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