• Keine Ergebnisse gefunden

Network Flow Problems Arising From Evacuation Planning

N/A
N/A
Protected

Academic year: 2021

Aktie "Network Flow Problems Arising From Evacuation Planning"

Copied!
205
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Arising From Evacuation Planning

vorgelegt von Diplom-Mathematiker

Daniel Dressler Speyer

Von der Fakult¨at II - Mathematik und Naturwissenschaften der Technischen Universit¨at Berlin

zur Erlangung des akademischen Grades Doktor der Naturwissenschaften

Dr. rer. nat. genehmigte Dissertation

Promotionsausschuss:

Vorsitzender: Prof. Dr. Peter Bank Berichter: Prof. Dr. Martin Skutella Berichter: Prof. Dr. Ekkehard K¨ohler

Tag der wissenschaftlichen Aussprache: 7. August 2012

Berlin 2012 D 83

(2)
(3)
(4)

Contents

0 Introduction 7

Outline and Contributions . . . 9

Collaborations and Previous Publications . . . 10

Acknowledgements . . . 11

1 Fundamentals 13 1.1 Complexity Theory and Approximations . . . 13

1.2 Graphs . . . 13

1.3 Shortest Paths . . . 14

1.4 Static Flows . . . 15

1.4.1 Static Flow Problems . . . 17

1.4.2 Working with Static Flows . . . 17

1.4.3 Multi-commodity Flows . . . 21

1.5 Flows Over Time . . . 22

1.5.1 ∆-constant Flows . . . 25

1.5.2 The Time-Expanded Network . . . 27

2 Earliest Arrival Flows and Their Computation 33 2.1 Background . . . 33

2.1.1 Modeling and Simulation . . . 33

2.1.2 Connection to MATSim . . . 35

2.2 Related Work . . . 37

2.3 Our Contribution . . . 39

2.4 Preliminaries . . . 39

2.5 Interval-Based Successive Shortest Paths . . . 44

2.5.1 Assumptions . . . 45

2.5.2 Storing Intervals . . . 46

2.5.3 Shortest Paths in the Time-Expanded Network . . . 47

2.5.4 Propagating Intervals . . . 48 2.5.5 Improvements . . . 59 2.5.6 Pseudo-Code . . . 67 2.5.7 Implementation Details . . . 72 2.6 Computational Results . . . 76 2.6.1 Rounding . . . 76 2.6.2 Instances . . . 77

2.6.3 Settings for Our Algorithm . . . 94

(5)

2.6.7 Conclusion from Computational Results . . . 118

2.7 Using the Solution . . . 120

2.8 Outlook . . . 125

2.8.1 Meta-Heuristics . . . 125

2.8.2 Holdover . . . 125

2.8.3 Time-dependent Capacities and Travel Times . . . 126

2.8.4 Warm-Starting the Path Search . . . 127

2.8.5 Alternatives to the Path Search . . . 127

2.8.6 Shelters . . . 128

3 Flows with Aggregate Arc Capacities 131 3.1 Related Work . . . 133

3.2 Our Contribution . . . 134

3.3 Preliminaries . . . 134

3.3.1 Aggregate Arc Capacities . . . 134

3.3.2 Discrete Bridge Flows and Time-Expansion . . . 135

3.3.3 Complexity and Integrality . . . 137

3.4 Approximation Scheme with Resource Augmentation . . . 144

3.5 Outlook . . . 149 4 Confluent Flows 151 4.1 Related Work . . . 153 4.2 Our Contribution . . . 155 4.3 Preliminaries . . . 155 4.3.1 Outerplanar Graphs . . . 157

4.3.2 Tree Decompositions and Treewidth . . . 158

4.3.3 Bounding the Complexity . . . 162

4.4 Polynomial Algorithm for Outerplanar Graphs . . . 166

4.5 Approximation Scheme for Bounded Treewidth . . . 177

4.5.1 Dynamic Program . . . 178

4.5.2 Computing the Tables . . . 181

4.5.3 Deriving the Approximation Scheme . . . 185

4.6 Outlook . . . 187

Bibliography 191

(6)
(7)

Introduction

We study how network flow theory can aid in evacuation planning. Our goal is to optimize the routes taken out of the endangered areas such that the evac-uation can finish more quickly. This is of uttermost importance for scenarios like tsunami warnings, where the disaster might only be minutes away. The mathematical perspective can help directing people to safety while avoiding bottlenecks in the infrastructure. Similar considerations apply for large public buildings, which must be quickly evacuated in case of a fire or other threats.

Note that we strictly consider an evacuation where the goal is to empty a certain area, even though in some cases disaster response forces might need to enter the area at the same time. Also, the goal always is to find an optimum plan in advance. This is opposed to managing an on-going evacuation.

The models we consider come from network flow theory, a sub-field of com-binatorial optimization. Flows have a long and successful history in logistics. On the sliding scale of intricate versus simple traffic models, they are about as simple as possible. Their advantage is that, like in all of combinatorial optimization, this makes it possible to find a global optimum solution, which accurately analyzes “the big picture”. It is important to realize that essentially any traffic model contains the flow model. If we do not understand flows and how to deal with them, complex models might degrade to simulations which offer little optimization potential. On the other hand, the apparent simplicity of flows hides their full potential. Many interpretations of flows have been suggested that add features from more elaborate traffic models, while still enabling global optimization.

Flows require a network describing the instance. In case of a city, this is typically a graph that closely resembles a map of the city. The arcs represent streets. They are modeled with transit times derived from the lengths of the streets and capacities depending on the widths. The vertices of the graph are the intersections. The sources are special vertices that represent the initial positions of the evacuees. The sinks are vertices for areas that are considered

safe. We assume that this network is already available. In our case, we

obtained real-world data from related projects.

A flow over time moves flow units from the sources to the sinks along the arcs of the network. A flow unit entering an arc reaches the other end of the arc after the transit time has passed. The capacities limit the number of flow

(8)

units entering an arc at the same time. Because a flow over time tracks the flow units in time as well, it can differentiate between flow units reaching a bottleneck simultaneously or one after another.

As we said above, one goal is to find a flow over time that minimizes the time until all flow units have reached the sink, that is, until all evacuees are in safe areas. A classic result shows that there can be an even better answer to this evacuation problem: The best imaginable flow over time is one that ensures that at any point in time already the maximum number of flow units have reached the sinks. Such a flow has the following properties: The first evacuees arrive in safe places as early as possible; the average time to safety is minimized; and the evacuation finishes as early as possible. The full effect of such a plan can also be summarized like this: If the disaster should strike at any time before the evacuation is completed, the maximum number of people have reached safety by then.

Solutions of this kind are called earliest arrival flows in the mathemati-cal literature. Their existence is only guaranteed if all safe areas can accept sufficiently many evacuees. This is the case, for example, when people exit a building.

We develop a fast algorithm for computing earliest arrival flows under this assumption that all safe areas are sufficiently large. This algorithm is ideal for being included in evacuation planning software because the good performance allows accurate models without technical concerns. When modeling buildings, the algorithm is fast enough to allow almost immediate feedback to the user. Another benefit of its increased performance over existing algorithms is that more variations of the same scenario can be evaluated, for example, to study the effects of a fire breaking out at varying places if such data is available.

We now turn to variant flow models which add desirable options for evacua-tion planning. However, these models have algorithmic challenges that prevent their use in practice yet. Therefore, our focus is clearly on their mathematical analysis and on developing first algorithms, which form the basis for possible further advances.

The first of these variations is a recently proposed model for flows over time called flows with aggregate arc capacities. This new model allows, among other things, bounding how much flow can be traveling on an arc at the same time. For example, this can represent a load limit on a bridge or a limit on the number of cars simultaneously in a tunnel, as opposed to treating these structures like any other street.

We discuss the substantial differences between flows with aggregate arc capacities and standard flows over time. We also provide a fully polynomial-time approximation scheme, that is, an algorithm that can solve the considered flow problem with any desired accuracy in polynomial time. However, due to many remaining algorithmic challenges, this model can probably not be applied on large-scale instances just yet.

Finally, we want to express the effects of emergency exit signs on the flow of evacuees if all evacuees observing the sign move into the same direction. This leads us to confluent flows. In such a confluent flow, all flow units ar-riving at the same vertex have to continue into the same arc. The challenge

(9)

then lies in choosing the right arc at each vertex, or equivalently, the right direction for the exit sign. Similar principles are commonly used for routing in telecommunication networks.

Specifically, we want to find confluent flows that send the maximum amount of flow, but in the simpler model without time. We have to solve this first, be-cause this is a subproblem needed to determine a confluent flow over time that minimizes the time needed. Progressing through complexity considerations for this problem, we first present brute-force algorithms for less challenging cases. We then develop a novel polynomial-time algorithm if the network has a cer-tain structure, namely, if it is outerplanar (a planar graph where all vertices lie on the outer face). This is significant because this case borders on other network structures for which no polynomial-time algorithm is expected to ex-ist. We complement this with an approximation scheme than can solve this problem on much larger graph classes with arbitrary precision.

Outline and Contributions

Chapter 1 contains the Fundamentals, mostly flow theory, that are used

throughout this entire work. Its main purpose is to state definitions and

introduce the notation we use. Many professional readers will be able to skip large parts of this. Should the definition of a symbol be needed, the Index helps to locate it.

The definitions unique to a chapter are given in the Preliminaries section of each chapter along with further material, like complexity considerations, to familiarize everyone with the topics at hand.

Chapter 2 deals with Earliest Arrival Flows and Their Computa-tion. Earliest arrival flows are flows over time with minimum total travel time and other desirable properties. As this model is well-studied from a theoreti-cal point of view [49], we focus on the development of an algorithm for large real-world instances. The algorithm is based on the successive shortest path algorithm, specialized to the repeating nature of the time-expanded network and typical instances. One central idea is to consider copies of the same vertex across multiple time layers at once when determining a shortest path.

The computational results show that we achieved our design goals: Our algorithm works very well on real-world instances — the larger, the better. We match the performance of all competitors on the largest real-world instances modeling cities, and significantly outperform them on the subset of instances modeling large buildings. This makes our algorithm particularly suitable for inclusion in evacuation planning software for buildings, where our performance gains allow near-instantaneous feedback or evaluating multiple scenarios of the same instance.

Chapter 3 is on Flows with Aggregate Arc Capacities, which are flows over time where capacities bound the flow into each arc within a sliding time window. This model was recently introduced by Melkonian [70], who showed first NP-hardness results. We generalize the model by uncoupling the length of the sliding windows from the transit times of the arcs, and show how this model generalizes standard flows over time.

(10)

We first discuss weak and strong flow conservation for our generalized model, as well as the complexity of the problem under various settings. Our findings differ a lot from the standard flow over time model.

The main contribution in this chapter is our fully polynomial-time approx-imation scheme (FPTAS), which computes solutions that require a violation of the capacities and the time horizon by the approximation factor. The arc costs and the lengths of the sliding windows are considered exactly, though. The correctness proof requires adapting the flow globally to rounded transit times. This is an extension of a technique by Fleischer and Skutella [27].

Chapter 4 discusses Confluent Flows, which impose a natural restric-tion on static flows by allowing only one outgoing arc to carry flow at each vertex. We consider the maximum confluent flow problem, because we think of maximizing the flow value as the most fundamental problem.

Recent works by Chen et al. [12, 13] explore minimizing the congestion of a confluent flow, but they omit arc capacities from their analysis. We allow arbitrary arc capacities, which is much more typical for flow problems. Our complexity discussions let us isolate interesting and challenging cases for the maximum confluent flow problem.

We then develop a polynomial algorithm for computing the maximum con-fluent flow value on outerplanar graphs with a single sink. We argue that this is an important non-trivial case. While presented as a dynamic program, the tables require pseudo-polynomially many entries, for which we find an efficient encoding.

We also detail an FPTAS for maximum confluent flows with arbitrary ter-minals on graphs with bounded treewidth. We conjecture that a combination of the two approaches results in polynomial algorithms for all possible graph classes for which the maximum confluent flow problem with a single sink is tractable.

Collaborations and Previous Publications

Several parts of this work were jointly developed and have been previously published in some way.

Chapter 2 is mostly unpublished. Preliminary results appeared in a short conference submission with Gunnar Fl¨otter¨od, Gregor L¨ammel, Kai Nagel, and Martin Skutella [20]. Some of the general ideas on evacuation modeling and how to use the computed solution can also be found in [21], which has a different focus than this chapter, though.

The approximation scheme for flows with aggregate arc capacities in Chap-ter 3 was joint work with Martin Skutella and has been published in [22]. Our presentation here extends the complexity analysis of this new flow model and aims to clarify the main proof.

The results in Chapter 4 on confluent flows were joint work with Martin Strehler. The chapter is based on our publication [24] and a pending sub-mission [23]. These were also included in his dissertation thesis [88]. Various changes have been made here, in particular, the approximation scheme pre-sented in [24] was completely overhauled to simplify the technical proofs.

(11)

Acknowledgements

This thesis only exists thanks to a lot of people and their support. My advi-sor/supervisor Martin Skutella was a source of knowledge and helpful nudges. Ekkehard K¨ohler took it upon him to assess this thesis, too. Martin Strehler was an indispensable coauthor since the first calculus course. Actually, ev-eryone else from the Adaptive Verkehrssteuerung (Adaptive Traffic Control) project [1] was great, too. The project meetings were a wonderful opportunity to exchange ideas. This project, granted by the German Federal Ministry of Education and Research, was also the main source of my funding.

I’m also indebted to “my” students, in particular: Manuel Schneider wrote a lot of the code for the algorithm in Chapter 2. Matthias Rost involuntar-ily ended up debugging our code while writing his Bachelor thesis. He also provided the Berlin instance for testing. With Martin G¨unther we seriously started the work towards the bridge flow model in Chapter 3. Finally, Stefan M¨uller was a great partner to discuss confluent flows and related models.

The hardest part near the end had my proofreaders, though: Jos´e Verschae read the bridge flow article in the frantic hours before the submission deadline and later Chapter 3 for this thesis. He also had many insightful comments on the introduction. Jan-Philipp Kappmeier and Martin Groß checked Chapter 2 and have been a source of evacuation knowledge for a couple of years now. Jannik Matuschke took on the quite technical Chapter 4. I hope our friendship did not suffer too much.

Of course, many more people helped me “endure” the daily academic life (and occasionally without quotation marks). There are so many to name for so many good reasons that I couldn’t shorten the list to a reasonable length. Thank you all.

To my family, I say: Thanks a lot for your support and the many ways in which you always encouraged me over the last three decades and especially the last year.

Finally, Janina M¨uttel proofread the entire thesis. There is more to say, but nothing she would not already know.

(12)
(13)

Fundamentals

1.1

Complexity Theory and Approximations

We will make use of the following notions: For running times of algorithms, we consider the categories polynomial, strongly polynomial, as well as pseudo-polynomial, and exponential. We consider our algorithms in the model of a Random Access Machine. This model is similar enough to a modern PC for our purposes that we do not distinguish the two. For precise definitions, we refer to the book by Schrijver [82].

From complexity theory, we use the classes P and NP extensively, as well as NP-hard, NP-complete, and strongly or weakly NP-complete. A thorough introduction to complexity theory concerning NP is the book by Garey and Johnson [36].

We study approximation algorithms, and we say that an algorithm that solves a maximization problem is an α-approximation if it always produces a value of αOPT or better, where OPT is the respective maximum value of the given instance. A fully polynomial-time approximation scheme (FPTAS) is an algorithm that, for every parameter ε > 0, is an (1 − ε)-approximation that runs in time polynomial in the input and ε−1.

One of the many existing complexity results that we want to point out for later usage, is that linear programs can be solved in polynomial time, first shown by [55].

1.2

Graphs

Throughout this work we consider finite graphs. Usually, we will denote a directed graph by G = (V, A). For an arc a ∈ A, let tail(a) denote its start-vertex and head(a) its end-start-vertex. There may possibly be loops and parallel arcs. Because of the latter, the arc set is technically a multi-set, but we still refer to it as arc set and to arcs by their tail and head (v, w). It will be

clear from the context which arc is meant. For v ∈ V , we use δin(v) :=

{a ∈ A : head(a) = v} and δout(v) := {a ∈ A : tail(a) = v} for the set of

arcs entering and leaving v, respectively. Undirected graphs have an edge set E instead of the arc set A, and the set of incident edges is simply δ(v). The undirected version of a directed graph is obtained by removing the directions of

(14)

the arcs and unifying parallel edges. A directed version of an undirected graph introduces a direction for each arc. The bidirected version of an undirected graph introduces two opposing arcs for each edge. The induced subgraph of G = (V, A) on the vertex set V0 ⊆ V is denoted by G[V0], and we use A[V0] for the arc set of G[V0].

A walk W = (a1, . . . , ak) is a finite sequence of arcs that fit head to tail to

each other. We use tail(W ) and head(W ) as shortcuts for the tail of the first and head of the last arc, respectively. A walk is said to be closed if its tail and head coincide. A path is a walk which passes through each vertex at most once, while a cycle is a closed walk that uses each vertex at most once with the exception of the joint, which occurs exactly as the tail and head. We will use V (W ) and A(W ) for the (multi-)set of vertices and arcs occurring in W .

1.3

Shortest Paths

A fundamental graph problem is asking for a shortest connection from one vertex to another. For this, the length (or cost) of the arcs is given by a function c : A → R, and the cost of a walk W , c(W ), is the sum of the costs of each arc along the walk, that is c(W ) := P

a∈A(W )c(a). Given a

start vertex v and a target vertex w, one asks for a shortest path P from v to w. Assuming that there is a path from v to w at all, such a shortest path always exists because there can only be a finite number of paths in a finite graph. However, the complexity of finding such a shortest path depends on the cost function and ranges between N P -hard and “easy enough” to be ubiquitous in modern life. The fundamental distinction for determining the complexity is whether the cost function admits a negative directed cycle. It is easy to see that using a cost function that assigns -1 to all arcs includes the problem of finding a path with the maximum number of arcs between v and w, which is N P -hard [36]. If no negative cycle exists, the cost function is called conservative. While conservative costs make the problem tractable, many algorithms are designed for the further restricted case of non-negative cost functions.

We will only need to compute distances from one vertex to many others here as opposed to the all-pair shortest path problem. Thus, we denote the shortest path distance from the starting vertex to some vertex w by dist(w) without explicitly mentioning the starting vertex as it will be clear from the context.

Dijkstra’s algorithm [17] is the classical algorithm for computing shortest paths with a single starting vertex when the cost function is non-negative. If the cost function can have negative entries, the Moore-Bellman-Ford algo-rithm [7,28,74] either detects a negative cycle or returns a shortest path. Both run in polynomial time, and Dijkstra’s algorithm in its modern version even achieves a very respectable running time of O(|V | log |V | + |A|) [32]. Both algorithms maintain labels on the vertices, label(·), which are upper bounds on the shortest path lengths dist(·) and get adjusted during the execution. If label(w) = dist(w), this label is called exact. The algorithms end when the

(15)

labels for all target vertices are known to be exact.

Shortest path computation is an entire sub-field of computer science in its own, though, and many improved algorithms exist. See Delling et al. [16] for an introduction to this field with an emphasis on road networks. But we have no need for typical shortest path algorithms in this work. Our successive shortest path algorithm in Chapter 2, that would be the obvious application, is quite specialized and needs to solve only a simpler problem than computing shortest paths.

1.4

Static Flows

The classic book on flows is the one by Ford and Fulkerson [30], a more modern introduction is given by Ahuja et al. [2]. For a broad theoretical approach, see Schrijver [82].

While there is a general agreement what properties a flow should have, we sometimes need to use objects that are not quite flows. Hence, the following definition of a flow is modular. In its most general form for our purposes, a flow function is simply a real-valued function on the arc set, say, x : A → R. Most settings consider non-negative arc capacities, u : A → R≥0. Often a graph

with its associated capacity (and maybe additional parameters) is called a network. A flow function is feasible if 0 ≤ x(a) ≤ u(a) for all arcs a ∈ A. From this, we can derive the inflow into a vertex, the outflow, and its balance which is the net flow out of a vertex.

inflow(v) := X a∈δin(v) x(a) outflow(v) := X a∈δout(v) x(a)

bal(v) := outflow(v) − inflow(v)

A flow function satisfies flow conservation at v, if bal(v) = 0 and this is the usual assumption for a vertex. But a source vertex may also have a positive balance (i.e, may send new flow into the network), while a sink vertex may have a negative balance (remove flow from the network). We denote the set of sources with S+ and the sinks with S−. Combined, they form the set of

terminals. Assuming S+∩ S− = ∅ is only natural and lets us bypass some

exceptional cases later on. We then call a feasible flow function that satisfies flow conservation at all non-terminals and has non-negative balance at each source and non-positive balance at each sink a flow . The value of a flow x is the sum of flow reaching the sinks, i.e.,

val(x) := − X

v∈S−

bal(v).

Due to flow conservation at the non-terminals, one can also express this as

val(x) =P

v∈S+bal(v).

Often we will want to further limit the balance of terminals. For this, we

(16)

directed arc antiparallel arcs = edge (undirected) (a) non-terminal

sources with supplies sink with demand

3/7

flow 3 out of capacity 7 1

−1

1

residual backwards arc

(b)

Figure 1.1: Our standard drawing style for graphs and flows. Note that unless otherwise noted we consider single-commodity flows. Sources are only distinguished by colors to trace flow units more easily. We will omit various aspects, for example exact supplies/demands or residual arcs, when they do not contribute to the drawing. Costs and other parameters will be added as necessary.

have negative values d(v) ≥ 0, while all sinks v ∈ V must have non-positive d(v) ≤ 0. We will often talk about the supply of a source and the demand of a sink and mean the absolute values in that case. Non-terminals must have 0 supply/demand.

We say that a flow function satisfies the supplies/demands d if d(v) = bal(v) holds for all vertices v. Flow conservation implies that a flow can only

satisfy supplies/demands d if P

v∈V d(v) = 0, i.e., when the sources want to

send exactly as much flow as the sinks can accept. We will call such a flow a transshipment for the supply/demand function d.

A weaker condition only requires that sources do not exceed their

sup-plies while sinks do not exceed their demands. We say a flow obeys the

supplies/demands d if the flow satisfies some supplies/demands d0 such that

0 ≤ |d0(v)| ≤ |d(v)| for all v ∈ V without changing the roles of sources

and sinks. Conversely, a flow always obeys some “infinite” supplies/demands, where infinite can be replaced by trivial bounds on the flow value in all our applications.

Finally, the graph might have an associated arc cost c : A → R, which defines a cost per unit of flow. The cost of a flow function is then

cost(x) := X

a∈A

(17)

1.4.1 Static Flow Problems

With this notation available, we can define some common flow problems. Problem 1.1 (MaxFlow).

Input: A digraph G, arc capacities u, sources S+, sinks S−, and a matching supply/demand function d.

Question: What is the maximum value of a flow obeying d? Problem 1.2 (MinCostFlow).

Input: As for MaxFlow, also arc costs c.

Question:What is the minimum cost of a maximum flow?

Instead of asking for a maximum flow, one could also ask for the exis-tence of a transshipment or a transshipment of minimum cost. If the set of sources is a singleton or if the demands imply only a single source, we call this the single-source version of the problem. Similarly, there are single-sink

versions. Actually, the single-source single-sink MinCostFlow problem

is general enough to model the other problems by introducing a supersource and a supersink. The supersource is a new vertex s∗+with supply equal to the total supply of the sources. For each original source s+, we introduce a new arc (s∗+, s+) with capacity d(s+) and cost 0. Then the supply of s+ is set to 0. Similarly, a supersink s∗ captures all flow from the various sinks, which become normal vertices. It is easy to see that the maximum value of a flow remains unchanged, and the costs of the solutions are also not affected.

The MinCostFlow problem becomes NP-hard under the same condition that makes shortest paths NP-hard, namely that the cost function admits a negative directed cycle. Otherwise, these static flow problems can be solved in polynomial time, even very quickly in theory and practice. Indeed, they have become routine in many application areas. See Table 1.1 for some results on possible running times, but there are many other specialized algorithms. We will give some intuition into the classical algorithms in the following section.

1.4.2 Working with Static Flows

Path decompositions and related concepts are a key ingredient in large parts of this work. Given a path P = (a1, . . . , ak) and some non-negative dP ∈ R,

we can send dP units of flow along P . This defines a flow function

xP(a) :=



dP if a ∈ A(P ),

0 else.

Since we used a path (in contrast to a walk), each arc in P occurs only once and therefore the balance of tail(P ) is dP, that of head(P ) is −dP and any other

vertex has balance 0. Assuming feasibility, we call xP a path flow. Similarly,

for a cycle C, one can define a cycle flow xC as dC on the arcs in C, and 0

elsewhere. This is a flow that satisfies flow conservation at all vertices and has no source or sink. Path and cycle flows let us trace the flow units in the network. They are the essential building blocks of flows, as demonstrated by the following theorem:

(18)

MaxFlow problem

algorithm running time comment

path augmentation O(val m) Ford, Fulkerson [30]

shortest path augmen-tation

O(nm2) Edmonds, Karp [25]

blocking flow O(n2m) Dinic [18]

(improve-ments exist)

push-relabel better than O(nm log n) e. g., King et al. [56]

MinCostFlow problem

algorithm running time comment

successive shortest path O(nm + val(m + n log n)) Edmonds, Karp [25]

minimum-mean cycle

canceling

O(m3n2log n) Goldberg, Tarjan [40]

cost-scaling O(nm log(n2/m) log(nC)) Goldberg, Tarjan [41]

cs2 (scaling

push-relabel)

O(n2m log(nC)) Goldberg [39]

mcf (network simplex) practical, not polynomial L¨obel [64, 65]

(polyno-mial variants exist)

Table 1.1: Some algorithmic results for static flow problems. For brevity, we denote n = |V |, m = |A|, C = the maximum cost, val = the maximum flow value. All data must be integral.

Theorem 1.3 (Ford and Fulkerson [30]).

Let G = (V, A) be a graph with capacities u. Let x be a flow. Then there is a set of paths P with positive constants dP ∈ R for P ∈ P, and a set of cycles C with

positive constants dC ∈ R for C ∈ C, such that |P| + |C| ≤ |{a ∈ A : x(a) > 0}|

and x ≡ X P ∈P xP + X C∈C xC.

The paths can be chosen such that tail(P ) is a source and head(P ) a sink of x for all P ∈ P.

The proof is constructive, repeatedly subtracting a path flow for some source-sink-pair from the flow. Any remaining flow cannot have a source or sink and thus can be similarly decomposed into cycle flows. There is also an opposite modification. One can add a path or cycle flow to an existing flow, assuming that the arc capacities allow this. More generally, the balance of a vertex depends linearly on the flow function, so it is trivial to add, subtract or scale flow functions and determine the effect of this on the balances and feasibility, as well as costs.

So the path decomposition also suggests a way to construct a flow: Simply add path and cycle flows to an existing flow until the desired flow is reached. This approach, however, depends on the ability to undo flow (and “bad de-cisions”) when adding a path, which is not required for decompositions. The

(19)

notion of the residual network allows just that. Given a feasible flow function x, the residual network Gx = (V, Ax) of G has the same vertex set V . We

will define its arc set shortly. First, let us introduce forward and backward

arcs. For each arc a = (v, w) ∈ A, there can be a forward copy, which is a

itself, and a backward copy ←−a = (w, v). (This backward arc is meant to be distinct from any existing arc (w, v).) They form the set of possible forward arcs A and backward arcs ←A , respectively. The cost function is extended to− the backward arcs with c(←−a ) := −c(a). The capacities of these arcs are only defined with respect to some feasible flow function x, resulting in the resid-ual capacity ux. For a forward arc this is ux(a) := u(a) − x(a), while the

residual capacity of a backward arc is ux(←−a ) := x(a). The residual network

then uses these capacities ux and the extended costs c on the arc (multi-)set

Ax:= {a ∈ A ∪

←−

A : ux(a) > 0}.

A new flow function x0 on the residual network represents changes that can be applied to the flow x. Flow on forward arcs can be added to x, while flow on backward arcs can be subtracted from x. This is called augmenting x with

x0. There are well-known optimality conditions based upon augmentation,

which further specify that we need only look for augmenting paths or cycles. Similar theorems can be found in many textbooks.

Theorem 1.4 (Ford and Fulkerson [30], Edmonds and Karp [25]).

Let G = (V, A) be a graph with capacities u and costs c, and let x be a flow for the sources S+ and sinks S−.

1. Flow x is a maximal flow in G for some obeyed supply/demand function d if and only if there is no path in Gx from s+∈ S+ with bal(s+) < d(s+)

to s−∈ S− with | bal(s−)| < |d(s−)|.

2. Flow x has minimum cost among all flows satisfying the same sup-plies/demands as x if and only if there is no directed cycle with negative total cost in Gx.

If, however, such path or cycle exists, we can send some flow x0along it and change the flow x towards optimality. The maximum amount of flow we can send is the bottleneck capacity of the path or cycle with arc set A0 ⊆ A ∪←A ,− that we define as umin(A0) := mina∈A0ux(a). The actual augmentation is

demonstrated in the following theorem: Theorem 1.5 (Ford and Fulkerson [30]).

Let G = (V, A) be a graph with capacities u and costs c. Let x be a flow satisfying some demands d. Let x0 be a flow in Gx satisfying some demands d0

with the same sources and sinks as x. Extend x0 with 0 to all possible forward or backward arcs. Let ¯x be x augmented by x0 as follows:

¯

x(a) := x(a) + x0(a) − x0(←−a ).

Then ¯x is a flow satisfying supplies/demands d + d0. If x is a minimum cost flow for d in G and x0 a minimum cost flow for d0 in Gx, then ¯x has minimum

(20)

This theorem proves the correctness of the classical Ford-Fulkerson algo-rithm [30] for the MaxFlow problem: It iteratively looks for a path between a suitable source and sink and augments flow along it. It only has a pseudo-polynomial running time. The Edmonds-Karp algorithm [25] improves upon this by augmenting along a path with the minimum number of arcs each, which can be found by a breadth first search. It achieves a polynomial running time. The classic successive shortest path (SSP) algorithm extends these maxi-mum flow algorithms to solve the MinCostFlow problem with non-negative costs and forms the basis for our work in Chapter 2. Recall that the single-source single-sink MinCostFlow problem is general enough to represent all the problems we mentioned. There are actually two goals in there: Maximiz-ing the amount of flow and minimizMaximiz-ing the cost. The SSP algorithm works on these two goals simultaneously, iteratively increasing the flow value while maintaining that the flow has minimum cost for this value. It starts with the zero flow x ≡ 0. By Theorem 1.4, if the flow x does not have maximum value, we can find a path P that can be added to it. If one chooses a shortest path P∗ in the residual network, any path flow x0 along P∗ is also a minimum cost flow for its value. Thus, if we augment x by the path flow x0, we obtain a flow with greater value and still with minimum cost.

The basic version of this is shown as Algorithm 1.1. The correctness de-pends on the initial zero flow x being a minimum cost flow for supply 0. This is true because there are no backward arcs in the residual network of the zero flow and no negative cycles because all arc costs are non-negative. Then, in each iteration, the flow is increased along a shortest path in Gx without

ex-ceeding supplies/demands or capacities. This maintains the optimality for the current flow value as described in Theorem 1.5.

The following theorem summarizes the properties of the SSP algorithm that we will need:

Theorem 1.6 (Edmonds and Karp [25]).

Let the input of the SSP algorithm consist of a digraph G = (V, A), capacities u : A → Z≥0, costs c : A → Z≥0, supersource s∗, supersink s=, with supply,

respectively, demand d ∈ Z≥0. Then the following hold true:

1. The shortest path distances from s∗ to any other vertex in the respective residual networks never decrease from one iteration to the next. In par-ticular, the length of the paths never decreases from one iteration to the next.

2. There are at most d iterations and the running time is dominated by the shortest path computations in the residual network.

3. The algorithm is correct.

The running time of this algorithm, however, is only pseudo-polynomial. While the shortest path computation can be done efficiently, because there can never be any negative cycles in Gx if x has minimum cost, the algorithm

(21)

Algorithm 1.1: The basic successive shortest path algorithm. input : Digraph G = (V, A), capacities u : A → Z≥0, costs

c : A → Z≥0, supersource s∗ with supply d ∈ Z≥0, supersink s=

with demand d

output: Flow x with minimum cost among all maximum value flows obeying d

1 x := 0 // start with the empty flow

2 while d > 0 do

3 P := shortest s∗-s=-path in Gx

4 if P = ∅ then return x // cannot send all supply

5 γ := umin(P ) // bottleneck capacity of P in Gx

6 γ := min{γ, d}

7 augment x by γ on P

8 d := d − γ

9 return x // satisfied supply

capacities. There are instances known which exhibit this pseudo-polynomial running time [91].

Further improvements to the SSP algorithm achieve a polynomial running time using the general concept of capacity scaling. Observe that an exponential running time can only occur in the SSP algorithm if the network contains paths with exponential capacities. By considering only arcs with large capacities, such paths can be found efficiently. Further iterations also consider residual arcs with smaller and smaller capacities. The actual algorithms can be found

in many textbooks [2, 62]. We do not delve any deeper into this because

capacity scaling is unlikely to help with the instances we consider in Chapter 2, as described in our assumptions in Section 2.5.1 and the description of the instances for the computational results in Section 2.6.2.

This leaves the shortest path computation as the core component of the SSP algorithm. This is an open invitation to adapt this part to the task at hand, and we will do so extensively in Chapter 2.

Note that from this algorithm one can see that the flow problems consid-ered so far always have integral solutions:

Theorem 1.7 (Dantzig and Fulkerson [15]).

The MaxFlow and MinCostFlow problems for integral input data have an integral optimum solution.

1.4.3 Multi-commodity Flows

Many applications distinguish multiple types of flow units, for example, vari-ous goods or people with different origins and destinations. This often cannot be expressed as a single flow, not even with multiple sources and sinks, as there is no rule enforcing that flow units from a certain source head to a certain sink. The common solution is to consider multi-commodity flows. This simply splits the problem into multiple flows xk, one for each commodity k in some set K.

(22)

Typically, each commodity also has their own set of sources Sk+, sinks Sk

and supplies/demands dk. There may be commodity-dependent costs and

arc capacities as well. There is essentially only one thing linking these flows: The sum of the flow functions has to obey certain arc capacities. Except for this condition, the problem could be decomposed into independent flow problems. From an algorithmic point of view, multi-commodity problems are harder than static flow problems, but can still be solved with linear program-ming in polynomial time, even in strongly polynomial time because of their special structure. They do exhibit other properties than single-commodity flows, though. For instance, the integrality guarantee by Theorem 1.7 does not hold in the setting with multiple commodities. The textbook by Schri-jver [82] includes many examples where multi-commodity behave differently than single-commodity flows.

1.5

Flows Over Time

As we have seen, a static flow only describes which paths are taken. But in many applications, it is necessary to examine more closely how flow moves along these paths: One needs to describe the flow at each moment and how it develops over time. This concept of a flow over time goes back to Ford and Fulkerson [29] (who used the term dynamic flows). Skutella gives a compact introduction to this field [86].

Given a graph G = (V, A), a flow over time function is a function f :

A × R≥0 → R that denotes the flow rate entering each arc at each point in

time. For notational simplicity, we always assume that the domain of the

flow functions is extended to the negative times with value 0. Capacities in the flow over time setting limit these flow rates on the arcs. Given enough time, an arbitrary amount of flow units could still pass through an arc. For our general model, we allow these capacities to change over time, that is, the arc capacities are of the form u : A × R≥0 → R≥0. A flow over time function

is feasible, if 0 ≤ f (a, t) ≤ u(a, t) for all a ∈ A and all t ∈ R≥0. For technical

reasons, we also require that f (a, ·) and u(a, ·) are Lebesgue-measurable for every arc a ∈ A, and we will soon see that we can usually restrict ourselves to simpler flow functions as well.

The most important rules that govern how a flow over time changes stem from the transit time (or length) that each arc has. These transit times could be time-dependent themselves, but here we will assume that they are constant over time, and capture them in a parameter τ : A → R≥0. Their interpretation

is that if flow enters the tail of arc a at time t at rate f (a, t), then flow leaves the head of a at time t + τ (a) at the same rate f (a, t).

Similar to a static flow, we can define the balance of a vertex v at each time t as the net flow rate out of v:

bal(v, t) := X

a∈δout(v)

f (a, t) − X

a∈δin(v)

f (a, t − τa).

It is certainly possible to require that bal(v, t) = 0 for all times t and all non-terminal vertices v 6∈ S+∪ S−. This is in concordance with static

(23)

flows, and we call this strong flow conservation. There is a viable alternative, though: Flow units might be allowed to wait at vertices. This is called weak flow conservation or holdover. To define it properly, we need the excess of a vertex, that describes how much flow has already entered but not left a vertex v by time t:

excess(v, t) := − Z t

0

bal(v, θ)dθ.

With strong flow conservation, there can never be any excess at non-terminal vertices. In contrast, for weak flow conservation, we only require excess(v, t) ≥ 0 for all times t and all non-terminals v. That is, the vertex can always send out stored flow but must not send out flow when nothing is stored. The amount of flow that can be stored is infinite by default. (It is natural to put an upper capacity on the amount of storage at a vertex, but we will not use this enough to justify unique notation for it.)

We still need to define the behavior of sources and sinks. Like in static flows, flow units originate at sources and vanish at sinks. If we require strong flow conservation for non-terminals, it is appropriate to demand bal(v, t) ≥ 0 for a source v and bal(v, t) ≤ 0 for a sink v and for all times t. In the case of weak flow conservation, a sink may store incoming flow for a while but then send it onwards, so that the balance might first be negative and then becomes positive. Thus, the balance of a sink can have either sign in the case of weak flow conservation, and the same holds for sources. So there is no immediate restriction on the balance of a terminal for weak flow conservation.

For both alternatives, how much flow has already left a source, respectively, reached a sink, is expressed by the excess of the terminal. As in static flows,

there can be supplies/demands d : V → R≥0, which must be non-negative

for sources, non-positive for sinks and 0 for non-terminals. A source v obeys supply d(v) if − excess(v, t) ≤ d(v) for all times t, while a sink v with demand |d(v)| simply has to obey excess(v, t) ≥ 0 for all t, just like a non-terminal vertex under weak flow conservation. When we evaluate the flow at some

given time T ∈ R≥0, we can then determine if the supplies/demands have

been satisfied: Is excess(v, T ) = −d(v) for all sources and sinks v ∈ S+∪ S−? A problem arises when flow functions continue forever: Whatever we mea-sure at time T is irrelevant shortly after, which is why we want the flow to end after finite time. We say that a flow function has time horizon T ∈ R≥0 if the

network is “empty” for all t ≥ T . In particular, no flow is allowed to enter an arc at some time t ≥ T , that is f (a, t) = 0 for all t ≥ T , and no flow must leave an arc at time t ≥ T , which can be expressed as f (a, t) = 0 for all t ≥ T − τa.

Additionally, no flow must be left in storage at a non-terminal vertex at the time horizon T , so excess(v, T ) must be 0 for all v ∈ V \ (S+∪ S−).

With all this in place, we can define a flow over time: It is a feasible flow function that satisfies weak or strong flow conservation (depending on the context).

A flow over time with time horizon T satisfies the supplies/demands d if excess(v, T ) = −d(v) for all v ∈ V , in which case it is a transshipment over

(24)

time for this supply/demand function. It obeys the supply/demand function d, if it satisfies some demands d0, with |d0(v)| ≤ |d(v)| without changing the role of a vertex. The value of a flow with time horizon T is

val(f ) := X

v∈S−

excess(v, T ).

Note that we assume strong flow conservation in Chapter 2, while the main results in Chapter 3 require weak flow conservation. The following problem definitions can be made independently of this distinction, though, by simply referring to flows over time.

One can also define costs for flow over time functions. Like in static flows, there is a cost c : A → R attached to each arc, which has to be paid per unit of flow on that arc. (Some definitions also make c time-dependent.) The cost of a flow over time f is

cost(f ) :=X

a∈A

Z ∞

0

c(a)f (a, θ)dθ.

We could also attach costs to storage at vertices (the excess), but this leads to some difficulties for the sources and sinks and how they interact with excess. For example, a flow over time as defined here does not track explicitly what amount of the excess at a sink is considered to enter the sink and what might be sent on to another sink at a later point. This cost will be added in Section 2.4, though, where waiting has the same cost no matter where it occurs. That section will also work on the time-expanded network (see below), which has no such ambiguity.

As in the static case, there are some standard problems considered for flows over time. These extend the static problems by fixing or minimizing the time horizon.

Problem 1.8 (MaxFlowOverTime).

Input: A digraph G, transit times τ , time-dependent arc capacities u. Sources S+, sinks Sfor a supply/demand function d. A time horizon T .

Question: What is the maximum value of a flow over time with time hori-zon T obeying d?

Problem 1.9 (MinCostFlowOverTime).

Input: As for MaxFlowOverTime, also arc costs c.

Question:What is the minimum cost of such a maximum flow? Problem 1.10 (QuickestTrans).

Input: A digraph G, transit times τ , and time-dependent arc capacities u. Sources S+, sinks S− for a supply/demand function d.

Question: What is the minimum time horizon for a transshipment satisfying the given supplies/demands?

Problem 1.11 (MinCostTransOverTime).

Input: As for MaxFlowOverTime, also arc costs c and a cost bound C. Question: Is there a transshipment over time with time horizon T satisfying d at cost ≤ C?

(25)

Note that flows over time also have a natural multi-commodity analogue. Like the static multi-commodity flows, multi-commodity flows over time are multiple flow problems linked by an overall capacity constraint on each arc.

We could proceed to define paths over time, the augmentation of flows over time and all the analogues from static flows. However, this is not really necessary, as we can reduce flows over time to static flows for almost all of our purposes by a construction called the time-expanded network, which was already used by Ford and Fulkerson [29]. The idea is two-fold: First of all, for our purposes we can replace a flow over time function by one with discrete time steps. Secondly, a copy of the original network is needed for each time step and the arcs are used to transport flow from one layer to the next according to the transit times. These copies are called time layers, and an arc a with transit time τ (a) transports flow from time layer representing t to one representing t + τ (a). We will define this in more detail in the next sections.

With the time-expanded networks, almost all flow over time problems can be reduced to pseudo-polynomially sized linear programs and often to static flow problems. This is probably the most common approach in practice as well. Fleischer and Skutella [27] give an FPTAS for the MinCostTransOver-Time that reduces the size of the time-expanded network. Problems that can be solved without the time-expanded network include the single-source single-sink MaxFlowOverTime problem, which can be reduced to a static MinCostFlow instance. Multiple sources or sinks change the problem (un-like in the static case), but there is a highly non-trivial polynomial-time algo-rithm by Hoppe and Tardos [49, 50]. Its running time is not practical though. The problem variants that include costs are (weakly) NP-complete even on series-parallel graphs [60], so the time-expansion is a reasonable approach.

1.5.1 ∆-constant Flows

To formally define the time-expanded network, we start out with the dis-cretization step. We assume that we are given a desired step size for the discretization ∆ ∈ R>0, that is suitable for the input data (as detailed below).

We quickly fix some notation for rounding: For r ∈ R we use dre∆ to

denote r rounded up to the next multiple of ∆. Analogously, brc∆ rounds

down to multiples of ∆. If ∆ is omitted, we assume ∆ = 1.

A function g : R → R is called ∆-constant if g restricted to [i∆, (i + 1)∆) is constant for all i ∈ Z. A flow over time function is ∆-constant if each f (a, ·) is. Thus, we need only dT /∆e values for each arc to describe a ∆-constant flow function with time horizon T .

We call ∆ admissible if τ (·) and the time horizon T (if given) are inte-gral multiples of ∆. The time-dependent arc capacities u(a, ·) have to be ∆-constant functions as well.

When dealing with ∆-constant flows for an admissible ∆, we can replace integration by summation in all expressions so far. The essential equality is

Z j∆ i∆ f (v, θ)dθ = j X k=i f (v, k∆) for all i, j ∈ Z.

(26)

General intervals from t1 to t2 can be linearly interpolated: Z t2 t1 f (v, θ)dθ =(dt1e∆− t1)f (v, bt1c∆) + Z bt2c∆ dt1e∆ f (v, θ)dθ+ + (t2− bt2c∆)f (v, bt2c∆),

with the remaining integral further to be replaced by the sum above.

As a side note, this setting of ∆-constant flows is essentially equivalent to discrete flows over time. However, in the interpretation of a discrete flow, the flow units travel in packets or impulses that take 0 time to enter or leave an arc (at what would be infinite rate) but may only do so at integral time steps. This introduces a few technical and notational differences to flows over time as we have introduced them, whereas ∆-constant flows do not need their own notation while still enabling the same algorithmic ideas as discrete flows.

Let us now show that restricting ourselves from general flows over time to those that are ∆-constant does not affect the solution quality of our problems if ∆ is admissible. Let f : A × R≥0→ R≥0 be a flow over time function. Then

we can define a flow f∆ that sends the average of what f sends in each time step: f∆(a, t) := 1 ∆ Z btc∆+∆ btc∆ f (a, θ)dθ ∀t ∈ R≥0 ∀a ∈ A .

This is clearly a flow over time function again. More importantly, it is feasible for the same capacities as f :

f∆(a, t) = 1 ∆ Z btc∆+∆ btc∆ f (a, θ)dθ ≤ 1 ∆ Z btc∆+∆ btc∆ u(a, θ)dθ ∗ = 1 ∆ Z btc∆+∆ btc∆ u(a, btc∆)dθ = u(a, btc∆) ∗ = u(a, t)

The equalities marked with an asterisk follow directly from u(a, ·) being con-stant within the interval [btc∆, btc∆+ ∆), which is required if ∆ is admissible.

Note that the behavior of the balance functions for f may be quite erratic in the case of weak flow conservation, changing sign very quickly. The balances induced by f∆ can still exhibit such behavior of changing signs, but they are at least ∆-constant.

Due to the averaging, there does not have to be a relation between balf(v, t)

and balf∆(v, t) for single values of t. However, the excess functions of the

ver-tices remain unchanged at each time t = i∆, i ∈ Z. That is, excessf∆(v, i∆) =

excessf(v, i∆) for all i ∈ Z. Since general integrals for f∆ can be linearly

(27)

the vertices at time t if it does so at times dte∆ and btc∆, which is

equiva-lent to asking this of f at these two points. Therefore, weak or strong flow conservation also carry over from f to f∆.

Note that if the original flow f has time horizon T and ∆ is admissible then the averaged flow f∆has time horizon T as well. By the same arguments, f∆satisfies (or obeys) the exact same supply/demand function at time T that f satisfies (or obeys) at time T . If a cost function is given, the cost is also unaffected by the averaging.

In summary, assuming ∆ is admissible, any flow f implies a ∆-constant flow f∆ which is feasible if f is, inherits the flow conservation and the time

horizon. The flow f∆ also satisfies the same supplies/demands as f at the

same cost.

Note, that if ∆ is admissible and the flow is ∆-constant, the entire time axis can be rescaled such that ∆ = 1. Besides the clear changes to the transit times, from τ (a) to τ (a)/∆, and the time horizon, this only affects the capacities: The flow rates being the amount of flow per time unit change by a factor of ∆. Thus, the arc capacities also are scaled from u(a, t) to ∆u(a, t/∆). Alternatively, one could scale the supply/demand-function and cost bounds instead of the flow rates.

1.5.2 The Time-Expanded Network

With ∆-constant flows, one can reduce the arbitrarily detailed flows over time to simpler constructs that can be expressed by linear (in-)equalities that only have to hold at each i∆. Thus, they can be expressed and solved as a linear program (for finite time horizons). This by itself can be useful and has com-plexity implications. However, a more elegant and efficient method to deal with flows over time is the classic idea of the time-expanded network, which reduces many flow over time problems to static flows.

Consider a graph G = (V, A) with transit times τ : A → R≥0,

time-dependent arc capacities u : A × R≥0 → R≥0 and a time horizon T . Choose

an admissible ∆ > 0. We can then define the time-expanded network of G

with time horizon T and discretization ∆, which we will write as GT /∆ =

(VT /∆, AT /∆), or simply as GT = (VT, AT) if ∆ = 1. The “T /∆” is purely notational, not a division. We will construct the time-expanded network such that there is a correspondence between ∆-constant flows over time with time

horizon T on G and static flows on GT /∆. This is a bijection for strong

flow conservation. With only weak flow conservation, the flow on the time-expanded network is not uniquely determined with respect to the balances of terminals. We will only give the construction for ∆ = 1 in the following, but the construction can easily be scaled to other values of ∆.

The vertex set VT of the time-expanded network is obtained as follows: For each t ∈ [0, T ) ∩ Z there is a copy of v ∈ V named vt. Together, the vertices vt, v ∈ V , form the time layer Vt at time t. For each source s+∈ S+

there is a vertex s++, together forming the set S++. Similarly, for each sink s−∈ S−there is a vertex s−− in the set S−−. The union of all the Vt, as well

(28)

The arc set AT consists of multiple groups of arcs, as well: Each original arc a ∈ A gives rise to a copy atfor each t ∈ [0, T ) ∩ Z such that t + τ (a) ∈ [0, T ). If a = (v, w), then the arc at points from vt to wt+τ (a). The arcs starting in Vt form the set At. The principle idea is that the static flow on the arc at = (vt, wt+τ (a)) represents the flow over time into the arc a from v at time t, which then arrives at w at time t + τ (a).

We need an additional treatment for the terminals. For each source s+ ∈ S+and each t ∈ [0, T ) ∩ Z, there is an arc at

s+ pointing from the corresponding

s++ to the copy of s+ at time t, (s+)t. Similarly, for each sink s− ∈ S− and the same values of t, there is an arc ats− from (s−)t to s−−. The arcs from

S++ form A++, while the arcs to S−− form A−−. The static flow on these

arcs represents the amount of supply released or demand satisfied at each time step. Figure 1.2 shows an example of a time-expanded network.

The (static) flow conservation at a vertex vtwill correspond to strong flow conservation in the flow over time. To model weak flow conservation, we must introduce holdover arcs, that carry the excess of the vertex v at time t to time t + 1. For this, the set of holdover arcs ATh contains an arc atv for all vertices v ∈ V and all t ∈ [0, T − 1) ∩ Z, which points from vt to vt+1.

Then AT consists precisely of the union of Atfor all t ∈ [0, T ) ∩ Z and A++ and A−−, and optionally ATh if weak flow conservation is allowed.

Since the arcs correspond to certain properties of the flow over time, they should reflect the capacities and other bounds on the flow over time. We define the capacity function of the time-expanded network uT : AT → R≥0 as

follows. For an arc a at time t, the capacity is u(a, t), and therefore we set uT(at) := u(a, t). Because they equal, we will often use the simpler u(a, t) instead of uT(at). The arcs connecting the new sources S++ and sinks S−− to the time-expanded vertices have “infinite” capacity, although this could be limited to the supply/demand of the respective terminal. We also assume that holdover, if it is allowed, is not bounded. Thus, all of ATh also has “infinite” capacity. (Instead of infinite capacity one could use, e. g., the total capacity of all capacitated arcs in the time-expanded network.)

The supplies and demands of the time-expanded network are shifted from S+ to S++ and from S− to S−−, respectively. Their values do not have to be changed, so dT(s++) := d(s+) for all s+ ∈ S+, and similar for the sinks.

These new vertices are the only terminals in the time-expanded network. Note that we could simplify the construction if we assume (infinite) holdover: In this case, (s+)0 could be the source and (s−)T −1 could be the sink for s+ and s−, respectively, and the holdover arcs provide the functionality of the arcs in A++ and A−−. This is, however, not suitable for the case without holdover, and has no advantage for our purposes.

Finally, we can relate the costs of the flow over time to the time-expanded network: The cost of an arc at is directly inherited from the arc a, so c(at) := c(a). All other arcs have 0 cost according to the standard flow model. But since we now explicitly account for the flow entering or leaving the terminals, as well as the excess of a vertex, it is easy to attach a cost to these arcs in the time-expanded network if it is needed. The following lemma summarizes the correctness of the entire construction:

(29)

τ = 2 τ = 1 s− v s+ s−− s++ T = 4 ∆ = 1 v0 v1 v2 v3 (s−)0 (s+)0 (s+)1 (s+)2 (s+)3 (s−)1 (s−)2 (s−)3 t ∈ [0, 1) t ∈ [1, 2) t ∈ [2, 3) t ∈ [3, 4) d(s+) d(s−) (a) arc a arc b A++ A−− u(a, 0) ∞ ∞ u(b,0) ∞ ∞ ∞ ∞ ∞ ∞ u(a, 1) ∞ ∞ ∞ ∞ ∞ ∞ ∞ ∞ ∞ u(b,1) u(b,2) (b)

Figure 1.2: (a) A graph G and the time-expanded network

GT with the label of the vertices, the new supply/demand

function and the time layers. For our purposes it is consistent to consider the new sources S++ as part of the earliest time layer because the supply is already available at time 0. The new sinks S−−, however, do not fit into any single time layer because we think of flow units disappearing as soon as they ar-rive there. (b) The capacities of the arcs in the time-expanded network. The vertical arcs are the holdover arcs ATh, which are only included if weak flow conservation is allowed. The arcs A++, A−−, and ATh have no direct correspondence in a flow over time but must be deduced.

(30)

Lemma 1.12.

Consider a flow over time instance on a graph G with some time horizon T ∈ Z≥0, and construct the time-expanded network GT for it.

1. Then f is a flow over time on G if and only if x with x(at) := f (a, t)

can be extended to a static flow on GT. That is, if and only if suitable non-negative flow values can be found for the holdover arcs and arcs out of the sources and into the sinks.

2. If and only if f has strong flow conservation, one can choose x such that no flow is on the holdover arcs ATh.

3. The cost of these flows is the same and they satisfy the same sup-ply/demand function with the discussed mapping between the terminals. Proof. The principal construction should be clear. However, there is some freedom in the static flow values on the holdover arcs of terminals. This can be resolved by greedily using as much of the supply/demand of the terminals as early as possible. Since all of these arcs have zero cost attached, this is as good as any other scheme.

So the time-expanded network is a reduction of flows over time to static flows. Thus, we can use the terminology, theorems and algorithms for static flows to discuss flows over time. For example, using linear programming tech-niques many flow over time problems can be solved. However, static flow problems are special linear programming problems and, thus, more efficient algorithms can be used on the time-expanded network.

We can also use path decompositions for flows over time if they are repre-sented on a time-expanded network. From Theorem 1.3 we then obtain a set of paths and cycles on the time-expanded network with associated flow values. If we consider a single path flow xP with value dP on the time-expanded path

from this decomposition, then it has a direct interpretation as a flow over time: It is a flow that sends dP flow units uniformly distributed over one time step

along the path. (Flow in and out of terminals as well as that on holdover arcs are not explicitly visible but only affect the balance functions.)

There is a straight-forward generalization for such path flows in the time-expanded network: We can use an arbitrary function for the flow rate entering the path, possibly for longer or shorter than a single time step. If this function is ∆-constant again, the resulting flow over time is also expressible in the same time-expanded network, but this is not necessary. To define such a path flow over time properly, let us start with a path over time. Let W = (a1, . . . , ak)

be a walk in the original network G, and associate a vector of starting times h ∈ Rk

≥0 with it. We use hi to designate when the walk enters ai.

This walk is compatible with the transit times τ if hi+ τ (ai) ≤ hi+1, that

is, the walk does not continue into the next arc before it arrives. While arcs may occur multiple times in a walk, P := (W, h) is still considered a path over time if all the pairs (tail(ai), hi) as well as the final (head(ak), hk+ τ (ak)) are

distinct. These pairs correspond to the vertices that the walk visits in the time-expanded networks.

(31)

Let dP : R≥0 → R≥0be the function of flow into the path, extended to −∞

with 0. Then this defines a flow function over time fP as follows:

fP(a, t) :=

X

i : a=ai

dP(t − hi).

Assuming enough capacity on the arcs, this forms a flow over time. If the starting times even satisfy the equality hi+τ (ai) = hi+1for all i < k, then this

flow satisfies strong flow conservation. It is also easy to derive such path flows over time from the path decomposition of the static flow on the time-expanded network by a simple projection to the original arc set. The missing starting times can be read off the time layer at which the static path started using each arc. The corresponding flow function into the path is dP(t) = bPχ[0,1)(t)

(32)
(33)

Earliest Arrival Flows and

Their Computation

Some problems can only be modeled if their temporal aspects are considered. Without time, the theoretical solution would not be applicable in the real world. But all modeled aspects are potentially part of the objective function, and minimizing the time taken is a natural goal. Indeed, time is the only cost in the mathematical setting of this chapter, where we study flows over time with minimum travel time (MinTravelTime).

While mathematical methods are universal, we base our discussion in the following on the overall theme of evacuating a city or a building. This allows us to point out advantages and disadvantages with respect to this specific application.

The study of evacuations within the research grant Adaptive Verkehrss-teuerung (Adaptive Traffic Control) [1] by the German Federal Ministry of Education and Research also gave rise to this work in the first place.

We will mostly consider the case of the MinTravelTime problem with a single supersink, which means that the solutions are earliest arrival flows (EAF): A flow over time is an earliest arrival flow if it simultaneously maxi-mizes the number of flow units that have reached the sink at each time step. Such a flow exists if there is a single sink. Earliest arrival flows are of partic-ular interest for evacuation modeling because they simultaneously minimize the average travel time as well as the egress time. See Section 2.4 for more details on earliest arrival flows.

2.1

Background

2.1.1 Modeling and Simulation

We start out with an informal discussion of the model that we consider. We need a representation of the area to be evacuated and the areas that are considered safe. This is usually given as geometric data in the form of a street map or the floor plan of a building.

To use this information we need to extract a graph from it. This graph will depend on the scale of the problem and the desired resolution: In a

(34)

macroscopic view, each edge of the graph can represent a street and vertices are intersections. Associated with each arc is the length of the street and a measure of its flow rate capacity, which usually correlates to the width of the street.

This is the kind of information we have about the city of Padang, Indonesia, which also happens to be one of the largest instances we consider. See Sec-tion 2.6.2 for details on this instance including a map of the area (Figure 2.15) and the network (Figure 2.16).

If we model a building instead, each vertex of the graph could represent a room or a hallway, so arcs simply represent the doors between them. This might be suitable for easy layouts, but a single vertex per room or hallway is in general too rough considering that rooms can have large obstacles from furniture to decoration, and hallways bend around corners etc. Instead, in a microscopic model only small “unproblematic” areas could be represented by a vertex, maybe a handful of square meters each at most. The arcs then join vertices which share a common border and have a length equal to the distance of the centers of these areas. Capacities are derived from the size of the shared border. This is the approach taken in the pedestrian simulator ZET [21, 92], from which we also obtain instances. The example in Figure 2.1 contains much less details to be still readable.

It might seem odd to model quite small areas in a building, but treat intersections as unimportant in a city. This is mainly due to the way the distances are set up. In a typical street map, the streets define the routes and the lengths, while the exact way through an intersection can mostly be neglected. In a building, though, the size of the intersections (the rooms) is quite large compared to the size of the straight segments which do not require decisions, say the distance between two doors in a hallway. This is only a rule of thumb, though. For example, large open urban areas (plazas) should be treated like rooms that need to be filled with vertices, with each representing only a part of the area.

Another key ingredient is the initial position of the population (at least those in endangered areas) and a designation which areas are considered safe. In some settings the size of the safe area is essentially infinite: People leaving a building are likely to find a spot outside on the street, just like people leaving a neighborhood can probably fit in the surrounding neighborhoods. However, people seeking shelter in few selected buildings may find them overcrowded, so these safe areas should be modeled with a limited capacity.

Given this input, the natural goal of an evacuation is to minimize the time it takes for everyone to reach safety. There are a few conflicting objectives here, though. For example, there could be a trade-off between minimizing the average travel time and the egress time (the time until the area is fully evacuated). A well-known result, which we will discuss in Section 2.4, states that minimizing the average travel time will also minimize the egress time if all safe areas have sufficient capacities. In any case, the desired result is an optimal flow over time that represents the movement of the people.

Note that network flows are not the end-all approach to evacuation plan-ning. They certainly are not a simulation of human behavior. They help to

(35)

(a)

2 2 3

(b)

Figure 2.1: (a) A fictitious building with occupants. In case of an evacuation, they should assemble outside on the gray area. (b) A graph with medium detail for this building. The vertices represent several square meters each and furniture is

not considered. The sources can represent one or multiple

evacuees, in which case the number is denoted next to the sources. The sink is located at the top. The arcs are all bidi-rected. The transit times can be derived from the Euclidean distances. The capacities are typically large for arcs connect-ing vertices in the same room or outside, and small for arcs leading through doors.

evaluate the potential of the most orderly evacuation, though, and can guide decision making. See Section 2.7 for interpretations of the optimum solution. For a more detailed discussion of this and other models, we refer to a survey by Hamacher and Tjandra [47].

2.1.2 Connection to MATSim

While it is already useful to determine an earliest arrival flow, this was only one step in the Adaptive Verkehrssteuerung project. The computed movement should then be tested and refined in the simulator MATSim [68], which stands for Multi-Agent Transport Simulation Toolkit. MATSim also operates on the same data as we mentioned above. Each individual is called an agent and each agent has a plan, that is, a path to some destination. In the case of an evacuation, the destination is always “safety” (a supersink), which can be reached through any safe area. The foundations of this approach were laid out by Gawron [38], and then refined by Simon et al. [85]. L¨ammel et al. [63] detail the specific application and adaptation of MATSim to evacuation scenarios, with more pointers to the literature as well. We only give a brief outline of MATSim’s operation in the following.

Referenzen

ÄHNLICHE DOKUMENTE

Then the value of a maximum flow in network N equals the maximum number of arc-disjoint directed s-t paths in N.. Proof: Let f* be a maximum flow in network N, and let r be the

Then the value of a maximum flow in network N equals the maximum number of arc-disjoint directed s-t paths in N.. Proof: Let f* be a maximum flow in network N, and let r be the

In this section, we report the results of our computa- tional experiments where we compare the performance of the robust mirror descent SA method and the SAA method applied to

In order to overcome the restrictions of pertur- bation techniques, some non-perturbation methods were developed such as the Laplace decomposition method [21 – 23], the

If one writes down the simplest relativistic forms of mass and energy-momentum balance for the case where there is only an electromagnetic force present, it is found that, if the

The mixed-effect model provides a flexible instrument for studying data sets with both fixed-effect factors and random-effect factors, as well as numerical covariates, that

So, in words, in expectation, the reward is equal to the capped value of the box whose prize is accepted minus the bonuses of all boxes that are opened but not

In addition, instead of irregular space–time samples, we show that uniform dynamical samples at sub-Nyquist spatial rate allow one to stably reconstruct the function f away