I am playing with Couenne for NLP optimization problems with JuMP and AmplNLWriter. After setting up these packages, I tried the toy example in Couenne’s documentation (section 5). For convenience, the problem is posted here.
My Julia code is shown below.
using JuMP, AmplNLWriter model = Model(with_optimizer(AmplNLWriter.Optimizer, raw"C:\Users\Gao Shuhua\Downloads\couenne-win64/couenne.exe")) @variable(model, 0<=x0<=10) @variable(model, 0<=x1<=10) @variable(model, y2, Bin) @variable(model, y3, Bin) @variable(model, y4, Bin) @constraints(model, begin y2 + x0 <= 1.6 y3 + 1.333*x1 <= 3 y4 - y3 - y2 <= 0 end) @NLconstraint(model, x0^2 + y2 == 1.25) @NLconstraint(model, x1^1.5 + 1.5*y3 == 3) @objective(model, Min, 2*x0 + 3*x1 + 1.5*y2 + 2*y3 - 0.5*y4) optimize!(model)
The last line
optimize!(model) displays the following information:
Couenne 0.5.7 -- an Open-Source solver for Mixed Integer Nonlinear Optimization Mailing list: email@example.com Instructions: http://www.coin-or.org/Couenne couenne: ANALYSIS TEST: Error evaluating constraint 2: can't evaluate pow"(0,1.5).
and then terminated. The termination status is
termination_status(model) = MathOptInterface.OTHER_ERROR objective_value(model) = NaN
In contrast, the problem has been solved successfully in the documentation. Is there anything wrong in my code, or did I missing anything? Thank you.