The current ramping constraints use max() and pyo.value() in the constraints definitions to compute a maximum value over Pyomo expressions. The preferred design would be to use MaxExpression or NPV_MaxExpression based on #76 (comment).
At the moment, this change is not applied because Pyomo’s unit checker does not handle NPV_MaxExpression. What happens is that the unit-consistency tests fail with an “unhandled expression node type: NPV_MaxExpression” error. Once we have a unit handler for NPV_MaxExpression that checks unit compatibility across the max-expression arguments and returns the appropriate common unit, GTEP can replace the pyo.value()/Python max() pattern with the Pyomo expression form.
The current ramping constraints use
max()andpyo.value()in the constraints definitions to compute a maximum value over Pyomo expressions. The preferred design would be to useMaxExpressionorNPV_MaxExpressionbased on #76 (comment).At the moment, this change is not applied because Pyomo’s unit checker does not handle
NPV_MaxExpression. What happens is that the unit-consistency tests fail with an “unhandled expression node type: NPV_MaxExpression” error. Once we have a unit handler forNPV_MaxExpressionthat checks unit compatibility across the max-expression arguments and returns the appropriate common unit, GTEP can replace thepyo.value()/Pythonmax()pattern with the Pyomo expression form.