Skip to content

Commit

Permalink
Fix bug in endogenous availability modules (#855)
Browse files Browse the repository at this point in the history
Fix missing timepoint weight in endogenous availability constraint.
  • Loading branch information
PascalLesage authored Dec 16, 2021
1 parent c0ec4d2 commit 4bd0969
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
unavailable_hours_per_period,unavailable_hours_per_event_min,available_hours_between_events_min1,1,1
unavailable_hours_per_period,unavailable_hours_per_event_min,available_hours_between_events_min2190,1,1
Expand Down
2 changes: 1 addition & 1 deletion gridpath/project/availability/availability_types/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def total_scheduled_availability_per_period_rule(mod, g, p):
"""
return (
sum(
mod.AvlBin_Unavailable[g, tmp] * mod.hrs_in_tmp[tmp]
mod.AvlBin_Unavailable[g, tmp] * mod.hrs_in_tmp[tmp] * mod.tmp_weight[tmp]
for tmp in mod.TMPS_IN_PRD[p]
)
== mod.avl_bin_unavl_hrs_per_prd[g]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def total_scheduled_availability_per_period_rule(mod, g, p):
"""
return (
sum(
mod.AvlCont_Unavailable[g, tmp] * mod.hrs_in_tmp[tmp]
mod.AvlCont_Unavailable[g, tmp] * mod.hrs_in_tmp[tmp] * mod.tmp_weight[tmp]
for tmp in mod.TMPS_IN_PRD[p]
)
== mod.avl_cont_unavl_hrs_per_prd[g]
Expand Down

0 comments on commit 4bd0969

Please sign in to comment.