Keywords

1 Introduction

Recent regulation towards a market liberalization in the EU has led to the decoupling of gas trading and transport. Now the transport system operators (TSOs), who own and operate the gas networks, sell so-called transport capacity, which can be booked by the traders at entry and exit points independently. Within these booked capacities, the traders may then nominate any amount of gas that they want to insert into or withdraw from the network in the short term, that is hours or days. The TSOs have to ensure that transportation can be realized in all balanced situations, meaning that the amount of gas inserted at the entries is equal to the amount withdrawn at the exits during a certain time horizon.

Different strategies to estimate the overall transport capacity of gas networks have been developed, usually based on the evaluation of realistic and severe transport situations, see [1] or [2] for examples. An important measure for the severity of a scenario is the so-called transportmoment, i.e., the value of the induced Minimum Cost Flow Problem (MCF) [3]. The goal of the Uncapacitated Maximum Minimum Cost Flow Problem (UMMCF), which we introduce in this article, is to determine a scenario with maximum transportmoment.

In the following, we formulate two linear bilevel optimization models for UMMCF differing in the linear program used for the induced MCF. Additionally, we propose a greedy-style heuristic and present our first computational results.

2 Definitions and Notation

In this article, we consider directed flow networks \(G = (V,A)\) with node set V and arc set \(A \subseteq V \times V\), where each arc \(a \in A\) has an associated nonnegative length \(\ell _{a} \in \mathbb {R}_{\ge 0}\) and infinite capacity. \(V^{+} \subseteq V\) and \(V^{-} \subseteq V\) denote the sources and sinks of the network and w.l.o.g. we assume that \(V^{+} \cap V^{-} = \emptyset \). Additionally, we demand that there exists at least one directed path from each source \(u \in V^{+}\) towards each sink \(w \in V^{-}\) in the network.

Further, for each source \(u \in V^{+}\) a lower and an upper bound \(\underline{b}_u, \overline{b}_u \in \mathbb {R}_{\ge 0}\) with \(\underline{b}_u \le \overline{b}_u\) on its supply are given. Similarly, for each sink \(w \in V^{-}\) there is a lower and an upper bound \(\underline{b}_w,\overline{b}_w \in \mathbb {R}_{\le 0}\) with \(\underline{b}_w \le \overline{b}_w\) on its demand. At the inner nodes \(V^{0}:= V \setminus (V^{+} \cup V^{-})\) flow conservation is assumed. Hence, we define \(\underline{b}_v = \overline{b}_v = 0\) for each \(v \in V^{0}\). Finally, \(b \in \mathbb {R}^{|V|}\) is called demand and supply vector or scenario if \(b_v \in [\underline{b}_v,\overline{b}_v]\) for all \(v \in V\). It is called balanced if \(\sum \nolimits _{v \in V} b_v = 0\).

3 Bilevel Optimization Models

Next, we formulate the first linear bilevel optimization model for UMMCF. For an introduction to bilevel optimization and common notation and definitions we refer to [4].

$$\begin{aligned}&\max _{b} \quad \, \, \sum _{a \in A} \ell _a f_a \end{aligned}$$
(1)
$$\begin{aligned}&\text {s.t. } \quad b_v \in [\underline{b}_v, \overline{b}_v] \qquad \qquad \forall v \in V \end{aligned}$$
(2)
$$\begin{aligned}&\min _{f} \qquad \qquad \sum _{a \in A} \ell _a f_a \end{aligned}$$
(3)
$$\begin{aligned}&\text { s.t.} \qquad \qquad \sum _{a \in \delta ^{+}(v)} f_a - \sum _{a \in \delta ^{-}(v)} f_a = b_v \qquad \qquad \forall v \in V \end{aligned}$$
(4)
$$\begin{aligned}&f_a \ge 0 \qquad \qquad \forall a \in A \end{aligned}$$
(5)

For each node \(v \in V\) the variable \(b_v\) represents its supply or demand. Its value is chosen by the leader with respect to the upper and lower bounds (2). Given the resulting supply and demand vector, the follower solves the induced MCF problem with unlimited capacities on the arcs stated in (3)–(5). Here, the nonnegative \(f_a\) variables (5) describe the amount of flow on arc \(a \in A\). Constraints (4) guarantee that the demands and supplies of all sources and sinks are satisfied and that flow conservation holds at all inner nodes. While the follower routes the flow through the network such that the cost \(\sum _{a \in A} \ell _a f_a\) is minimized, it is the leaders goal to choose the supplies and demands in such a way that the cost is maximized, see (3) and (1). Since the arc flow formulation for the MCF problem [3] is used, we call this model the arc flow formulation (AFF) for UMMCF. Note that the demand and supply vector \(b \in \mathbb {R}^{|V|}\) as it is chosen by the leader must be balanced. Otherwise the follower’s MCF problem does not admit a feasible solution. If the bounds allow for no balanced scenarios, the problem is infeasible.

Another well-known formulation for the MCF problem, the path flow formulation [3], features flow variables for all directed paths from the sources towards the sinks instead. Since all arcs have infinite capacity in UMMCF, we can restrict ourselves to shortest paths (w.r.t. the arc lengths) here. Hence, let \(p_{uw}\) denote an arbitrary but fixed shortest path for each pair \(u \in V^{+}\) and \(w \in V^{-}\) in G. Additionally, we define \(P:= \bigcup \nolimits _{u \in V^{+}} \bigcup \nolimits _{w \in V^{-}} p_{uw}\), as well as \(P_u:= \bigcup \nolimits _{w \in V^{-}} p_{uw}\) and \(P_w:= \bigcup \nolimits _{u \in V^{+}} p_{uw}\) to simplify notation. With \(\ell _p:= \sum \nolimits _{a \in p} \ell _a\) being the length of the path \(p \in P\) and \(f_p\) denoting the flow on it, the path flow formulation (PFF) for UMMCF can then be stated as follows:

$$\begin{aligned}&\max _{b} \quad \, \, \sum _{p \in P} \ell _p f_p \end{aligned}$$
(6)
$$\begin{aligned}&\text {s.t. } \quad b_v \in [\underline{b}_v, \overline{b}_v] \qquad \qquad \forall v \in V \end{aligned}$$
(7)
$$\begin{aligned}&\min _{f} \qquad \quad \sum _{p \in P} \ell _p f_p \end{aligned}$$
(8)
$$\begin{aligned}&\text { s.t.} \qquad \qquad \sum _{p \in P_{u}} f_p= b_u \qquad \qquad \forall u \in V^{+} \end{aligned}$$
(9)
$$\begin{aligned}&\qquad \qquad - \sum _{p \in P_{w}} f_p = b_w \qquad \qquad \forall w \in V^{-} \end{aligned}$$
(10)
$$\begin{aligned}&f_p \ge 0 \qquad \qquad \forall p \in P. \end{aligned}$$
(11)

It is easy to verify that each optimal solution of PFF can be identified with an optimal solution of AFF. Thus, we can restrict ourselves to the reduced network \(G'=(V,A')\) where \(A':= \{a \in A \, | \, a \in p \text { for some } p \in P\}\) when solving AFF.

4 Classical KKT Reformulation

A common way to solve bilevel optimization problems is to reduce them to single level problems. In this article we apply the so-called classical Karush-Kuhn-Tucker (KKT) transformation [4]. The linear programs of the follower are replaced by their KKT conditions: The primal and dual constraints together with the corresponding complementary slackness conditions. Applying it to AFF and PFF yields the following two non-linear single level problems:

$$\begin{aligned}&\max _{b,f,\pi ,\phi } \quad \, \, \sum _{a \in A} \ell _a f_a \end{aligned}$$
(12)
$$\begin{aligned}&\text { s.t. } \quad \sum _{a \in \delta ^{+}(v)} f_a - \sum _{a \in \delta ^{-}(v)} f_a = b_v \qquad \forall v \in V \end{aligned}$$
(13)
$$\begin{aligned}&\pi _v - \pi _u + \phi _a=\ell _a \qquad \forall (u,v) = a \in A \end{aligned}$$
(14)
$$\begin{aligned}&\phi _a f_a= 0 \qquad \forall a \in A \end{aligned}$$
(15)
$$\begin{aligned}&f_a \ge 0 \qquad \forall a \in A \end{aligned}$$
(16)
$$\begin{aligned}&\phi _a \ge 0 \qquad \forall a \in A \end{aligned}$$
(17)
$$\begin{aligned}&\overline{b}_v \, \ge \, b_v \ge \underline{b}_v \qquad \forall v \in V, \end{aligned}$$
(18)
$$\begin{aligned}&\max _{b,f,\lambda ,\mu } \qquad \quad \sum _{p \in P} \ell _p f_p \end{aligned}$$
(19)
$$\begin{aligned}&\text { s.t.} \qquad \sum _{p \in P_{u}} f_p= b_u \qquad \forall u \in V^{+} \end{aligned}$$
(20)
$$\begin{aligned}&- \sum _{p \in P_{w}} f_p= b_w \qquad \forall w \in V^{-} \end{aligned}$$
(21)
$$\begin{aligned}&\lambda _w - \lambda _u + \mu _p=\ell _p \qquad \forall p_{uw} = p \in P \end{aligned}$$
(22)
$$\begin{aligned}&\mu _p f_p = 0 \qquad \forall p \in P \end{aligned}$$
(23)
$$\begin{aligned}&f_p \ge 0 \qquad \forall p \in P \end{aligned}$$
(24)
$$\begin{aligned}&\mu _p \ge 0 \qquad \forall p \in P \end{aligned}$$
(25)
$$\begin{aligned}&\overline{b}_v \, \ge \, b_v \ge \underline{b}_v \qquad \forall v \in V. \end{aligned}$$
(26)

In the following, we denote these two models by KKT-AFF and KKT-PFF.

5 Greedy Minimum Cost Flow Heuristic

The Greedy Minimum Cost Flow Heuristic is based on the Greedy Minimum Cost Flow Method presented in [5]. To describe it here, we introduce some additional notation: For a balanced scenario \(b \in \mathbb {R}^{|V|}\) we denote the optimal value of the induced MCF problem by T(b). Furthermore, if we say two nodes are close to another or far away from another, this is always w.r.t. the length of a shortest path between them. The Greedy MCF Heuristic works as follows:

  1. 1.

    Choose a balanced scenario \(b_{\text {init}}\) and set \(b_{\text {max}}:= b_{\text {init}}\) and \(T_{\text {max}}:= T(b_{\text {init}})\).

  2. 2.

    For each source \(x \in V^{+}\):

    1. (a)

      Set \(u:= x\), \(b:= b_{\text {init}}\), and \(T:= T(b_{\text {init}})\).

    2. (b)

      Choose \(w \in V^{-}\) with \( b_w > \underline{b}_w\) being farthest away from u.

    3. (c)

      Increase \(b_u\) and decrease \(b_w\) simultaneously until one of the values hits a bound. Denote the resulting balanced scenario by \(b'\) and let \(T':= T(b')\).

    4. (d)

      If \(T' < T\) go to (e). Otherwise set \(b:= b'\) and \(T:= T'\). If \(b'_u = \overline{b}_u\) for all \(u \in V^{+}\) or \(b'_w = \underline{b}_w\) for all \(w \in V^{-}\) go to (e). Otherwise, assign u an entry \(u'\) with \(b_{u'} < \overline{b}_{u'}\) being closest to x and go to (b).

    5. (e)

      If \(T > T_{\text {max}}\), set \(b_{\text {max}}:= b\) and \(T_{\text {max}}:= T\).

  3. 3.

    For each sink \(y \in V^{-}\):

    1. (a)

      Set \(w:= y\), \(b:= b_{\text {init}}\), and \(T:= T(b_{\text {init}})\).

    2. (b)

      Choose \(u \in V^{+}\) with \(b_u < \overline{b}_u \) being farthest away from w.

    3. (c)

      Increase \(b_u\) and decrease \(b_w\) simultaneously until one of the values hits a bound. Denote the resulting balanced scenario by \(b'\) and let \(T':= T(b')\).

    4. (d)

      If \(T' < T\) go to (e). Otherwise set \(b:= b'\) and \(T:= T'\). If \(b'_u = \overline{b}_u\) for all \(u \in V^{+}\) or \(b'_w = \underline{b}_w\) for all \(w \in V^{-}\) go to (e). Otherwise, assign w an exit \(w'\) with \(b_{w'} > \underline{b}_{w'}\) being closest to y and go to (b).

    5. (e)

      If \(T > T_{\text {max}}\), set \(b_{\text {max}}:= b\) and \(T_{\text {max}}:= T\).

  4. 4.

    Return \(b_{\text {max}}\).

The roles of entry x and exit y in the inner loops of the heuristic are to describe the direction from which flow is supposed to enter or leave the network in the created scenario, respectively. To do this, the supplies or demands of the entries or exits close to them are increased in a greedy fashion by using the corresponding farthest aways node for balancing.

Further, in the initialization phase (Step 1) the Greedy MCF Heuristic needs a scenario to start with. One way to generate it is the following: Start with the scenario where \(b_u = \underline{b}_u\) for all \(u \in V^{+}\) and \(b_w = \overline{b}_w\) for all \(w \in V^{-}\). If for example \(\sum \nolimits _{v \in V} b_v < 0\), increase the supply at one entry after the other until it hits its upper bounds using any consecutive order on \(V^{+}\). Continue until the scenario is balanced. In case that \(b_u = \overline{b}_u\) for all \(u \in V^{+}\) at some point, but the scenario is still not balanced, the problem is infeasible. If \(\sum \nolimits _{v \in V} b_v > 0\) proceed analogously.

6 Computational Experiment

Next, we present a small computational experiment based on the data from the gaslib-582 network from the GasLib benchmark library [6]. The network topology and parameters are based on real data of a part of the German pipeline system, but slightly perturbed. In addition, it contains a collection of 4227 balanced scenarios, that were created with the methods described in [2]. For each source we used zero as the lower and the maximum supply value occuring in these scenarios as upper supply bound. Equivalently, for each sink we used zero as the upper and the minimum demand value occuring in these scenarios as the lower demand bound. The table below lists some important quantities concerning the reduced network.

$$ \begin{array}{c|cccc} \text {instance} &{} \, |V|\, &{} \, |A'|\, &{} \, |V^{+}|\, &{} \, |V^{-}|\, \\ \hline \hline \text {gaslib-582} &{} 582 &{} 420 &{} 15 &{} 70 \end{array} $$

In our experiment we solve the KKT-AFF and KKT-PFF model of the gaslib-582 instance. All experiments were performed with the non-commercial MIP solver SCIP 4.0.0, using SoPlex 3.0.0 as LP solver [7]. The experiments were run on an Intel Core i7-5600U CPU with 2.6 GHz and 8GB of RAM and a time limit of 3600 s. All computations were run single-threaded.

It is important to note that for our experiment all non-linear constraints of type (15) and (23) were reformulated as SOS1 (Special Ordered Set of Type 1) constraints: Given such a set of variables, at most one of them is allowed to be non-zero in any feasible solution. In our case all the SOS1 sets contain two variables only, namely the f- and \(\phi \)-variable for each \(a \in A'\) in KKT-AFF and the f- and \(\mu \)-variable for each \(p \in P\) in KKT-PFF. For more information about SOS in general we refer to [8]. Important quantities of the two models and the computational results are shown below.

$$ \begin{array}{c|cccccc} &{} \text {vars} &{} \text {cons} &{} \text {sos1} &{} \text {LB} &{} \text {UB} &{} \text {time (in s)} \\ \hline \hline \text {KKT-AFF} &{} 1507 &{} 1002 &{} 420 &{} - &{} - &{} 3600 \\ \hline \text {KKT-PFF} &{} 2270 &{} 1135 &{} 1050 &{} 1406674 &{} 1406674 &{} 338 \end{array} $$

The second column lists the number of variables, while the third column states the number of linear constraints of the models. In the fourth column the number of SOS1 sets can be found. In the fifth column the value of the best solution is given while the sixth column contains the best upper bound found by SCIP. Finally, the last column states the solving time for the models.

While the KKT-PFF is solved to optimality within 338 s, the KKT-AFF fails to find a feasible solution, even though it contains significantly less constraints of type SOS1. Additionally, SCIP is not able to determine any upper bound on the optimal solution within the time limit. A possible explanation for this behaviour is that SCIP detects useful variable bounds for KKT-PFF due to the sparsity of its coefficient matrix compared to KKT-AFF. The result is going to be the topic of future analysis.

We additionally ran the Greedy MCF Heuristic for the instance. For the MCF problems arising in the different steps of the heuristic, we solved the arc flow formulation for the reduced network. The Greedy MCF Heuristic provided a feasible solution with value 1379907 in 88 s. The heuristic should be used to provide an initial feasible solution for the two models in future implementations.