grid-parity-exchange / Egret

Tools for building power systems optimization problems
Other
126 stars 50 forks source link

Fixing bug in constraint removal #220

Closed bknueven closed 3 years ago

bknueven commented 3 years ago

Egret's PTDF code currently incorrectly removes constraints from the Pyomo transmission blocks. Indexed constraints need to be removed from a Pyomo block by calling del indexed_constr[key], not del constraint_data. This PR fixes this bug, which particularly causes issues when using a persistent solver and querying dual values for transmission limits.