Skip to content

[KNITRO] Enhance status mapping#3837

Merged
mrmundt merged 2 commits intoPyomo:mainfrom
eminyouskn:knitro-fix-get-obj-value
Feb 9, 2026
Merged

[KNITRO] Enhance status mapping#3837
mrmundt merged 2 commits intoPyomo:mainfrom
eminyouskn:knitro-fix-get-obj-value

Conversation

@eminyouskn
Copy link
Contributor

Fixes # .

Summary/Motivation:

This PR improves how return codes are mapped to SolutionStatus and TerminationCondition, ensuring more accurate and complete status reporting.

Changes proposed in this PR:

  • Added several missing return codes to the mapping.
  • Fixed get_obj_value so it is called whenever the problem is feasible, not only when it is optimal.

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.

@mrmundt mrmundt changed the title [KNITRO] Enhace status mapping [KNITRO] Enhance status mapping Feb 9, 2026
@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3837      +/-   ##
==========================================
- Coverage   89.48%   89.46%   -0.03%     
==========================================
  Files         904      904              
  Lines      105385   105389       +4     
==========================================
- Hits        94299    94281      -18     
- Misses      11086    11108      +22     
Flag Coverage Δ
builders 29.03% <7.69%> (-0.01%) ⬇️
default 83.57% <100.00%> (?)
expensive 35.52% <7.69%> (?)
linux 86.76% <7.69%> (-2.45%) ⬇️
linux_other 86.76% <7.69%> (-0.01%) ⬇️
oldsolvers 29.69% <7.69%> (+<0.01%) ⬆️
osx 82.91% <7.69%> (-0.01%) ⬇️
win 84.98% <7.69%> (-0.02%) ⬇️
win_other 84.98% <7.69%> (-0.02%) ⬇️
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.

@mrmundt mrmundt merged commit d53206f into Pyomo:main Feb 9, 2026
57 of 65 checks passed
@eminyouskn eminyouskn deleted the knitro-fix-get-obj-value branch February 9, 2026 23:36
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