# Research on Interval Optimal Scheduling Strategy of Virtual Power Plants with Electric Vehicles
## 3 Optimized Scheduling Model
### Constraints  
1. Grid and gas networks need to maintain their power balance to operate properly; therefore, the power balance constraints are as follows: \[[P^{ex}_{grid,t}]=[P_{cloud,t}]+P_{ev,t}+P_{P2G,t}+P_{es,t}-[P_{WPP,t}]-[P_{PV,t }]-P_{PMT,t}\] (29) \[[V^{ex}_{gas,t}]=[V_{gload,t}]+V_{PMT,t}+V_{gs,t}-V_{P2G,t}\] (30) where \(P_{es,t}\) denotes the power of the energy storage system at time \(t\). When \(P_{es,t}\) is positive, it represents discharge, and when it is negative, it represents charging. \(V_{gs,t}\) represents the output of the gas storage system at the moment \(t\). When \(V_{gs,t}\) is positive, it represents gassing, and when it is negative, it represents gas storage. 2. There are limits to the amount of electricity and natural gas that can be received by the grid and the gas grid from virtual power plants (42); therefore, virtual power plants deliver power constraints to the grid and natural gas network as follows: \[P^{ex}_{grid,\min}\leq[P^{ex}_{grid,t}]\leq P^{ex}_{grid,\max}\] (31) \[V^{ex}_{gas,\min}\leq[V^{ex}_{gas,t}]\leq V^{ex}_{gas,\max}\] (32) where \(P^{ex}_{grid,\max}\) and \(P^{ex}_{grid,\min}\) are the upper/lower limits of the virtual power plant's power transmission to the grid, respectively, and \(V^{ex}_{gas,\max}\) and \(V^{ex}_{gas,\min}\) are the up per/lower limits of the virtual power plant's power transmission to the natural gas grid, respectively. 3. Electric vehicle charging power constraint Dividing a day into 24 time periods, the total load demand for time period \(t\) is the sum of all EV charging loads, and the total charging load is: \[P_{\text{ev,}t}=\sum_{m=1}^{M}P_{m,t},t=1,2,...24\] (33) where \(M\) represents the total number of electric vehicles that the charging power should satisfy, \(P_{m,t}\) is the charging power of the \(m\)-th car in the \(i\)-th time period, and \(P_{ev,t}\) is the total charging power of all cars in the \(i\)-th time period. Therefore, the charging power should meet the following: \[P_{ev,t,\min}\leq P_{ev,t}\leq P_{ev,t,\max}\] (34) The charging power should also meet the dispatchable potential of the electric vehicle cluster. 4. Total Electric Vehicle Power Balance Constraint \[\eta\sum_{t=1}^{24}P_{ev,t}=Q_{ev}\] (35) where \(Q_{ev}\) is the total electric vehicle charging capacity, and \(\eta\) denotes the charging efficiency. In this study, \(\eta\) = 0.9. 5. Electricity storage equipment power constraints \[SOC(t)=SOC(t-1)+\eta_{es}\cdot P_{es,t}\cdot\Delta t\] (36) where \(SOC(t)\) represents the charge of the storage device at time \(t\), \(\eta_{es}\) is the charging/discharging efficiency of the storage device. The charging and discharging behavior do not take place in the storage device simultaneously, so the storage state is: \[U_{ech}+U_{edis}\leq 1\] (37) where \(U_{ech}\) and \(U_{edis}\) are for the storage equipment charging and discharging signs, respectively. 6. Gas storage device gas storage capacity constraints \[V_{gch}(t)=V_{gch}(t-1)+(v_{ch,t}-v_{dis,t})\cdot\Delta t\] (38) where \(V_{gch}\) (\(t\)) and \(V_{gch}\) (\(t\)-1) represent the volume of natural gas in the storage facility at the end of time periods \(t\) and \(t-1\), respectively, m\({}^{3}\); and \(v_{ch,t}\) and \(v_{dis,t}\) are the storage and release rates of the storage facility, respectively, m\({}^{3}\)/h. 7. Each device has its own upper and lower limits of operating power, and can only operate properly if it is kept within these limits. The power constraints for each device are as follows: \[\left\{ \begin{array}{l}\frac{P_{PMT}\leq P_{PMT,t}\leq\overline{P_{PMT}}}{P _{P2G}\leq P_{P2G,t}\leq\overline{P_{P2G}}}\\ \frac{P_{es}}{P_{es}}\leq P_{es,t}\leq\overline{P_{es}}\\ \frac{v_{ch}}{v_{dis}}\leq v_{ch,t}\leq\overline{v_{ch}}\\ \frac{v_{dis}}{v_{dis}}\leq v_{dis,t}\leq\overline{v_{dis}}\end{array}