Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xpress: fix NLP results processing for Xpress 9.2.0 #2921

Merged
merged 3 commits into from
Jul 25, 2023

Conversation

jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

Xpress 9.2.0 appears to return infeasible status differently than previous versions. In previous versions, infeasible nonlinear problems solved using the Xpress optimizer returned solution status via LPSTATUS. Beginning in 9.2, it appears that the problem status is now returned in XSLP_NLPSTATUS. This PR updates the results processor to only fall back on the LP results processor if LPRESULTS is nonzero (and XSLP_NLPSTATUS is 0)

@djunglas, am I interpreting the change in Xpress behavior correctly?

Changes proposed in this PR:

  • Update processing of NLP results to only use the LP results processor if there the NLP results status is not set.

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 review from blnicho and mrmundt July 24, 2023 22:19
Copy link
Contributor

@mrmundt mrmundt left a comment

Choose a reason for hiding this comment

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

Typo!!

pyomo/solvers/plugins/solvers/xpress_direct.py Outdated Show resolved Hide resolved
elif status == xp.nlp_unfinished:
results.solver.status = SolverStatus.ok
results.solver.termination_message = (
"Non-convex solve not finished (numerical issues?)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remind me later to change this error message. Because it's entirely not helpful.

@jsiirola jsiirola requested a review from mrmundt July 24, 2023 22:33
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Patch coverage: 53.33% and project coverage change: +0.01% 🎉

Comparison is base (228f5eb) 87.81% compared to head (fcac472) 87.83%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2921      +/-   ##
==========================================
+ Coverage   87.81%   87.83%   +0.01%     
==========================================
  Files         770      770              
  Lines       89644    89645       +1     
==========================================
+ Hits        78721    78736      +15     
+ Misses      10923    10909      -14     
Flag Coverage Δ
linux 84.86% <53.33%> (+<0.01%) ⬆️
osx 74.58% <53.33%> (+<0.01%) ⬆️
other 85.03% <53.33%> (+<0.01%) ⬆️
win 82.12% <53.33%> (+0.01%) ⬆️

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

Files Changed Coverage Δ
pyomo/solvers/plugins/solvers/xpress_direct.py 72.71% <53.33%> (+0.95%) ⬆️

... and 2 files with indirect coverage changes

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

@jsiirola jsiirola merged commit 3379349 into Pyomo:main Jul 25, 2023
29 of 30 checks passed
@jsiirola jsiirola deleted the xpress-nlp-status-fix branch July 25, 2023 03:26
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.

3 participants