Julia JuMP无法解决的问题-如何洞悉哪些约束使问题无法解决?

时间:2019-12-16 17:29:22

标签: julia-jump

using JuMP, Cbc

model = Model(with_optimizer(Cbc.Optimizer, seconds= (20 * 60), ratioGap = 0.10));

@variable(model, x[1:5], Bin);

@constraint(model, c1[i in 1:4], x[i] == 0 )
@constraint(model, c2[i in 4:5], x[i] == 1 )

@objective(model, Min, sum(x[i] for i in 1:5))

JuMP.optimize!(model)
# Problem is infeasible - 0.00 seconds

如何获得约束c1 [4]和c2 [4]使得问题不可行的信息?

  

c1 [4]:x [4] = 0.0
    c2 [4]:x [4] = 1.0

0 个答案:

没有答案