Skip to content

Implementation of NPV_MaxExpression fails unit-consistency checks #165

Description

@esrawli

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions