Skip to content

Add support for PyNumero for discrete variables #1972

Open
@adowling2

Description

@adowling2

Summary

Degeneracy Hunter (https://github.com/IDAES/idaes-pse/blob/main/idaes/core/util/model_diagnostics.py) uses PyNumero to construct/analyze the Jacobian of an optimization problem. Passing an MINLP into PyNumero (via Degeneracy Hunter) triggers the following warnings and error messages:

WARNING | PyNumero does not support discrete variables

And then my Jupyter notebook/Python kernel crashes (on Colab).

Proposal: In PyNumero, relax the discrete variables to continuous, warn the user, and continue.

Rationale

Yes, PyNumero crashes when analyzing a Pyomo model with discrete variables.

Description

See above.

Quick work around: when constructing the MINLP model, manually relax the binary decisions as continuous bounded between 0 and 1. This is not super clean but is easy.

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