Skip to content

Cleaning up Constraints after failed rule #403

Open
@andrewlee94

Description

@andrewlee94

From a discussion in IDAES: https://github.com/IDAES/idaes/pull/177

When a constructing a Constraint using a rule, the Constraint component is first created and then populated by the rule. If the rule fails for some reason but the Exception is handled by something, the Constraint object remains attached to the model.

It would be good if Pyomo could clean up when things go badly wrong in this way.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions