Avoid duplicate AMPLFUNC entries in ipopt_v2#3554
Merged
blnicho merged 6 commits intoPyomo:mainfrom Apr 14, 2025
Merged
Conversation
mrmundt
reviewed
Apr 8, 2025
mrmundt
approved these changes
Apr 9, 2025
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3554 +/- ##
==========================================
+ Coverage 85.00% 88.72% +3.71%
==========================================
Files 889 889
Lines 102128 102129 +1
==========================================
+ Hits 86819 90617 +3798
+ Misses 15309 11512 -3797
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:
|
blnicho
approved these changes
Apr 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes # .
Summary/Motivation:
ipopt_v2(frompyomo.contrib.solver) failed to check/remove duplicate entries when constructing theAMPLFUNCenvironment variable, which led to (numerous) warnings from ipopt for IDAES-like models. This PR ports the filter from the original ipopt interface and updates the filtering method to simplify it and remove some assumptions.Changes proposed in this PR:
amplfunc_mergefromipopttoipopt_v2amplfunc_mergeto simplify logic (now that we are only supporting Python>3.7, dicts are deterministic)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: