Skip to content

Failure with SOS1 reformulation #39

Description

@frapac

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions