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: |
|
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, |
|
Thanks a lot. We can close the discussion |
Uh oh!
There was an error while loading. Please reload this page.
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 ?
All reactions