-
Notifications
You must be signed in to change notification settings - Fork 92
Add Bridges.ListOfNonstandardBridges attribute #666
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
Codecov Report
@@ Coverage Diff @@
## master #666 +/- ##
==========================================
- Coverage 94.96% 94.95% -0.02%
==========================================
Files 50 50
Lines 5346 5351 +5
==========================================
+ Hits 5077 5081 +4
- Misses 269 270 +1
Continue to review full report at Codecov.
|
src/attributes.jl
Outdated
""" | ||
RequiredBridges() | ||
|
||
A list of bridges that are required when using the optimizer. For instance, if |
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.
What does "required" mean? Required to pass tests? What does this imply for direct mode?
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.
What does "required" mean? Required to pass tests?
I was hesitant for the naming, may be recommended (and RecommendedBridges) is better ?
What does this imply for direct mode?
If the user uses a LazyBridgeOptimizer
in direct mode then the bridges will be automatically added. The bridges are added in the LazyBridgeOptimizer
constructor, not just in the full_bridge_optimizer
function.
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 don't think RecommendedBridges
is any clearer. Recommended for what? How is someone looking at this description supposed to know how it fits into LazyBridgeOptimizer
?
If a solver has required bridges, maybe it shouldn't publicly return its MOI optimizer and instead return a LazyBridgeOptimizer
that wraps the optimizer with the required bridges? It doesn't make sense to me to have required bridges while the default way of constructing the solver doesn't include them.
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.
There is indeed the other option of returning the optimizer wrapped in a SingleBridgeOptimizer
(like we currently do in tests). As the bridge is required there is no need to include it in the Bellman-Ford computation.
What would be the recommendation for naming the constructor and the optimizer ?
Adding an underscore before Optimizer
?
struct _Optimizer <: MOI.AbstractOptimizer
end
Optimizer(...) = CustomBridge(_Optimizer(...))
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.
Adding an underscore before
Optimizer
?
Yes, that makes sense.
5d19010
to
182e522
Compare
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.
LGTM, other than the comment about language.
This attributes allow an optimizer to list a few bridges that should automatically be used by JuMP.
Here are a few use cases: