Skip to content

Commit

Permalink
Merge pull request #1071 from SermishaNarayana/master
Browse files Browse the repository at this point in the history
Modification to function "add_operational_reserve_margin" in solve_ne…
  • Loading branch information
fneum authored May 20, 2024
2 parents 7ce1593 + 6722e58 commit d2c48b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/solve_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,9 +735,9 @@ def add_operational_reserve_margin(n, sns, config):
.loc[vres_i.intersection(ext_i)]
.rename({"Generator-ext": "Generator"})
)
lhs = summed_reserve + (p_nom_vres * (-EPSILON_VRES * capacity_factor)).sum(
"Generator"
)
lhs = summed_reserve + (
p_nom_vres * (-EPSILON_VRES * xr.DataArray(capacity_factor))
).sum("Generator")

# Total demand per t
demand = get_as_dense(n, "Load", "p_set").sum(axis=1)
Expand Down Expand Up @@ -767,7 +767,7 @@ def add_operational_reserve_margin(n, sns, config):

p_max_pu = get_as_dense(n, "Generator", "p_max_pu")

lhs = dispatch + reserve - capacity_variable * p_max_pu[ext_i]
lhs = dispatch + reserve - capacity_variable * xr.DataArray(p_max_pu[ext_i])

rhs = (p_max_pu[fix_i] * capacity_fixed).reindex(columns=gen_i, fill_value=0)

Expand Down

0 comments on commit d2c48b6

Please sign in to comment.