Mu_target not working for ipopt


#1

Hello guys!

Previously, Ipopt was accepting my mu_target option. With problems created in the standard manner you see on the internet. Now, it is not. The difference is that now for some specific reason I’m creating the problem like this:

JuMP.setNLobjective(m, :Min, :(my_objective($(x…))))

Do you have a clue why Ipopt is not accepting my mu_target?

Best,


#2

Well,

It seems that if you register a multivariate function, as you cannot provide the hessian, ipopt cannot use mu_target.

For me it is weird. Check the code below:

using JuMP
using Ipopt

###############################################################

#=
ipoptSolver = IpoptSolver(mu_target = 1.0)
m = Model(solver=ipoptSolver)
@variable(m, x >= 0)
@NLobjective(m, :Min, x)
solve(m)
getvalue(x)
=#

###############################################################

#=
ipoptSolver = IpoptSolver(mu_target = 1.0)
m = Model(solver=ipoptSolver)
@variable(m, x >= 0)
JuMP.register(m, :my_objective, 1, (x) -> x, (x) -> 1.0, (x) -> 0.0)
JuMP.setNLobjective(m, :Min, :(my_objective($(x…))))
solve(m)
getvalue(x)
=#

###############################################################

#=
function val(x1, x2)
return x1 + x2
end

function grad(result, x1, x2)
result[1] = 1.0
result[2] = 1.0
end

ipoptSolver = IpoptSolver(mu_target = 1.0)
m = Model(solver=ipoptSolver)
@variable(m, x[1:2] >= 0)
JuMP.register(m, :my_objective, 2, val, grad, autodiff=false)
JuMP.setNLobjective(m, :Min, :(my_objective($(x…))))
solve(m)
getvalue(x)
=#