1 Introduction

Many relevant applications in the context of routing or logistics call for a temporal component that is part of the input and the actual solution. In classical flow theory, flow traverses the network in a static fashion, that is, the solutions need to obey capacity restrictions—and possibly additional constraints. In many real-world applications, however, flow takes some time in order to traverse a network edge. Hence, a temporal dimension has to be introduced into the models. Dynamic flow problems that take time into account have been studied for more than half a century. Dynamic flow problems are also referred to as flow over time problems in the literature and in this paper. Despite the relevance of the topic and the existence of fascinating results, few textbooks cover this topic. We refer to [18] for an introduction to flow over time problems. Furthermore, real-world applications are often also affected by measurement errors as well as by a large degree of uncertainty. In such situations, the classical models are usually highly inaccurate. An application may be distribution networks such as gas [15] or water networks. In gas networks, for example, the roughness of the pipes is uncertain due to contamination or aging processes and can only be measured with large effort. The roughness strongly influences the friction and thus the travel time of gas along a pipe. As these uncertainties might influence the decision about feasibility or infeasibility of the corresponding complex optimization tasks, a worst-case robust perspective is appropriate.

Although relevant applications exist, little is known about flow over time problems that are protected against uncertain conditions. In this work, we provide a first step towards studying their properties. We first define an appropriate model for determining robust optimum flows over time subject to uncertain travel times. We start from the known classical flow over time theory that ignores uncertainties, that is, the nominal case. Adapting the \(\varGamma \)-robustness model introduced by Bertsimas and Sim [5] that is often applied to combinatorial optimization problems under uncertainty, we develop a robust flow over time framework. In this model, the degree of protection against uncertainties can be controlled by a parameter \(\varGamma \). For uncertain objective functions, a robust optimum is a solution with the best guaranteed cost under the assumption that at most \(\varGamma \) many objective function coefficients attain their worst-case realization. Thus, the value of \(\varGamma \) determines the conservatism of the solution.

Applying this modeling framework for flows over time, we study the following optimization task. Let a time horizon T and a network with travel times and potential delays on the edges be given. Maximize the minimum amount of flow that can be sent through the network within time horizon T under the assumption that at most \(\varGamma \) edges are delayed. In order to study the problem in its most basic version, we restrict ourselves to the case in which flow is not allowed to wait at any intermediate vertex. For example, this is the case in communication, water, or gas networks without buffer capacities on intermediate vertices. Although the obtained model seems quite punishing, it is a natural robust counterpart of network flows over time with uncertain travel times. We provide a formal problem definition in Sect. 2.

Related work The concept of flows over time was introduced in [9]. They also showed how to find a maximum s-t-flow over time using one minimum-cost flow computation, thus generalizing the concept of static maximum s-t flows. Detailed introductions to flows over time and further references can be found in the surveys by Aronson [2] and Skutella [18].

In general, the goal of robust optimization is to find a solution that is feasible and as good as possible for any input data in a given uncertainty set. For a comprehensive introduction to robust optimization, we refer to [3]. In this paper, we consider \(\varGamma \)-robustness, a concept introduced by Bertsimas and Sim [5]. Here, the uncertainty set is determined by \(\varGamma \): Protection is sought against all scenarios in which the input deviates from the nominal input data in at most \(\varGamma \) elements simultaneously. In the context of static network flows, such a scenario could be the failure of at most \(\varGamma \) edges in a given network. Aneja et al. [1] showed how to solve the \(\varGamma \)-robust maximum s-t-flow problem in polynomial time for \(\varGamma = 1\), even for the case where the flow is required to be integral. Du and Chandrasekaran [8] claimed that the \(\varGamma \)-robust maximum s-t-flow problem is NP-hard for \(\varGamma >1\). However, Matuschke et al. [17] recently showed that the proof is incorrect. Personal communication with Disser and Matuschke [7] indicates that this problem is already NP-hard if \(\varGamma \) is not bounded by any constant. Still, the complexity of the static \(\varGamma \)-robust flow problem where \(\varGamma \) is bounded by any constant bigger than 1 is open. Note that in this model, it is not possible to reroute after the edge failure.

In [4], Bertsimas et al. investigate several variants of robust flow problems. As far as we know, Bertsimas et al. [4] is the only work that considers robustness in a flow over time setting. In particular, they study a so-called adaptive model where rerouting after edge-failure is allowed within bounds determined by the initial flow and show that this problem is weakly NP-hard. In contrast, in this paper, rerouting after edge failures is not permitted and we consider a more general robustness scenario: Besides total edge failures, the travel time can also increase by a finite amount.

Another problem that is highly related to our work is the network interdiction problem. In contrast to robust maximum flow problems, where the goal is to find a flow that is good no matter which scenario of the uncertainty set is realized, the network interdiction problem takes the opposite perspective: Here, the goal is to find a set of edges whose deletion minimizes the amount of flow that can be sent in the remaining network. Wood [19] showed NP-hardness of this problem.

Köhler and Skutella [16] consider a flow over time problem where traffic times depend on the actual load of an edge. While the resulting flow problem is NP-hard, in contrast to our model, temporally repeated flows can be used to obtain a 2-approximation.

Our contribution First, we discuss generalizations of well-studied concepts for the nominal maximum flow over time problem towards robustness. For uncertain travel times, we point out problems with a straightforward generalization of encoding flow rates on the edges. We show that this concept as well as time-expanded networks are no longer appropriate. In contrast, we introduce a non-standard, more viable solution encoding in terms of a path decomposition with associated flow rates and dispatch intervals. We call this concept general solutions (to the robust maximum flow over time problem). Whereas these two descriptions are equally powerful in the non-robust, that is, nominal flow over time case, this is not true for the robust flow over time model. We also study a robust counterpart of temporally repeated flows due to their simple solution encoding, computational complexity and optimality in the nominal case [18].

Table 1 An overview of the complexity results from Sect. 3
Table 2 Outline of the main results regarding optimality gaps of temporally repeated solutions from Sect. 4

After introduction and discussion of the models, we address the computational complexity of both solution variants. Our results are summarized in Table 1. The special case of \(\varGamma \)-robust flow over time with zero travel times and infinite delays on all edges reduces to the static \(\varGamma \)-robust flow problem that searches for an optimum static flow which is robust against up to \(\varGamma \) edge failures (cf. related work). We show in Proposition 2 that our problem contains the static case. Irrespective of this, our problem for general solutions is considerably more complex. We show by a reduction from maximum clique that even the verification of feasibility of arbitrary solution candidates is an NP-hard problem (Theorem 1). By a reduction from the two edge-disjoint paths problem we show that, again in contrast to the static version, the optimization problem is inapproximable for \(\varGamma = 1\), if flow rates are required to be integral (Proposition 3).

For temporally repeated flows, we observe that the computational complexity depends on the actual edge delays. In general, they inherit the same complexity status as general solutions (Proposition 4). However, if the maximum possible path length of each path is bounded by the time horizon, the status changes. In fact, we show that in this case optimal temporally repeated flows can be computed in polynomial time (Proposition 5). We formalize this concept in Sect. 3 and call it the T-bounded path length property. Note that our hardness results for general solutions also hold for instances with the T-bounded path length property.

Subsequently, we study the quality of temporally repeated solutions, when compared to general solutions (Table 2). Temporally repeated solutions do not only have benefits with respect to the computational complexity, but also have a simple solution encoding and are very well studied for the nominal case [18]. In the nominal case, it is well known that temporally repeated flows yield optimal solutions. Under uncertainty, however, we show that temporally repeated flows can be accompanied by a large optimality gap.

If the delay on all edges is either infinitely large or zero, that is, \(\varDelta \in \{0,\infty \}\), we show that the optimality gap can be as large as \(\max \{T,\varGamma \}\) (Proposition 7). By using a non-trivial primal-dual fitting approach, we show that it is always upper bounded by \(O(k \log T)\) (Theorem 2). Here, k is a parameter that is specific to the instance. It does not depend on the delay but only on the graph structure, travel times and the time horizon (The definition of k is formalized in Sect. 4). Although the instances used in Proposition 7 have \(k = T\), other classes of instances exist for which the value of k is very small. For example, acyclic digraphs with the T-bounded path length property have \(k = 1\).

For instances with the T-bounded path length property, we provide lower bound examples with an optimality gap of \(\max \{\log T,\log \varGamma \}\) (Proposition 6). For arbitrary delays, we prove an upper bound of \(O(\eta k \log T)\) (Theorem 3). Here, \(\eta \) accounts for the relative amount of flow that can be destroyed by scenarios on single paths in the worst case. Again, this instance specific parameter is formalized in Sect. 4. This bound is tight for the instance from Proposition 6 as, in this case, \(k = \eta = 1\).

Finally, if we fix a graph with travel times and finite delays and let the time horizon tend to infinity, we observe that temporally repeated solutions tend to optimality (Proposition 8).

Outline The remainder of this paper consists of three main sections. Section 2 is devoted to modeling techniques for the robust maximum flow over time problem. It introduces a model and two solution concepts which we study subsequently. Section 3 provides insight in the computational complexity of both concepts under several perspectives. Finally, Sect. 4 evaluates the solution quality of optimum temporally repeated flows with respect to their optimality gap to general solutions. The paper is concluded with final remarks and a discussion of open questions in Sect. 5.

2 Modeling techniques for the robust maximum flow over time problem

Nominal maximum flow over time problem An instance of the nominal maximum flow over time problem consists of a directed graph \(G = (V,E)\) with source and destination vertices \(s,d \in V\) and a time horizon \(T \in {\mathbb {N}}\). Each edge is equipped with a capacity \(u :E \rightarrow {\mathbb {N}}\) and a travel time \(\tau :E \rightarrow {\mathbb {N}}\). Flow entering edge e at some time \(\theta \) leaves the edge at its head at time \(\theta + \tau _e\). We seek to maximize the total amount of flow sent from s to d within the time horizon. In particular, we use the so-called continuous time model. For further discussion of the relationship between continuous and discrete time models, we refer to [14].

In classical flow theory, a solution is encoded by a set of Lebesgue-integrable functions \(f_e :{\mathbb {R}}\rightarrow {\mathbb {R}}_+\) for all \(e \in E\) describing the rate of flow entering edge e at time \(\theta \in {\mathbb {R}}\). We assume \(f_e(\theta ) = 0\) for all \(e \in E\) and all \(\theta \in {\mathbb {R}}{\setminus }[0,T)\). A feasible solution obeys the capacity limit, that is, \(f_e(\theta ) \le u_e\) for all edges and for all \(\theta \in [0,T)\). Depending on the situation to be modeled, waiting at intermediate vertices may or may not be allowed. For example, if vertices do not have any buffer capacity, it is impossible to store flow at intermediate vertices. In such situations, strict flow conservation is required, that is, the total amount of flow leaving a vertex until any point in time \(\xi \) is exactly the total amount of flow entering that vertex until the same time. We have

$$\begin{aligned} \sum _{e \in \delta ^-(v)} \int _0^{\xi - \tau _e} f_e(\theta ) d\theta = \sum _{e \in \delta ^+(v)} \int _0^{\xi } f_e(\theta ) d\theta \end{aligned}$$

for all \(\xi \in [0,T)\) and for all \(v \in V {\setminus } \{s,d\}\). The objective function value of a flow f is defined as the total amount of flow reaching vertex d until time T, that is, \(\sum _{e \in \delta ^-(d)}\int _0^{T - \tau _e} f_e(\theta ) d\theta \). Here, we assume that d has no outgoing edges, otherwise, we would have to subtract the amount of flow leaving d until time T. We make this assumption throughout this paper. Note that flow that arrives at d after T is allowed but does not give any contribution to the value of the objective function.

Ford and Fulkerson [9] showed that relaxing strict flow conservation to weak flow conservation, where flow may wait at intermediate vertices, does not change the optimal objective function value in the nominal case. That is, they proved that there always exists an optimal flow over time which never stores flow at intermediate vertices.

\(\varGamma \)-Robust flows over time In this paper, we assume that the travel times \(\tau _e\) are uncertain and may deviate by a certain delay \(\varDelta _e \in {\mathbb {N}}\). We follow the \(\varGamma \)-robust approach suggested by Bertsimas and Sim [5]: for a given integer \(\varGamma \in {\mathbb {N}}\), we look for a maximum flow over time that is robust against any possible scenario of up to \(\varGamma \) edge delays. This situation can be interpreted as a two-player game in which the first player (the “flow player”) decides on a flow over time. Afterwards, the second player (the “bad adversary”) chooses at most \(\varGamma \) edges on which she delays the travel times from \(\tau _e\) to \(\tau _e+\varDelta _e\). The adversary’s goal is to minimize the total throughput, or to violate the capacity constraints. In the robust setting, it might well be that a nominal flow without waiting times has to wait in certain scenarios. In situations with implied strict flow conservation, such a flow is no longer feasible. In this paper, we do not consider such situations, and therefore demand strict flow conservation no matter how the adversary chooses edges to be delayed. We remark that requiring weak flow conservation only introduces additional challenges, as it would have to be decided which flow particles need to wait and which may pass on.

Furthermore, we do not require the network to be empty at time T, that is, we allow flow to enter destination d after time T. The flow arriving at d after T is not counted in the objective function. This yields some freedom in reacting to different possible scenarios. Otherwise, it would be necessary to ensure additionally that\(\textemdash \)no matter which edges the adversary chooses to delay\(\textemdash \)all flow can reach d by time T. This would result in a very restrictive model where we would not be allowed to use any edges whose travel time may exceed T. Note that, for the same reason, the capacity constraints and the flow conservation constraints are only present until time T. For example, we also allow a feasible solution to violate the edge capacities after T. By omitting the capacity constraints outside of the time horizon, the model becomes less pessimistic. This can be seen in the instance depicted in Fig. 4a. Analyzing robust flows over time which have to obey the capacity after time T is left for future research.

Mathematical model A solution formulated in terms of flow rates \(f_e(\theta )\) seems to be unsuitable. There, the actual flow rate at any intermediate edge depends on the corresponding scenario. As we are interested in solutions that can be described independently from the scenario, we formulate solutions in terms of s-d-paths. A nominal flow over time satisfying strict flow conservation can always be described by a path decomposition \((f_P)_{P\in \mathcal {P}}\), where \(\mathcal {P}\) is the set of s-d-paths and \(f_P :{\mathbb {R}}\rightarrow {\mathbb {R}}_+\) with \(f_P(\theta ) = 0\) for all \(\theta \in {\mathbb {R}}{\setminus }[0,T-\tau (P))\). For simplicity reasons, in this paper we only allow flow on simple paths. The function assigns a flow rate \(f_P(\theta )\) to each point in time \(\theta \) that describes the rate at which flow is sent into path P. Note that this path decomposition is not necessarily unique. Already in the static robust maximum flow problem, Bertsimas et al. [4] have shown that the robust flow value depends on the path decomposition. In this work, however, we do not decompose a flow, but rather define it on the set of all simple paths.

Let \({\mathcal {S}}= \{z \in \{0,1\}^{|E|} : \sum _{e\in E} z_e \le \varGamma \}\) denote the set of admissible scenarios, that is, representing all combinations of at most \(\varGamma \) delays. Here, \(z_e\) is a decision variable with \(z_e = 1\) if and only if e is delayed. We call a flow over time \((f_P)_{P\in \mathcal {P}}\) feasible if the capacity constraints are obeyed under every possible scenario \(z\in {\mathcal {S}}\). That is, if

$$\begin{aligned} \sum _{P\in \mathcal {P}: e\in P} f_P(\theta _{z,e}) \le u_e \quad \forall e\in E, \theta \in [0, T), z\in {\mathcal {S}}, \end{aligned}$$

where

$$\begin{aligned} \theta _{z,e}=\theta -\sum _{e'\in E: e' <_P e} (\tau _{e'}+\varDelta _{e'} z_{e'}) \end{aligned}$$

denotes the departure time at s of a flow particle on path P which enters edge e at time \(\theta \) under scenario z. As usual, \(\{e'\in E: e' <_P e\}\) denotes the set of edges that need to be traversed on path P before edge e is reached. Note that negative values of \(\theta _{z,e}\) imply that these flow particles would have started at s before time zero (which is not possible).

The robust value of a feasible flow over time \(f=(f_P)_{P\in \mathcal {P}}\) is

$$\begin{aligned} \min _{z\in {\mathcal {S}}} \sum _{P\in \mathcal {P}} \int _0^{\max \{0,T - \tau (P) - \varDelta _z(P)\}} f_P(\nu ) d\nu , \end{aligned}$$

where \(\tau (P) + \varDelta _z(P) = \sum _{e\in P} (\tau _e + \varDelta _e z_e)\) denotes the travel time on path P in scenario z.

Remark 1

The nominal maximum flow over time problem, that corresponds to \(\varGamma = 0\), can be modeled by an auxiliary time-expanded network. This graph contains a vertex (vt) for each relevant time \(t \in \{0, \ldots , T - 1\}\). Edges between the vertices (vt) and \((w,t + \tau _{vw})\) model edges between vertices v and w with travel time \(\tau _{vw}\) in the original graph. This is not possible in the robust version, since each scenario would induce a different time-expanded network. Thus, the choice of z defines the topology of the network, and a straight-forward usage of time-expanded networks cannot be applied here.

By an averaging argument, we show next that it is sufficient to consider functions \(f_P\) which are piecewise constant on all integral unit length intervals.

Fig. 1
figure 1

Comparison of different models for flows over time. a Arbitrary flow. b Piecewise constant flow. c Temp. repeated flow

Proposition 1

For every solution to the robust maximum flow over time problem there exists a solution with the same objective function value which consists only of piecewise constant functions \(f_P\) whose values change only at integer points.

Proof

Let \(\tilde{f}\) be a solution to the robust maximum flow over time problem. For every s-d-path P, we construct the piecewise constant \(f_P :{\mathbb {R}}\rightarrow {\mathbb {R}}_+\) as follows. Intuitively, cut \(\tilde{f}_P\) into unit-intervals \([a,a+1) \subseteq [0,T)\). This is possible due to the fact that T is integral. Set the flow rate entering path P during each interval to be the average observed in the unit interval, that is,

$$\begin{aligned} f_P(\theta ) = \int \limits _{a}^{a+1}{\tilde{f}_P(\nu ) d\nu }\quad \text {for all } \theta \in [a,a+1), \end{aligned}$$

and zero outside of the interval [0, T), see Fig. 1a, b for an illustration. This ensures that f and \(\tilde{f}\) have the same objective function value since all limits of the intervals are integral.

We now argue that all constraints are satisfied. Suppose there is a scenario \(z \in {\mathcal {S}}\) and a time \(\theta \in [a,a+1)\) when f violates the capacity of some edge \(e \in E\). Then the capacity must be violated for all \(\theta \in [a,a+1)\) since the solution consists of piecewise constant functions only, and all travel times \(\tau _e\) and \(\varDelta _e z_e\) are integral. Therefore, the solution sends more than \(u_e\) through this edge in the unit interval. We can conclude that the original solution sends more than \(u_e\) through this edge in the unit interval, too. So there has to be a time \(\theta ^* \in [a,a+1)\) for which the capacity is violated in the original solution, which contradicts the feasibility of \(\tilde{f}\). \(\square \)

Hence, it is sufficient to consider solutions that can be described by a family of triples \(\left\{ \left( P^i,f^i, [a^i,b^i)\right) \right\} _{i = 1,\dots ,\omega }\) that describe the rate \(f^i\) at which flow is sent into path \(P^i\) during the time interval \([a^i,b^i)\), with \(a_i,b_i\in {\mathbb {N}}\). We call this interval the dispatch interval. Using Proposition 1 we redefine a solution to the robust maximum flow over time problem as follows.

Definition 1

A solution to the robust maximum flow over time problem is encoded as a family of triples \(\left\{ \left( P^i,f^i, [a^i,b^i)\right) \right\} _{i = 1,\dots ,\omega }\). For each \(1 \le i \le \omega \), \(P^i\) is a simple s-d-path in G, \(f^i > 0\) and \(a^i,b^i \in \{0,\dots ,T\}\) with \(a^i < b^i\).

Temporally repeated flows Temporally repeated flows are a classical solution concept used to solve the nominal maximum flow over time problem to optimality. They are constructed from a path decomposition \(x = \sum _{P\in \mathcal {P}} x_P\) of a given static flow x by sending flow at rate \(x_P\) along a path P as long as the flow can arrive at the sink d by time T. Therefore, a temporally repeated flow represented in our model has dispatch intervals of the form \([0, T-\tau (P))\) for a path P and flow rates \(f_P = x_P\). A temporally repeated flow is called feasible, if

$$\begin{aligned} \sum _{i : e \in P^i} f^i \le u_e \quad \text{ for } \text{ all } \text{ edges } e \in E, \end{aligned}$$
(1)

that is, the capacity constraints are satisfied independent of the actual point in time. Note that this will always be the case, if the temporally repeated flow was constructed from a feasible static flow.

Equivalently, we can state that a flow \(\big \{(P^i, f^i, [a^i, b^i))\big \})\) is a feasible temporally repeated flow if and only if \(a^i = 0\) and \(b^i = T - \tau (P^i)\) for all i and (1) holds. Since the dispatch intervals are fixed by the paths, we will omit them from now on. See Fig. 1 for a graphical comparison between the different flow models.

3 Computational complexity of the robust maximum flow over time problem

General solutions The following proposition shows that the robust maximum flow over time problem is at least as hard as the static counterpart. Recently, Disser and Matuschke [7] disclosed that they were able to prove NP-hardness of the static counterpart for unbounded \(\varGamma \). The result, however, is not yet published.

Proposition 2

The robust maximum flow over time problem is at least as hard as the static robust maximum flow problem.

Proof

We will show that the robust maximum flow over time problem can be used to solve the static robust maximum flow problem.

Let us assume an instance \((G = (V,E),s,d,u,\varGamma )\) of robust maximum flow is given. We construct an instance \((G = (V,E),s,d,u,\tau ,\varDelta ,T,\varGamma )\) of robust maximum flow over time as follows. Let \(T = 1, \tau \equiv 0\) and \(\varDelta \equiv \infty \). Then any feasible solution to the robust maximum flow problem can be mapped to a solution \(\left\{ \left( P^i,f^i, [a^i,b^i)\right) \right\} _{i = 1,\dots ,\omega }\) of the robust maximum flow over time instance. For every path P with flow rate \(f_P\) in the robust maximum flow solution, the over-time solution sends the same amount of flow during the dispatch interval [0, 1). The worst-case scenario of the robust maximum flow destroys at most \(\varGamma \) edges and decreases the robust flow value—with respect to the nominal flow value—by the total flow rate summed among all paths that are affected by the set of deleted edges. The same interference occurs in the constructed instance of robust maximum flow over time. If an edge was delayed, the travel time increases to an arbitrarily large value. Hence, any path using such an edge does not reach the destination. Thus, the objective function values coincide and an optimal solution to the robust maximum flow over time instance is also optimal for the robust maximum flow problem. \(\square \)

The following two results show that the temporal component introduces additional difficulty to the robust problem, as the static counterparts are both polynomially solvable. First, we show that computing an optimal integral solution in polynomial time is unlikely and that the problem cannot be approximated.

Proposition 3

If the flow rates are required to be integral, that is, \(f^i \in {\mathbb {Z}}\), the robust maximum flow over time problem is NP-hard. It remains NP-hard even if \(\varGamma = 1\). Moreover, the problem is inapproximable within any factor.

Proof

We will show that robust maximum flow over time with integral flow rates solves the two edge-disjoint paths problem. An instance of two edge-disjoint paths consists of a graph \(G = (V,E)\) with two designated pairs of vertices \((s_i,d_i), i = 1,2\) and asks for two edge-disjoint \(s_i\)-\(d_i\)-paths in G. We assume that \(s_1,s_2,d_1,d_2\) are pairwise disjoint. The problem was shown to be NP-hard by Fortune et al. [10].

We model this task as a robust maximum flow over time problem as follows (see Fig. 2). We introduce two auxiliary vertices s and d and connect s to \(s_i\) and d to \(d_i\). Hence, we end up with the graph \(\bar{G} = (V \cup \{s,d\}, E \cup \{s,s_1\} \cup \{s,s_2\} \cup \{d_1,d\} \cup \{d_2,d\})\). Let \(u \equiv 1, \varDelta \equiv 2, \tau _e = 0\) for all \(e \in E\), \(\tau _{\{s,s_1\}} = 0, \tau _{\{s,s_2\}} = 1, \tau _{\{d_1,d\}} = 1, \tau _{\{d_2, d\}} = 0\) and \(T = 2\).

Fig. 2
figure 2

Construction for Proposition 3. Edge labels denote the travel times and possible delays, respectively. The thick edges depict the possible paths and time intervals a feasible solution may use

If we solve the robust maximum s-d-flow over time problem, the travel times ensure that only the following path types can contribute to the objective function value of any feasible solution:

  1. (1)

    s-d-paths traversing \(s_1\) and \(d_1\),

  2. (2)

    s-d-paths traversing \(s_1\) and \(d_2\),

  3. (3)

    s-d-paths traversing \(s_2\) and \(d_2\).

Let us assume that there are two edge-disjoint paths \(P_1\) and \(P_2\) in G, that is, a YES-instance. Then we can construct a solution to robust maximum flow over time which sends flow along \({s,s_1},P_1,{d_1,d}\) in the interval [0, 1) and along \({s,s_2},P_2,{d_2,d}\) in the interval [0, 1). Since both paths are disjoint, the total amount of flow reaching the destination is two. Moreover, no scenario can destroy more than one of the two paths, hence, the robust flow value is equal to one.

Now, let us assume a NO-instance of two edge-disjoint paths. Due to the integrality of the dispatch intervals and flow rates, a solution to robust maximum flow over time in this network can only consist of at most two different paths. If it uses a path of type 1) and a path of type 3), both paths have to share some common edge \(e^{*} \in E\) as we assumed to have a NO-instance of two edge-disjoint paths. The scenario delaying exactly this edge reduces the flow value to zero. In all other cases, the worst case scenario may delay the single utilized edge leaving s (resp. entering t) in order to decrease the robust flow value to zero.

Hence, the instance is a NO-instance if and only if the robust flow value is zero. Note that in the construction used above, the objective function value is zero for a NO-instance and one for a YES-instance. Hence, any approximation algorithm would still distinguish between YES- and NO-instances. \(\square \)

The following theorem shows that it is strongly NP-hard to verify feasibility of robust flow over time solutions in general.

Theorem 1

Deciding feasibility of a given solution \(f = \left\{ \left( P^i,f^i, [a^i,b^i)\right) \right\} _{i = 1,\dots ,\omega }\) is NP-hard.

Proof

We provide a polynomial-time reduction from the clique decision problem, which is one of Karp’s classical NP-hard problems [13]. We will show that, given any graph \(\bar{G}=(\bar{V},\bar{E})\) and some \(r \in {\mathbb {N}}\), we can construct a maximum robust flow over time instance and a corresponding solution f such that the following holds. There is a clique of size r in \(\bar{G}\) if and only if f is an infeasible solution for the maximum robust flow over time instance. Without loss of generality, we assume \(|\bar{E}| \ge |\bar{V}|\), \(r\ge 3\) and that the vertices in \(\bar{V}\) are numbered from \(1, \ldots , n\). Let \(m = |\bar{E}|\).

We construct a multigraph \(G = (V,E)\), with vertices \(V = \{s,d_0,d_1\} \cup \{ v_i^\ell , v_i^r : i \in \bar{V} \}\) as illustrated in Fig. 3 for the example of \(\bar{G}=K_3\). V consists of two vertices \(v_i^\ell \) and \(v_i^r\) for each vertex \(i \in \bar{V}\), together with three vertices s, \(d_0\) and \(d_1\). The edge set E consists of five types of edges (omitted values for edges \(e \in E\) are \(u_e = \infty , \tau _e = 0\) and \(\varDelta _e = 0\)):

  1. (1)

    \(e = (v_i^\ell ,v_i^r)\) for each vertex \(i \in \bar{V}\) with \(\varDelta _e = 2^{i}\),

  2. (2)

    \((v_i^r,d_0)\) for each vertex \(i \in \bar{V}\),

  3. (3)

    all “backward” edges \((v_i^r,v_j^\ell )\) for \(i \ne j\in \bar{V}\),

  4. (4)

    \(e = (d_0,d_1)\) with \(u_e = \smash {\left( {\begin{array}{c}r\\ 2\end{array}}\right) } - 1\),

  5. (5)

    \(e = (s,v_i^\ell )\) for each edge \(\bar{e} \in \bar{E}\) such that \(i \in \bar{e}\). For \(\bar{e} = \{i, j\}\), set \(\tau _e = 2^{m+1} - 2^{i} - 2^{j}\). These edges can be parallel.

We set \(T = 2^{m+1} + 1\) and \(\varGamma = r\). The solution candidate for the feasibility problem is constructed as follows. We introduce a triple \((P^{\bar{e}}, f^{\bar{e}}, [0,1))\) for each edge \(\{i, j\} = \bar{e} \in \bar{E}\), where \(P^{\bar{e}} = (s, v_i^\ell , v_i^r, v_j^\ell , v_j^r, d_0, d_1)\). The edge \((s, v_i^\ell )\) is chosen to be the designated edge for \(\bar{e}\) of type (5) above.

The following two claims conclude the proof as we will show that a r-clique in \(\bar{G}\) exists if and only if the constructed solution is infeasible due to a capacity violation at time \(t = 2^{m+1}\).

Fig. 3
figure 3

Construction from Theorem 1 for the example of \(\bar{G} = K_3\). The graph \(\bar{G}\) is on the left and the corresponding robust flow over time instance with \(T=2^{m+1}+1=17\) and \(\varGamma = r\) is on the right hand side

  • Claim The constructed solution obeys the capacity constraints for every point in time \(t < 2^{m+1}\).

For the proof, observe that only the edge \((d_0,d_1)\) has finite capacity and that only edges \((v_i^{\ell }, v_i^r)\) can be delayed. Hence, it is sufficient to argue that its capacity cannot be exceeded unless \(t = 2^{m+1}\). For any point in time \(t < 2^{m+1}\), a path can only contribute to the capacity violation if it was delayed at most once. If it had been delayed twice, it would have had a total travel time of \(2^{m+1}-2^i-2^j+2^i+2^j = 2^{m+1}\) by construction.

Now, let us consider some edge \((v_i^\ell ,v_i^r)\) and assume that it was delayed. Then all paths which cross that edge and have no other delayed edge, will have a total travel time of \(2^{m+1} - 2^j\) for some \(j \ne i\). By construction, at most \(\varGamma = r\) many edges are delayed. We conclude that at most r paths can have the same travel time, which in particular, are strictly fewer than \(\left( {\begin{array}{c}r\\ 2\end{array}}\right) \) paths for \(r \ge 3\).

We now observe that for \(\{i, j\} \not = \{i', j'\}\), \(2^i + 2^j \not = 2^{i'} + 2^{j'}\) and that \(2^i \not = 2^{i'} + 2^{j'}\) for all \(i, i', j'\). Therefore, less than \(\left( {\begin{array}{c}r\\ 2\end{array}}\right) \) paths can arrive at \(d_0\) at any point in time before \(2^{m+1}\) and thus, the capacity cannot be violated.

  • Claim There is a scenario in which the solution violates the capacity constraint for \(t = 2^{m+1}\) and edge \(e = (d_0,d_1)\) if and only if there is a clique of size r in \(\bar{G}\).

In order to prove the claim, we will show that a clique C of size r in \(\bar{G}\) proves that the solution f is infeasible. Let us select a scenario \(z \in {\mathcal {S}}\) with \(z_{(v_i^\ell ,v_i^r)} = 1\) if and only if \(i \in C\). Now, for each path \(P^{\bar{e}}\) there are three possible situations:

  1. 1.

    The path contains no delayed edge, then \(\tau (P^{\bar{e}}) = 2^{m+1} - 2^u - 2^v < 2^{m+1}\). Hence, it does not contribute to the capacity of edge \((d_0,d_1)\) at time \(2^{m+1}\).

  2. 2.

    If the path is delayed exactly once, the same argument holds and \(\tau (P^{\bar{e}}) < 2^{m+1}\).

  3. 3.

    Finally, if the path is delayed exactly twice, \(\tau (P^{\bar{e}}) = 2^{m+1}\) and the path contributes to the capacity.

Consequently, a path \(P^{\bar{e}}\) contributes to the capacity violation at edge \((d_0,d_1)\) if and only if it was delayed twice. Due to the construction of z, this is the case if and only if both endpoints of \(\bar{e}\) and thus \(\bar{e}\) itself was part of the clique. Since the clique consists of \(\left( {\begin{array}{c}r\\ 2\end{array}}\right) \) edges, the edge capacity is violated.

On the other hand, if the solution is infeasible, there exists a scenario \(z \in {\mathcal {S}}\) such that at least \(\left( {\begin{array}{c}r\\ 2\end{array}}\right) \) paths are delayed exactly twice. Since \(\varGamma = r\), this is only possible if the delayed paths form a r-clique in \(\bar{G}\). \(\square \)

Temporally repeated flows Next, we discuss the computational complexity of temporally repeated flows, which were introduced in Sect. 2. We observe that computing optimal temporally repeated flows is an NP-hard task in general.

Proposition 4

In general, the problem of computing an optimal robust temporally repeated flow is at least as hard as the static robust maximum flow problem.

Proof

We consider again the construction in the proof of Proposition 2. Recall that we had \(T = 1\). In Proposition 1, we showed that it suffices to consider flows with integer dispatch intervals. Therefore, the dispatch interval for any path is [0, 1) and there is an optimal flow over time in this network that is a temporally repeated flow. \(\square \)

There are situations in which an optimal temporally repeated flow can be computed efficiently. The following Proposition 5 considers instances whose longest robust path length does not exceed the time horizon for any possible scenario \(z \in {\mathcal {S}}\). That is, we say an instance has the T-bounded path length property if and only if

$$\begin{aligned} \max _{P \in {\mathcal {P}}, z \in {\mathcal {S}}} \{ \tau (P) + \varDelta _z(P) \} \le T. \end{aligned}$$

This ensures that we can write down an LP model for the problem whose pricing problem is tractable. That means, we can solve the dual separation problem efficiently: given a dual solution, decide whether the solution is feasible and, if not, return a violated dual inequality. This concludes that the LP can also be solved in polynomial time due to [11].

Proposition 5

An optimal robust temporally repeated flow can be computed in polynomial time for instances with the T-bounded path length property.

Proof

For ease of notation, we denote the set of all feasible temporally repeated flows by \(\mathcal {F} = \{ x \in {\mathbb {R}}_+^{|\mathcal {P}|} : \sum _{P : e \in P} x_P \le u_e, \forall e \in E \}\). We can formulate the problem as follows:

$$\begin{aligned} \max _{x \in \mathcal {F}} \min _{z \in {\mathcal {S}}} \left\{ \sum _{P \in {\mathcal {P}}} \left( T - \tau (P) - \varDelta _z(P) \right) x_P \right\} \end{aligned}$$

where, as before, \({\mathcal {S}}=\{z\in \{0,1\}^E\mid \sum _{e\in E} z_e \le \varGamma \}\), and \(\varDelta _z(P)=\sum _{e\in P} z_e \varDelta _e\). The variables \(x_P\) denote the flow rate at which flow is sent into path \(P \in {\mathcal {P}}\) and the \(z_e\) variables model the decision on which edge the travel time increases. Note that the additional assumption on the maximal path length makes sure that the objective coefficients of all paths in all scenarios can never be negative.

Each flow \(x\in \mathcal {F}\) induces a load of \(x_e=\sum _{P\in {\mathcal {P}}:e\in P}x_P\) on each edge \(e\in E\). Thus, the term \(\sum _{P\in {\mathcal {P}}} \varDelta _z(P) x_P\) can be rewritten as \(\sum _{e\in E} \varDelta _e z_e x_e\). As a consequence we can reformulate the objective function of the problem above as:

$$\begin{aligned} \max _{x\in \mathcal {F}}\left( \sum _{P \in {\mathcal {P}}} \left( T - \tau (P)\right) x_P - \max _{z\in {\mathcal {S}}}\sum _{e\in E} \varDelta _e z_e x_e \right) . \end{aligned}$$

Let us consider the inner problem \(\max _{z\in {\mathcal {S}}}\sum _{e\in E} \varDelta _e z_e x_e\) for a fixed flow \(x\in \mathcal {F}\). Since the linear inequality system \(\{ \sum _{e\in E} z_e \le \varGamma ,\ 0\le z_e \le 1 \forall e\in E \}\) is totally unimodular, we might as well replace \(\max \{\sum _{e\in E} \varDelta _e z_e x_e : z\in {\mathcal {S}}\}\) by its linear relaxation

$$\begin{aligned} \max _{z\in [0,1]^{|E|}} \left\{ \sum _{e\in E} \varDelta _e z_e x_e: \sum _{e\in E} z_e \le \varGamma \right\} . \end{aligned}$$

By strong LP duality (using \(\gamma _0\) as dual variable for the GUB constraint and \(\gamma _e\) for the upper variable bounds), the objective function value of this inner problem coincides with the objective function value of the dual problem

$$\begin{aligned} \min _{\gamma \in {\mathbb {R}}_+^{|E|+1}}\quad&\gamma _0 \varGamma + \sum _{e \in E} \gamma _e \\ \text {s.t.} \quad&\gamma _0 + \gamma _e \ge \varDelta _e \sum _{P\in {\mathcal {P}}: e \in P} x_P \quad&\forall e \in E. \end{aligned}$$

As a consequence, we can reformulate the problem to compute an optimal temporally repeated flow as:

$$\begin{aligned} \max _{x \in {\mathbb {R}}_+^{|\mathcal {P}|},\ \gamma \in {\mathbb {R}}_+^{|E|+1}} \quad&\sum _{P \in {\mathcal {P}}} x_P (T - \tau (P)) - \gamma _0 \varGamma - \sum _{e \in E} \gamma _e\\ \text {s.t.} \quad&\sum _{P\in {\mathcal {P}}: e \in P} x_P \le u_e \quad&\forall e \in E \\&\gamma _ 0 + \gamma _e \ge \varDelta _e \sum _{P\in {\mathcal {P}}: e \in P} x_P \quad&\forall e \in E. \end{aligned}$$

We denote the dual variables for capacity constraints by \(\alpha \in {\mathbb {R}}_+^{|E|}\) and the dual variables for scenarios by \(\beta \in {\mathbb {R}}_+^{|E|}\) and obtain the following dual:

$$\begin{aligned} \min _{\alpha ,\ \beta \in {\mathbb {R}}_+^{|E|}} \quad&\sum _{e \in E} \alpha _e u_e \\ \text {s.t.}\quad&\sum _{e \in P} \alpha _e + \sum _{e \in P} \beta _e \varDelta _e \ge T - \sum _{e \in P} \tau _e\quad&\forall P \in \mathcal {P} \\&\sum _{e \in E} \beta _e \le \varGamma \\&\beta _e \le 1\quad&\forall e \in E. \end{aligned}$$

The pricing problem for path variables \(x_P\) corresponds to separating the inequalities \(\sum _{e \in P}(\alpha _e + \beta _e \varDelta _e) \ge T - \sum _{e \in P} \tau _e\) for all paths \(P \in {\mathcal {P}}\). By moving \(\sum _{e \in P} \tau _e\) to the left hand side, it can be solved as a shortest path problem with cost \(c_e = \alpha _e + \beta _e \varDelta _e + \tau _e\), which can be solved in polynomial time. Since the ellipsoid method requires only a polynomial time separation oracle in order to run in polynomial time [11], this concludes that the LP can also be solved in polynomial time. \(\square \)

Note that, in general, checking whether the longest path length exceeds the time horizon is NP-hard. Still, whenever the time horizon is sufficiently large, the T-bounded path property is certainly fulfilled.

4 Bounds on the solution quality of temporally repeated flows

In the remainder of the paper, we turn our focus on the solution quality of temporally repeated flows compared to a general solution. For any given instance \(\mathcal {I}\) of the robust maximum flow over time problem, let \(f_{\text {TR}}^{\text {OPT}}\) be the value of an optimal temporally repeated and \(f^{\text {OPT}}\) be the value of an optimal general solution. We call the ratio \({f^{\text {OPT}}}/{f_{\text {TR}}^{\text {OPT}}}\) the optimality gap of \(\mathcal {I}\) and provide general upper and lower bounds on the optimality gap.

Fig. 4
figure 4

Instances showing an optimality gap for temporally repeated flows. a Instance \(I_3\) from Proposition 6. Edge labels denote the travel times and possible delays, respectively. b Instance \(I_3\) from Proposition 7. Edge labels denote the travel times and possible delays, respectively

4.1 Lower bounds

The next two propositions provide lower bounds on the worst case optimality gap and show that the class of temporally repeated flows is not necessarily optimal for the robust maximum flow over time problem, even for \(\varGamma = 1\). Proposition 7 presents a family of instances with optimality gap \(\varOmega (T + \varGamma )\). For instances with T-bounded path length, the following Proposition 6 yields a gap of \(\varOmega (\log T + \log \varGamma )\). Both families of instances are depicted in Fig. 4.

Proposition 6

The optimality gap of temporally repeated flows can be \(\mathcal {H}_T\) and \(\mathcal {H}_{\varGamma +1}\) for instances satisfying the T-bounded path length property. Here, \(\mathcal {H}_r \in \varOmega (\log {r})\) is the r-th harmonic number, that is, \(\mathcal {H}_r = \sum _{i = 1}^r \frac{1}{i}\).

Proof

For fixed \(r \in {\mathbb {N}}\), we construct an instance \(I_r\) with graph \(G_r = (V,E_r)\) as follows (see Fig. 4a). The vertex set always consists of three vertices \(V = \{s,v,d\}\). The edge set consists of a designated edge \(e^* = (v,d)\) and a set of r parallel edges \(e_i = (s,v), i = 0,\dots ,r-1\). We set \(\tau _{e^*} = \varDelta _{e^*} = 0\), \(\tau _{e_i} = i, \varDelta _{e_i} = r - i, \varGamma = r - 1, T = r\). All edges have unit capacity. For the sake of notation, we use \(P^i\) to denote the unique s-d-path which contains edge \(e_{r-i-1}\). Combining the two claims below yields an optimality gap of \(\mathcal {H}_r = \varOmega (\log r)\). Note that \(r = \varGamma + 1 = T\).

  • Claim There exists a solution to \(I_r\) with objective function value 1.

For each \(i = 0,\dots ,r-1\), we send one unit of flow along path \(P^i\) in the time interval [0, 1). The flow of each path reaches the designated edge \(e^*\) during the time interval \([i, i+1)\), or if the path was delayed, during \({[r,r+1)}\) which exceeds the time horizon. Since the time intervals do not overlap during the time horizon, there will be no collisions. Furthermore, the total flow sent in the nominal setting is equal to the time horizon \(T = r\). Since the total flow sent along each path is equal to 1, any scenario can destroy at most \(\varGamma = (r-1)\) units of flow, thus leaving a remaining flow of 1.

  • Claim An optimal temporally repeated flow can send at most \(\mathcal {H}_r^{-1}\) units of flow.

Let us assume that \(x^*\) is an optimal temporally repeated flow with flow rate \(x^*_{P^i}\) on path \(P^i\). For ease of notation, we use \(x^*_i = x^*_{P^i}\) in the remainder of the proof. Recall that a temporally repeated flow must obey the capacity limits independent of any point in time. Hence, \(\sum x^*_i \le 1\) holds. Without loss of generality, we can assume equality. Otherwise, we could increase some variable \(x^*_i\) by a sufficiently small positive amount \(\epsilon \) without decreasing the robust flow value (Note that any scenario can destroy at most the additional flow that would be sent by increasing the variable by \(\epsilon \)). In the following, we claim that the optimal temporally repeated flow is of the following form:

$$\begin{aligned} x^*_0 = 2 x^*_1, \quad x^*_1 = \frac{3 x^*_2}{2}, \quad \dots , \quad x^*_{r-2} = \frac{r x^*_{r-1}}{r - 1}. \end{aligned}$$

First, let us assume that the solution is of such form. Then, by substituting, we get and \(\sum x^*_i = 1\) implies that \(x^*_0 \le (\sum _{i=1}^r 1/i)^{-1}\).

Also note that the objective function coefficient of path \(P^i\) is \(T - \tau _{e_{r - i - 1}} = r - (r - i - 1) = i + 1\) for all \(i = 0,\dots ,r-1\). Hence, \(x^*\) satisfies for every ij,

$$\begin{aligned} x^*_i (T - \tau _{e_{r - i - 1}}) = \frac{x^*_0 (i+1)}{i+1} = x^*_0 = \frac{x^*_0 (j+1)}{j+1} = x^*_j (T - \tau _{e_{r - j - 1}}). \end{aligned}$$

In other words, destroying any set of edges of cardinality \(\varGamma \) results in the same objective function value. Hence, in every scenario, one of the r paths remains unharmed, yielding an objective function value of \(x^*_0 \le (\sum _i 1/i)^{-1}\).

Now, let us assume that the solution is not of such form. Then, there exist two indices \(\ell = \arg \min _{i = 0,\dots ,r - 1} x_{i} (T - \tau _{e_{r - i - 1}})\) and \(k = \arg \max _{i = 0,\dots ,r - 1} x_{i} (T - \tau _{e_{r - i - 1}})\) with \(x_{\ell } (T - \tau _{e_{r - \ell - 1}}) < x_k (T - \tau _{e_{r - k - 1}})\). The worst case scenario will delay all edges except for \(e_{\ell }\). Averaging the flow shows that it was not optimal: Decreasing the flow on all edges with weighted flow value equal to \(x_k(T - \tau _{e_{r - k - 1}})\) and increasing the flow on all edges with weighted flow value equal to \(x_\ell (T - \tau _{e_{r - \ell - 1}})\) would strictly increase the robust flow value. \(\square \)

Proposition 7

There are instances for robust maximum flow over time whose gap between an optimal temporally repeated flow and an optimal flow is T and \(\varGamma +1\).

Proof

For fixed \(r \in {\mathbb {Z}}_+\), we construct an instance \(I_r\) with graph \(G_r = (V,E_r)\) as follows (see Fig. 4b). The vertex set always consists of four vertices \(V = \{s,v_1,v_2,d\}\). The edge set consists of a designated edge \(e^* = (v_1,v_2)\) and two sets of r parallel edges \(e^1_i = (s,v_1)\) and \(e^2_i = (v_2,d), i = 0,\dots ,r-1\). We set \(\tau _{e^*} = \varDelta _{e^*} = 0\), \(\tau _{e^1_i} = \tau _{e^2_i} = i, \varDelta _{e^1_i} = \varDelta _{e^2_i} = \infty , \varGamma = r - 1, T = r\). All edges have unit capacity. Combining the two claims below yields an optimality gap of \(\varOmega (r)\).

  • Claim There exists a solution to \(I_r\) with objective function value 1.

We define r paths \(P^i = \{e^1_i,e^*,e^2_{r-i-1}\}\) and dispatch a single unit of flow in the interval [0, 1) into each. The flow is clearly feasible and has a nominal objective function value of r. Moreover, any \(r-1\) attacked edges can destroy at most \(r-1\) units of flow, hence, yielding a flow value of at least 1.

  • Claim An optimal temporally repeated flow can send at most 1 / r units of flow.

We start by defining a temporally repeated flow with robust solution value 1 / r and show the optimality of this flow. Let \(x_i=1/r\) for all paths \(P^i, 0\le i \le r-1\).

We will argue that x is optimal with robust function value 1 / r. Let us check the objective value contribution in detail. Each path \(P^i, i= 0,\dots ,r - 1\) contributes

$$\begin{aligned} T - \tau _{e^1_i} - \tau _{e^2_{r-i-1}} = r - i - (r - i - 1) = 1 \end{aligned}$$

to the objective. Hence, sending a flow value \(x_i = 1/r\) on all r paths yields an objective function value of 1 / r independent of which \(\varGamma = r - 1\) edges between s and \(v_1\) are destroyed. Note that attacking different edges does not make any sense for this type of solution.

Now, we show that any feasible temporally repeated flow different than x yields a smaller objective function value. Let \(x'\) be a different solution, that is, there is some path \(P^i\) that has flow rate \(x'_i < 1/r\). We will show that this solution has objective value at most \(x'_i\).

More precisely, we will show that there is a scenario which leaves only the path \(P^i\) intact. We will use the scenario \(z \in {\mathcal {S}}\) with \(z_{e^1_j} = 1\) for all \(0 \le j < i\), \(z_{e^2_j} = 1\) for all \(0 \le j < r - i - 1\) and zero otherwise. The total number of edges destroyed by z is \(r - 1\). In the following, we show that in this scenario only \(P^i\) with \(x'_i<1/r\) contributes to the objective function value.

If any other path \(P \ne P^i\) should survive the scenario, it must avoid all edges affected by z. P can neither contain edges from \(\{e_1^1,\dots ,e_{i-1}^1\}\) nor from \(\{e_1^2,\dots ,e_{r-i-2}^2\}\). Let us consider the path length of such a path P. The only possibility to achieve a path length smaller than \(T=r\) is to use edges \(e_i^1\) and \(e_{r-i}^2\), that is, \(P = P^i\). We conclude that the objective value is at most \(x'_i < 1/r\), which proves the optimality of x and finishes the proof of the claim. \(\square \)

4.2 Asymptotic optimality

Although the gaps seem large, they appear only if the time horizon is relatively short, when compared to the travel times. An asymptotic bound shows that the optimality gap diminishes as the time horizon increases.

Proposition 8

For instances of the maximum robust flow over time problem with \(\varDelta _e < \infty \) for all \(e \in E\), temporally repeated flows tend to optimality for \(T \rightarrow \infty \), if all other parameters are fixed.

Proof

Let \((G,s,t,u,\varDelta ,\varGamma )\) with \(\varDelta _e < \infty \) for all \(e \in E\) be an instance of robust max flow over time, with values that do not depend on the time horizon T. If we denote the optimal objective function value of a temporally repeated flow by \(f_{\text {TR}}^{\text {OPT}}(T)\) and the value of a general flow by \(f^{\text {OPT}}(T)\) for time horizon T, then for every \(\epsilon > 0\) we show that there exists a \(T' \in {\mathbb {R}}\) such that \(f^{\text {OPT}}(T)/f_{\text {TR}}^{\text {OPT}}(T) \le 1 + \epsilon \) for all \(T \ge T'\). Since \(\varDelta \) is supposed to be a constant, we can assume that the choice of any scenario destroys at most a value of \(\lambda ^* = \varGamma \max _{e \in E} \varDelta _e u_e\). For sufficiently large T, any optimal nominal temporally repeated flow will send a flow value of at least \(F^*(T) - \lambda ^*\), where \(F^*(T)\) is the nominal optimal value for time horizon T. Moreover, as temporally repeated flows are optimal in the nominal case, we can deduce \(f^{\text {OPT}} \le F^*(T)\). Thus,

$$\begin{aligned} \frac{f^{\text {OPT}}(T)}{f_{\text {TR}}^{\text {OPT}}(T)} \le \frac{F^*(T)}{F^*(T) - \lambda ^*}, \end{aligned}$$

which tends to one as T tends to infinity. \(\square \)

4.3 Upper bounds

In the remainder of this section, we prove an upper bound on the gap between the objective function values of optimal general solutions and optimal temporally repeated flows. This gap depends on some graph parameter k introduced below. Note that flow sent along a particular path \(P\in \mathcal {P}\) only has a chance to reach the destination if each edge \(e\in P\) is reached by the flow within interval \(I_{e,P} = [\tau ^{<e}(P), T - \tau ^{\ge e}(P)]\), where \(\tau ^{<e}(P) = \sum _{e'\in E : e' <_P e}\tau (e')\) is the time required for a flow particle on path P to reach edge e. We call an instance of maximum flow over time k-coverable if for each edge \(e\in E\) it is possible to select k points in time to cover all intervals \(\{I_{e,P}\}_{P\in \mathcal {P}: e\in P}\). The same definition holds for the robust counterpart. Note that this definition only depends on the graph G, the vertices sd, the travel times \(\tau \) and the time horizon T. Denote these k points in time by \(t^e_1, \ldots t^e_k\). We also call these points witnesses of edge e. That is, we define for each edge \(e\in E\) the interval graph \(H_e\) whose vertex set corresponds to the intervals \(\{I_{e,P}\}_{P\in \mathcal {P}: e\in P}\) two of which are linked by an edge if and only if the associated intervals overlap. Then the instance is k-coverable if and only if the vertices of each of the interval graphs \(H_e\) can be covered by not more than k cliques. Since the clique-covering-number equals the maximum cardinality of a stable set by Dilworth’s Theorem [6], we define

Definition 2

An instance of maximum robust flow over time is k-coverable if and only if the maximum size of a stable set in all of the associated interval graphs \(H_e, e\in E,\) is at most k.

For example, an instance satisfying \(\max _{P \in \mathcal {P}} \tau ^{<e}(P) + \max _{P \in \mathcal {P}} \tau ^{\ge e}(P) \le T\) for all \(e \in E\) is 1-coverable: for an edge e, select \(t^e_1 \in [\max _{P \in \mathcal {P}} \tau ^{<e}(P), T-\max _{P \in \mathcal {P}} \tau ^{\ge e}(P)]\). This inequality is fulfilled in directed acyclic graphs whose longest path length does not exceed the time horizon, that is, where \(\max _{P \in \mathcal {P}} \tau (P) \le T\). Note that maximum robust flow over time instances on a directed acyclic graph with the T-bounded path length property, that is, with \(\max _{P \in \mathcal {P}, z \in {\mathcal {S}}} \tau (P)+\varDelta _z(P) \le T\), are also 1-coverable.

More vividly, let us consider the graphs in Fig. 4. The graph in (a) has \(k=1\), as its longest path length does not exceed the time horizon. The graph in (b) has \(k=2\), as can be seen by considering the edge \(e^* = (v_1,v_2)\) and the following three paths. Let \(P_1\) be the path with the top edge from s to \(v_1\) and the bottom edge from \(v_2\) to d. It has interval \(I_{e^*,P_1} = [0,1]\). \(P_2\) with both middle edges has \(I_{e^*,P_2} = [1,2]\). Finally, \(P_3\) with the first bottom edge and the last top edge has \(I_{e^*,P_3} = [2,3]\). A minimum covering of these intervals can be achieved by choosing \(t^{e^*}_1 = 1, t^{e^*}_2 = 2\). Hence, k is at least two. One can easily check that the remaining intervals do not change this. Moreover, one can observe that all remaining edges are 1-coverable.

It is shown in [12] that a stable set of maximum cardinality in an interval graph, in general, can be found by a simple greedy approach: sweep from right to left through the whole domain, in our case [0, T], and, iteratively, select the interval with rightmost left endpoint. Remove this interval together with all intersecting intervals from the list, until no intervals are remaining. Moreover, select the left endpoint as a witness for the covering. In this work, we do not discuss the complexity status of computing k in detail. We only note that the greedy approach described above is, in general, certainly not strongly polynomial as it depends on the time horizon T and on the number of s-d paths in the given graph.

Next, we prove upper bounds on the optimality gap of temporally repeated flows. Since the proofs are rather technical, we distinguish between the case \(\varDelta _e \in \{0,\infty \}\) for all \(e \in E\) and the case \(\varDelta _e \in {\mathbb {Z}}_+\). The former turns out to be simpler and is covered in Theorem 2, the latter is covered in Theorem 3 and builds upon the former.

Theorem 2

Let a k-coverable instance with \(\varDelta _e \in \{0,\infty \}\) for all \(e \in E\) be given. Then, an optimal temporally repeated solution is an \(O(k \log T)\)-approximation for the robust maximum flow over time problem.

Additionally, we derive an upper bound for general instances. Let \(\bar{\varDelta }_z(P)\) denote the effective amount of flow cut off by scenario \(z \in {\mathcal {S}}\) on path P, that is, \(\bar{\varDelta }_z(P) = \min \{ \varDelta _z(P), T - \tau (P) \}\). Then we define

$$\begin{aligned} \eta = \max _{P \in {\mathcal {P}},z : \bar{\varDelta }_z(P) < T - \tau (P)} \frac{T - \tau (P)}{T - \tau (P) - \bar{\varDelta }_z(P)}, \end{aligned}$$

or \(\eta = 1\), if no such path exists. The value can be interpreted as follows. If \(\eta = 1\), the total contribution of flow on a path P in a temporally repeated solution is either \(x_P(T - \tau (P))\), or zero, depending on whether or not the path is attacked by the worst-case scenario. If \(\eta \) is large, the ratio between the contribution of path P, if P is not attacked, and the non-zero contribution for some scenarios might be as large as \(\eta \). We will see that this ratio makes it harder to estimate the loss in the proof of Theorem 3.

Theorem 3

Let a k-coverable instance with \(\varDelta \in {\mathbb {Z}}_+\) be given. Then, an optimal temporally repeated solution is an \(O(\eta k \log T)\)-approximation for the robust maximum flow over time problem.

The proof strategy of both theorems is the same and can be viewed as a dual fitting approach. We present primal-dual pairs (P), (D) modeling robust temporally repeated flows and (P’), (D’) modeling general solutions to the robust flow over time problem. It is clear by strong duality that \(\text {opt}(P) = \text {opt}(D)\) and \(\text {opt}(P') = \text {opt}(D')\). Hence, in order to prove a bound on the optimality gap, it suffices to show \(\text {opt}(D') \le \alpha \text {opt}(D)\), where \(\alpha \ge 1\) is the upper bound on the optimality gap from Theorems 2 and 3, respectively. With this factor, we conclude

$$\begin{aligned} \text {opt}(P') = \text {opt}(D') \le \alpha \text {opt}(D) = \alpha \text {opt}(P) \Leftrightarrow \frac{f^{\text {OPT}}}{f^{\text {OPT}}_{\text {TR}}} = \frac{\text {opt}(P')}{\text {opt}(P)} \le \alpha . \end{aligned}$$
(2)

We bound the factor \(\alpha \) via a geometric box interpretation of solutions in the dual problems. From an optimal solution of (D), we construct a feasible solution of (D’), guaranteeing that the objective function values differ by at most the factor of \(\alpha \).

In the remainder, we prove Theorems 2 and 3. We start by introducing the LP models. (P) is a model for temporally repeated flows with corresponding dual (D). Without the constraints for scenarios z, (P) models (nominal) temporally repeated flows. The variable \(\lambda \) corresponds to the amount of flow that is lost due to the actions of the adversary.

$$\begin{aligned} \max _{x \in {\mathbb {R}}_+^{|\mathcal {P}|},\ \lambda \in {\mathbb {R}}_+}\quad&\sum _{P \in \mathcal {P}} (T - \tau (P) )x_P - \lambda \\ \text {s.t.} \quad&\sum _{\begin{array}{c} P \in \mathcal {P} : \\ e \in P \end{array}} x_P \le u_e&\quad&\forall e \in E \\&\sum _{\begin{array}{c} P \in \mathcal {P} : \\ z \cap P \ne \emptyset \end{array}} \bar{\varDelta }_z(P) x_P - \lambda \le 0&\quad&\forall z \in {\mathcal {S}}\end{aligned}$$
(P)

The corresponding dual with variables \(\alpha _e\) and \(\beta _z\) is:

$$\begin{aligned} \min _{\alpha \in {\mathbb {R}}_+^{|E|},\ \beta \in {\mathbb {R}}_+^{|{\mathcal {S}}|}}\quad&\sum _{e \in E} u_e \alpha _e \\ \text {s.t.} \quad&\sum _{z \in {\mathcal {S}}} \beta _z \le 1 \\&\sum _{e \in P} \alpha _e + \sum _{\begin{array}{c} z \in {\mathcal {S}}: \\ z \cap P \ne \emptyset \end{array}} \bar{\varDelta }_z(P) \beta _z \ge T - \tau (P)&\quad&\forall P \in {\mathcal {P}}\end{aligned}$$
(D)

Now, we present a model (P’) for general robust solutions. We introduce variables \(x_P^i\) which correspond to the flow rate sent into path P in the dispatch interval \([i, i+1)\). Here, we implicitly use the fact that we can restrict to integer dispatch intervals, as shown in Proposition 1. As before, \(\lambda \) is the loss incurred after the adversary acts. For ease of notation, we assume that all variables with a negative index in (P’) are omitted, e.g. a variable \(x_P^{-5}\) is assumed to be excluded from the model. This can also be seen as having variables \(x_P^i\) for all \(i \in {\mathbb {Z}}\) and forcing \(x_P^i = 0\) for all \(i < 0\) or \(i \ge T - \tau (P)\). We use the notation \(\varDelta ^{<e}_z(P) = \sum _{e' \in P : e' <_P e} \varDelta _{e'} z_{e'}\) to denote the delay on path P induced by scenario z until edge e.

$$\begin{aligned} \max _{x,\ \lambda \ge 0}\quad&\sum _{P \in \mathcal {P}} \sum _{0 \le i< T - \tau (P)} x_P^i - \lambda \\ \text {s.t.} \quad&\sum _{\begin{array}{c} P \in \mathcal {P} :\\ e \in P \end{array}} x_P^{t - \tau ^{<e}(P) - \varDelta ^{<e}_z(P) } \le u_e \quad&\forall e \in E, \forall 0 \le t < T, \forall z \in {\mathcal {S}}\\&\sum _{P \in \mathcal {P}} \sum _{i \ge T - \tau (P) - \varDelta _z(P)} x_P^i - \lambda \le 0 \quad&\forall z \in {\mathcal {S}}\end{aligned}$$
(P')

The corresponding dual with variables \(\alpha _e^t(z)\) and \(\beta _z\) is:

$$\begin{aligned} \min _{\alpha ,\ \beta \ge 0}\quad&\sum _{e \in E} u_e \sum _{ 0 \le t< T} \sum _{z \in {\mathcal {S}}} \alpha _e^t(z) \\ \text {s.t.} \quad&\sum _{z \in {\mathcal {S}}} \beta _z \le 1 \\&\sum _{e \in P} \sum _{z \in {\mathcal {S}}} \alpha _e^{ i + \tau ^{<e}(P) + \varDelta ^{<e}_z(P) }(z) + \sum _{z \in {\mathcal {S}}(i,P) } \beta _z \ge 1 \quad&\forall P \in {\mathcal {P}}, \forall 0 \le i < T - \tau (P). \end{aligned}$$
(D')

By \({\mathcal {S}}(i,P)\) we denote for a path P and time i the set of scenarios for which flow on path P sent into the network at time i will not reach the destination, that is, \({\mathcal {S}}(i,P) = \{ z \in {\mathcal {S}}: i \ge T - \tau (P) - \varDelta _z(P) \}\). In other words, these are the scenarios for path P which prevent flow sent at time i from contributing to the objective.

Graphical Interpretation of (D) The remaining proofs in this section rely on the following graphical interpretation of the duals (D) and (D’). We consider an optimal solution \((\alpha ^*, \beta ^*) \in (D)\) and interpret the dual constraints and variables of (D) as boxes in a two-dimensional space \([0,T] \times [0,1]\) as follows (see Fig. 5): Let us consider the dual constraint for a path \(P \in {\mathcal {P}}\) and assume \(\bar{\varDelta }_z(P) \in \{0, T - \tau (P)\}\) for all \(z \in {\mathcal {S}}\), that is, P only contains edges that have a very large value for \(\varDelta \), or zero. The general case is discussed in the proof of Theorem 3.

Fig. 5
figure 5

Illustration of the box model with three boxes. The height profile is a solution constructed for the proof of Theorem 2

We can regard the dual constraint of such a path P as a set of boxes

$$\begin{aligned} B^e_P = \left[ \tau ^{<e}(P), T - \tau ^{\ge e}(P) \right] \times \left[ 0, \Bigl ( 1 - \beta ^*(P) \Bigr ) \frac{\alpha _{e}^*}{\alpha ^*(P)} \right] ,\quad e \in P, \end{aligned}$$

where \(\alpha ^*(P) = \sum _{e \in P} \alpha ^*_e\) and \(\beta ^*(P) = \sum _{z \in {\mathcal {S}}: z \cap P \ne \emptyset } \beta ^*_z\). Each box \(B^e_P\) starts at the earliest possible arrival of flow at edge e traveling along path P and ends at the latest reasonable departure time from edge e. As soon as we consider the total area covered by the boxes of a path P, the connection between the boxes and their dual constraint becomes evident.

$$\begin{aligned} \sum _{e \in P} \text {vol}(B^e_P) = \sum _{e \in P} \left( T - \tau (P)\right) \Bigl (1 - \beta ^*(P)\Bigr )\frac{\alpha ^*_e}{\alpha ^*(P)} = T - \tau (P) - \sum _{\begin{array}{c} z \in {\mathcal {S}}: \\ z \cap P \ne \emptyset \end{array}} \beta ^*_z \bar{\varDelta }_z(P) \end{aligned}$$

Here we used that \(\bar{\varDelta }_z(P) = T -\tau (P)\) for \(z \cap P \ne \emptyset \) as \(\varDelta _e \in \{0, \infty \}\). The sum of volumes of all boxes of a path is equal to the corresponding right hand side value of its dual constraint in (D) (assuming all terms involving \(\beta ^*\) are moved to the right hand side). Furthermore, the volume of \(B^e_P\) is a lower bound for the value of \(\alpha ^*_e\) for all edges \(e \in P\). This can be seen by considering the dual constraint for path P in (D), multiplying it by \(\alpha ^*_e\) and rearranging the terms to have \(vol(B^e_P)\) as the right hand side value.

$$\begin{aligned} \alpha ^*(P) =&\sum _{e' \in P} \alpha ^*_{e'} \ge \left( 1- \beta ^*(P) \right) \left( T - \tau (P) \right) \nonumber \\ \Leftrightarrow&\quad \alpha ^*_e \alpha ^*(P) \ge \alpha ^*_e \left( 1- \beta ^*(P) \right) \left( T - \tau (P) \right) \nonumber \\ \Leftrightarrow&\quad \alpha ^*_e \ge \frac{\alpha ^*_e}{\alpha ^*(P)} \left( 1- \beta ^*(P) \right) \left( T - \tau (P) \right) = vol(B^e_P). \end{aligned}$$
(3)

In the following, we will use the area covered by boxes in order to construct a feasible solution for (D’) and use the volume of the boxes in order to estimate the total cost of the solution.

In a k-coverable instance, every box \(B^e_P\) intersects at least one of the lines \(t^e_i \times [0, 1]\). Recall that \(t^e_i\) are the witnesses of edge e, that is, the points used in order to cover the interval graph in the definition of k-coverability. In the interval graph \(H_e\), we had intervals \(I_{e,P} = [\tau ^{<e}(P), T - \tau ^{\ge e}(P)]\) for path P. Note that this is exactly the shadow of box \(B^e_P\) on the horizontal t-axis.

For the remainder of this part, we will restrict all arguments to boxes which intersect a specific line \(t^* = t^e_i \times [0, 1]\). That is, we will consider only boxes \(\{B^e_P : \tau ^{<e}(P) \le t^* \le T - \tau ^{\ge e}(P) \}\). Afterwards, in the proofs of the theorems, we will do a summation over all lines \(t^e_i\). A box may intersect multiple lines\(\textemdash \)and thus be considered multiple times\(\textemdash \)but this does not harm the approximation guarantee. In particular, we assume that no box starts after, respectively ends before, \(t^*\). By \(t_{min}\) and \(t_{max}\) we denote the earliest and latest points on [0, T] covered by any of the considered boxes (see Fig. 5). That is, \(t_{min} = \min \{ \tau ^{<e}(P) : \tau ^{<e}(P) \le t^* \le T - \tau ^{\ge e}(P) \}\) and \(t_{max}\) is defined analogously.

Construction of a feasible solution for (D’) Let us examine feasible values for the dual variables \(\alpha _e^t(z)\) in (D’) which can be constructed from the graphical interpretation of \((\alpha ^*,\beta ^*)\).

First, let us see how \(\alpha _e^t(z)\) can be set in order to become feasible for the constraints induced by a single path P. We set \(\alpha _e^t(z) = 0\) for all \(z \ne \emptyset \). Setting these variables to a positive value would be hard to analyze. But in order to become feasible, we set \(\alpha _e^t(\emptyset )\) to the height of box \(B^e_P\) in each slice \((t,t+1)\). This results in \(\alpha _e^t(\emptyset )\) being the height of \(B^e_P\), if \(\tau ^{<e}(P) \le t < T - \tau ^{\ge e}(P)\), or zero otherwise. Then

$$\begin{aligned} \sum _{e \in P} \sum _{z \in {\mathcal {S}}} \alpha _e^{i + \tau ^{<e}(P) + \varDelta _z^{<e}(P)}(z) = \sum _{e \in P} \left( 1 - \sum _{z \in {\mathcal {S}}(i,P)} \beta ^*_z \right) \frac{\alpha _e^*}{\alpha ^*(P)} = 1 - \sum _{\begin{array}{c} z \in {\mathcal {S}}(i,P) \end{array}} \beta ^*_z. \end{aligned}$$

That means, if we had only a constraint for a single path, the solution would be feasible. But we have many paths and the height of their boxes \(B^e_P\) differs.

Hence, if we set \(\alpha _e^t(\emptyset )\) to the maximal height of all boxes \(B^e_P\) intersecting slice \((t,t+1)\), we obtain a feasible solution \((\alpha ,\beta ^*) \in (D')\). Formally, the solution can be described as

$$\begin{aligned} \alpha _e^t(\emptyset ) = \max _{P \in \mathcal {P}_e^t} \left\{ \left( 1 - \sum _{z \in {\mathcal {S}}(t,P) } \beta ^*_z \right) \frac{\alpha _e^*}{\alpha ^*(P)} \right\} , \end{aligned}$$

where \(\mathcal {P}_{e}^t = \{P : e \in P \wedge \tau ^{<e}(P) \le t < T - \tau ^{\ge e}(P) \}\) describes the set of paths which can utilize edge e at time t. And \(\alpha _e^t(z) = 0\) for all other variables. The height profile in Fig. 5 depicts this solution.

The constructed solution is feasible for (D’). We will now analyze its total cost. Intuitively, we argue as follows:

The sum of dual variables, \(\sum _{0 \le t < T} \alpha _{e}^t(\emptyset )\) for any fixed edge e is equal to the area covered by the union of all boxes \(B^e_P\) induced by paths \(P \in \mathcal {P}\) such that \(e \in P\). Thus, in order to prove the \(O(k \log T)\)-approximation factor for Theorem 2, we will show that, for any fixed edge \(e \in E\), the total area covered by the union of all boxes is bounded by \(O(k \log T)\) times the area of the largest box. Recall that (3) implies that the value of \(\alpha ^*_e\) in the temporally repeated solution is lower bounded by the area of the largest box. With this, we can estimate the total solution cost of \((\alpha ,\beta ^*)\) in terms of \((\alpha ^*,\beta ^*)\).

Proof of Theorem 2

In order to prove the theorem, we will show \(\text {opt}(D') \le O(k \log T) \text {opt}(D)\), which is sufficient in combination with (2). Therefore, we will use the argumentation from the preceding paragraphs, in particular, we will use the constructed solution \(\alpha _e^t(z)\). We will show

$$\begin{aligned} \sum _{ 0 \le t < T} \sum _{z \in {\mathcal {S}}} \alpha _e^t(z) = vol \left( \bigcup _{\begin{array}{c} P \in \mathcal {P} :\\ e \in P \end{array}} B^e_P \right) \le \sum _{i=1}^{k} vol \left( \bigcup _{\begin{array}{c} P \in \mathcal {P}_e^{t_i} \end{array}} B^e_P \right) \le O(k \log T) \alpha ^*_e \quad \forall e \in E. \end{aligned}$$
(4)

Recall that \((\alpha ^*, \beta ^*)\) was an optimum solution to (D). Thus, result (4) then will prove

$$\begin{aligned} \text {opt}(D') \le \sum _{e \in E} u_e \sum _{ 0 \le t < T} \sum _{z \in {\mathcal {S}}} \alpha _e^t(z) \le O(k \log T) \sum _{e \in E} u_e \alpha ^*_e = O(k \log T) \text {opt}(D). \end{aligned}$$

Without loss of generality, we can assume \(\sum _{z \in {\mathcal {S}}}\beta ^*_z = 1\). For the remainder of the proof, we will consider the graphical interpretation of the duals from the preceding paragraphs and fix an edge \(e \in E\) and witness at \(t^* = t^e_i\). For ease of notation, we use \(\mathcal {P}\) to denote the set \(\mathcal {P}_e^{t^*}\) of all paths whose boxes \(B_e^P\) intersect \(t^*\). If a path intersects multiple witnesses, we consider it multiple times.

We will show that the total volume of the union of the boxes intersecting \(t^*\) can be bounded by \(O(\log T)\alpha _e^*\). Summation over \(t_i^e\) with \(i \le k\) yields the result.

Since a single edge e is fixed and since every box \(B^e_P\) for each path \(P \in \mathcal {P}\) intersects the point \(t^*\), it is easy to see that the sets of paths \(\mathcal {P}^\ell = \{P \in \mathcal {P} : T - \tau ^{\ge e}(P) \ge t^* + (t_{max} - t^*) 2^{-\ell } \}\) are monotonically increasing, that is, \(\mathcal {P}^i \subseteq \mathcal {P}^{i+1}\). The set \(\mathcal {P}^\ell \) contains all rectangles covering some area to the right of the line \(t^* + (t_{max} - t^*) 2^{-\ell }\).

Fig. 6
figure 6

Illustration of the proof of Theorem 2. The interval \([t^*,t_{max}]\) contains three boxes (orange, blue, green). The total area is covered by copies of \(P_i, i \ge 1\), the copies are black (slightly moved up/down to distinguish different copies). The box used in iteration 2 and 3 is the same, moved to a different offset. We also assume that \(\frac{t_{max} - t^*}{8} \le \alpha ^*_e\), hence, the final box is just the slice of height [0, 1]. The height profile of the solution is depicted in red (color figure online)

Now, let us consider the set \(\mathcal {P}^1\) and pick the path \(P_1 \in \mathcal {P}^1\) whose box \(B_1\) is the highest among all candidates, that is,

$$\begin{aligned} P_1 = \arg \max _{P \in \mathcal {P}^1} \left( 1 - \sum _{z \in {\mathcal {S}}(t^*,P)} \beta ^*_z \right) \frac{\alpha _e^*}{\alpha ^*(P)}. \end{aligned}$$

\(B_1\) has the largest height among all boxes which intersect the interval \([t^* + (t_{max} - t^*)\frac{1}{2}, t_{max}]\). Furthermore, it has a total width exceeding the width of the interval, as it contains both, \(t^*\) and \(t^* + (t_{max} - t^*)\frac{1}{2}\). Hence, we can take a copy of \(B_1\), shift it such that it starts at \(t^* + (t_{max} - t^*)/2\) and cover the total area of the interval \([t^* + (t_{max} - t^*)/2, t_{max}]\). An example is given in Fig. 6.

Analogously, we can proceed with increasing \(\ell \) in order to pick a path \(P_\ell \in \mathcal {P}^\ell \) whose box \(B_\ell \) covers the interval \([t^* + (t_{max} - t^*) 2^{-\ell }, t^* + (t_{max} - t^*) 2^{-\ell +1}]\). As soon as \(t^* + (t_{max} - t^*) 2^{-\ell } \le \alpha ^*_e\), we can stop as the remaining area in the interval \([t^*, t^* + \alpha ^*_e]\) is at most \(\alpha ^*_{e}\). The total area consumption of chosen boxes is bounded by \(O(\log T) \alpha ^*_e\) as the length of the remaining interval to be covered is divided by two in each step. Recall that \(\alpha ^*_e\) is an upper bound on the volume of all of the considered boxes.

In summary, we have just shown that the total area covered by boxes in the interval \([t^*, t_{max}]\) can be bounded. By symmetry, the same arguments also hold for the area covered by boxes in the interval \([t_{min}, t^*]\). Here, we shift boxes to the left instead of to the right. So the total area covered by boxes that intersect \(t^*\) can be bounded by \(2 \cdot O(\log T) \alpha ^*_e\). Recall \(\mathcal {P} = \cup _{1 \le i \le k} \{ P \in \mathcal {P} : P \cap t^e_i \ne \emptyset \}\), hence,

$$\begin{aligned} vol \left( \bigcup _{\begin{array}{c} P \in \mathcal {P} :\\ e \in P \end{array}} B^e_P \right) \le \sum _{i=1}^{k} vol \left( \bigcup _{\begin{array}{c} P \in \mathcal {P}_e^{t_i} \end{array}} B^e_P \right) \le \sum _{i=1}^k 2 \cdot O(\log T) \alpha ^*_e = O(k \log T) \alpha ^*_e \end{aligned}$$

holds, which concludes the proof. \(\square \)

Since we restricted the preceding argumentation only to the case when \(\varDelta \in \{0,\infty \}\), we will now generalize it towards arbitrary delays in the proof of Theorem 3.

Proof of Theorem 3

We begin the proof by generalizing the box model to general scenarios. Let us fix a path P. Again, we want to construct geometric objects \(B^e_P\) such that \(\sum _{e \in P} vol(B^e_P)\) equals the right hand side value of the dual constraint of path P in (D) (assuming that all terms involving \(\beta \) are moved to the right hand side).

Therefore, let us start with the following boxes

$$\begin{aligned} \hat{B}^e_P = \left[ \tau ^{<e}(P), T - \tau ^{\ge e}(P) \right] \times \left[ 0, \frac{\alpha ^*_e}{\alpha ^*(P)} \right] . \end{aligned}$$

Let us also fix an edge \(e \in P\) and order the scenarios \(z_i, 1 \le i \le \ell \) with \(\beta ^*_{z_i} > 0\) such that \(\bar{\varDelta }_{z_i}(P) \ge \bar{\varDelta }_{z_{i+1}}(P)\) for all \(1 \le i < \ell \). For each \(1 \le i \le \ell \), we cut out a section of box \(B^e_P\) of height \(\beta ^*_{z_i}\) starting at the top right boundary of the box. That is, for each scenario, define the following rectangles

$$\begin{aligned} A^e_{z_i}= & {} \left[ T - \tau ^{\ge e}(P) - \bar{\varDelta }_{z_i}(P), T - \tau ^{\ge e}(P) \right] \\&\times \left[ \left( 1 - \sum _{j=1}^i \beta ^*_{z_j} \right) \frac{\alpha ^*_e}{\alpha ^*(P)}, \left( 1 - \sum _{j=1}^{i-1} \beta ^*_{z_j} \right) \frac{\alpha ^*_e}{\alpha ^*(P)} \right] \end{aligned}$$

and cut these out of \(\hat{B}^e_P\). So we end up with a polygon \(B^e_P = \hat{B^e_P}{\setminus }\left( \bigcup _{i=1}^\ell A^e_{z_i} \right) \) (see the box shaped as a staircase in Fig. 7). Also note that the boxes A do not overlap - except for their boundaries—and are always contained in \(\hat{B^e_P}\). Hence, it is simple to compute the total volume of the polygons of any path.

$$\begin{aligned} \sum _{e \in P} vol(B^e_P)&= \sum _{e \in P} \left( \frac{\alpha ^*_e}{\alpha ^*(P)} \left( T - \tau (P) \right) - \sum _{i=1}^{\ell } vol(A_{z_i}) \right) \\&= \sum _{e \in P} \left( \frac{\alpha ^*_e}{\alpha ^*(P)} \left( T - \tau (P) \right) - \sum _{i=1}^{\ell } \bar{\varDelta }_{z_i}(P) \beta ^*_{z_i} \frac{\alpha ^*_e}{\alpha ^*(P)} \right) \\&= T - \tau (P) - \sum _{\begin{array}{c} z \in {\mathcal {S}}: \\ z \cap P \ne \emptyset \end{array}} \bar{\varDelta }_z(P) \beta ^*_z. \end{aligned}$$

Analogously to (3) we can deduce that \(\alpha ^*_e \ge vol(B^e_P)\) holds for all P and \(e \in P\), in other words, the volume of polygons is again a lower bound on the variables of the dual temporally repeated solution.

Fig. 7
figure 7

Illustration of the box model for arbitrary values of \(\varDelta \). The boundary of the polygon \(B^e_P\) is drawn in solid blue. The corresponding rectangular box \(\bar{B}^e_P\) from the proof of Theorem 3 is drawn red, dashed (color figure online)

Note that the preceding construction of a feasible solution for (D’) used only variables \(\alpha _e^t(\emptyset )\). Hence, the solution constructed therein is not only feasible if \(\varDelta _e \in \{0,\infty \}\), but also for general \(\varDelta _e \in {\mathbb {Z}}_+\) by the same arguments. Fix a path P and set \(\alpha _e^t(\emptyset )\) to the height of polygon \(B^e_P\) in the slice \((t,t+1)\). This time, note that the height of a polygon corresponding to a specific path P and an edge \(e \in P\) may differ depending on the actual slice. Then the solution is feasible as the height of polygons in slice \((t,t+1)\) is, by construction, equal to \(\frac{\alpha ^*_e}{\alpha ^*(P)} \left( 1 - \sum _{z \in {\mathcal {S}}(t,P)} \beta ^*_z \right) \).

It remains to prove that the total cost of the constructed solution \(\alpha \) is bounded by the total cost of the temporally repeated solution times at most a factor \(O(\eta k \log T)\). Unfortunately, the staircase structure of \(B^e_P\) prevents us from covering the area as in the proof of Theorem 2. If we take a copy of a staircase structure and shift it to the left, the area to the left of \(t^*\) will not necessarily be covered. Recall that, at the end of the proof of Theorem 2, we pointed out that we have to cover the area to the right and the area to the left of each witness \(t^*\). The proof explicitly described how copies of boxes are used to cover the area to the right. For the area to the left, the proof was analogous. For the staircase structure, this does not work. For example, consider the staircase structure in Fig. 7. If we take a copy of it and move it to the left by half of its width, the copy will not cover the left half of the staircase structure. In contrast, for the boxes in the proof of Theorem 2, the copy would have covered the left half of the box.

Therefore, we will use the following strategy. In a first step, we will replace all polygons \(B^e_P\) from the temporally repeated solution by rectangles \(\bar{B}^e_P\). This will cost at most a factor \(\eta \). The polygons will be replaced in such a way that the height profile with respect to \(B^e_P\) is contained in the height profile with respect to \(\bar{B}^e_P\). Afterwards, we can apply exactly the same proof as in Theorem 2. The proof will be concluded.

The replacement is done as follows. Fix a path P and \(e \in P\) and consider the polygon \(B^e_P\). We want to replace it by a rectangle \(\bar{B}^e_P\) that contains the polygon. Therefore, let \(h = \frac{\alpha ^*_e}{\alpha ^*(P)} \left( 1 - \sum _{z \in {\mathcal {S}}: \bar{\varDelta }_z(P) = T - \tau (P)} \beta ^*_z \right) \) be the highest point of the polygon. We will replace \(B^e_P\) by the rectangle \(\bar{B}^e_P = \left[ \tau ^{<e}(P), T - \tau ^{\ge e}(P) \right] \times \left[ 0, h \right] \). Clearly, it contains the polygon. The factor we lose can be bounded as follows. We use \({\mathcal {S}}_1 = \{z \in {\mathcal {S}}: \bar{\varDelta }_z(P) = T - \tau (P) \}\) and \({\mathcal {S}}_2 = {\mathcal {S}}{\setminus }{\mathcal {S}}_1\) to partition the scenarios. The first set contains all scenarios that destroy the entire flow on path P, the latter contains scenarios that destroy only a smaller amount.

$$\begin{aligned} \frac{vol(\bar{B}^e_P)}{vol(B^e_P)}&= \frac{\frac{\alpha ^*_e}{\alpha ^*(P)} \left( T - \tau (P) \right) \left( 1 - \sum _{z \in {\mathcal {S}}_1} \beta ^*_z \right) }{\frac{\alpha ^*_e}{\alpha ^*(P)} \left( T - \tau (P) - \sum _{z \in {\mathcal {S}}} \beta ^*_z \bar{\varDelta }_z(P) \right) } \\&= \frac{\left( T - \tau (P) \right) \left( 1 - \sum _{z \in {\mathcal {S}}_1} \beta ^*_z \right) }{ T - \tau (P) - \sum _{z \in {\mathcal {S}}_1} \beta ^*_z \left( T - \tau (P) \right) - \sum _{z \in {\mathcal {S}}_2} \beta ^*_z \bar{\varDelta }_z(P)} \\&= \frac{\left( T - \tau (P) \right) \left( 1 - \sum _{z \in {\mathcal {S}}_1} \beta ^*_z \right) }{ \left( T - \tau (P) \right) \left( 1 - \sum _{z \in {\mathcal {S}}_1} \beta ^*_z \right) - \sum _{z \in {\mathcal {S}}_2} \beta ^*_z \bar{\varDelta }_z(P)} \\&\le \frac{\left( T - \tau (P) \right) \left( 1 - \sum _{z \in {\mathcal {S}}_1} \beta ^*_z \right) }{ \left( T - \tau (P) \right) \left( 1 - \sum _{z \in {\mathcal {S}}_1} \beta ^*_z \right) - \max _{z \in {\mathcal {S}}_2}\{ \bar{\varDelta }_z(P)\} \sum _{z \in {\mathcal {S}}_2} \beta ^*_z} \\&= \frac{T - \tau (P)}{ T - \tau (P) - \max _{z \in {\mathcal {S}}_2}\{ \bar{\varDelta }_z(P)\} } \le \eta . \end{aligned}$$

The last equality is due to \(\sum _{z \in {\mathcal {S}}_2} \beta ^*_z = 1 - \sum _{z \in {\mathcal {S}}_1} \beta ^*_z\). The proof is concluded since

$$\begin{aligned} \text {opt}(D') \le \sum _{e \in E}{u_e\sum _{0\le t< T}{\sum _{z \in {\mathcal {S}}}{\alpha _e^t(z)}}} \le \eta \sum _{e \in E}{u_e\sum _{0\le t < T}{\sum _{z \in {\mathcal {S}}}{\bar{\alpha }_e^t(z)}}}\le O(\eta k \log T) \text {opt}(D). \end{aligned}$$

\(\square \)

5 Open problems

In this work, we provided a first step towards modeling and solving robust flow over time problems. We have shown that temporally repeated flows under the presence of uncertainty are no longer optimal. We provided lower and upper bounds on the optimality gap. Moreover, we have shown that the relation between delays, the time horizon and the longest path length has a strong impact on the complexity status. We have shown that, for instances with T-bounded path length, an optimum temporally repeated solution can be computed in polynomial time.

Clearly, many interesting questions remain open. We want to point out a few of these explicitly which may inspire follow-up work.

In our opinion, one of the biggest questions is clearly the complexity status of robust maximum flow over time if \(\varGamma \) is bounded by a constant, even for \(\varGamma = 1\). Since the static counterpart is solvable in polynomial time for \(\varGamma = 1\), it is interesting to see if the complexity status changes already due to the introduction of travel times. The same question could be asked for temporally repeated solutions. Although we were able to show that temporally repeated solutions can be computed in polynomial time if the instance has T-bounded path length, we were not able to provide insight for the case in which this setting is not true.

A related question is the following. Note that Proposition 5 implies that, for T-bounded instances, there always exists an optimum temporally repeated solution which utilizes at most 2|E| paths. This is due to the number of constraints in the reformulated LP which we solve. It would be interesting to understand if, for general instances or even for general solutions, there always exists an optimum solution which utilizes only a polynomial number of paths. The LP formulations used in Sect. 4 contain an exponential number of variables and constraints. Hence, it is unclear whether there always exists a basic feasible solution which is not of exponential size. If one could show that there are instances for which every optimum solution is of exponential size, one should also ask if the gap between polynomial size solutions and exponential size solutions can be bounded and if such solutions can also be computed in polynomial time.

The optimality gaps provided in Sect. 4 are not necessarily tight. We have seen that for \(k = \eta = 1\) in T-bounded instances, the lower bound from Proposition 6 and the upper bound from Theorem 3 coincide up to constant factors. Apart from that, larger gaps remain. It would be interesting to close these gaps, for example by constructing instances for k-coverable instances with \(k > 1\) matching the upper bound from the Theorem. This is especially interesting for instances with \(\varDelta \in \{0,\infty \}\) as discussed in Theorem 2. Here, the gap between our lower and upper bounds is even bigger. Moreover, it would be interesting to see if the dependency on \(\eta \) in Theorem 3 is necessary. In the proof strategy we used, we were not able to remove it, although our lower bound instances always satisfied \(\eta = 1\) and we were not able to construct gap instances with \(\eta > 1\).

As mentioned before, the model studied here is a natural formulation for robust flow over time problems under uncertain travel times, using the well-established \(\varGamma \)-robustness model. Due to the worst-case nature of the models introduced here, the resulting robust counterpart is quite restrictive and in general yields conservative solutions. However, its study is interesting in order to understand robust flow over time problems. Based upon the results obtained here, more advanced and potentially less conservative models could also be studied in the future.