Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix _KOW_generation_limits in generation_limits.py #312

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions egret/model_library/unit_commitment/generation_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ def power_limit_from_start_stops_rule(m,g,t):
if not full_range:
i = SU_time_limit+1
if (t-i) >= value(m.InitialTime):
coef = max((value(Pmax) - value(SD[g,t+SD_time_limit]) - sum(value(RD[g,t+j]) for j in range(1,SD_time_limit+1)) - \
(value(Pmax) - value(SU[g,t-i]) - sum(value(RU[g,t-j]) for j in range(1,i+1)))), 0)
coef = max((value(Pmax) - value(SU[g,t-i]) - sum(value(RU[g,t-j]) for j in range(1,i+1))) - \
(value(Pmax) - value(SD[g,t+SD_time_limit]) - sum(value(RD[g,t+j]) for j in range(1,SD_time_limit+1))), 0)
if coef != 0:
linear_vars.append(Start[g,t-i])
linear_coefs.append(coef)
Expand Down