Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
ANALYSIS OF LOCAL MARGINAL PRICES IN TRANSMISSION SYSTEMS  
DOMINATED BY HYDROELECTRIC GENERATION  
ANÁLISIS DE PRECIOS MARGINALES LOCALES EN SISTEMAS DE  
TRANSMISIÓN DOMINADOS POR GENERACIÓN HIDROELÉCTRICA  
1
2
Sánchez-Masaquiza Manuel ; Quinatoa-Caiza Carlos  
1
2
Resumen  
En los mercados eléctricos competitivos, las señales de precio son fundamentales para guiar las  
decisiones de inversión en expansión y repotenciación de la red, especialmente cuando se  
identifican congestiones en generadores, transformadores y líneas de transmisión, por lo que  
este artículo propone una metodología para analizar dichas congestiones en el Sistema Nacional  
Interconectado (SNI) Ecuatoriano mediante un modelo de optimización con flujo DC que  
incorpora pérdidas eléctricas, determinando los Precios Marginales Locales en cada nodo bajo  
tres escenarios clave: red sin límites de transmisión, red con capacidad real de los elementos y  
red real incluyendo pérdidas, cuya comparación permite identificar y cuantificar las congestiones  
y su impacto económico, obteniendo así índices cuantitativos que asisten al planificador en la  
toma de decisiones óptimas de inversión, con resultados preliminares que revelan puntos críticos  
de congestión en líneas y generadores específicos cuya repotenciación minimiza los costos  
globales de operación del sistema.  
Palabras clave: Planificación energética, Precios marginales, Incertidumbre, Costo marginal,  
Precios nodales, Congestión en las líneas, Pérdidas en las líneas.  
Abstract  
In competitive electricity markets, price signals are essential for guiding investment decisions on  
grid expansion and repowering, especially when congestion is identified in generators,  
transformers, and transmission lines. This article therefore, proposes a methodology for analysing  
such congestion in the Ecuadorian National Interconnected System (SNI) using an optimization  
model with DC flow that incorporates electrical losses, determining the Local Marginal Prices at  
each node under three key scenarios: a network without transmission limits, a network with the  
actual capacity of the elements, and a real network including losses. Comparing these scenarios  
allows for the identification and quantification of congestion and its economic impact, thus  
obtaining quantitative indices that assist planners in making optimal investment decisions.  
Preliminary results reveal critical points of congestion in specific lines and generators whose  
repowering minimizes the overall operating costs of the system.  
Keywords: Energy Planning, Marginal prices, Uncertainty, Marginal cost, Nodal prices, Line  
congestion, Line losses.  
Información del manuscrito:  
Fecha de recepción: 09 de enero de 2026.  
Fecha de aceptación: 20 de marzo de 2026.  
Fecha de publicación: 20 de abril de 2026.  
384  
Sánchez-Masaquiza et al. (2026)  
1
. Introduction  
operators of the electrical market  
include in the offer prizes of the lines  
transmission restriction trough which  
energy is sold. Whence the problems  
such as trapped charge or  
generations required to maintain the  
operation of the power system within  
safe ranges become conditions that  
agents use to influence nodal prices  
or to achieve higher margins in the  
market, due to their strategic position  
in the transmission system.  
Currently, in Ecuador as well as in  
different countries, the electric  
systems face new challenges related  
with  
the  
electric  
demand  
increasement, the introduction of  
variable  
sources  
renewable  
and the  
generation  
uncertainty  
produced by these technologies [1],  
the study of nodal prices or LMP  
(Location Marginal Prices), is a topic  
of analysis and great importance,  
due to it is precise to stablish  
adequate rates that provide efficient  
and optimal economic signals [2].  
In many electricity markets, the  
busbar price is determined without  
considering congestion, and losses  
are approximated to calculate the  
market cost [6]. For example, the  
authors in [5] utilize a DC flow  
methodology to estimate losses. The  
current methodology does not  
account for reactive power or  
uncertainty in renewable energy  
sources. However, other authors,  
such as [7] and [8], present linearized  
flow equations that assist in  
determining losses by finding a  
global optimum [9]. Additionally,  
some authors, like [10], develop  
methods to account for the  
uncertainty in local nodal prices.  
The analysis of congestion as an  
indicator of the application of models  
for planning the expansion in  
generation and transmission must  
consider various factors, such as the  
incorporation of new electrical  
infrastructure, the construction of  
generating plants, substations and  
power transmission lines [3], [4].  
Generally, the electricity prize for  
each period is determined by the  
variable cost of the last required  
generation unit to meet the demand  
[
5]. That one that has available  
generation capacity, which is why  
said unit is called Marginal. It is  
important to point out that the  
Nonetheless,  
their  
optimization  
models rely on a DC flow model and  
do not incorporate electrical energy  
385  
Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
losses. In [11], the issue of how  
strategic generators interact in  
deregulated electricity markets is  
addressed using machine learning to  
maximize profits, including the  
integration of distributed generation  
and grid faults. Meanwhile, in [12],  
the authors examined settlement,  
electricity supply and demand.  
Previous literature review linearizes  
the marginal price level (LMP) using  
DC flow. However, they do not  
consider actual AC losses, which  
could lead to price signal deviations.  
Based on the above, we suggest  
developing an optimization model  
implemented in Python using Pyomo  
and the GLPK solver. This model  
aims to determine nodal prices in the  
National Interconnected System  
congestion,  
instruments within the electricity  
market. However, the LMP  
and  
financial  
decomposition depends on the  
energy reference bar used in the  
OPF model, and the simulation is  
carried out in a simplified system.  
(SIN) under three scenarios. The first  
scenario assumes unlimited  
transmission line capacity, allowing  
analysis of system behavior without  
network constraints. The second  
Because of restrictions on the  
transmission network and on the  
operation of electric generators,  
energy flows are redistributed and  
more expensive units are used [13].  
As a result, nodal price separation  
occurs, and marginal power lines  
scenario  
incorporates  
actual  
transmission line capacities, without  
considering electrical losses. The  
third scenario includes both real line  
capacities and network losses,  
resulting in a nonlinear optimization  
problem. Because of this complexity,  
the last case is solved using the  
IPOPT solver. The database feeding  
the model is obtained from  
(MPL) increase. Therefore, the MPL  
reflect not only the marginal cost of  
energy, but also the cost of  
maintaining system reliability and  
stability.  
simulations  
performed  
in  
the  
Local marginal process must account  
for losses and congestion in  
DIgSILENT PowerFactory software.  
The data is automatically extracted  
using a Python script developed  
transmission  
lines,  
generators,  
transformers, and other components.  
This is necessary to determine the  
true cost of the transition between  
within  
the  
PowerFactory  
enabling efficient  
environment,  
386  
Sánchez-Masaquiza et al. (2026)  
integration of simulation results with  
the optimization model.  
2.1.1.3. Transmission system  
losses  
Transmission  
system  
losses  
2
. Methodology  
increase generation requirements  
and depend on the technology,  
usage, and length on the lines. The  
price generated by these losses is  
justified by the relative location effect  
between generation and demand:  
when a load is electrically distant  
from the marginal generator, this  
price component increases at its  
node; conversely, it decreases when  
the load is closer.  
2.1.1. LMP composition  
2.1.1.1. Energy price  
The Price is determined by  
disregarding both losses and  
network constraints, that is, by  
performing an ideal energy dispatch.  
In this stance the LMP (Lower  
Maximum Permissible Limit) is equal  
to the single-node price with infinite  
transmission line capacity.  
This price formation mechanism is  
applied in both developing and  
2.1.1.2. Network restrictions  
developed  
electricity  
markets  
This component is associated with  
the operational constraints of the  
equipment that makes up the  
electrical power system. Such as  
thermal, voltage, and stability limits.  
The cost of constraints arises when  
these limitations prevent the dispatch  
of lower-cost generators, forcing the  
use of more expensive units located  
closer to load centers to meet  
demand. This price component is  
zero when the grid has no active  
constraints or when the system  
operates well beyond its operational  
limits.  
because it improves efficiency and  
maintains transparency in the  
system, generating economic signals  
for new investments in generation or  
transmission.  
The calculation of nodal prices is  
based on optimization models, such  
as DCOPF and ACOPF; in practice,  
DCOPF is used because its  
simplicity and speed, while ACOPF is  
used for offline studies because of its  
greater accuracy [14].  
387  
Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
2
.1.2. Optimal power flow  
solving the optimization problem  
provides the inputs for calculating the  
maximum permissible limits (MPL).  
Optimal power flow  
involves  
determining the state variables of a  
power system by optimizing an  
The DC model is an approximation of  
the AC model, which can be solved  
more quickly and generally yields a  
global optimum [15]. Therefore, the  
equation used to solve case studies  
1 and 2 corresponds to the DC  
optimization model.  
objective  
function  
while  
simultaneously adhering to a set of  
physical operational constraints. In  
this study, the objective function is to  
minimize generation costs subject to  
network equality and inequality  
operational constraints. Therefore,  
(
(
1)  
2)  
min 푧 = ∑ 퐶푖 ∗ 푝푔푖  
∈푁  
푠. 푎  
푓푖, 푗 − ∑ 푓푗, 푖 + 푝푔 = 푑푖 ∀푖 ∈ ꢂ  
,ꢁ∈퐿  
ꢁ.ꢀ∈퐿  
(
(
3)  
4)  
푓푖, 푗 = 푣푖 푣푗(휃푖 − 휃푗) / 푥푖, 푗 ∀푖, 푗 ∈ ꢃ  
푓푖, 푗| ≤ 푓 , , ∀푖, 푗 ∈ ꢃ  
|
(
(
5)  
6)  
푚ꢀ푛  
푚ꢄꢅ  
≤ 푃 ≤ 푃  
ꢆꢀ  
∀푖 ∈ ꢂ  
ꢆꢀ  
    휃푖 ≤ 휃   ∀푖 ∈ ꢂ  
the transmission lines. Equation (4)  
imposes the corresponding upper  
limit on the line power flows.  
Equation (1) formulates the objective  
functions aimed at minimizing the  
total generation cost. This equation is  
subject to constraints. Equation (2)  
Equation  
(5)  
determines  
the  
maximum generation capacity of  
each unit, and finally, equation (6)  
restricts the voltage angle to the  
permissible range.  
imposes  
the  
nodal  
balance,  
considering the incoming and  
outgoing power flows in the nodal  
power balance (fj.i denotes the  
power flow entering node i from node  
j), simply th opposite of the outgoing  
flow fi,j. Subsequently, equation (3)  
represents the power flow through  
To implement case 3, in which  
system losses are implemented, the  
DC model with losses is applied.  
388  
Sánchez-Masaquiza et al. (2026)  
(
7)  
min 푧 = ∑ 퐶푖 ∗ 푝푔푖  
∈푁  
푠. 푎  
(
(
8)  
9)  
ꢃ퐹푔푖 ∗ 푝푔푖 − ∑ ꢃ퐹푑푖 ∗ 푑푖 = 푃ꢃ + 푂푓푓푠푒푡  
∈푁  
ꢀ∈푁  
푓푖, 푗 − ∑ 푓푗, 푖 + 푝푔푖 = 푑푖 + 푃ꢃ ∀푖 ∈ ꢂ  
,ꢁ∈퐿  
ꢁ,ꢀ∈퐿  
(
(
10)  
11)  
푓푖, 푗 = 푣푖 푣푗(휃푖 − 휃푗) / 푥푖, 푗 ∀푖, 푗 ∈ ꢃ  
|
푓푖, 푗| ≤ 푓 , , ∀푖, 푗 ∈ ꢃ  
(
(
12)  
13)  
푚ꢀ푛  
푚ꢄꢅ  
≤ 푃 ≤ 푃  
ꢆꢀ  
∀푖 ∈ ꢂ  
ꢆꢀ  
    휃푖 ≤ 휃   ∀푖 ∈ ꢂ  
requiring that at each node the sum  
of line flows and local generation  
equals demand, assigning the  
absorption of total system losses to  
the reference node.  
Equation (8) represents overall  
system balance, in which total  
generation and demand are adjusted  
using loss factors, so that their  
difference is equivalent to the system  
losses (LP) plus a compensation  
term. In this formulation, Pl  
represents the total transmission  
losses and incorporates their effect  
on the overall power balance.  
Because the lost factors are obtained  
3
. Procedure for obtaining nodal  
prices in python software  
using PYOMO and the GLPK  
solver  
3
.1. Electrical Power System  
through  
linear  
approximations,  
arise between  
discrepancies  
The electrical system under study is  
the National Interconnected System  
generation, demand, and estimated  
losses. Therefore, the OFFSET  
parameter is applied to correct these  
discrepancies, thus ensuring the  
exact closure of the power balance  
constraint in the DC model with  
losses. Finally, equation (9) ensures  
power balance and the nodal level,  
(SIN). The system is modeled using  
the Power Factory DIgSILENT  
simulation software. This data is  
crucial, as it provides the necessary  
input for the optimization model,  
which is then used to calculate nodal  
prices. The analysis is based on the  
389  
Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
Figure 1: Implementation of the Script for  
2
025 case study, considering a peak  
Data Extraction in Python Format.  
demand scenario. This scenario  
includes 181 transmission lines and  
191 busbars.  
3.2. Data Extraction by Python  
application.  
Given the nature of this electrical  
system, which models the National  
Interconnected System, manually  
extracting the necessary data for the  
database is complex. Therefore,  
Python programming software is  
used. Specifically, a Python script, as  
shown in Figure 1, must be created  
within the case study’s libraries to  
automatically extract data using  
Excel paths. This data will then be  
chronologically organized in a .dat  
file. It is important to note that the  
data should be extracted from the  
SNI Zone. Extracting data from the  
entire case study, including the  
Santo Domingo Zone, Quito Zone,  
Cuenca Zone, and others, will result  
in data discrepancies due to the lack  
of connections between lines and  
busbars.  
3
.3. Convert the entire system to  
per unit and perform the base  
changes  
Once the system data is obtained, it  
is advisable to normalize all systems  
parameters to a common basis using  
the per-unit (p.u.) system. For input  
into the Python software, this  
process must be performed correctly,  
respecting the electrical system data.  
Due to the amount of data, the  
process can be carried out in Python  
or using Excel, simplifying data  
management. The conversion is  
performed using equation (15), which  
must adhere to the power system  
basis.  
푅푒푎푙 푉푎푙푢푒  
퐵푎푠푒 푉푎푙푢푒  
(14)  
푉푎푙푢푒 in 푝. 푢. =  
For this purpose, a base power must  
be established for the entire system,  
in this case which is Sbase = 100  
MVA, because it is the default value  
390  
Sánchez-Masaquiza et al. (2026)  
used in the DIgSILENT software,  
however, the base voltage is  
determined by the nominal voltages  
of the lines and transformers.  
to the selected system base, in this  
case 100 MVA. This adjustment aims  
to ensure that the parameters are  
consistent. The base change is  
performed using equation (18)  
Therefore, the  is determined  
,ꢄ  
(18)  
. = 푍. ꢄ  (  
)
according  
to  
equation  
(15),  
푏ꢄꢇꢈ,ꢄ푛ꢍꢀꢆꢋꢄ  
necessary to convert the values of  
the lines to p.u.  
3.4. Generator costs  
One of the main inputs for obtaining  
the LMPs is the cost of generators,  
since, based on these costs and line  
and generator limits, dispatch and  
the determination of nodal prices will  
be carried out.  
Equation (16) shows the value  
obtained for  for a 500 kV  
voltage level, which is operated by  
the line L_INGA_SRAFA_3_1.  
Equation (17) shows the value  
obtained for  for a voltaje level  
of 230 kV, which is operated by the  
line L_PIMA_POMA_2_1.  
The  
costs  
of  
thermal  
and  
hydroelectric power generators in  
Ecuador are obtained from two  
databases, in CVS and TXT formats  
respectively. These prices serve as  
(
15)  
2
푏ꢄꢇꢈ  
ꢈ  
=
ꢈ  
(
(
16)  
17)  
002  
an  
Internationally  
recognized  
5
ꢈ  
=
=
= ꢉ500  
= 5ꢉ9  
1
00푀푉퐴  
benchmark.  
ꢉ30푘2  
ꢈ  
1
00푀푉퐴  
To determine the prices at the  
busbars, an analysis of the  
generators connected to the busbar  
must be carried out, determining the  
respective value, which is why Table  
Once the  value is obtained for  
each voltaje level, it is easy to find the  
p.u.values of the lines by dividing the  
actual value in Ω by the base value.  
1
presents 3 costs of the 191 existing  
busbars.  
The transformers exhibit X1 values in  
p.u., which are specified in their  
machine nominal bases. Therefore, it  
is necessary to readjust these values  
391  
Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
Table 1: Costs in the SNI busbars, 5  
the busbars. The second column  
values.  
contains the line’s reactance, and  
finally, the third column contains the  
line’s maximum flux. Table 3 shows  
an example of the five lines of the  
electrical system and how their  
parameters are defined.  
Busbar  
Cost  
65  
118.076  
205.155  
B_Manta_13.8_ATM  
B_Alluriquin_U1_13.8  
B_Baba_69  
3
.5. Building the database (.dat)  
to feed the model)  
First, in the .txt file, the slack bus  
must be defined as a parameter.  
Regarding the bus parameters, the  
data is divided into five columns: the  
first defines the bus number, the  
second defines the demand at that  
bus, the third defines the maximum  
power (in this case, generation), the  
fourth defines the coast at the bus,  
and finally, the maximum angle. This  
must be done for each bus in the  
power system, ensuring the data is  
correctly organized. Table 2 shows  
an example of the first five buses in  
the electrical system and how their  
parameters are defined.  
Table 3: Definition of the parameters  
corresponding to the transmission lines.  
nl  
reac  
0.00215  
0.1243512  
0.112278  
0.185567  
0.104143  
fmax:  
0.541  
0.478  
0.23  
0.276  
0.416  
1
2
2 3  
6
4
6
5
6
7
3.6. Building the Python model  
using Pyomo and the GLPK solver  
The problem is formulated as an  
optimal DC power flow (DC-OPF)  
using the Pyomo library, which  
allows representing the behavior of  
Ecuador’s National Interconnected  
System (SNI) under a generation  
cost  
minimization  
approach,  
network  
considering  
constraints.  
physical  
Table 2: Definition of the parameters  
corresponding to the busbars.  
nb  
1
2
3
4
dem  
0
0.0116  
pmax  
0.139  
0
0.039  
0.03  
0.35  
cost  
anmax:  
3.34  
1.77  
1.04  
1.04  
The model is defined as an  
AbstractModel, which allows the  
mathematical formulation to be  
separated from the system data,  
which are subsequently loaded form  
a .dat file.  
65  
118.076  
0
0
6.95  
0
0
0
5
3.08  
Finally, to define the lines, there are  
three columns. The first column  
contains two pieces of data: the  
starting point of the line and the  
ending point in terms of connection to  
392  
Sánchez-Masaquiza et al. (2026)  
3
.6.1.  
Implemented Model  
extraction of data from the  
DIgSILENT software, continuing with  
the construction of the optimization  
model, and finally obtaining the nodal  
prices.  
Process  
Figure 2 shows the process followed  
by the method, starting with the  
Figure 2: Flowchart of the implemented model.  
4
. Result analysis  
.1. Case 1.  
across the system. This is attributed  
to the presence of very low-cost local  
generators or zero-cost generation  
constraints that lead to local  
dispatch. Therefore, it does not imply  
congestion, but rather a natural  
consequence of economic dispatch  
with multiple marginal bids.  
4
In case 1, Ecuador’s National  
Interconnected System (SIN) was  
modelled  
assuming  
infinite  
transmission capacity on all lines of  
the network. Therefore, any type of  
congestion is eliminated, reducing  
the problem to a purely economic  
dispatch, where generation is  
allocated based on the marginal  
costs of the generators. The problem  
was solved using a linear DC-OPF  
solution with the GLPK solver,  
yielding an optimal feasible solution.  
Due to the absence of congestion,  
the market price depends on the  
marginal cost of the dominant  
generator, that is, the one that is not  
saturated and can offer a margin.  
Based on the results obtained, the  
market  
price  
Pmarket=35.7  
USD/MWh, is observed; this value  
corresponds to the shadow price  
obtained from the dual of the  
optimization model.  
Although the lines are considered  
infinite, the results show that nodal  
prices are not completely uniform  
393  
Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
The resulting price data shows low  
values associated with hydroelectric  
USD/MWh corresponding to zones  
with expensive or isolated  
generation  
~
6
USD/MWh,  
generation. This behavior results in a  
multimodal distribution, which is  
expected in large-scale systems  
such as the National Interconnected  
System.  
intermediate values of 30 to 45  
USD/MWh corresponding to the  
dominant zone of the system, and  
high  
values  
exceeding  
100  
Figure 3: Diagram corresponding to the prices obtained for each node of the SNI in case 1.  
Figure 4: Diagram corresponding to the prices obtained for each node of the SNI in case 1.  
394  
Sánchez-Masaquiza et al. (2026)  
moderate coefficient of variation,  
indicating controlled price dispersion  
even under unlimited transmission  
conditions. Furthermore, Figure 5  
shows the histogram and normal  
distribution for case 1.  
Figures (3) and (4) show the different  
nodal prices obtained for case 1,  
which assumes infinite line capacity.  
This confirms that the system  
exhibits significant concentration  
around the average price, with a  
Figure 5: Histogram and Normal Distribution of Case 1.  
direct impact of transmission  
congestion on system nodal prices.  
4.2. Case 2.  
In case 2, Ecuador’s (SNI) was  
modelled considering the actual  
transmission capacities of the lines,  
as defined in the system model in  
DIgSILENT Power Factory. Electrical  
losses are not considered; therefore,  
the analysis corresponds to a  
lossless DC-OPF with capacity  
constraints on the lines. This  
scenario allows for determining the  
The results show a high dispersion of  
nodal prices, with values reaching a  
maximum of 235.3 USD/MWh and  
multiple  
intermediate  
levels  
associated with different areas of the  
system. This variability is a clear sign  
of congestion in the transmission  
network, which prevents lower-cost  
generation from supplying the entire  
system uniformly. The increases in  
395  
Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
nodal prices, in contrast to case 1,  
are presented in Table 4. It can be  
observed how the nodal process  
rose, thus determining the correct  
implementation of case 2. Therefore,  
the values tend to increase in the  
different nodes of the system, as  
observed in case study 2.  
suggesting an adequate local  
generation availability. However, due  
to line limitations, energy cannot be  
transmitted to other parts of the  
system without violating maximum  
power flow restrictions on the  
transmission lines.  
Figures (6) and (7) show the different  
nodal prices obtained for case 2,  
which considers the actual line  
Table 4: Nodal prices contrasts in case 1  
and case 2  
Node  
Case 1  
Case 2  
1
1
1
2
5
8
2
3
4
0
6
9
36.6237  
39.6237  
39.6237  
35.7000  
35.7000  
40.0639  
102.0850  
102.0850  
102.0850  
47.8000  
135.4000  
102.0850  
capacities.  
Therefore,  
when  
comparing with figures (3) and (4), a  
significant increase in the prices of  
some nodes is evident. This is  
attributed to compliance with the  
maximum flow rates that must occur  
on the transmission lines.  
Nodes with low prices between 6 and  
USD/MWh are mainly located in  
8
areas near hydroelectric plants or  
low marginal cost generators,  
Figure 6: Diagram belonged to prices obtained for each node SIN in case 2.  
396  
Sánchez-Masaquiza et al. (2026)  
Figure 7: Diagram belonged to prices obtained for each node SIN in case 2.  
distribution, with a pronounced right  
tail, characteristic of congested  
electrical systems.  
Furthermore, Figure 8 shows the  
histogram and normal distribution for  
case 2. It shows an asymmetrical  
Figure 8: Histogram and Normal Distribution from case 2.  
losses. This case study is more  
complex to implement because  
different parameters must be  
included, and the solver must be  
4
.3. Case 3.  
In case 3 of this study, the nodal  
prices are obtained considering the  
real flows of the system and including  
397  
Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
changed to achieve optimization,  
thus minimizing costs for the buses  
Then by applying equation (21), the  
LF loss factors can be obtained.  
(
21)  
푑ꢃꢎ  
The new parameter to be considered  
in the present case study is the  
resistance in per unit, which must be  
correctly extracted from the DIgSilent  
software for each of the system lines.  
=
ꢉ ꢑ∑ 푅ꢎ 푓ꢎ 퐻푖, ꢎꢒ  
푑푝푔푖  
푚휖휄  
Loss factors make it easy to  
determine the offset, which which  
considers the actual AC losses of the  
base case, which correspond to 38.1  
MW. The code calculates the  
difference between the generated  
and demand power, multiplies it by  
the loss factor obtained for each bus.  
Finally, it subtracts the product of the  
power and the LF (Lower Line  
Factor) at each bus from the system  
loss factor, thus obtaining and offset  
of 36.73MW.  
The implemented procedure is found  
in the study; this process begins with  
obtaining the line-node incidence  
matrix, which will be used to obtain  
the distribution factor.  
To determine both the line-node  
incidence matrix and the Y-transfer  
matrix, a Python code was applied,  
which extracts the data from an Excel  
file containing the information  
necessary for the study. The code  
then generates the incidence matrix  
Finally, it is necessary to stablish  
new conditions in the code for  
obtaining nodal prices, which are  
determined by equations (22) and  
considering  
the  
line-node  
connections, defining 1 as the bus to  
which the flow originates. -1 as the  
bus to which the power flow arrives,  
and 0 if there is no connection.  
Furthermore, the Y-transfer matrix is  
(
23).  
(
(
22)  
23)  
∑ ꢃ퐹푔푖 ∗ 푝푔푖 − ∑ ꢃ퐹푑푖 ∗ 푑푖 = 푃ꢃ + 푂푓푓푠푒푡  
∈푁  
ꢀ∈푁  
푓푖, 푗 − ∑ 푓푗, 푖 + 푝푔푖 = 푑푖 + 푃ꢃ ∀푖 ∈ ꢂ  
,ꢁ∈퐿  
ꢁ,ꢀ∈퐿  
generated  
by  
extracting  
the  
In the third case study, after  
implementing the loss factors and the  
OFFSET implementation, values are  
obtained that are accordance with  
the real prices of the SNI bars; these  
reactance of lines i-j, which form the  
diagonal. Once both matrices are  
obtained, equation (20) is used to  
calculate the distribution factors.  
ꢏꢐ  
퐻푖, ꢎ = 훾 ∗ 퐴 ∗ (퐴 ∗ 훾 ∗ 퐴)  
(20)  
398  
Sánchez-Masaquiza et al. (2026)  
values are presented in figures (9)  
and (10)  
Figure 9: Diagram belonged to the prices obtained for each node of the SNI in case 3  
Figure 10: Diagram corresponding to the prices obtained for each node of the SNI in case 3.  
USD/MWh. Figure 10 shows that,  
Based on the results obtained, it can  
although there is a dominant average  
be observed that nodal prices have  
value. There are no single prices,  
an approximate range between 15  
which confirms the influence of the  
and 43 USD/MWh, with a majority of  
concentration  
around  
34-36  
399  
Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
transmission systems and losses on  
price transformation.  
While the busbars with the lowest  
nodal prices generally correspond to  
areas near large power plants and  
sectors with a lower marginal impact  
from losses. At these busbars, the  
marginal cost of supplying additional  
demand is lower, resulting in reduced  
nodal prices.  
It was determined that the busbars  
with highest nodal prices are  
primarily associated with areas far  
from major hydroelectric generation  
centers, and sectors where energy  
must travel long distances through  
the transmission line. Within the  
Figure 11 shows the nodal Price  
context  
of  
the  
National  
histogram,  
which  
shows  
an  
Interconnected System (SNI), these  
prices reflect the higher cost of  
supplying an additional unit power,  
since meeting the increased demand  
at these nodes implies growth in both  
generation and system losses.  
approximately normal distribution,  
with a maximum frequency around  
the system average price, moderate  
dispersion, and extreme values  
representing nodes with particular  
congestions conditions or high  
losses  
Figure 11: Histogram and Normal Distribution of case 3.  
400  
Sánchez-Masaquiza et al. (2026)  
4
.4. Statistical  
Indicators  
evaluation the progressive impact of  
actual line flows and losses.  
Analysis.  
Table 5: Statistical Indicators for the study  
In case 2, the actual transmission  
cases  
capacities  
of  
the  
SNI  
are  
Indicator  
Mean  
Case 1  
45.48  
Case 2  
70.27  
Case 3  
34.06  
incorporated, the statistical results  
show an increase in the average  
values, with a mean of 70.27  
USD/MWh and a median of 47.80  
USD/MWh, as well as a standard  
deviation of 55.55 and a coefficient of  
variation of 0.7905. These values  
indicate a high price dispersion,  
associated with the appearance of  
congestions in the transmission  
network.  
USD/MWh  
Median  
USD/MWh  
Standard  
Deviation  
Coefficient  
of variation  
35.70  
45.57  
1.002  
47.80  
55.55  
35.38  
4.43  
0.13  
0.7905  
To evaluate the impact of the  
transmission network and losses on  
the formation of nodal prices of the  
National Interconnected System of  
Ecuador,  
three  
progressive  
scenarios were analyzed, for which  
the nodal prices obtained in the 191  
bars of the system were evaluated,  
calculating statistical indicators such  
as the mean, median and standard  
deviation.  
Finally, case 3 represents the most  
realistic scenario, as it considers  
both the actual flows on the lines and  
system losses. In this case, the  
statistical indicators show a different  
behavior, with a mean of 34.06  
USD/MWh, a median of 35.38  
USD/MWh, a standard deviation of  
Case 1, which assumes infinite  
capacity in the transmission lines,  
shows a mean of 45.48 USD/MWh  
and a median of 35.70 USD/MWh,  
accomplished by a high standard  
deviation of 45.57 and a coefficient of  
variation close to 1.002. Due to this  
behavior, a high relative dispersion of  
prices is determined. This case does  
not fully represent the reality of the  
National Interconnected System  
4
.43, and a coefficient of variation of  
.13. These values exhibit greater  
0
consistency. It is determined that the  
inclusion of losses smooths out the  
extreme differences observed in the  
previously study cases, reflecting a  
more balanced representation of the  
actual behavior of the National  
(SNI), but it serves as a basis for  
Interconnected (SNI).  
System  
Therefore, it is determined that the  
401  
Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
model with losses adequately  
captures the real behavior of the  
national interconnected system,  
obtaining consistent and accurate  
nodal prices in accordance with  
actual values.  
demonstrating network congestion.  
Therefore, high nodal prices indicate  
areas where demand cannot be met  
with more economical generation  
due to network limitations, forcing the  
system to use more expensive local  
generators, thereby increasing the  
marginal cost. Based on the above, it  
is concluded that transmission plays  
a key role in nodal price formation, as  
it not only guarantees the operational  
security of the system but also  
provides economic signals for the  
local of new generation.  
5. Conclusions  
When considering transmission lines  
with a infinite capacity, the electric  
power system behaves as a perfectly  
integrated market with no energy  
transport  
restriction.  
Therefore,  
prices tend to homogenize across  
most busbars; in this case, the  
predominant process across most  
busbars was 35.7 USD/MWh. This  
presents a theoretical ideal scenario  
in which the cheapest generators can  
supply existing demands at the  
busbars, regardless of the flows  
through the lines, but without  
exceeding their generation capacity.  
This scenario is far removed from the  
actual operation of Ecuador’s  
National Interconnected System, as  
it ignores the physical limitations of  
the network.  
The determination of nodal prices in  
Ecuador’s National Interconnected  
System, considering the actual line  
capacity, real power flows and  
system losses, yielded values  
consistent with the system’s actual  
physical. However, the results also  
demonstrate the inclusion of losses,  
disrupting price uniformity and  
generating differences in nodal  
values due to the higher marginal  
cost of meeting demand and nodes  
far from major generation centres or  
with a greater marginal loss. In  
conclusion, case 3 demonstrates that  
the transmission system and the  
losses play a significant role in nodal  
price formation. Furthermore, it was  
The  
incorporation  
of  
actual  
transmission line capacities revealed  
significant differences, raising nodal  
prices at most busbars and thus  
determined  
that  
implementing  
402  
Sánchez-Masaquiza et al. (2026)  
mathematical optimization models  
using the open source Python  
software, with solvers such as GLPK  
and IPOPT, yields consistent values  
that align with real-world nodal  
prices. Therefore, the results provide  
a solid technical foundation for future  
[4]  
Q. Wang, G. Zhang, J. D.  
McCalley, T. Zheng, and E.  
Litvinov,  
Locational Marginal Pricing  
and Congestion  
“Risk-Based  
Management,” IEEE Trans.  
Power Syst., vol. 29, no. 5, pp.  
25182528, Sep. 2014, doi:  
10.1109/TPWRS.2014.23053  
03.  
research,  
given  
the  
models'  
effectiveness.  
[
5]  
F. Li, “Continuous Locational  
Marginal Pricing (CLMP),”  
IEEE Trans. Power Syst., vol.  
Bibliographic  
22, no. 4, pp. 16381646,  
Nov. 2007, doi:  
[
1]  
A. Zakariazadeh, R. Ahshan,  
R. Al Abri, and M. Al-Abri,  
10.1109/TPWRS.2007.90752  
.
1
“Renewable  
energy  
integration in sustainable  
water systems: A review,”  
Clean. Eng. Technol., vol. 18,  
p. 100722, Feb. 2024, doi:  
[6]  
F. Li and R. Bo, “DCOPF-  
Based LMP Simulation:  
Algorithm, Comparison With  
ACOPF, and Sensitivity,”  
IEEE Trans. Power Syst., vol.  
10.1016/j.clet.2024.100722.  
22, no. 4, pp. 14751485,  
[
2]  
H. Yang, L. Wang, Y. Zhang,  
H.-M. Tai, Y. Ma, and M.  
Zhou, “Reliability Evaluation  
of Power System Considering  
Time of Use Electricity  
Pricing,” IEEE Trans. Power  
Syst., vol. 34, no. 3, pp. 1991–  
Nov. 2007, doi:  
1
4
0.1109/TPWRS.2007.90792  
.
[7]  
H. Yuan, F. Li, Y. Wei, and J.  
Zhu, “Novel Linearized Power  
Flow and Linearized OPF  
Models for Active Distribution  
Networks With Application in  
2
1
5
002,  
May  
2019,  
doi:  
0.1109/TPWRS.2018.28799  
3.  
Distribution IEEE  
Trans. Smart Grid, vol. 9, no.  
, pp. 438448, Jan. 2018,  
doi:  
LMP,”  
[
3]  
B. Tamimi and S. Vaez-  
Zadeh, “An Optimal Pricing  
Scheme in Electricity Markets  
Considering Voltage Security  
Cost,” IEEE Trans. Power  
Syst., vol. 23, no. 2, pp. 451–  
1
10.1109/TSG.2016.2594814.  
[8]  
Z. Yang et al., “LMP Revisited:  
A Linear Model for the Loss-  
Embedded LMP,” IEEE Trans.  
Power Syst., vol. 32, no. 5, pp.  
40804090, Sep. 2017, doi:  
4
1
0
59,  
May  
2008,  
doi:  
0.1109/TPWRS.2008.92018  
.
403  
Revista Científica ‘‘INGENIAR”: Ingeniería, Tecnología e Investigación. Vol. 9 Núm. (17) 2026. ISSN: 2697-3693  
Analysis of local marginal prices in transmission systems dominated by hydroelectric generation.  
1
1
0.1109/TPWRS.2017.26488  
6.  
“Asignación  
unidades de generación en  
regiones múltiples aplicando  
eficiente  
de  
[
9]  
Z. Yang, H. Zhong, A. Bose, T.  
Zheng, Q. Xia, and C. Kang,  
optimización  
Rev. Científica, vol. 7, 2024.  
multiobjetivo,”  
“A Linearized OPF Model With  
Reactive Power and Voltage  
Magnitude: A Pathway to  
Improve the MW-Only DC  
OPF,” IEEE Trans. Power  
Syst., vol. 33, no. 2, pp. 1734–  
[14] J. S. Ortiz, C. I. Quinatoa, and  
J. H. Acurio, “A New Model  
Optimization Convex Using  
Wirtinger  
Calculus  
for  
Economic Dispatch,” in 2024  
8th International Conference  
on Power Energy Systems  
and Applications (ICoPESA),  
Hong Kong, Hong Kong:  
IEEE, Jun. 2024, pp. 557–  
1
1
5
745,  
Mar.  
2018,  
doi:  
0.1109/TPWRS.2017.27185  
1.  
[
10] Rui Bo and Fangxing Li,  
Probabilistic LMP  
5
1
4
66.  
doi:  
Forecasting Considering Load  
Uncertainty,” IEEE Trans.  
Power Syst., vol. 24, no. 3, pp.  
0.1109/ICOPESA61191.202  
.10743906.  
12791289, Aug. 2009, doi:  
10.1109/TPWRS.2009.20232  
68.  
[15] C. Quinatoa, A. Chasi, V.  
Puetate, A. Casilimas, L.  
Camacho, and J. Ortiz,  
Optimization  
Model for  
Multistage  
[
11] F. Aydin and C. Karatekin,  
Strategic Integration of  
Coordinated  
Planning of the Generation-  
Transmission System with  
Demand Forecasting Using  
Distributed Generation in a  
Deregulated Power Market:  
An Agent-Based Approach,”  
IEEE Access, pp. 11, 2024,  
doi:  
Neural  
Networks,”  
in  
Proceedings of the 4th  
International Conference on  
Electronic Engineering and  
1
7
0.1109/ACCESS.2024.3512  
81.  
Renewable  
Energy  
SystemsVolume 1, B. Hajji,  
A. Gagliano, A. Mellit, A.  
Rabhi, and M. Calì, Eds.,  
Singapore: Springer Nature  
Singapore, 2025, pp. 573–  
[
12] F. O. S. Saraiva and V. L.  
Paucar, “Locational Marginal  
Price Decomposition Using a  
Fully Distributed Slack Bus  
Model,” IEEE Access, vol. 10,  
pp. 8491384933, 2022, doi:  
581.  
1
2
0.1109/ACCESS.2022.3197  
23.  
[
13] T.-P. D. Gabriela, Q.-C. C.  
Iván, and C.-C. L. Hernán,  
404