-
Notifications
You must be signed in to change notification settings - Fork 98
[Bridges.Variable] change ParameterToEqualToBridge to <: SetMapBridge #2664
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
|
Okay, one is implemented here in MathOptInterface.jl/test/Bridges/identity_bridge.jl Lines 12 to 32 in 3bbca2a
but it doesn't get properly tested, so we don't hit the relevant methods: MathOptInterface.jl/test/Bridges/bridge_optimizer.jl Lines 713 to 729 in 3bbca2a
There is, for example, no check for |
e35c344 to
f5594b3
Compare
f5594b3 to
faba7c5
Compare
| function MOI.get(bridge::SetMapBridge, ::MOI.NumberOfVariables)::Int64 | ||
| return length(bridge.variables) | ||
| function MOI.get( | ||
| model::MOI.ModelLike, |
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.
It's a bit difficult to review if the methods are moved around in the same PR so it's unclear what changed but it looks correct
| x::MOI.VariableIndex | ||
| ci::MOI.ConstraintIndex{MOI.VariableIndex,MOI.EqualTo{T}} | ||
| struct ParameterToEqualToBridge{T} <: | ||
| SetMapBridge{T,MOI.EqualTo{T},MOI.Parameter{T}} |
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 much better
@blegat it doesn't look like a
SetMapBridge{T,<:MOI.AbstractScalarSet}bridge was ever implemented or tested?