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

Rewrite of the Pyomo Set component hierarchy #1111

Merged
merged 222 commits into from
Sep 24, 2019

Conversation

jsiirola
Copy link
Member

@jsiirola jsiirola commented Aug 27, 2019

Fixes #326

Summary/Motivation:

This implements the rewrite of the Pyomo Set component as specified in PEP #326

NOTE: This PR does NOT switch Pyomo over to using the new Set system. Everything is implemented in parallel to the existing system. A second PR will switch Pyomo over to the new system later.

Changes proposed in this PR:

  • Rewrite of Set to follow the current Pyomo component object model
  • Adding "Range" objects for performing operations on continuous and discrete numeric ranges
  • Adding a new approach for processing component initialization options
  • Adding a new approach for providing errors for unconstructed (Abstract) component methods.

Legal Acknowledgement

By contributing to this software project, I 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 added 30 commits April 4, 2018 08:17
@codecov
Copy link

codecov bot commented Aug 28, 2019

Codecov Report

Merging #1111 into master will increase coverage by 0.87%.
The diff coverage is 98.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1111      +/-   ##
==========================================
+ Coverage   69.58%   70.46%   +0.87%     
==========================================
  Files         530      532       +2     
  Lines       78478    80711    +2233     
==========================================
+ Hits        54612    56872    +2260     
+ Misses      23866    23839      -27
Impacted Files Coverage Δ
pyomo/core/base/set.py 100% <ø> (ø)
pyomo/core/expr/numvalue.py 94.42% <100%> (+0.08%) ⬆️
pyomo/core/base/range.py 100% <100%> (ø)
pyomo/core/base/sets.py 86.58% <100%> (+0.24%) ⬆️
pyomo/core/base/block.py 84.57% <100%> (+0.88%) ⬆️
pyomo/core/base/component.py 86.92% <100%> (+0.08%) ⬆️
pyomo/core/base/util.py 100% <100%> (ø) ⬆️
pyomo/core/base/indexed_component.py 89.93% <86.36%> (-0.98%) ⬇️
pyomo/core/base/misc.py 82.83% <87.5%> (+3.8%) ⬆️
pyomo/pysp/scenariotree/tree_structure.py 83.28% <0%> (-0.23%) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d595d7a...905cae0. Read the comment docs.

@jsiirola
Copy link
Member Author

This should be ready to discuss/review. Tests all pass, and coverage is good: overall project coverage is up 0.87% and the new Set code is covered at 100%.

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.

This looks great to me. I even checkout out the branch and used the new sets. I created an issue for the only problem I ran into.

@michaelbynum michaelbynum merged commit 89cf885 into Pyomo:master Sep 24, 2019
@jsiirola jsiirola deleted the set-rewrite branch June 18, 2020 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PEP] Redesign Pyomo Set component
4 participants