Skip to content

Commit

Permalink
Add stability constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanalakori committed Apr 6, 2022
1 parent 16a676d commit 3294692
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/G1_oemof_create_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,22 @@ def build(experiment, case_dict):
el_bus_dc=bus_electricity_dc,
)
elif case_dict[STABILITY_CONSTRAINT] == CRITICAL:
# TODO: add the function to make the stability constraint favor critical demand over demand
pass
# constraints_custom.critical(
# model,
# )
# ADDED: a function to make the stability constraint favor critical demand over demand
logging.info(
"Added constraint: Stability though actual generation of diesel generators and backup through batteries."
)
constraints_custom.critical(
model,
case_dict,
experiment=experiment,
storage=storage,
sink_demand=sink_demand_ac,
genset=genset,
pcc_consumption=pointofcoupling_consumption,
source_shortage=source_shortage,
el_bus_ac=bus_electricity_ac,
el_bus_dc=bus_electricity_dc,
)
else:
logging.warning(
"Case definition of "
Expand Down

0 comments on commit 3294692

Please sign in to comment.