The intermittent nature of renewable energy sources poses a significant challenge to the stability of energy systems. This challenge is exacerbated by the increasing global demand and low-carbon transition requirements. This paper introduces the development of a novel framework for the optimal sizing and dispatch of energy in a grid-connected microgrid. The proposed model incorporates solar photovoltaic, stationary energy storage systems, and mobile storage systems utilizing vehicle-to-grid technology. A mixed integer linear programming algorithm was implemented using the Open Energy Modeling Framework to minimize system costs and emissions while maintaining reliability and improving efficiency. The framework was validated through a case study applied to a building of the green energy park research platform. The results demonstrate a competitive levelized cost of energy (LCOE) of approximately 0.85 MAD·kWh −1 , with a renewable energy share of approximately 96%. Hybrid storage inclusion significantly decreases dependence on the grid, enhances energy self-sufficiency, and minimizes the total annual cost (TAC) to 441,403.81 MAD . The inclusion of hybrid storage significantly reduced grid dependence, enhanced energy self-sufficiency, and lowered TAC to 441,403.81 MAD. It also contributes to system flexibility, with electric vehicle batteries supplying 6.6% of total energy production. Furthermore, the sensitivity analysis indicates that projected cost declines in PV systems and batteries could further reduce the LCOE to 0.5 MAD·kWh −1 by 2030 and 0.3 MAD·kWh −1 by 2050. These results underline the economic viability and environmental durability of the proposed microgrid design. This study supports the development of hybrid energy storage systems. This also contributes to the development of more efficient and sustainable energy solutions.
Mahir et al. (Wed,) studied this question.