Closed matbesancon closed 3 years ago
this errors, because calls the conic interface:
model = direct_model(diff_optimizer(Clp.Optimizer))
MOI.set(model, MOI.Silent(), true)
@variable(model, x[1:1])
@objective(model, Min, x[1])
@constraint(model, x[1] ≥ 0)
@constraint(model, x[1] ≥ 3)
optimize!(model)
# obtain gradients
grads = backward(JuMP.backend(model), ["G", "h"], [1.0])
This fixes the problem:
@objective(model, Min, 1.1 * x[1])
This should be fixed in the #81 rewrite
OK great. I had a quick fix in an upcoming PR but a more systematic one will be better
fixed by #83
This makes LPs with
MOI.SingleVariable
conic programs, which is a bit overkill