-
Notifications
You must be signed in to change notification settings - Fork 517
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
PyomoNLP scaling factors on sub-blocks #3295
Merged
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
23d316e
finding scaling_factors in PyomoNLP
bknueven a7791e1
always return a scaling factor
bknueven e7bfad9
fix tests
bknueven 8215ef8
adding SuffixFinder to PyomoGreyBoxNLP
bknueven c2e00f2
remove hack from implicity functions solver
bknueven c7b1bca
adding SuffixFinder to PyomoNLPWithGreyBoxBlocks
bknueven 0b4d16b
modify tests so the fail on main
bknueven 1733e35
Revert "remove hack from implicity functions solver"
bknueven 50df842
Revert "fix tests"
bknueven 44da068
Revert "always return a scaling factor"
bknueven 9ca3928
maintain backwards compatibility
bknueven 29e0395
Revert "modify tests so the fail on main"
bknueven d4e4e0a
add small test
bknueven 946a42d
Merge branch 'main' into pyomonlp-scaling
blnicho 3a083c3
Merge branch 'main' into pyomonlp-scaling
blnicho bb944fe
Merge remote-tracking branch 'upstream/main' into pyomonlp-scaling
bknueven 031500b
use context argument for SuffixFinder
bknueven ff67817
implement John's suggestion
bknueven 7e79e19
adding Robby's test code for no scaling
bknueven File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a minor edge case, but should we enforce that we never use a suffix that is "outside the scope" (above) the
pyomo_model
that was used to construct thePyomoNLP
? MaybeSuffixFinder
should support acontext
argument.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blnicho @jsiirola @michaelbynum Can I get a second opinion here? The question is: what should happen when a PyomoNLP is constructed from a subblock that has relevant scaling factors on the parent block:
Current behavior:
None
Proposed by this PR:
[0.01, 0.1 ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that I would advocate the old behavior (although I can see value in both approaches!).
My rationale is the following: if we define a "model" as all "active components reachable through active blocks contained within the reference block," then we should exclude Suffixes outside of the subtree, as Suffix is an active component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined to agree.