## 3 Materials and Methods
### Short Version of Economic Dispatch Problem  
The problem of economic dispatch of power plants is a classic problem in power systems. We have a network of electric power generators that are located in different nodes of an electric network. The objective of the problem is to determine, for a given period, the power that each generator has to produce to meet the required demand at the minimum cost, complying with a set of technical restrictions of the network and the generators. Each line in the network transmits power from the supply node to the receiving node. The power sent is proportional to the difference in the angles of these nodes (susceptance). The power transmitted from node \(i\) to node \(j\) through line \((i-j)\) is represented by Equation (1) [32]:  
\[B_{ij}(\delta_{i}-\delta_{j}) \tag{1}\]  
where \(B_{ij}\) is the susceptance of the line \((i-j)\), \(\delta_{i}\) and \(\delta_{j}\) are the angles of the nodes. The amount of power transmitted through a network line is limited by thermal or stability conditions. This is represented in Equation (2).  
\[-P_{ij}^{max}\leq B_{ij}(\delta_{i}-\delta_{j})\leq P_{ij}^{max} \tag{2}\]  
The power produced by a generator is a magnitude limited lower and higher. The lower level is due to stability conditions and the upper level to thermal conditions. Equation (3) shows this constraint  
\[P_{i}^{min}\leq P_{i}\leq P_{i}^{max} \tag{3}\]where \(p_{i}\) is the power produced by generator \(i\) and, \(P_{i}^{min}\) and \(P_{i}^{max}\) are the maximum and minimum power output that can be administered to generator \(i\). In each node, the power must match the power that comes out of it according to the law of conservation of energy. This is represented in Equation (4).  
\[\sum_{j\in\Omega_{i}}B_{ij}(\delta_{j}-\delta_{i})+p_{i}=D_{i},\ \forall i \tag{4}\]  
where \(\Omega_{i}\) is the set of nodes connected through the lines to node \(i\) and \(D_{i}\) the demand in node \(i\), the transmitted power is bounded. Equation (5) show this constraint.  
\[-P_{ij}^{max}\leq B_{ij}(\delta_{i}-\delta_{j})\leq P_{ij}^{max},\ \forall j\ \in\ \Omega_{i},\ \forall i \tag{5}\]  
Therefore, a generic version of the problem of economic dispatch can be formulated as follows. Equation (6) shows the objective function of the economic dispatch problem [32].  
\[Min\ Z=\sum_{i=1}^{n}C_{i}p_{i} \tag{6}\]  
where \(C_{i}\) is the production price of generator \(i\) and \(n\) number of generators. Subject to generic constraints represented by Equations (7)-(10)  
\[\sum_{j\in\Omega_{i}}B_{ij}(\delta_{j}-\delta_{i})+p_{i}=D_{i};\ i=1,\ 2,\ldots,n \tag{7}\]  
\[-P_{ij}^{max}\leq B_{ij}(\delta_{i}-\delta_{j})\leq P_{ij}^{max};\ \forall j\ \in\ \Omega_{i},\ i=1,\ 2,\ \ldots,\ n \tag{8}\]  
\[P_{i}^{min}\leq P_{i}\leq P_{i}^{max};i=1,\ 2,\ \ldots,\ n \tag{9}\]  
\[\delta_{k}=0;\textit{where}\ k\ \textit{is an arbitrary node} \tag{10}\]  
where  
\(n:\) the number of generators  
\(p_{i}^{min}:\) the minimum power of generator \(i\)  
\(p_{i}^{max}:\) the maximum power of generator \(i\)  
\(B_{ij}:\) the susceptance of line \(i-j\)  
\(p_{ij}^{max}:\) the maximum transport capacity of line \(i-j\)  
\(C_{i}:\) the cost of producing power from generator \(i\)  
\(\Omega_{i}:\) the set of nodes connected to node \(i\)  
\(D_{i}:\) the demand at node \(i\)  
\(p_{i}:\) the power to be produced by generator \(i\)  
\(\delta_{i}:\) the angle of node  
As documented in the first section, the problem of economic dispatch has multiple aspects according to the elements that are to be integrated into the power grid to be modeled. The demand of each node in the network is a fundamental element for this optimization problem; this variable is generally determined based on historical data observed. However, when proposing new methods of solving the problem and assessing its efficiency and stability, it is necessary to have a large number of test cases that replicate in the best way the real behavior of the electrical network.