## 4 Simulation Results and Discussion
### Case 2: MES in Residential Building  
In this case, the home arrival time of EVs owners in the evening is also described by a normal distribution with mean value 7:00 p.m. and standard deviation 1 h; and the home departure time in the morning follows a normal distribution with mean value 8:00 a.m. and standard deviation 1 h. The stochastic characteristics of EVs are represented by the reduced scenarios of the available number of the aggregated EVs at each time [43; 44]. The capacity of each EV is assumed to be 20 kWh, and the total number of aggregated EVs is 100 in this case. The upper limit of SOC is set to be 1. The lower limit of SOC is set to be 0.3 during 10:00 a.m.-10:00 p.m., 0.5 during 11:00 p.m.-4:00 a.m., and 0.8 during 5:00 a.m.-9:00 a.m. considering the schedulability of EVs induced by the peak/valley price and departure time. The energy tariff is shown in Table 3.  
Similarly, two thousand scenarios are generated by using the LHS method and the number of scenarios is further reduced to 10 by using the scenario reduction technique. The probabilities of the reduced scenarios are given in Table 4; as is shown, the sum of scenario probability is also equal to 1. The total available EV number at each time instant for the reduced scenarios in Case 2 is depicted in Figure 13. Compared with Figure 7, it is shown that, in the residential building, the total number of available EVs begins to increase when off work and most of the EVs are available during the period 8:00 p.m.-6:00 a.m. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Scenarios** & **s1** & **s2** & **s3** & **s4** & **s5** & **s6** & **s7** & **s8** & **s9** & **s10** \\ \hline probabilities & 0.075 & 0.151 & 0.134 & 0.110 & 0.089 & 0.082 & 0.143 & 0.073 & 0.060 & 0.083 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The probabilities of reduced scenarios in Case 2. Figure 12: Aggregated SOC of EVs in Case 1. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Valley** & **Peak** \\
**Price of Electricity** & **(1:00 a.m.–7:00 a.m.,11:00 p.m.–12:00 p.m.)** & **(8:00 a.m.–10:00 p.m.)** \\ \hline  & 0.288 RMB/kWh & 0.668 RMB/kWh \\  & Case 2 & \\
**Price of Gas** & 3.4 RMB/m\({}^{3}\) & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Energy tariff in Case 2. In Figure 14, the electrical and thermal loads in residential building are drawn. It is obvious that, during the time periods 7:00 a.m.-9:00 a.m. and 5:00 p.m.-10:00 p.m., the electricity and thermal demands are relatively higher, and the average value of period 5:00 p.m.-10:00 p.m. is much higher than that of 7:00 a.m.-9:00 a.m. The profile of electricity and thermal demands is in accordance with the peoples' living habits. The scheduling results of the aggregated EVs, the external main grid and two kinds of CHP units are depicted in Figures 15-17. The aggregated SOC of EVs is depicted in Figure 18. During the time period 5:00 p.m.-10:00 p.m., with the increase of available EVs and the higher electricity price, EVs are scheduled to serve as an electricity energy supplier by discharging to help satisfy the higher electricity demand; and, even during the period 6:00 p.m.-10:00 p.m. when the thermal and electricity demands stay at a peak level, no purchasing electricity from the extern main grid can be achieved. The charging of EVs is scheduled at the valley periods 0:00 a.m.-1:00 a.m. and 4:00 a.m.-5:00 a.m. As shown in Figures 16 and 17, since the electrical and thermal demand is lower except the period 6:00 p.m.-9:00 p.m., only the coordination of CHP_I unit and the connected main grid can satisfy the multi-energy demands during 10:00 p.m.-5:00 p.m., with the CHP_II unit being off; during the period 6:00 p.m.-9:00 p.m., with the higher energy demands, CHP_II units are scheduled to provide the multi-energy, together with the external main grid and CHP_I unit working at full-load state. The coordinated scheduling of the different kinds of CHP units can indicate the fact that the CHP_I unit has a higher energy conversion efficiency, and the lower operating costs.