Skip to content

Fix IIS interface for current CPLEX releases#3965

Merged
jsiirola merged 2 commits into
Pyomo:mainfrom
jsiirola:cplex-iis
May 28, 2026
Merged

Fix IIS interface for current CPLEX releases#3965
jsiirola merged 2 commits into
Pyomo:mainfrom
jsiirola:cplex-iis

Conversation

@jsiirola
Copy link
Copy Markdown
Member

Fixes # .

Summary/Motivation:

This PR fixes the interface for computing the IIS through CPLEX. Apparently, current versions of CPLEX (starting in 22.1.2.1) require passing the list of constraints to consider when calling conflict.refine() [this interface is poorly documented, and the examples that the documentation references apparently are not available unless you install CPLEX studio]. Based on the refine() docstring, adding conflict.all_constraints() as the sole argument appears to work (tested back through cplex 22.1.1.0).

Changes proposed in this PR:

  • Pass conflict.all_constraints() as the sole argument for conflict.refine()
  • Remove restriction disallowing recent CPLEX versions in the GHA test driver

AI-Use Disclosure

  • AI tools were NOT used during the preparation of this PR

or

  • AI tools contributed to the development of this PR

    • AI tools generated documentation (including the PR description/comments, code comments, and/or Sphinx documentation)
    • AI tools generated tests (baselines, examples, and/or code)
    • AI tools generated code (apart from tests)

    Review process (select ONE):

    • Rewritten: All AI-generated content was rewritten by me before being committed.
    • Reviewed/verified: I retained AI-generated content and verified it before committing. Verification included (as applicable):
      • Ran the code and fixed issues
      • Added and ran tests
      • Checked correctness/logic of code and tests
      • Checked for alignment with the contribution guide
      • Considered security implications
    • As-is: AI-generated content was commited directly to the repository

Notes for reviewers (optional):

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.

@jsiirola jsiirola requested a review from blnicho May 28, 2026 16:28
Copy link
Copy Markdown
Member

@blnicho blnicho left a comment

Choose a reason for hiding this comment

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

Looks good pending tests

@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.17%. Comparing base (984f242) to head (5643fb7).
⚠️ Report is 40 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3965      +/-   ##
==========================================
+ Coverage   90.10%   90.17%   +0.06%     
==========================================
  Files         909      909              
  Lines      108551   109317     +766     
==========================================
+ Hits        97813    98577     +764     
- Misses      10738    10740       +2     
Flag Coverage Δ
builders 29.09% <0.00%> (+<0.01%) ⬆️
default 86.10% <0.00%> (?)
expensive 35.12% <0.00%> (?)
linux 87.62% <100.00%> (-1.99%) ⬇️
linux_other 87.62% <100.00%> (+<0.01%) ⬆️
oldsolvers 28.05% <0.00%> (+<0.01%) ⬆️
osx 83.05% <100.00%> (-0.02%) ⬇️
win 85.37% <100.00%> (-0.01%) ⬇️

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.

@jsiirola jsiirola merged commit 3603b1e into Pyomo:main May 28, 2026
35 checks passed
@jsiirola jsiirola deleted the cplex-iis branch May 28, 2026 17:43
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.

2 participants