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

BUGFIX: Solver Refactor - Allow no objective #3181

Merged
merged 11 commits into from
Mar 12, 2024

Conversation

mrmundt
Copy link
Contributor

@mrmundt mrmundt commented Mar 7, 2024

Fixes NA (but this is mentioned in #2574)

Summary/Motivation:

There was a bug reported in #2574 (comment) that points out that you can't use ipopt_v2 to solve something without an objective, which you technically can do in v1. This fixes that bug.

Changes proposed in this PR:

  • Allow no objective
  • Populate the number of objectives / constraints / params attributes on problem

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.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 99.02913% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 88.39%. Comparing base (0cc323a) to head (4164bbd).
Report is 14 commits behind head on main.

Files Patch % Lines
pyomo/repn/linear.py 94.73% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3181   +/-   ##
=======================================
  Coverage   88.38%   88.39%           
=======================================
  Files         846      846           
  Lines       94978    95043   +65     
=======================================
+ Hits        83947    84009   +62     
- Misses      11031    11034    +3     
Flag Coverage Δ
linux 86.33% <94.11%> (-0.01%) ⬇️
osx 76.15% <94.11%> (+0.41%) ⬆️
other 86.53% <94.11%> (+<0.01%) ⬆️
win 83.82% <94.11%> (+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.

Copy link
Contributor

@michaelbynum michaelbynum left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @mrmundt. I left one comment below.

pyomo/contrib/solver/base.py Show resolved Hide resolved
@mrmundt mrmundt requested a review from jsiirola March 11, 2024 20:33
@mrmundt mrmundt merged commit f8b0239 into Pyomo:main Mar 12, 2024
33 checks passed
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.

4 participants