# Optimal Operation of CCHP Smart Distribution Grid with Integration of Renewable Energy
## 7 Results and Discussion
### Scenario 1  
Figures 4-6 depict the optimal planning of the electric generators and exchange in electric energy with the SB and the main system. It is observed from Figure 4 that the MT is operated during the whole scheduling time to supply both electric and heat loads. Additionally, the FC operates 24 h as well to supply the electric loads, where it is operated at hours 1 to 5 with less than maximum power because the EEOMP has low values at these hours and the CCHP system purchases the highest possible energy from the upstream system to supply the electric and heat loads through the EH and EC. Whereas, at these hours, the CCHP system exports the largest possible heat energy to the upstream system because the HEOMP has the highest values during the scheduling horizon, as shown in Figure 7. The DE operated for much fewer hours than the MT and FC due to its high operating cost. Nevertheless, the DE is committed when the electric, heating, and cooling loads have high value because the electric power is required to supply the heating and cooling loads through the EH and EC. Despite the high operating cost of the DE, it is operated at hour 24 to meet the high electricity and heat demands. And thermal loads are supplied through the EH and EC because the SB is unable at this hour to respond to the constraint that the state of charge of the SB should be at maximum value at the end of the scheduling day. In addition, the solar energy equals zero as shown in Figures 3 and 5. The SB is discharged when the EEOMP has peak values, where the SB supplied the highest possible energy at hour 13 when the price has the highest value and the electric load has a high value as well (as shown in Figure 5). Additionally, the SB is charged the highest possible energy at hours 12 and 18, where at hour 12, the price has a lower value than hour 13 and renewable energies are abundant. Therefore, the SB is charged at 12 and discharged at hour 13 to increase the system revenue, while at hour 18 the SB is charged again because the EEOMP has quite a low value and to meet the limit to charge the SB until maximum. The CCHP system exports the highest electric energy to the main system at hours 9 and 10 because the EEOMP has the highest values during these hours and the electric load has low values with abundant wind and solar energies, as shown in Figures 2 and 6. This is to minimize the expense and increase the revenue of the CCHP system. Figure 4: Optimal schedule of the electric system. price has the lowest value as depicted in Figure 8. Figure 9 demonstrates that the CCHP system provides the highest possible heat energy to the main system at hours 1 to 5, 16, and 17 to reduce the total cost and increase the revenue. This is because the HEOMP arrives at high values at these hours. Similarly, the CCHP system purchases high heat energy at hours 19, 20, 23, and 24 because the heat load has the highest values at these hours. Figure 10 shows the output of cooling energy of the EC and AC. It can be seen that the AC is uncommitted at hours 1 to 11 because the AC needs heat energy to operate, where the heat load at these hours is quite high and the HEOMP shows peak values at these hours. Therefore, the EC supplies the load at these hours because the electric load has low values at these hours and renewable energy generation is abundant. However, the EC is uncommitted at hours 13 and 14. This is due to high electric load and high EEOMP at these hours. In the cooling system, it is obvious that the generators of cooling energy depend on the electric and heating systems. Figure 11 depicts the hourly costs of electric, heating, and cooling systems, in addition to emissions and the total cost. It is revealed that the electric cost has the highest cost among other costs because the electric system supplies electric load, heating, and cooling loads through interfacing generators, and emission cost belongs to the electric generators.