## 3 Problem Formulation
### Constraints  
* P2G constraints The overall chemical process of P2G to convert the surplus power into gas has been discussed in the previous section. The performance of P2G in the MCMG scheduling is restricted by several constraints modeled as in (5)-(10). The electric power consumed by the P2G facility is limited in Equation (5). The maximum capacity of injected and stored gas of P2G storage is modeled by (6) and (7), respectively. The P2G performance is expressed as a function of injecting/storing natural gas in Equation (8). The natural gas storage is modeled in Equation (9). \[0\leq P_{t,s}^{\text{P2G}}\leq P^{\text{P2G,max}}\] (5) \[0\leq G_{t,s}^{dis}\leq G^{dis,\text{max}}\] (6) \[GS^{\text{min}}\leq GS_{t,s}\leq GS^{\text{max}}\] (7) \[G_{t,s}^{GP}=\eta_{\text{P2G}}P_{t,s}^{\text{P2G}}\] (8) \[GS_{t,s}=GS_{t-1,s}+G_{t,s}^{GP}-G_{t,s}^{dis}\] (9)
* Wind turbine constraints The hourly power generated by the wind unit is a function of wind speed [57]. The hourly wind power is calculated based on Equation (10). The curtailed wind power is also limited to the wind availability and installed wind capacity as Equation (11). \[P_{t,s}^{pv}=\left\{\begin{array}{ll}0&V_{t,s}<V_{cut-in},V_{t,s}>V_{cut-out }\\ P^{pv,r}\times\left(\frac{V_{t,s}-V_{cut-in}}{V_{r}-V_{cut-in}}\right)^{3}&V_{ cut-in}\leq V_{t,s}\leq V_{rated}\\ P^{pv,r}_{rated}\leq V_{t,s}\leq V_{cut-out}\end{array}\right.\] (10) \[P_{t,s}^{pv,sp}\leq P_{t,s}^{pv}\] (11)
* CAES constraints A binary variable is defined for each CAES's operating mode, and it commonly operates in one mode at each hour, as in Equation (12). The power value limit for charging, discharging, and simple-cycle mode are shown in (13)-(15), respectively. The capacity of CAES is bounded by upper and lower values as Equation (16). Besides, the energy capacity of CAES is calculated by Equation (17). \[u_{t,s}^{ch}+u_{t,s}^{dis}+u_{t,s}^{si}\leq 1\] (12) \[0\leq P_{t,s}^{ch}\leq P^{ch,\text{max}}u_{t,s}^{ch}\] (13) \[0\leq P_{t,s}^{dis}\leq P^{dis,\text{max}}u_{t,s}^{dis}\] (14) \[0\leq P_{t,s}^{si}\leq P^{gs,\text{max}}u_{t,s}^{si}\] (15) \[E^{\text{min}}\leq E_{t,s}\leq E^{\text{max}}\] (16) \[E_{t,s}=E_{t-1,s}+P_{t,s}^{ch}-(P_{t,s}^{dis}+P_{t,s}^{si})\times ER\] (17)
* Demand response The DRP shiftable strategy of [58] is employed in the model to smooth the load curve as in Equations (18)-(21). \[P_{d,s}^{dr}=P_{d_{0},t,s}+dr_{t,s}\] (18) \[dr_{t,s}\leq dr^{\text{max}}\times P_{d_{0},t,s}\] (19) \[dr_{t,s}\geq-dr^{\text{max}}\times P_{d_{0},t,s}\] (20)\[\sum_{t=1}dr_{t,s}=0 \tag{21}\]  
* Energy balance constraints  
The proposed MCMG supplies electrical and gas demands. The electricity and gas purchased from the power and gas markets are limited in Equations (22) and (23). The power and gas balance constraints are established by Equations (24) and (25). The gross heating value (GHV) is used to convert the consumed natural gas by CAES into the corresponding gas value as in Equation (25) [59].  
\[P_{t,s}^{buy}\leq p^{buy,\max} \tag{22}\]  
\[G_{t,s}^{buy}\leq C^{buy,\max} \tag{23}\]  
\[P_{t,s}^{buy}+P_{t,s}^{w}-P_{t,s}^{w,sp}-P_{t,s}^{\rm P2G}-P_{t,s}^{\rm Ch}+P_{ t,s}^{dis}+P_{t,s}^{si}+dr_{t,s}-P_{d,s}=0 \tag{24}\]  
\[G_{t,s}^{buy}-(P_{t,s}^{dis}+P_{t,s}^{si})\times ER\times GHV+G_{t,s}^{GP}-G_{d, t,s}=0 \tag{25}\]