You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interval on each x should be Interval(2.001, 9.999) instead of Interval(-2.001, 9.999) for log(x - 2) to be defined.
Here's an example using Ipopt,
using JuMP, Ipopt
model =Model(Ipopt.Optimizer);
@variable(model, -2.001<= x[1:10] <=9.999);
f =log(x[1] -2)^2+log(10- x[1])^2;
for i =2:10
f +=log(x[i] -2)^2+log(10- x[i])^2end
f -= (x[1] * x[2] * x[3] * x[4] * x[5] * x[6] * x[7] * x[8] * x[9] * x[10])^0.2;
@objective(model, Min, f);
JuMP.optimize!(model)
which returns EXIT: Invalid number in NLP function or derivative detected.
If the variables are defined as @variable(model, 2.001 <= x[1:10] <= 9.999) instead, then the solution is found.
The text was updated successfully, but these errors were encountered:
I believe there may be an issue here:
MathOptInterface.jl/src/Test/test_nonlinear.jl
Lines 1391 to 1400 in 2401296
The interval on each x should be
Interval(2.001, 9.999)
instead ofInterval(-2.001, 9.999)
forlog(x - 2)
to be defined.Here's an example using Ipopt,
which returns
EXIT: Invalid number in NLP function or derivative detected.
If the variables are defined as
@variable(model, 2.001 <= x[1:10] <= 9.999)
instead, then the solution is found.The text was updated successfully, but these errors were encountered: