Egret icon indicating copy to clipboard operation
Egret copied to clipboard

Missing else statement

Open michaelbynum opened this issue 6 years ago • 3 comments

In egret.model_library.transmission.branch.declare_ineq_p_branch_thermal_lbub, there is an if statement that checks if the approximation type is is BTHETA or PTDF. If so, constraints are added to limit the power flow. However, there is no else statement. We should at least raise an exception or warning rather than silently doing nothing.

michaelbynum avatar Mar 13 '20 13:03 michaelbynum

It looks like the same is true for declare_ineq_p_branch_thermal_bounds.

michaelbynum avatar Mar 13 '20 13:03 michaelbynum

It should be noted that both the dcopf lazy ptdf code and the unit commitment lazy ptdf code exploit this particular "feature" to add the Pyomo Constraint objects but no constraints (so they can be added in the solve loop). I think the right solution is to throw and exception, but we need to add an additional member to the approximation type enum for this case.

bknueven avatar Mar 19 '20 17:03 bknueven

I agree.

michaelbynum avatar Mar 26 '20 15:03 michaelbynum