# Optimal Scheduling of Microgrids Based on an Improved Dung Beetle Optimization Algorithm
## 6 Conclusions  
It is crucial to fully consider economic issues and RE when scheduling MGs. In this paper, we constructed an MG system model including PV, WT, MT, DE, BESS, and grid connection. Based on the price-demand elasticity matrix, Monte Carlo sampling, and K-means clustering algorithm, DR and uncertainty of wind and solar power were fully modeled. The objective function was the total cost, including operational costs and environmental treatment costs. A novel algorithm IDBO was proposed to solve the issue. Compared to other algorithms, the designed IDBO managed to obtain lower total costs, achieve peak load shifting, and improve the utilization of RE. The optimization scheduling method proposed in this study holds significant practical value, particularly in scenarios such as smart MGs and virtual power plants (VPPs). By integrating the strategies, the economic efficiency and stability of the system can be significantly enhanced. The method presented in this paper can assist MG operators in reducing energy procurement costs and optimizing the utilization of renewable energy, thereby improving the system's self-sufficiency. Furthermore, with the opening of the electricity market and the advancement of smart grid technologies, the proposed method will enable MGs to operate more efficiently in dynamic market environments. Especially when faced with uncertainties such as complex weather conditions and load fluctuations, this method will enhance the system's robustness and flexibility, ensuring the reliability and economic efficiency of power supply. Although our study achieved certain results in MG optimization scheduling, there are still some limitations that provide directions for future research improvements. Firstly, our study primarily focuses on optimizing the MG system in specific scenarios; it does not fully consider the impact of different geographical environments, climate conditions, and load characteristics on MG operations. Therefore, the generalizability of the research findings in more complex or diverse microgrid scenarios still requires further validation. Additionally, Monte Carlo sampling and K-means clustering may introduce certain biases. Specifically, potential uncertainty factors such as extreme weather events will cause information loss during the clustering process, lead to insufficient description of scenarios. Figure 13: MG output at the lowest total cost considering DR and uncertainty of wind and solar power. In the future, we aim to extend our research to more complex and diversified MG systems, further exploring the applicability and scalability of the method proposed in this paper. Specifically, we will investigate the feasibility of our approach in scenarios such as urban, rural, and industrial MG systems, each with distinct load profiles, energy sources, and operational constraints. By doing so, we can evaluate the robustness and adaptability of our method under different conditions, ensuring its practical utility in real-world applications. Additionally, we plan to explore the integration of our proposed method with emerging technologies and concepts in the energy domain. One particularly promising direction is its application to VPPs, which have garnered significant attention as a cutting-edge topic in modern power systems. By applying our method to VPPs, we aim to optimize their coordination and control, enhancing their ability to participate in energy markets, provide grid services, and improve overall system efficiency. Conceptualization, Y.Y. ; methodology, H.R. and Y.Y; software, H.R. ; validation, H.R. and L.Z. ; resources, D.L. ; data curation, D.L. and L.Z. ; writing--original draft preparation, H.R. ; writing--review and editing, Y.Y. and D.L. All authors have read and agreed to the published version of the manuscript. This research was funded by Natural Science Foundation of Beijing Municipality, Grant number 4204093. Not applicable. The data presented in this study are available on request from the corresponding author.