## 1 Introduction
These approaches encompass factors such as geographical position, types of connections, mathematical formulations, and other relevant aspects. In [33], it is highlighted that while classic optimization methods are prevalent, metaheuristic approaches, particularly PSO and GA, are more commonly employed in microgrid sizing. In [34], a large range of solution options is presented, with a great variety of heuristics. It is also observed that standalone networks are more common than connected networks. Additionally, it reflects that it is essential to have historical information on temperature, solar irradiation, wind speed, and load or demand profile so that the prediction can be made from these data. Likewise, Refs. [33; 34] show that the most common energy sources in the microgrid configuration are solar photovoltaic (PV), batteries, diesel generator (DG), and, on several occasions, wind turbine generation (WT). This paper contributes to the field by addressing the challenge of optimizing microgrid sizing, particularly focusing on enhancing the reliability and efficiency of energy supply. Our objective is to present a comprehensive framework that integrates a multiyear model with non-linear optimization techniques, considering uncertainties, to facilitate the design of optimal microgrids. We aim to economically, safely, and reliably supply electrical energy to communities with limited or no access to the main power grid, predominantly relying on renewable sources such as solar and wind technologies. In general terms, an optimization strategy is developed for selecting the microgrid size. This mathematical formulation involves solving a deterministic problem. However, considering the nature of the data, it is important to account for its stochasticity. Additionally, since the time horizon of the sizing model is long-term, multi-year formulations should also be taken into account. Therefore, four models are proposed: deterministic with annual data, stochastic with annual data, multi-year deterministic, and multi-year stochastic. To solve the models, an optimization solution algorithm is utilized. Additionally, it is proposed to decompose the problem into two parts: one for making installation decisions and another for evaluating operational performance. This is accomplished through the use of an iterated local search (ILS) optimization algorithm, which is easy to implement and highly practical as a metaheuristic. To optimize computational time, another solution algorithm is proposed, where operational performance is achieved through dispatch strategies. These strategies enable real-time modeling of the network. To summarize, the main features and contributions of this paper are as follows:  
* A comprehensive framework integrating multiyear optimization and uncertainty is proposed to enhance microgrid design. Environmental stochasticity and electrical demand variability are incorporated, relying on renewable sources such as solar and wind technologies, it also allows the combination of different types of technology generators. * A mixed strategy combining optimization and simulation is used to solve the model through a two-stage process. The first stage focuses on installation decisions, while the second evaluates operational performance using an iterated local search (ILS) algorithm. * The methodology is validated using real data from a non-interconnected zone in Colombia. This demonstrates the practical applicability of the proposed model. The optimization of renewable-based microgrids facilitates electricity expansion in remote areas where traditional grid extension is unfeasible, ensuring cost-effectiveness and operational reliability. This paper is organized as follows: Section 2 introduces the proposed model, which includes the mathematical formulation that formally defines the microgrid sizing problem. This section also outlines the multi-year model and incorporates a stochastic algorithm for minimizing errors. Section 3 describes the approach adopted in this research work for solving the microgrid sizing problem.