Value of the constraints at the solution #36
Replies: 3 comments 3 replies
-
The returned structure by all the JuliaSmoothOptimizers is a The particular field you might be interested in are:
|
Beta Was this translation helpful? Give feedback.
-
When I execute the following program using NLPModelsIpopt, ADNLPModels
nlp = ADNLPModel(x -> sum(x.^2), ones(3));
f(x) = 0.5*((x[1]-1)^2 + x[2]^2)
c(x) = [-x[1]+x[2]^2]
x0 = [1.;1.]
println("f(x0) = ", f(x0))
nlp = ADNLPModel(f, x0, c, [0.], [0.])
output = ipopt(nlp, print_level = 5)
println("solution = ", output.solution)
println("cons(nlp, output.solution) = ", cons(nlp, output.solution)) I obtain : EXIT: Optimal Solution Found. And if write : println("ADNLPModels.cons(nlp, output.solution) = ", ADNLPModels.cons(nlp, output.solution)) It's ok I obtain EXIT: Optimal Solution Found. I think you have to export the fonction cons Thanks, |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot. We can close the discussion |
Beta Was this translation helpful? Give feedback.
-
We want to solve an optimization problem with contraints and we would like for diagnostic to have the value of the constraints at the solution. Is it possible ?
Beta Was this translation helpful? Give feedback.
All reactions