Skip to content

Commit

Permalink
resolving contradiction for SlackType.NONE
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven committed Aug 17, 2021
1 parent 8a4ed5e commit 386a128
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions egret/model_library/unit_commitment/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ def _warn_neg_impedence(m, v, l):
if 'violation_penalty' in branch:
val = branch['violation_penalty']
if val is not None:
# resolve the contradiction here if the user specifies
# no slacks and print a single message to the screen
if slack_type == SlackType.NONE:
logger.warning("Ignoring slacks on individual transmission constraints because SlackType.NONE was specified")
break
_branch_penalties[bn] = val
_branches_with_slack.append(bn)
if val <= 0:
Expand Down

0 comments on commit 386a128

Please sign in to comment.