Stationary Gas Networks with Compressor Control and Random Loads : Optimization with Probabilistic Constraints

We introduce a stationary model for gas flow based on simplified isothermal Euler equations in a non-cycled pipeline network. Especially the problem of the feasibility of a random load vector is analyzed. Feasibility in this context means the existence of a flow vector meeting these loads, which satisfies the physical conservation laws with box constraints for the pressure. An important aspect of the model is the support of compressor stations, which counteract the pressure loss caused by friction in the pipes. The network is assumed to have only one influx node; all other nodes are efflux nodes. With these assumptions the set of feasible loads can be characterized analytically. In addition we show the existence of optimal solutions for some optimization problems with probabilistic constraints. A numerical example based on real data completes this paper.


Introduction
In this paper, we present a way to model stationary gas networks with random loads.Natural gas as energy source has been popular for decades.Because of the nuclear power phase-out and aim to leave energy gained by coal behind, natural gas as energy source is more current than ever.So in this paper we study the problem of gas transport in a pipeline network mathematically.The aim of this paper is to get results in optimization problems with probabilistic constraints using the example of gas networks.
There are several studies about the mathematical problem of gas transport.A gas transport network in general can be modeled as a system of hyperbolic balance laws, like e.g., the isothermal Euler equations.In [1] one can find a great overview about existing models and their application areas.A network system is modeled as a graph with nodes end edges.It can be extended by different elements, like compressor stations, valves and resistors.In [2] the authors describes the functionality of these elements and how they can be included to the model.
We assume an active stationary state for our model that means we use compressor stations as controllable elements in a state of time-independent flows and pressures.Our model is based on the Weymouth-Equation (see [3]), a simplification of the isothermal Euler equation (see e.g., [4,5]).Further [3] also studies the isothermal Euler equations for real gas.We assume our gas to be ideal.The optimal control problem in pipeline networks has been studied in, e.g., [4,6].In our work we assume the loads to be random, so this leads to optimization problems with probabilistic constraints (see [7]).
In the next section, we introduce our gas network model, which is based on the model in [8].This is a passive one which we extend by compressor stations.So our model contains inner control variables which makes our model an active one.These controls will be one goal of the optimization in Section 4.
In Section 3 we characterize the set of feasible loads.Instead of searching a flow and a pressure vector (based on a given load vector), which fulfills the physical balance laws, we look for these vectors fulfilling a system of inequalities, which depend on bounds for the pressure.In addition, we assume the load vector to be random.So we adapt the system to the spheric-radial decomposition, which is our central tool to handle the uncertainty in the loads.

Mathematical Problems in Engineering
In Section 4, we consider some optimization problems with and without probabilistic constraints.The existence of optimal solutions is based on the analysis we did in Section 3.This should built a base for further works about optimal control problems with probabilistic constraints using the example of gas networks.
In Section 5 we present three numerical examples.The first is a minimal graph without inner control, which shows the idea of the spheric-radial decomposition.The second one is a minimal graph with inner control and the third one is based on real data, for which we present real values for a network.
In the last section we present a few ideas of extending this paper.One main aspect is the turnpike-theory.

Mathematical Modeling
We start with the introduction of the model that is also used in [8].This model does not include compressor stations.We extend this model to include compressor stations and we discuss the network analysis.Then the main tool, the so called spheric-radial decomposition, is introduced to handle the stochastic uncertainty.

Model Description.
We consider a connected, directed graph  = (V + , E) which represents a pipeline gas transport network.We assume that there are no cycles in the graph, so the network is a tree.We set |V + | fl  + 1 and |E| fl  =  (,  ∈ N).In our model, every node is either a influx node (gas enters the network) or an efflux node (gas leaves the network).An edge can either be a flux edge, so the pressure decreases along the edge, or a compressor edge, so the pressure increases along the edge.We define E  as the set of all flux edges and E  as the set of compressor edges, it follows E = E  ∪ E  with E  ∩ E  = 0.
Let  + ∈ R +1 with 1  +1  + = 0 denote the balanced load vector and assume   ≤ 0 for nodes with gas influx and   ≥ 0 for nodes with gas efflux ( ∈ {0, . . ., }).The vector 1 +1 denotes the vector of all ones in the dimension  + 1.Furthermore, a vector  ∈ R  describes the flows through the edges resp.through the pipes.The pressures at the nodes are defined in a vector  + ∈ R +1 .Let pressure bounds  +, ,  +, ∈ R +1 be given.For the pressure we consider the constraints  + ∈ [ +, ,  +, ].For further modeling we need the following definition: Definition 1.Consider the graph  = (V + , E): (i) ℎ() denotes the head node of an edge  and () denotes the feet of an edge  for all  ∈ E. (ii)  0 (V) fl { ∈ E | ℎ() = V ∨ () = V} denotes all edges which are connected to node V.
(iii) The matrix  +  ∈ R +1× ,  + , fl (V  ,   ) with is called the incidence matrix of the graph .
Note that definition (iv) only makes sense since we assumed the graph to be tree-structured, so there are no cycles and the union is finite.The model is based upon the conservation equations of mass and momentum.The mass equation for the nodes is formulated for every node by ( This is equivalent to Kirchhoff 's first law (see [9]) and by using the definition of the incidence matrix, the equation for mass conservation for the whole graph is As balance laws we use the isothermal Euler equations (see [3,4,10]) for a horizontal pipe, so the flow through every flux edge is modeled by Here,  is the gas density,  is the speed of sound,  is a (constant) friction coefficient and  is the diameter of the pipe.
We assume first, that the network is in a steady state, so the time derivatives are equal to zero.And second, we assume the gas flow to be slow, so the coefficient (  /) 2 is negligible.These assumptions simplify the equations enormously.With the ideal gas equation  =    (see [9]) we get a direct dependency between pressure and density.Solving this simplified equation leads us to the so called Weymouth-Equation (see [3]): Here,   is the specific gas constant,  is the temperature of the gas and   is the length of the pipe .This equation shows the pressure drop along the pipes (see Figure 1).Some articles consider the isothermal Euler equations in gas transport without these simplifications, e.g., [5,10].
Compressor stations counteract the pressure drop along the pipes.These stations are modeled as pipes without friction.We use the following model equation (see [1], section 7.4.7;[11], section 2.3): Here,   and   are the pressures at the end resp.at the beginning of one pipe,  and  are constants and ũ, which is our control, is the specific change in adiabatic enthalpy.
More information about the parameters can be found in [11].In addition, [2] contains more information about the functionality of compressor stations and a deduction of the equation.A short transformation of the equation leads to our representation of the pressure rise along the compressor edges: It holds   ≥ 1 where   = 1 means that the compressor station is switched off (see Figure 2).Now, we define the set of feasible loads.We say that a vector  + ∈ R +1 is feasible, if (3), (5), and (7) are fulfilled.So the feasible set (here called M) is defined as follows: ] and (3) , ( 5) , (7) are fulfilled} . (8)

Stochastic Uncertainty in the Loads.
In reality, the future demand for gas can never be known exactly a priori.It depends on various physical effects like e.g., the temperature of the environment.Also personal reasons can be responsible for a higher or lower use of gas.Thus the load vector is considerd to be a random vector.Many papers study how the distribution functions of the load vector can be identified, e.g., [12].This article also describes, why a multivariate Gaussian distribution is a good choice for random gas demand.So we use some random vector () with  ∼ N(, Σ) for a mean vector  and a positive definite covariance matrix Σ on a suitable probability space (Ω, A, P) and our aim is to calculate the following probability: for a suitable set .
In our case, we assume that the tree-structured graph has only one influx node, which gets the number zero, all remaining nodes are efflux nodes.Then the graph is numerated with breadth-first search or depth-first search and every edge  ∈ E gets the number max{ℎ(), ()}.Our set  is defined as follows: There are many studies for special sets , e.g., for polyhedral sets (see [13]), but our set is very general.So we need a very general method for calculating the probability (9).Our method of choice is the so called spheric-radial decomposition.It became popular for dealing with probabilistic constraints (e.g., see [8,[14][15][16][17][18][19]).
Theorem 2 (spheric-radial decomposition).Let  ∼ N(0, ) be the -dimensional standard Gaussian distribution with zero mean and positive definite correlation matrix .Then, for any Borel measurable subset  ⊆ R  it holds that where S −1 is the ( − 1)-dimensional sphere in R  ,   is the uniform distribution on S −1 ,   denotes the -distribution with  degrees of freedom and  is such that  =   (e.g., Cholesky decomposition).
The difference with our problem is, that our load vector is normal distributed with mean value  and positive definite covariance Σ.We want to use the result of Theorem 2 to general Gaussian distributions (see [8]).Therefore we set and observe that P( ∈ ) = P( * ∈  −1 ( − )).So our aim is to compute the following probability: So the calculation of the probability (9) for a very general set  is equivalent to compute the integral in Theorem 2, which is not easy to compute analytically, too.But the integral can be computed numerically in a easy and nearly exact way.Therefore we formulate the following algorithm (see [8], Algorithm 4): Algorithm 3. Let  ∼ N(, Σ) and  such that   = Σ.
The first step is quite easy.There are many possibilities to sample a set of uniformly distributed points on the sphere S −1 , e.g., Monte-Carlo sampling or the randn-generator in MATLAB5.Normalizing these points leads us to the sampling we are looking for.Alternatively, quasi Monte-Carlo methods can be used.In [8] the authors use a quasi Monte-Carlo method for their computations and they show its advantages in Figure 6.
The main challenge is to handle the one-dimensional sets of the second step.If the set  is convex, these sets are closed intervals but  need not to be convex.The aim is to get a representation of   ( = 1, . . ., ) as a union of disjoint intervals.With this, the third step can be done efficiently.The next section deals with this representation in detail.
The third step is the approximation of the integral.The values   (  ) can be calculated easily with the distribution function F  of the distribution (see [20] for details of that distribution).With the representation   = ⋃  =1 [  ,   ] the -distribution can be calculated the following: This leads to the wanted probability.The -distribution function is given by the following (see [20], p. 132): with Γ(1/2) = , Γ(1) = 1 and Γ( + 1) = Γ() for all  ∈ R + .Note that there are very precise numerical approximations for the distribution function, e.g., the chi2cdf -function in MATLAB5 (see Figure 3).

Explicit Characterization of the Gas Flow
In this section we want to characterize the feasible set to use Algorithm 3. The aim is to get a representation of the onedimensional sets of step (2) as a union of disjoint intervals.Therefore we need another representation of the feasible set as a system of inequalities.This is an idea from [8], Theorem 1.In the proof, the authors use a representation of the pressure loss for the full network graph: which is equivalent to (5) if and only if E  = 0.In this paper we also consider the case E  ̸ = 0.The matrix Φ is diagonal with the values   as defined in (5) at its diagonal.This representation is not possible yet, because we extended our model by compressor edges, so this equation does not hold for all edges.So we have to find a way to use a similar equation like (16) to state a suitable theorem.The idea that allows to include compressor stations is to remove compressor edges from the graph and replace them by suitable algebraic conditions.First we consider the equation of mass: We want to treat the flows through the compressor edges as loads, so we have to adapt the load vector.The new load vector b+ is defined as follows: The resulting graph G = (V + , E  ) is no longer connected (scheme is shown in Figure 4).q 1 q 2 q 3 q 3 q 4 q 5 q 5 q 6 q 7 q 8 We set Note that  is a vector in   1 now.We determine that   is the -th self-connected subgraph of  (depends on numbering of the graph).Analogously  + , is the -th component of the -th subgraph.The terms  , and  ,, are defined similarly.The feasible set for G is then The last equation in M is the same as in (8), that models the pressure rise caused by the compressor.With this we can present the equation for pressure loss in the form of ( 16) for every subgraph.Before we state a theorem for characterizing the feasible set, we show the equivalence of M and M. Lemma 4. Let b+ be as defined in (18).The feasible sets defined in (8) and (19) are equivalent in the following sense: Proof.(i) Consider a vector  + ∈ M. It holds 1  +1  + = 0 and because of (18) it follows directly 1  +1 b+ = 0.After removing the compressor edges, from  +  =  + it follows with (17) that  +    = b+  , which is equivalent to     = b .The pressure loss is fulfilled for all flux edges in M and because the flow vector  doesn't change in the relevant coefficients while removing the compressor edges, the pressure loss is fulfilled in M too.The compressor property is independent of  + and , so it also holds.From this it follows b+ ∈ M.
(ii) The other way around is quite similar.We consider a vector b+ ∈ M. From 1  +1 b+ = 0 it follows with (18) that 1  +1  + = 0.The equation for mass conservation is fulfilled in every subgraph.So with (17) it follows  +  =  + , which implies the mass conservation in .The pressure loss holds in all self-connected parts of the graph too and because the relevant coefficients of  doesn't change while adding the compressor edges, the pressure loss is fulfilled in  too.Last, as said before, the compressor property is independent of b+ and , it is also fulfilled in .This completes the proof.
Because our network graph is a tree, the mass conservation is fulfilled with a full rank incidence matrix  of size ×, so  can be computed explicit by the following: which makes us able to use Lemma 4.
With this result, we can write the equation for momentum conservation depending on the incidence matrices for the parts of the tree.This makes us able to formulate the theorem for characterizing the feasible set M. Therefore we will use the following function: which describes the pressure loss between the nodes.We also introduce a new notation: (i)  (,), is the -th control on the path from V ,0 to V ,0 (ii)  (,), is the function  for the -th subgraph on the path from V ,0 to V ,0 , whereas  (,),1 is the function  of the graph   .According to this,  (,),,ℓ is the ℓ-th component of the function  (,), (iii) b(,), is the load vector of the -th subgraph in the path from V ,0 to V ,0 , whereas b(,),1 is the load vector of the graph   and b(,),,ℓ is the ℓ-th component of b(,), Analogously we define  (,), ,  (,), and  (,), .Furthermore we define the following values: )} as the largest index of all subgraph, the paths to V ,0 and V ,0 pass through )}| as the number of subgraph which are on the path from V ,0 from V ,0 containing   and )}| as the number of controls which are between V ,0 and V ,0 With this notation and these values we define a sum for ,  ∈ {1,  2 + 1}.If V ,0 ∈ Π(V ,0 ) we set ∑ , fl 0 and else we set where we write only  * and  * instead of  *  * , and  *  * , for better reading.Last, we define a product Π , fl 1 and From a first point of view, the notation seems to be confusing, but using this notation makes sense since we want to guarantee the feasibility of a load vector by comparing the pressure bounds at every node with each other.We explain this in a short example.Figure 5 shows a graph after removing the compressor edges.
If we want to compare the pressure bounds of node 11 and node 12, we need to know how the pressures change on the path from 2 to 11, resp., from 2 to 12. Node 11 is part of the subgraph  5 and node 12 is part of the subgraph  6 , so it follows  * 5,6 = 2 because node 2 is part of subgraph 2. The notation can be understood as a numbering along the path.It is  (2,11),1 =  2 , the first control on the path from node 2 to node 11 and  (2,11),2 =  4 , the second control on this path.Further it follows  * 2,11 = 3 ( 2 ,  3 ,  5 ) and  * 2,11 = 2 ( 2 ,  4 ).The product defined before is the product of all controls along this path and the sum is the pressure loss between node 2 and node 7. Using this notation makes us able to formulate the theorem for characterizing the feasible set in a readable way.Theorem 5.For given pressure bounds  +, ,  +, ∈ R +1 and controls   ∈ R ( = 1, . . .,  2 ) the following equivalence holds.
Let us have a look at the inequalities.Inequalities ( 25)-( 27) are well-known from [8] and they describe the feasibility inside a connected tree.The other inequalities (28)-( 35) guarantee the feasibility between the subgraphs.Therefore we compare the pressures of the entries of two parts ((28), ( 29)), of the entry of one part and the exit nodes of the other parts ((30)-( 33)) and we compare the pressures of all exits ((34), ( 35)).Because we cannot compare the pressures of   and   directly (there may be no direct connection), we have to compare them using the subgraph   * which is the last part the paths to V ,0 and V ,0 pass.Therefore we defined the sums Σ  * , and Σ  * , , which trace back the pressures to   * .Remark 6.For an implementation it is wise to define a set  (,) containing all controls on the path from V ,0 to V ,0 and use an index running over this set to define the sums and the products.Now we want to proof the theorem.
Proof of Theorem 5 .Because the columns of  + sum up to zero, it holds "⇒" We consider a feasible vector  + ∈ M. From the equation of mass conservation of every subgraph it follows We take the equation of momentum conservation for the -th subgraph ( ∈ {1, . . .,  2 + 1}) and separate  +  to  + ,0 and   : Next we insert (36) into (38) and get We multiply this equation from left with (   ) −1 and insert (37), so it follows and using the definition of the function  we have Remember, that  * , is the largest index of all subgraphs, the paths to V ,0 and V ,0 pass through.For better reading, we only write  * instead of  * , .We use the equation of the compressor property for the first compressor on the path from V  * ,0 to V ,0 ,  2 ℎ(  ( * ,), 1 ) and insert it into (42) for  = (  ( * ,),1 ): ) and  2 ℎ(  ( * ,),1 ) =  2 ( * ,),2,0 .We use the compressor equation for the second compressor on the path from V  * ,0 to V ,0 and put it, together with (42) into (44): (45)
With this theorem we have another characterization of the feasible set M. The last step in this intersection is the adaption of the results to the spheric-radial decomposition.As mentioned before, the main step is to get a representation of the sets   in step (2) of Algorithm 3.
Because we assumed that the graph has only one entry, we define the following set: Consider a sampled point V  ∈ S −1 of step (1) of Algorithm 3 ( = 1, . . ., ).We identify the load vector  with the affine linear function: where  is the mean value of the Gaussian distribution and  is such that   = Σ for positive definite covariance matrix Σ.Note that the index  here is for the sampled vector V  , not for the -th subgraph.Because   is defined only for the exit nodes, it must hold  ≥ 0 which leads to the definition of the regular range: So the feasible set is 5) and (7)} , (68) and with Theorem 5 it holds where b () is from (18).Because b depends on  now, the function  depends on , too.More exactly,  is quadratic in , so   (  ()) can be represented as follows: Here, Ψ is the product of  and Φ.So the inequations, which characterize   , are also quadratic in  because the minimal and maximal pressures in the inequalities only count to c .Now we can write the feasible sets as follows: where  is an index for the total number of inequalities in   .Now the regular range can be cut with the positive intervals of the inequalities and the result is a union of disjoint intervals: Here   is the number of disjoint intervals in which all inequalities are fulfilled and  , and  , are the interval bounds, they depend on the pressure bounds and the controls.So the third step of Algorithm 3 can be executed.With the probability for a random load vector to be feasible can be computed.

Existence of Optimal Solutions
In this section we want to have a look at some optimization problems.We distinguish between problems with constant loads (without uncertainty on the demand) and problems with random loads.The latter leads us to optimization problems with so called probabilistic constraints or chance constraints (see [21]).There are two aims in optimization: Minimize the maximal pressure bounds and minimize the controls.For minimizing the maximal pressure bounds, we define the following set: in which we look for them.Because the maximal pressures are in proportion to the cost of pipes, an objective function for a optimization problem could be    +, for a cost vector  ∈ R +1 >0 .By minimizing the controls, we use the Euclidean norm of the controls as an objective function.which is obviously a solution of (75).Moreover, this solution is unique, because reducing one component of the upper bounds would either hurt an inequality or it would not fulfill  +, ≥  +, anymore.
Note that a vector  + ∈ R +1 is suitable here if the vector b+ is feasible for the subgraphs, i.e., the inequalities ( 25)-( 27) are fulfilled for b+ .
Proof.(a) For this part we use a proof by contradiction.Assume that Because   ≥ 1 for all  = 1, . . .,  2 , it follows It it Σ  * ,() = 0 and Π  * ,() = 1 because the subgraph with index  * is equal to the subgraph with index ().And because the subgraphs () and () are neighbours (i.e., directly connected), it follows Π  * ,() =   and Thus we have a contradiction to (28) and   cannot be optimal.
Note that the sufficient condition in Lemma 8 is comparatively strong, there may exist optimal solutions with less strong conditions, e.g., the following.

Corollary 9.
If the graph has only one compressor edge, i.e., |E  | = 1, then it holds: If  ∈ R ≥1 is an optimal solution of (76),  is unique.This conclusion follows directly from the strict monotonicity of the objective function.
Optimization with Random Loads.In this section we consider the load vector to be random as we mentioned in Section 2.2.In the optimization problems, we want to make sure that the feasibility of a random load vector is guaranteed for a probability  ∈ (0, 1).This leads us to optimization problems with so called chance or probabilistic constraints.
In general problems with probabilistic constraints have the form min  (, ) with an objective function  and a vector of uncertainty .There exist many works about probabilistic constraints resp.stochastic programming, e.g., [7] gives an excellent overview about chance constraints in theory and application.In our case we consider the following problem: To handle this problem resp.the probabilistic constraint, the spheric-radial decomposition gives us an explicit representation of the constraint for a Gaussian vector  ∼ N(, Σ) with mean value  and positive definite covariance Σ: Further, Algorithm 3 gives a way to approximate this integral in an efficient way.In Section 3 we showed a way to characterize the feasible set  and how to adapt this characterization to the spheric-radial decomposition.This changes our problem with probabilistic constraints (89) to min Of course the interval bounds depend on the pressure bounds and the control.For this problem we formulate the next lemma.
Proof.For the proof, we fix a V ∈ {V 1 , . . ., V  } from the given sampling.From ( 25) and ( 26) it follows for all  = 1, . . .,   with  ∈ {1, . . .,  2 + 1}, With a random vector  ∼ N(, Σ) , ( b ()) are quadratic functions in  and the upper pressure bounds only influence the constant part with a positive sign: It follows that a rise in   , for all  = 0, . . .,   enlarges the intervals, in which the inequalities hold.The same holds for all inequalities in Theorem 5.The cumulative distribution function of the Chi-Square-Distribution is strictly monotonic increasing and convergent to 1. Thus upper pressure bounds   , (for  = 1, . . ., ) can be found so that is higher that  ∈ (0, 1).The index  is for all sampled points on the sphere and the index   is for the union of intervals in which all inequalities hold.The interval boundaries  , and  , depend continuously on the pressure bounds and because the inequalities are not strict,   can be found s.t. the side constraint is fulfilled with equality.So there exists at least one solution of (91).

Numerical Results
In this section we show a few results of implementation.At first we show the idea of the spheric-radial decomposition by using an easy example.Next we show a easy example with one compressor edge and at last we use real data of the Greek gas network.The focus of the implementation is on the theorems proofed in Section 4.
Example 1.Our first example is an easy graph without inner control (see Figure 6).
Assume that node 1 and 2 are gas consumers with mean demand  = [0.5, 0.5]  .The pressure bounds are given by  +, = [2, 1, 1]  and  +, = [3, 2, 2]  and Φ = E 2 .Then the incidence matrix is Consider the inequalities of Theorem 5 to characterize the feasible set.Because the network has no compressor edges the system of inequalities only contains the information ( 25)-( 27), the other inequalities do not occur.The function  is given by ) . (96) By inserting the pressure bounds, one can see that inequality (25) is always fulfilled and inequality (27) implies With this, inequality (26) follows for 0 ≤  2 ≤ √ 3: So the feasible set  is the following (see Figure 7): Now consider the optimization problem: with  =  = [0.5, 0.5]  .Lemma 7 guarantees the existence of a unique solution of this problem.We use the fminconfunction in MATLAB5, which minimizes a constrained nonlinear multivariable function.The fmincon default setting uses a interior-point method.For more information we refer to the official MathWorks5 homepage (https://www.mathworks.com/help/optim/ug/fmincon.html).The solver returns the following result: One can easily see that this is the correct solution.The gas demand at node 2 is 0.5, which is equal to the flow  2 , so using the equation of momentum implies a difference in the quadratic pressures between node 1 and node 2 of 0.25.The flow through edge 1 is given by the two exit nodes and it is  1 = 1.This implies a difference in the quadratic pressures between node 0 and node 1 of 1.So the optimal solution  +,  directly follows.
Next we use the spheric-radial decomposition, especially Algorithm 3, to calculate the probability P( ∈ ) for a random vector  ∼ N(E 2 , [0.5, 0.5]  ).Therefore we view the results of 8 tests with 1000 sampled points in each one (Table 1).
The probability in all eight tests is nearly the same.The mean value is 0.3479 and the variance is 2.7723 ⋅ 10 −6 , which is very small.This shows that the implementation is working nearly exact.The efficiency of the implementation of course is not perfect, but that is not part of this work.
Last we want to solve the following optimization problem: We use again the fmincon-function in MATLAB5 to solve the problem eight times, with 1000 sampled points in every case.
Example 2. Now we add a compressor edge to the graph of Example 1 (see Figure 8).
Assume that node 1 and 3 are consumers, node 2 is a inner node.The mean demand  = [0.5, 0, 0.5]  .The pressure    bounds are given by  +, = [2, 1, 1, 1]  and  +, = [3, 2, 2, 2]  and   1 = 1 and   3 = 1.The incidence matrix is given by Before we have a look at the inequalities of Theorem 5, we have to remove the compressor edge from the graph.The flows can be computed by using the equation of mass conservation and the new load vector is then b = ( ) . ( We assume the control to be switched off, so it holds  = 1.With this, the control edge  2 is treated as a flow edge without friction.The resulting graph is shown in Figure 9: from the inequalities ( 25   so the feasible set is (see Figure 10): This implies Solving the problem min for  =  = [0.5, 0, 0.5]  leads us to the optimal solution The argumentation for the optimality of this vector is exactly like before in the easy example.Because we have a compressor edge in this graph, we can minimize the control.Therefore we fix the pressure bounds as we did at the beginning of this example and we set  = [1, 0, 1.5]  .So inequality (31) is not fulfilled anymore for  = 1.We use again the fmincon-solver in MATLAB5 to solve the following problem: The solver returns the optimal solution   = 1.1818.
Here, one can see that the sufficient condition in Lemma 8 is really strong.It's not fulfilled with the given values but there exists a solution anyway.Of course, the necessary condition is fulfilled.Now, we use again Algorithm 3 to compute the probability P( ∈ ) for a random load vector  ∼ N(E 3 , [0.5, 0.5, 0.5]  ).Table 3 shows us the results.
Again we can see, that the probability is nearly the same in all eight cases.The mean probability is 0.1535 and the variance is 3.2369 ⋅ 10 −6 .For the optimization, we reduce the covariance matrix and assume  ∼ N(0.01 ⋅ E 3 , [0.5, 0.5, 0.5]  ).For a probability  = 0.9 Table 4 states the results.
Example 3. In this example, we use a part of a real network.The focus here is on realistic values for our model.We get these values from the GasLib (see [22]), a collection of technical gas network data.
"The goal of GasLib is to promote research on gas networks by providing a set of large and realistic benchmark instances."(http://gaslib.zib.de/) We use a part of the Greek gas network (GasLib-134) (see Figure 11).
For using real values, we first need to know the constant   from (5): The value   is the specific gas constant, which can be calculated by   = / with the ideal gas constant  = 8.31451 ⋅  2 / 2 ⋅  ⋅  (see [23]) and the molar mass  = 16.62/(from real data) of the used natural gas.Also the temperature  = 289.15 is given from real data.For the (constant) friction factor  we use the law of Chen (see [24]): Diameter  = 914.4and roughness value  = 8 ⋅ 10 −6  for the first pipe (see Figure 11) are known from real data.The Reynolds-Number Re can be calculated by Re = (V)/ with the dynamic viscosity  = 1 ⋅ 10 −5  ⋅  (see [1]), the mean velocity V = 95.48/(calculated with the mean volume flow rate which is given by the real data) of the gas and the density  = 0.7433/ 3 (from real data).So we get Re = 6489590.74≈ 6.49 ⋅ 10 6 and with this the pipe friction coefficient after Chen is  = 0.0093.The length of the first pipe is given by  = 17.8693 from the real data.Last value missing is the sound speed in natural gas, which we assume to be ideal.The sound speed  depends on the modulus of compressibility (see [9]).For ideal gases, the modulus of compressibility only depends on the adiabatic exponent and the pressure.Using the ideal gas equation simplifies the equation for the sound speed to The adiabatic exponent for methan, which is the main part of natural gas (> 90%) is about 1.33 (see [25]).Together, all values are shown in Table 5 (example for the pipe next to the source in Figure 11).Now we want to optimize the inner control in the network for a fix load vector.Therefor we choose two nominations: 2011-11-01 and 2016-02-17.In both cases, the fmincon-function in MATLAB5 returns   = 1 (114) as a local minimum, which satisfies the constraint  ∈ .This means, for these nominations, a compressor station is not needed so it is switched off.With this, as a last calculation in this paper, we calculate the probability for the given nominations to be feasible.We use the values from the nominations as mean value  and set  ∼ N( ⋅ 10 −3 E, ).
The results are shown in Tables 6 and 7.
Again one can see that the results are quite similar.The mean probability in Table 6 is 0.9860 and the mean probability in Table 7 is 0.9760.Both values are nearly 1 so there must happen something really unforeseeable that a Greek does not get his demanded gas.

Conclusion
In this paper, we have used an existing stationary model for gas transport based on the isothermal Euler equations.We have extended this model by compressor stations and presented a characterization of the set of feasible loads.Especially Theorem 5 contains the central idea to get an access to the optimization in Section 4 and the spheric-radial decomposition is our main tool to handle the uncertainty in the loads.We were able to show some results for optimization with probabilistic constraints in gas transport.In a next step these results should be generalized.With the characterization of the feasible set, we have shown that the feasibility of a load depends significantly on the pressure bounds.These pressure bounds play a main role in our optimization problems.The other main parts are the inner controls modeled by compressor edges, which should lead in optimal control problems with probabilistic constraints.Here we have built a base for further works with this topic.
The idea of separating the graph and removing the compressor edges can be used to extend the model with other components, like, e.g., control valves and resistors.This would change the inequalities in Theorem 5, but the approach works also for these modifications.Further, [8] showed a way to deal with a network which is a cycle.Combining both methods, we get an access to model gas networks in high detail.
Finally the expansion to a dynamic model might be also possible.The idea is to use a space-mapping approach, because one can use a lot of the analysis we did here.Therefore upcoming papers should deal with these problems and present results of the turnpike-theory, which describes a relation between stationary and instationary solutions.In fact, turnpike-theory implies that the optimal dynamic state is close to the optimal static state in the interior of the time intervals for sufficiently long time horizons.A.J. Zaslavski explains the turnpike-phenomenon in [26].This book also gives an overview about the theory.

Figure 4 :
Figure 4: Network graph with two compressor edges (left) and new not connected network graph with three connected subgraphs after removing the compressor edges (right).

3
Scheme of the spheric-radial decomposition with

Figure 10 :
Figure 10: Feasible set of the Example 2.

Table 1 :
Test results of easy example.

Table 2 :
Test results of Example 1.

Table 3 :
Test results of control example.

Table 4 :
Test results of control example.

Table 5 :
[22]es based on real data.Figure11: Greek gas network from GasLib[22], red edges are used in our example.