Skip to content

Update Ipopt interface in contrib.solver#3792

Merged
blnicho merged 51 commits intoPyomo:mainfrom
jsiirola:ipopt-sol-parser
Feb 11, 2026
Merged

Update Ipopt interface in contrib.solver#3792
blnicho merged 51 commits intoPyomo:mainfrom
jsiirola:ipopt-sol-parser

Conversation

@jsiirola
Copy link
Member

@jsiirola jsiirola commented Dec 2, 2025

Fixes #3807 .

Summary/Motivation:

This started as an update the to SOL file parser to resolve some holes in the parse logic around parsing AMPL options, and turned into a significant rework of the Ipopt solver interface.

Changes proposed in this PR:

  • rewrite of the SOL file parser. The parser no longer requires any external information to parse a SOL file.
  • update the ipopt log parser to make the iteration log parse cleaner
  • rework how ipopt options are parsed so that both command line and option file options can be processed in a single pass through the user-provided options. For efficiency, iterate over the (usually much shorter) list us user-provided options and not the list of all known options.
  • refactor the ipopt interface so that in the future the bulk of it can be abstracted into a generic "ASL" interface that other ASL solvers can leverage.
  • add a delete= option to the TempfileManager contexts so that we can create "unmanaged" temporary files through the context.
  • update some documentation
  • expand test coverage (cover 100% of the ipopt interface!)

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.73%. Comparing base (f2d23a5) to head (88931bf).
⚠️ Report is 318 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3792      +/-   ##
==========================================
- Coverage   89.48%   88.73%   -0.75%     
==========================================
  Files         904      910       +6     
  Lines      105385   107811    +2426     
==========================================
+ Hits        94299    95671    +1372     
- Misses      11086    12140    +1054     
Flag Coverage Δ
builders 29.06% <18.36%> (+0.02%) ⬆️
default 83.63% <100.00%> (?)
expensive 35.55% <17.86%> (?)
linux 87.03% <99.75%> (-2.18%) ⬇️
linux_other 87.03% <99.75%> (+0.26%) ⬆️
oldsolvers 29.71% <16.12%> (+0.02%) ⬆️
osx 83.19% <99.75%> (+0.27%) ⬆️
win 85.26% <96.77%> (+0.26%) ⬆️
win_other 85.26% <96.77%> (+0.26%) ⬆️
xpress95 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blnicho blnicho moved this from Todo to Review In Progress in Pyomo 6.10 Feb 10, 2026
@github-project-automation github-project-automation bot moved this from Review In Progress to Reviewer Approved in Pyomo 6.10 Feb 11, 2026
@blnicho blnicho merged commit 9ea56f1 into Pyomo:main Feb 11, 2026
64 of 65 checks passed
@github-project-automation github-project-automation bot moved this from Reviewer Approved to Done in Pyomo 6.10 Feb 11, 2026
v_id = id(v)
rc[v_id] = (v, 0)
if self._nl_info.eliminated_vars:
raise MouseTrap(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a mouse trap? I'm not sure I understand when MouseTrap should be expected?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see! It's in the doc string for MouseTrap!

@jsiirola jsiirola deleted the ipopt-sol-parser branch February 11, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

New solver interface doesn't return bound dual variables from IPOPT's restoration phase

4 participants