## 2 Proposed Model
### Mathematical Formulation
\begin{table}
\begin{tabular}{c l} \hline \hline  & **Strategical Decision Variables** \\ \hline
**Variable** & **Description** \\ \hline \(w_{k}\) & 1 if the generator \(k\) is installed and 0 otherwise \\ \(q_{l}\) & 1 if the battery \(l\) is installed and 0 otherwise \\ \hline \multicolumn{3}{c}{**Operational Decision Variables**} \\ \hline
**Variable** & **Description** \\ \hline \(p_{kt}\) & Power generated in the period \(t\) by the generator \(k\) [kW] \\ \(v_{kt}\) & 1 if the generator \(k\) is used in time \(t\) and 0 otherwise, \(k\mid\mathit{tec}_{k}=D\) \\ \(soc_{lt}\) & State of charge of the battery \(l\) in time \(t\) [kW] \\ \(b_{lt}^{+}\) & Power charged to the battery \(l\) in time \(t\) [kW] \\ \(b_{lt}\) & Power taken from the battery \(l\) in time \(t\) [kW] \\ \(bd_{lt}\) & Binary state, 1 if the battery \(l\) is being discharged in time \(t\), and 0 otherwise \\ \(bc_{lt}\) & Binary state, 1 if the battery \(l\) is being charged in time \(t\), and 0 otherwise \\ \(s_{t}^{-}\) & Energy not supplied in time \(t\) [kW] \\ \(s_{t}^{+}\) & Surplus in time \(t\) [kW] \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Decision variables. \[cost\_{\text{-}}\mathit{vom} =\sum_{k\in\mathcal{U}\mathcal{K}\
eq D}w_{k}*cost\_op_{k}+\sum_{l \in\mathcal{B}}q_{l}*cost\_op_{l} \tag{4}\] \[\quad+\sum_{k\in\mathcal{U},k=D}\sum_{t\in\mathcal{T}}(f0_{k}*G\_ max_{k}*v_{kt}+f1_{k}*p_{kt})*\rho_{FC}\]  
The CRF of Equation (5) takes into account the real interest rate (\(i_{r}\)) expected by the shareholder, while inflation (\(i_{n}\)) and the nominal interest rate (\(i_{f}\)) are considered in calculating the real interest rate of Equation (6). Additionally, the time horizon (\(\mathcal{H}\)) should be taken into consideration. The purpose of this indicator is to annualize the investment and infrastructure costs, thus enabling the use of the LCOE. This facilitates the analysis of different technologies with varying life cycles, ensuring a fair annual comparison of different energy sources [5; 10]. \[CRF =\frac{i_{r}(1+i_{r})^{|\mathcal{H}|}}{(1+i_{r})^{|\mathcal{H}|}-1} \tag{5}\] \[ir =\frac{i_{n}-i_{f}}{1+i_{f}} \tag{6}\]  
Note that the objective function is nonlinear, as the denominator involves the not served demand or energy not supplied, \(s_{t}^{-}\). To ensure linearity, the denominator is replaced by the total demand (\(\sum_{t\in\mathcal{T}}d_{t}\)). It implies that the \(LCOE\) could be underestimated. However, the constraint of Equation (7) is modeled as part of the objective function to minimize the \(LPSP\) by defining a minimum admissible value (\(\zeta\)). A strategy such as an \(\epsilon\)-constraint can be used to limit the value of the \(LPSP\). The constraint allows for moving average periods with a time interval (\(\delta\)) set by the user. Thus, if this \(\delta\) value is 1, \(\zeta\) must be guaranteed for all periods; if it is greater than 1, the \(LPSP\) limit must be met, on average, during the \(\delta\) period but not necessarily in each individual period within the interval [10]. \[\frac{\sum\limits_{ \begin{subarray}{c}t=k-\delta\\ t=ik-\delta\end{subarray} }^{tk}s_{t}^{-}}{\sum\limits_{t=ik-\delta}^{tk}d_{t}}\leq\zeta \forall tk\in\mathcal{T},\;tk\geq\delta \tag{7}\]  
Concerning strategic decision-making, the primary concern is to ensure compliance with the available area (\(a_{max}\)) for the microgrid, as enforced by the constraints of Equation (8). This constraint incorporates the area occupied by installed generators (\(a_{k}\)) and batteries (\(a_{l}\)). \[\sum_{k\in\mathcal{U}}a_{k}*w_{k}+\sum_{l\in\mathcal{B}}a_{l}*q_{l}\leq a_{max} \tag{8}\]  
Regarding operational decisions, the initial constraints pertain to power generation. For diesel generators, the power generated (\(p_{kt}\)) is determined by both minimum and maximum capacity constraints. As for renewable sources, they contribute the maximum rated power to the network in each period.