I am using JuMP + Ipopt to solve a nonlinear constrained optimization problem. The problem is of this form:
P = JuMP.Model()
JuMP.@variable(P, x0[j] ≤ x[j=1:N] ≤ x1[j])
JuMP.@variable(P, y0[j] ≤ y[j=1:M] ≤ y1[j])
JuMP.@variable(P, z0[j] ≤ z[j=1:M] ≤ z1[j])
JuMP.@variable(P, lambda ≥ 0)
JuMP.@variable(P, Q ≥ 0)
JuMP.@constraint(P, matrix * x .== lambda * b - y)
for i = 1:M
JuMP.@NLconstraint(P, y[i] ≤ z[i] / (T[i] + z[i]))
JuMP.@NLconstraint(P, z[i] == R[i] - y[i] * Q)
end
JuMP.@NLconstraint(P, lambda / prod{1. + z[i] / R2[i], i=1:M} - prod{z[i] / (R3[i] + z[i]), i=1:M} - C ≥ 0)
where x0, x1, y0, ..., z1 are vectors previously defined, 'matrix' is a MxN matrix, also previously defined, 'b' an M-vector, T, R, R2, R3 also previously defined vectors.
I copied below the full Ipopt output containing the error I get when I try to optimize this model. I have no clue of where to start looking for the source of this error. Can someone point out common causes of this error, so I can get started?
******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
Ipopt is released as open source code under the Eclipse Public License (EPL).
******************************************************************************
This is Ipopt version 3.12.1, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).
Number of nonzeros in equality constraint Jacobian...: 1495
Number of nonzeros in inequality constraint Jacobian.: 501
Number of nonzeros in Lagrangian Hessian.............: 27107
Total number of variables............................: 505
variables with only lower bounds: 256
variables with lower and upper bounds: 231
variables with only upper bounds: 1
Total number of equality constraints.................: 458
Total number of inequality constraints...............: 230
inequality constraints with only lower bounds: 1
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 229
Number of Iterations....: 0
Number of objective function evaluations = 0
Number of objective gradient evaluations = 1
Number of equality constraint evaluations = 1
Number of inequality constraint evaluations = 1
Number of equality constraint Jacobian evaluations = 1
Number of inequality constraint Jacobian evaluations = 1
Number of Lagrangian Hessian evaluations = 0
Total CPU secs in IPOPT (w/o function evaluations) = 0.060
Total CPU secs in NLP function evaluations = 0.004
EXIT: Invalid number in NLP function or derivative detected.
WARNING: Ipopt finished with status Invalid_Number_Detected
WARNING: Not solved to optimality, status: Error