I'm running nonlinear optimization using the Ipopt optimizer in JuMP. My objective/cost function relies on the constraints being adhered to strictly. However on some iterations the constraint are being broken.
Specifically, my constraints are s.t. the values should be between 0 and 1/0.6 = 1.6666666....
However, in some iterations, the variables have values like:
-7.761358324221462e-9 or 1.6666666718748067
crashing the program.
Is this a bug? Is it a problem with JuMP or Ipopt? Is there a workaround?
Code:
using JuMP
using Ipopt
model = Model(Ipopt.Optimizer)
@variable(model, 0.0 <= ξ[1:6] <= 1.0/0.6)
set_start_value.(ξ, ξ₀)
@constraint(model, dot(ξ, T) == 1)
register(model, :objtv, 6, MyNonLinearObjectiveFn; autodiff=true)
@NLobjective(model, Min, objtv(ξ...))
optimize!(model)