## 4 Solution Methodology  
_The Solution of Network Sub-Problem Solving_  
This work adopted an improved SCP method based on SOC with reasonable initial expansion value for natural gas network sub-problem. The method is suitable for both sub-problems A and B. The steps of solving are derived from the special form of the Weymouth function. Weymouth nonlinear steady-state pipeline flow of constraints (2)-(3) can be transformed as follows and shown in (36)-(38). \[\left(I_{mn,t}^{+}-I_{mn,t}^{-}\right)(\pi_{m,t}-\pi_{n,t})=(1/c_{m})^{2}F_{mn,t}^ {2} \tag{36}\]  
\[I_{mn,t}^{+}+I_{mn,t}^{-}=1 \tag{37}\]  
\[\pi_{m}^{\min}\leq\pi_{m,t}\leq\pi_{m}^{\max} \tag{38}\]  
According to [8], (36) is substituted by McCormick envelope (39)-(43) which converts the whole model into the MISOCP problem. \[\Pi_{mn,t}\geq(1/c_{m})^{2}F_{mn}^{2} \tag{39}\]  
\[\Pi_{mn,t}\geq\pi_{n,t}-\pi_{m,t}+\Big{(}I_{mn,t}^{+}-I_{mn,t}^{-}+1\Big{)} \Big{(}\pi_{m}^{\min}-\pi_{n}^{\max}\Big{)} \tag{40}\]  
\[\Pi_{mn,t}\geq\pi_{m,t}-\pi_{n,t}+\Big{(}I_{mn,t}^{+}-I_{mn,t}^{-}-1\Big{)} \Big{(}\pi_{m}^{\max}-\pi_{n}^{\min}\Big{)} \tag{41}\]  
\[\Pi_{mn,t}\leq\pi_{m,t}-\pi_{n,t}+\Big{(}I_{mn,t}^{+}-I_{mn,t}^{-}-1\Big{)} \Big{(}\pi_{m}^{\min}-\pi_{n}^{\max}\Big{)} \tag{42}\]  
\[\Pi_{mn,t}\leq\pi_{n,t}-\pi_{m,t}+\Big{(}I_{mn,t}^{+}-I_{mn,t}^{-}+1\Big{)} \Big{(}\pi_{m}^{\max}-\pi_{n}^{\min}\Big{)} \tag{43}\]  
Constraints (39)-(43) will be equal to constraint (36) if (39) is tight. This work adopts a penalty function by combining SCP method to tight the constraint (39). (1) Penalty function method  
To tighten the inequality as much as possible under constraint (39), the objective function includes a penalty as shown in (44), to make the left term of inequality (39) as small as possible. This kind of solution is often not accurate enough but could be used to determine an initial solution. \(\varphi\) represents a pre-set positive number. \[\text{Min}\ \sum\limits_{t=1}^{N_{T}}\sum\limits_{t=1}^{N_{S}}\tau_{s}W_{s,t}+ \sum\limits_{t=1}^{N_{T}}\sum\limits_{mn=1}^{N_{p}}\varphi\Pi_{mn,t} \tag{44}\]  
\(s.t\) Constraints (4) and (5), (37)-(43)  
(2) Sequential cone programming method  
In SCP method, extra concave constraint (45) is adopted to let constraints (39)-(43), (45) equivalent to constraint (36). \[\Pi_{mn,t}\leq\Big{(}\frac{1}{C_{mn}}\Big{)}^{2}F_{mn,t}^{2} \tag{45}\]As such, the key problem becomes the processing of Equation (45), and linearization is a common method. According to Taylor series, it can be approximated as (46). When the right-hand side value of the inequality is close to 0, the solution meets the expected requirements. Where \(S\) is an auxiliary variable. \[\left\{ \begin{array}{l}\Pi_{mn,t}^{k}-\left(\frac{1}{c_{mn}}\right)^{2}\!\left( \!F_{mn,t}^{k-1}\!\right)^{2}-\\ \left(\frac{1}{c_{mn}}\right)^{2}\cdot 2F_{mn,t}^{k-1}\cdot\left(F_{mn,t}^{k}-F_{ mm,t}^{k-1}\right)\end{array} \right\}\leq S_{mn,t}^{k} \tag{46}\]  
(3) Solution procedure  
The Algorithm 1 solution procedure is given as follows:  
```
Step 1 Use penalty function method to solve natural gas steady-state flow problem to get the initial solution of gas flow \(F_{mn}^{0}\). Set initial iteration number \(k=0\). Min Min \(\left\{\sum_{t=1}^{N_{T}}\sum_{N_{S}}^{N_{S}}\tau_{S}W_{s,t}+\sum_{t=1}^{N_{T} }\sum_{mm=1}^{N_{T}}\vartheta\Pi_{mn,t}\right\}\) \(s.t\) Constraints (4) and (5), (37-43) Step 2 Parameter settings. Set a punish growth rate \(v\) and maximum penalty factor \(\phi^{\max}\), SCP residual tolerance \(\xi^{Z}\) and \(\xi^{S}\). Step 3 Solve the following MISOCP problem: \(Z^{k}=\text{Min}\ Z^{k}=\text{Min}\Big{\{}\sum_{t=1}^{N_{T}}\sum_{N_{S}}^{N_ {S}}\tau_{S}W_{s,t}+\sum_{t=1}^{N_{T}}\sum_{mm=1}^{N_{T}}\phi^{k-1}S_{mn,t}^{ k}\Big{\}}\) \(s.t\) Constraints (4) and (5), (37-43), (46) Step 4 Check SCP residuals. \(\left|Z^{k}-Z^{k-1}\right|\leq\xi^{Z}\) \(\max\left(\sum\limits_{mm=1}^{N_{T}}\xi_{mn,t}^{k}\right)\leq\xi^{S}\) If yes, end the procedure. Otherwise, update the penalty factor and iteration number.