IDAES / idaes-pse

The IDAES Process Systems Engineering Framework
https://idaes-pse.readthedocs.io/
Other
218 stars 235 forks source link

Report Numerical Issues does not issue a warning for a singular Jacobian #1437

Open dallan-keylogic opened 5 months ago

dallan-keylogic commented 5 months ago

When troubleshooting issues revealed by #1395, I encountered this:

====================================================================================
Model Statistics

    Jacobian Condition Number: 9.195E+14

------------------------------------------------------------------------------------
1 WARNINGS

    WARNING: 54 pairs of variables are parallel (to tolerance 1.0E-08)

------------------------------------------------------------------------------------
6 Cautions

    Caution: 72 Variables with value close to zero (tol=1.0E-08)
    Caution: 84 Variables with extreme value (<1.0E-04 or >1.0E+04)
    Caution: 8 Variables with None value
    Caution: 74 Variables with extreme Jacobian values (<1.0E-04 or >1.0E+04)
    Caution: 54 Constraints with extreme Jacobian values (<1.0E-04 or >1.0E+04)
    Caution: 76 extreme Jacobian Entries (<1.0E-04 or >1.0E+04)

------------------------------------------------------------------------------------
Suggested next steps:

    display_near_parallel_variables()

====================================================================================

This matrix is more-or-less singular, which is why it's shocking that we're not issuing a warning for it.

ksbeattie commented 1 month ago

This requires #1429 and will also require many models to improve their scaling. A working session with all the owners of the impacted models is being organized.