Skip to content

Conversation

@michaelbynum
Copy link
Contributor

Summary/Motivation:

This PR updates the solution loader in pyomo/contrib/solver based on recent design discussions.

Changes proposed in this PR:

  • add get_number_of_solutions method
  • add get_solution_ids method
  • add load_solution_method
  • add load_import_suffixes method
  • add solution_id as an argument to methods

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.

@michaelbynum michaelbynum changed the title Rework SolutionLoader [Depends on #3698] Rework SolutionLoader Aug 13, 2025
@codecov
Copy link

codecov bot commented Aug 14, 2025

Codecov Report

❌ Patch coverage is 89.04847% with 183 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.94%. Comparing base (2ca7dfb) to head (0bbdd70).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...contrib/solver/solvers/gurobi/gurobi_persistent.py 89.23% 86 Missing ⚠️
pyomo/contrib/observer/model_observer.py 90.08% 49 Missing ⚠️
...ontrib/solver/solvers/gurobi/gurobi_direct_base.py 88.70% 14 Missing ⚠️
pyomo/contrib/solver/common/solution_loader.py 77.77% 10 Missing ⚠️
...omo/contrib/solver/solvers/gurobi/gurobi_direct.py 93.54% 8 Missing ⚠️
pyomo/contrib/solver/solvers/sol_reader.py 63.15% 7 Missing ⚠️
pyomo/contrib/solver/solvers/highs.py 70.58% 5 Missing ⚠️
pyomo/contrib/observer/component_collector.py 94.28% 2 Missing ⚠️
pyomo/contrib/solver/solvers/ipopt.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #3701    +/-   ##
========================================
  Coverage   85.94%   85.94%            
========================================
  Files         892      895     +3     
  Lines      103018   103696   +678     
========================================
+ Hits        88535    89124   +589     
- Misses      14483    14572    +89     
Flag Coverage Δ
builders 26.75% <23.51%> (+0.02%) ⬆️
default 85.77% <89.04%> (?)
expensive 34.04% <23.63%> (?)
linux ?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants