-
Notifications
You must be signed in to change notification settings - Fork 98
[Bridges] add ScalarQuadraticToScalarNonlinearBridge #2233
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
Conversation
| return ScalarQuadraticToScalarNonlinearBridge{T,S} | ||
| end | ||
|
|
||
| function MOI.get( |
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 method and the next two should be implemented at the AbstractFunctionConversion level
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.
But this can be done in a separate PR
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.
Yeah there's the canonical issue as well. But we can come back to it with #2224
|
I just removed the canonical method. It'll get added back generically by #2224 |
|
thanks @odow! exciting. do you know off-hand if the SNF to SAF/SQF convert in this PR will handle all the cases the above code does? I'd love to be able to remove my hacky code when this PR lands. |
|
Yeah that code will now just make a ScalarNonlinearFunction. Let me take another look. |
|
So I guess one decision is how hard we want to fight to recognize Perhaps this would be easier if we had a smart |
|
That'll do for now. We can revisit |
cc @chriscoey
Necessary precursor to jump-dev/Pavito.jl#67
Basic
src/Bridges/XXX/bridgesstruct must end in
BridgeMOI.Bridges.Constraint.SetMapBridgeconstthat is aSingleBridgeOptimizerwrapping thenew bridge. The name of the const must be the name of the bridge, less
the
Bridgesuffixincludethe file insrc/Bridges/XXX/bridges/XXX.jladd_all_bridgesat the bottom ofsrc/Bridges/XXX/XXX.jlTests
tests/Bridges/XXXMOI.Bridges.runteststo test various inputs and outputs of thebridge
covered by the tests, add additional bridge-specific tests to cover the
untested lines.
Documentation
docs/src/submodules/Bridges/list_of_bridges.mdFinal touch
If the bridge depends on run-time values of other variables and constraints in
the model:
ImplementMOI.Utilities.needs_final_touch(::Bridge)ImplementMOI.Utilities.final_touch(::Bridge, ::MOI.ModelLike)Ensure thatfinal_touchcan be called multiple times in a row