The SOS1 reformulation fails on this LPCC example:
using JuMP
using ComplementOpt
using HiGHS
model = Model()
@variable(model, 0 <= z1, start=0.0)
@variable(model, 0 <= z2, start=1.0)
@variable(model, z3, start=0.0)
# z3 = 1.0
@objective(model, Min, z1 + z2 - z3)
@constraint(model, -4 * z1 + z3 <= 0)
@constraint(model, -4 * z2 + z3 <= 0)
@constraint(model, comp, [z1, z2] ∈ MOI.Complements(2))
JuMP.set_optimizer(model, () -> ComplementOpt.Optimizer(
MOI.Bridges.full_bridge_optimizer(HiGHS.Optimizer(), Float64)
)
)
JuMP.optimize!(model)
Returning an error in final_touch:
ERROR: LoadError: MathOptInterface.Bridges.BridgeRequiresFiniteDomainError{MathOptInterface.Bridges.Constraint.SOS1ToMILPBridge{Float64, MathOptInterface.VectorOfVariables}, MathOptInterface.VariableIndex}:
There was an error reformulating your model into a form supported by the
solver because one of the bridges requires that all variables have a
finite domain.
The error remains if I add bound on z1 and z2. I am wondering what would be the correct usage for the SOS1 bridge? Should we allow the user to pass the big-M constraint manually?
The SOS1 reformulation fails on this LPCC example:
Returning an error in
final_touch:The error remains if I add bound on
z1andz2. I am wondering what would be the correct usage for the SOS1 bridge? Should we allow the user to pass the big-M constraint manually?