## 1 Introduction
### Brief Study of the Literature  
The purpose of microgrid planning is to determine the size, number, combination, and in some cases, optimal location of assets that minimize the costs of investing and operating microgrids [14]. However, in community-based microgrids, it is also projected to involve factors such as the sufficiency of income for the community, the efficient allocation of resources among stakeholders, and particularly in urban communities, the improvement of the reliability levels for the users [10]. Specifically, a community microgrid focuses on ensuring the electricity supply to a community during a power interruption in the power grid [15]. Community microgrids increase the resilience of the system in the face of low-probability and high-impact events, as is the case with the microgrid installed in Huatacondo, Taracapa Region-Chile, where in the event of contingencies that occurred (an avalanche that cut the access road of the community, an earthquake and the fall of the wind generator) the microgrid was able to maintain \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Country** & **SAIDI [Hours]** & **Country** & **SAIDI [Hours]** \\ \hline Argentina & 29 & Costa Rica & 6 \\ Brazil & 18 & Panama & 20 \\ Chile & 13 & Peru & 15 \\ Colombia * & 39 & Uruguay & 11 \\ \hline \hline \end{tabular}  
* Colombia includes interruptions longer than one minute, while the other countries measure them from three minutes.  
\end{table} 
Table 1: Average annual duration of interruptions for Latin American countries [11]. the power supply to all its inhabitants [16]. Consequently, several studies have been carried out on the deployment of microgrids, specifically in the urban-residential segment. In [17], the planning of a 15-household community microgrid is proposed, where the optimal size of their energy resources is determined (bank of batteries and biogas generators), incorporating demand management through a group of controllable loads. The importance of community microgrids is also analyzed in [18], where an optimization model based on Mixed Integer Linear Programming (MILP) is formulated for the planning of a microgrid made up of 20 households. The objective is to reduce the total costs, which include investment plus operational costs of Distributed Energy Resources (DER), battery degradation costs, costs for loss of customer comfort, among others, when considering residential HVAC (heating, ventilation and air conditioning) systems. On the other hand, the authors in [19] have analyzed the advantages of having community microgrids with demand response (200 homes distributed in 20 groups of 10 households, with photovoltaic generators and battery storage systems) to favor the penetration of photovoltaic solar energy. The demand response is used as a strategy to displace the import needs of extra energy from the main grid during cloudy days or those with little solar generation. In [20], a planning problem for the expansion of a microgrid is tackled, proposing a two-stage stochastic optimization approach. Investment decisions (capacity of generation units and transmission lines) are determined in the first stage, which seek to maximize benefits for all interested parties. In the second stage, operating costs are minimized by considering uncertainty factors for maintaining the resilience and reliability of the system. Furthermore, a microgrid made up of five houses with photovoltaic (PV) generation systems, wind generation and batteries, is planned in [21]. The microgrid operates connected to the power grid, and seeks to reduce the cost of energy, while increasing the reliability of the supply and allowing the community to export surplus energy to the main grid. Additionally, in [22], the interconnection of six microgrids is planned in order to increase the reliability of an entire community, and facilitate load sharing between microgrids.