-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
The following model
using JuMP; using GLPK
m = Model()
@variable(m, x, binary=true, lower_bound=0, upper_bound=1)
optimize!(m, with_optimizer(GLPK.Optimizer))results in,
ERROR: LoadError: Cannot set bounds because variable is of type: BINARY.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] add_constraints(::GLPK.Optimizer, ::Array{MathOptInterface.SingleVariable,1}, ::Array{MathOptInterface.GreaterThan{Float64},1}) at /.julia/packages/LinQuadOptInterface/ZMx9f/src/constraints/singlevariable.jl:128
[3] add_constraints(::MathOptInterface.Bridges.LazyBridgeOptimizer{GLPK.Optimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Bridges.AllBridgedConstraints{Float64}}}, ::Array{MathOptInterface.SingleVariable,1}, ::Array{MathOptInterface.GreaterThan{Float64},1}) at /.julia/packages/MathOptInterface/C3lip/src/Bridges/bridgeoptimizer.jl:342
...
Both CBC and Gurobi have no issue with this case. You might want to support it for consistency.