Closed sebapersson closed 9 months ago
Do you see the error with Ipopt as well?
Sorry my fault, with Ipopt I do not see the error, so this code works:
using Optimization, ForwardDiff, OptimizationMOI, Ipopt
rosenbrock(x, p) = (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2
x0 = zeros(2)
_p = [1.0, 100.0]
f = OptimizationFunction(rosenbrock, Optimization.AutoForwardDiff())
prob = OptimizationProblem(f, x0, _p, lb = [-1.0, -1.0], ub = [0.8, 0.8])
sol = solve(prob, Ipopt.Optimizer())
No worries, wanted to confirm.
Fixed the title
Interior point Newton methods such as
IPNewton
orIpopt
are capable of handling non-linear constraints, but it is also possible to run them with just box-constraints. In our benchmarks for ODE models we have found IPNewton to perform well for smaller models. However, currently when trying to use eitherIPNewton
orIpopt
Optimization requests constraints (MVE below).The problem can be worked around by providing an empty constraint function, but, to make it easier for the user it would be nice if this is not necessary. In particular, we have just wrapped Optmization for PEtab.jl (and it is great to gain access to so many algorithms via one interface!) - and it would be great if the user would not have to provide a flag that they want to use an interior-point method when creating the
OptmizationProblem
.MVE
Error message :