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

Fixing aux parameter in ramping constraint #358

Merged
merged 4 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions src/dispatch/PyomoRuleLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ def ramp_rule_down(prod_name, r, limit, neg_cap, t, m, bins=None) -> bool:
# dq is negative, - limit is negative
return delta >= - limit
else:
eps = 1.0 # aux parameter to force binaries to behave, TODO needed?
# special treatment if we have frequency-limiting binaries available
# eps is an aux parameter (small number) to ensure that binary vars for ramp-up and ramp-
# down events behave correctly (e.g., are zero when activity remains constant)
eps = 1e-6*limit
down = bins[0][t]
up = bins[1][t]
# NOTE we're following the convention that "less negative" is ramping "down"
Expand Down Expand Up @@ -181,7 +184,9 @@ def ramp_rule_up(prod_name, r, limit, neg_cap, t, m, bins=None) -> bool:
return delta <= limit
else:
# special treatment if we have frequency-limiting binaries available
eps = 1.0 # aux parameter to force binaries to behave, TODO needed?
# eps is an aux parameter (small number) to ensure that binary vars for ramp-up and ramp-
# down events behave correctly (e.g., are zero when activity remains constant)
eps = 1e-6*limit
down = bins[0][t]
up = bins[1][t]
# NOTE we're following the convention that "more negative" is ramping "up"
Expand Down
Binary file not shown.
Loading