-
Notifications
You must be signed in to change notification settings - Fork 553
WIP: Solution Pool #3657
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
base: main
Are you sure you want to change the base?
WIP: Solution Pool #3657
Conversation
Reordering and documenting API
Use the Pyomo Bunch class as an alias for Munch, to avoid introducing an additional Pyomo dependency.
Note that this PR now includes updates to the Bunch class defined in pyomo.common. I have been using the public Munch class, but these revisions align the Bunch API with Munch. |
Avoiding use of KW_ONLY, which is an internal mechanism
Using new serialization API, which is simpler. :)
1. Reworking solver matrix logic 2. Fixing test to benchmark against the solution values
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3657 +/- ##
==========================================
- Coverage 89.05% 87.00% -2.05%
==========================================
Files 890 820 -70
Lines 102617 101335 -1282
==========================================
- Hits 91384 88167 -3217
- Misses 11233 13168 +1935
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Added non-positive error check and value 1 warning for num_solutions in balas
Added num_solution error if num_solutions is non-positive, warning if num_solutions =1
Added checks and warnings for num_solutions as non-positive or 1 respectively
…de=1 Added num_solution checks and warnings for non-positive and 1 values respectively. Allowed PoolSearchMode=1 if users want, but included warning about unexpected behavior
Added checks to the policies supporting max_pool_size to error on non-positive pool size
The functionality to catch invalid policies already existed in PoolManager. Added the corresponding tests for invalid policies with and without extra arguments
Added methods to get the active pool name and the list of all pool names in the PoolManager and corresponding tests
Added the placeholder for the SolutionPoolBase so it can easily be retreived elsewhere without looking at the name of the subclass
Added methods to get the active pool and all pools policy and max_pool_sizes. Added corresponding tests
.pool -> .active_pool ._pool -> ._pools Stresses the active pool in use and the tools to touch on multiple pools
Old to_dict method worked on all pools, renamed get_pool_dicts New to_dict is pass through to active pool
Updates to Solution Pool and MyMunch
Fixes #3513 (partially) .
Summary/Motivation:
The alternative_solutions contrib package includes a rudimentary solution pool object. This PR includes a more comprehensive capability for defining and managing solution pools.
Changes proposed in this PR:
NOTE: This is a WIP PR. I'm submitting this now to help define expectations for finalizing this new capability.
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: