# Optimal Scheduling of Microgrids Based on an Improved Dung Beetle Optimization Algorithm
## 1 Introduction  
The energy demand is rising, and fossil resources like coal, diesel, and natural gas are still important for both production and daily life [1, 2]. However, excessive use of fossil resources is causing an increasing environmental problem, which threatens natural ecosystems [3]. As a result, renewable energy (RE) sources like wind and solar power are highly anticipated. The microgrid (MG) is seen as a system that allows fossil and REs to work in a coordinated way. MG is a small power-generation and distribution system composed of distributed generations (DGs), Battery Energy Storage Systems (BESSs), and loads. Fossil-energy-generation units, such as diesel generators (DEs) and micro gas turbines (MTs), together with RE-generation units, such as wind turbines (WTs) and photovoltaic panels (PVs), collectively form the DGs. They operate collaboratively to provide a reliable power supply [4]. MG was proposed to achieve flexible and efficient use of distributed energy sources and toaddress the challenge of integrating DGs into the grid. The development and promotion of MG can greatly advance the integration of fossil and RE, ensuring a highly reliable energy supply to loads in multiple forms. This is an effective way to transition from traditional grids to smart grids. The scale of distributed RE generation is expanding, and its role in MG is becoming prominent. However, RE generation depends on real-time weather conditions, making it unpredictable. Directly integrating RE will lead to a negative impact on the safety and stability of MG. Fossil energy generation also faces uncertainties, such as fluctuating operational costs and environmental treatment costs, which may impact grid interaction [5; 6]. As a result, the multiple power sources involved mean that managing and optimizing the scheduling of microgrids has become a complex problem involving many constraints. In recent years, the demand response (DR) and the uncertainty of wind and solar power have been proposed to describe issues resulting from unpredictability in MG scheduling. But this will make the MG operation more complex to schedule. Finding efficient ways to resolve these problems is a challenge [7]. Bio-inspired optimization algorithms have gained attention for their ability to tackle microgrid optimization issues. Common algorithms, such as particle swarm optimization (PSO) [8; 9], genetic algorithm (GA) [10; 11], and grey wolf optimizer (GWO) [12], have been shown to be feasible in MG optimal scheduling. Researchers have explored various bio-inspired optimization algorithms for MG optimal scheduling. [PERSON] et al. [13] introduced a model for analyzing the cost-effectiveness of MG operation using a Distributed Economic Model Predictive Controller (DEMPC). This method is effective; however, the solving process requires each subsystem to obtain the optimal solutions of other subsystems, making the process complex. [PERSON] et al. [14] proposed an optimization model for an MG with PV, WT, MT, DE, and BESS, aiming to reduce operating costs using Improved Archimedes Optimization (IAO). While it performs well in global searches, it can sometimes encounter local optima and may struggle with multi-objective problems. [PERSON] et al. [15] used the Analytical Target Cascading (ATC) method but offered limited discussion on RE sources like PVs and WTs; as such, their model is overly restrictive for solving a complex MG system that contains diverse DG units. [PERSON] et al. [16] presented an MG model using the Pareto Envelope-based Selection Algorithm II (PESA-II) for optimal scheduling. This algorithm only checks undefeated members and its parents; the process is simple. But fossil energy sources are not sufficiently addressed. Other researchers, like [PERSON] et al. [17], also focused on optimal scheduling, considering fossil energy and using the Amended Multiverse Optimizer Algorithm (AMVOA), considering the uncertainty of wind and solar power. However, the optimization process of AMVOA includes two stages.