Missing else statement
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.
It looks like the same is true for declare_ineq_p_branch_thermal_bounds.
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.
I agree.