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

Resolve error identifying vars in indexed SOS #2852

Merged
merged 2 commits into from
May 30, 2023

Conversation

jsiirola
Copy link
Member

Fixes #2827

Summary/Motivation:

The NLv2 writer incorrectly handled iterating over SOSConstraint components when identifying model variables. This PR fixes the issue and adds a test exercising the correct behavior.

Changes proposed in this PR:

  • Resolve error iterating over SOSConstraint component data.
  • Add test

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.

@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (4743218) 87.45% compared to head (2d1805d) 87.46%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2852   +/-   ##
=======================================
  Coverage   87.45%   87.46%           
=======================================
  Files         771      771           
  Lines       89582    89582           
=======================================
+ Hits        78345    78349    +4     
+ Misses      11237    11233    -4     
Flag Coverage Δ
linux 84.52% <100.00%> (+<0.01%) ⬆️
osx 74.59% <100.00%> (+0.02%) ⬆️
other 84.69% <100.00%> (ø)
win 82.09% <100.00%> (ø)

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

Impacted Files Coverage Δ
pyomo/repn/plugins/nl_writer.py 94.69% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@michaelbynum michaelbynum merged commit 68e4410 into Pyomo:main May 30, 2023
@jsiirola jsiirola deleted the nlwriter-sos branch May 30, 2023 17:07
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.

Indexed SOS1 constraints raise errors with SCIP and pyomo 6.5.0
2 participants