# Flexible Dispatch for Integrated Power and Gas Systems Considering Power-to-Gas and Demand Response
## 3 Flexible Economic Dispatch Model
#### 3.1.2 Constraints  
The constraints of the power system are as follows. \[\sum\limits_{i\in\Omega_{c}}P_{i,t}+\sum\limits_{k\in\Omega_{\rm W}}\left(P_ {\rm wf,k,t}-\Delta P_{w,k,t}\right)-\sum\limits_{p\in\Omega_{\rm P2G}}P_{p2g,p,t}=\sum\limits_{b\in\Omega_{\rm B}}\left(P_{\rm ff,b,t}-\Delta P_{b,t}\right) \tag{9}\]  
\[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]  
\[P_{i,t}-P_{i,t-1}\leq u_{i,t-1}\cdot R_{u,i}\cdot\Delta t+(1-u_{i,t})\cdot P_{ i,t,\min} \tag{11}\]  
\[P_{i,t-1}-P_{i,t}\leq u_{i,t}\cdot R_{d,i}\cdot\Delta t+(1-u_{i,t-1})\cdot P_{ i,t-1,\min} \tag{12}\]  
\[\left(X^{out}_{i,t-1}-T^{out}_{i}\right)(u_{i,t-1}-u_{i,t})\geq 0 \tag{13}\]  
\[\left(X^{off}_{i,t-1}-T^{off}_{i}\right)(u_{i,t}-u_{i,t-1})\geq 0 \tag{14}\]  
\[SU_{i,t}\geq su_{i}(u_{i,t}-u_{i,t-1}),SU_{i,t}\geq 0 \tag{15}\]  
\[SD_{i,t}\geq sd_{i}(u_{i,t-1}-u_{i,t}),SD_{i,t}\geq 0 \tag{16}\]  
\[u_{p2g,p,t}\cdot P^{\min}_{p2g,p,t}\leq P_{p2g,p,t}\leq u_{p2g,p,t}\cdot P^{ \max}_{p2g,p,t} \tag{17a}\]  
\[P_{p2g,p,t}-P_{p2g,p,t-1}\leq u_{p2g,p,t-1}\cdot R^{u}_{p2g,p}\cdot\Delta t+ \left(1-u_{p2g,p,t-1}\right)\cdot P^{\min}_{p2g,p,t} \tag{17b}\]  
\[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]0\[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]1 \[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]2 (19) \[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]3  
\[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]4 \[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]5 (22) \[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]6  
\[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]7  
\[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]8  
\[u_{i,t}\cdot P_{i,t,\min}\leq P_{i,t}\leq u_{i,t}\cdot P_{i,t,\max} \tag{10}\]9 \[P_{i,t}-P_{i,t-1}\leq u_{i,t-1}\cdot R_{u,i}\cdot\Delta t+(1-u_{i,t})\cdot P_{ i,t,\min} \tag{11}\]0 (26b) \[P_{i,t}-P_{i,t-1}\leq u_{i,t-1}\cdot R_{u,i}\cdot\Delta t+(1-u_{i,t})\cdot P_{ i,t,\min} \tag{11}\]1 (26c) \[P_{i,t}-P_{i,t-1}\leq u_{i,t-1}\cdot R_{u,i}\cdot\Delta t+(1-u_{i,t})\cdot P_{ i,t,\min} \tag{11}\]2 (26d) \[P_{i,t}-P_{i,t-1}\leq u_{i,t-1}\cdot R_{u,i}\cdot\Delta t+(1-u_{i,t})\cdot P_{ i,t,\min} \tag{11}\]3 (26e) \[P_{i,t}-P_{i,t-1}\leq u_{i,t-1}\cdot R_{u,i}\cdot\Delta t+(1-u_{i,t})\cdot P_{ i,t,\min} \tag{11}\]4 (27a) \[P_{i,t}-P_{i,t-1}\leq u_{i,t-1}\cdot R_{u,i}\cdot\Delta t+(1-u_{i,t})\cdot P_{ i,t,\min} \tag{11}\]5 (27b) \[P_{i,t}-P_{i,t-1}\leq u_{i,t-1}\cdot R_{u,i}\cdot\Delta t+(1-u_{i,t})\cdot P_{ i,t,\min} \tag{11}\]6 (28a) \[P_{i,t}-P_{i,t-1}\leq u_{i,t-1}\cdot R_{u,i}\cdot\Delta t+(1-u_{i,t})\cdot P_{ i,t,\min} \tag{11}\]7  
The above formulation expresses the following constraint. (9) limits the power balance. Constraints (10)-(16) are generating unit constraints, including the output constraints of generator units; climbing constraints; minimum uptime and downtime constraints; start-up and shutdown cost constraints, etc. [34]. Constraints (17a)-(17c) limit the P2G facility. Similar to generator unit constraints, including converted active power constraints (17a) and climbing constraints (17b) and (17c). (18) and (19) are wind power constraints. (20) limits transmission line capacity. Constraints (21)-(25) are demand response constraints, including adjustable capacity, minimum control interval, maximum control time and maximum control times constraints. (26a)-(26e) represent the scheduling flexibility constraint, which are upward and downward adjustable capacity constraints, including generator units, P2G facility, and incentive DRPs. (27a) and (27b) are adjustable capacity demand constraints. (28a) and (28b) are scheduling flexibility supply and demand constraints.