Skip to content

[cyipopt] Auto-select limited-memory Hessian for grey-box models#3903

Closed
aryanjsingh wants to merge 1 commit intoPyomo:mainfrom
aryanjsingh:fix/issue-3891-cyipopt-automatically-use-hessian-approx
Closed

[cyipopt] Auto-select limited-memory Hessian for grey-box models#3903
aryanjsingh wants to merge 1 commit intoPyomo:mainfrom
aryanjsingh:fix/issue-3891-cyipopt-automatically-use-hessian-approx

Conversation

@aryanjsingh
Copy link
Copy Markdown

Summary

This change updates the CyIpopt solver interface to automatically select the 'limited-memory' Hessian approximation when a grey-box model is present that does not provide exact Hessian information. This prevents poor solver performance when users do not manually specify a Hessian approximation method.

Changes

  • pyomo/contrib/pynumero/solvers/ipopt.py: In the CyIpopt solver's solve() method, added logic to detect if the model contains an ExternalGreyBoxBlock whose external model does not provide methods for Hessian evaluation. If such a block is found and the user has not explicitly set the 'hessian_approximation' option, it is automatically set to 'limited-memory' to ensure robust solver behavior.

Related Issue

Closes #3891

@blnicho
Copy link
Copy Markdown
Member

blnicho commented Apr 3, 2026

There is already an open PR (#3892) to fix issue #3891 so closing this.

@blnicho blnicho closed this Apr 3, 2026
@aryanjsingh aryanjsingh deleted the fix/issue-3891-cyipopt-automatically-use-hessian-approx branch April 4, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CyIpopt] Automatically use Hessian approximation when grey-box exact Hessian isn't available

2 participants