## 4 Simulation Results and Discussion
### Presentation and Discussion of Results
The total expected cost of MG operation as well as costs of providing energy and reserve services from DG units in case 1 are obtained as 897.833$, 436.622$ and 19.752$, respectively.  
Case 2: In this case, optimal operation of MG with demand-side participation (i.e., TBR-DR programs) but without EVs contribution is presented. The scheduled energy and reserve capacity in RTP programs are illustrated in Figure 6a,b, respectively. Comparing the results in Figures 5a and 6a demonstrates that with demand side participation in RTP schemes, the power provided by DG units is reduced at peak hours, specifically in 10:00-14:00 and 20:00-22:00. Likewise, during the hours with relatively high energy prices, the customers also reduce their consumption levels to save energy and get incentives. On the other hand, customers shift most of their consumptions into the time intervals with low energy prices, specifically in 01:00-05:00 (valley period, see Figure 3) to further reduce their running cost.  
Figure 5: Hourly energy and reserves scheduling in case 1, (**a**) hourly energy and (**b**) reserve capacity.  
As shown in Figure 6b, in this case, a part of the required reserve capacity is provided by demand side participation, including up-spinning reserve (Up/DR) and down-spinning reserve (Down/DR). Comparison of results in Figures 5b and 6b also shows that the participation of responsive loads can decrease the spinning reserve requirement of DG units and reduce the back-up energy costs. It can also be understood from the simulation results that the stochastic nature of wind and PV power generations, makes it necessary to allocate more reserve capacity to the time intervals (e.g., 10:00-14:00 and 19:00-22:00) when the risk of power shortage from RESs is higher. To this end, DR actions can provide a considerable portion of the needed upward reserve in the MG and decrease the MG operation cost. The expected operating cost of MG and the DGs energy and reserve costs in case 2 in RTP program are obtained as 872.9435, 416.7895 and 25.0775, respectively.  
The scheduled energy and reserve capacity under TOU programs are illustrated in Figure 7a,b, respectively. By comparing the results in Figures 6a and 7a, it can be seen that the produced powers of DGs in TOU are slightly higher than ones in RTP programs at peak hours. This is due to the fact that during peak periods, participation of consumers in TOU programs is lower than that in RTP programs.  
It is also observed from Figure 7b that the scheduled reserves in these programs are different, especially in peak periods. This difference is due to the fact that the load reduction in TOU is less than that of in RTP at peak periods and the customers don't participate in downward reserve. Therefore, DGs non-spinning reserve scheduling is not required. The expected operating cost of MG and the DGs energy and reserve costs in case 2 under TOU programs are 881.1645, 420.5495 and 19.1725, respectively.  
The hourly energy and reserve scheduling in case 2 in CPP programs are shown in Figure 8a,b, respectively. As mentioned before, the electricity price in CPP programs is the same as the price in TOU programs, except during hours 20:00 and 21:00. During these two hours, the price in CPP is four times greater than that of TOU. So, as Figure 8a shows, customers are highly encouraged to reduce their consumption as much as possible. As a result, the demand downward reserve increases in these  
Figure 6: Hourly energy and reserves scheduling in case 2 under RTP programs (**a**) energy and (**b**) reserve.  
Figure 7: Hourly energy and reserves scheduling in case 2 under TOU programs (**a**) energy and (**b**) reserve.  
two hours and consequently, the DGs non-spinning reserve increases. The expected operating cost of MG and the DGs energy and reserve costs are 850.395$, 410.590$ and 21.600$, respectively. **Case 3:** In this case, we evaluate the effectiveness of TBR-DR schemes in presence of EVs.