An optimization strategy based on machine learning employs a support vector machine for forecasting renewable energy, aiming to enhance the scheduling of green energy utilization, demand response, and the optimal charging and discharging of battery energy storage for dynamic . An optimization strategy based on machine learning employs a support vector machine for forecasting renewable energy, aiming to enhance the scheduling of green energy utilization, demand response, and the optimal charging and discharging of battery energy storage for dynamic . Microgrids have emerged as a key element in the transition towards sustainable and resilient energy systems by integrating renewable sources and enabling decentralized energy management. This systematic review, conducted using the PRISMA methodology, analyzed 74 peer-reviewed articles from a total. Abstract—This study investigates the economic dispatch and optimal power flow (OPF) for microgrids, focusing on two config-urations: a single-bus islanded microgrid and a three-bus grid-tied microgrid. The methodologies integrate renewable energy sources (solar PV and wind turbines), battery energy. This paper proposes an integrated framework to improve microgrid energy management through the integration of renewable energy sources, electric vehicles, and adaptive demand response strategies. The dieselgeneratorsin the microgrid arenetworkedtoallowparallel operation andcoordinateddispatchforloadsinterconnectedwithinafa-cility's.