-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Labels
Description
HiGHS doesn't support ConstraintDualStart
, so any bridged constraint shouldn't either. But yet:
julia> model = MOI.Bridges.full_bridge_optimizer(HiGHS.Optimizer(), Float64)
MOIB.LazyBridgeOptimizer{HiGHS.Optimizer}
with 0 variable bridges
with 0 constraint bridges
with 0 objective bridges
with inner model A HiGHS model with 0 columns and 0 rows.
julia> MOI.supports(model, MOI.ConstraintDualStart(), MOI.ConstraintIndex{MOI.VectorOfVariables,MOI.Nonnegatives})
true
julia> MOI.supports(model.model, MOI.ConstraintDualStart(), MOI.ConstraintIndex{MOI.VectorOfVariables,MOI.Nonnegatives})
false
Here's the offending code:
MathOptInterface.jl/src/Bridges/bridge_optimizer.jl
Lines 1218 to 1234 in 9a54ba7
function MOI.supports( | |
b::AbstractBridgeOptimizer, | |
attr::MOI.AbstractConstraintAttribute, | |
IndexType::Type{MOI.ConstraintIndex{F,S}}, | |
) where {F,S} | |
return reduce_bridged( | |
b, | |
F, | |
S, | |
true, | |
() -> MOI.supports(b.model, attr, IndexType), | |
ok -> ok && MOI.supports(b, attr, Variable.concrete_bridge_type(b, S)), | |
ok -> | |
ok && | |
MOI.supports(b, attr, Constraint.concrete_bridge_type(b, F, S)), | |
) | |
end |
It ends up calling
MathOptInterface.jl/src/Bridges/Constraint/scalarize.jl
Lines 121 to 127 in 9a54ba7
function MOI.supports( | |
::MOI.ModelLike, | |
::Union{MOI.ConstraintPrimalStart,MOI.ConstraintDualStart}, | |
::Type{<:ScalarizeBridge}, | |
) | |
return true | |
end |
which is only true if the inner optimizer also supports it.