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.
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]
, notdel constraint_data
. This PR fixes this bug, which particularly causes issues when using a persistent solver and querying dual values for transmission limits.