# feasibility tolerance

4 messages
Open this post in threaded view
|
Report Content as Inappropriate

## feasibility tolerance

 I am solving a nonlinear optimization problem and I set the feasibility tolerance as:`  mdl = Model(solver =KnitroSolver(feastol=0.01))`then I have several equality constraints including`@NLconstraint(mdl, psi0_con, psi[1] == psi0);`after I solve the optimization problem, I get an infeasible point and when I run:`getdual()`on all of the constraints, the one that looks like the worst is:`getdual(psi0_con) = 1`but then when I look at the point that the optimization actually converges on, it does not look that bad:`julia> getvalue(psi0)1.3772404760181705julia> getvalue(psi[1])1.3697550013526445`Any ideas why this is not a feasible point even though:`julia> getvalue(psi[1])-getvalue(psi0)`is within the tolerance that I set? -- You received this message because you are subscribed to the Google Groups "julia-opt" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. Visit this group at https://groups.google.com/group/julia-opt. For more options, visit https://groups.google.com/d/optout.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: feasibility tolerance

 Also, I have tried:`  mdl = Model(solver =KnitroSolver(infeastol=0.01))`with similar results -- You received this message because you are subscribed to the Google Groups "julia-opt" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. Visit this group at https://groups.google.com/group/julia-opt. For more options, visit https://groups.google.com/d/optout.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: feasibility tolerance

 Additionally, I tried to simplify the problem definition and use linear constraints as: `@constraint(mdl, psi0_con, psi[1] == psi0_);`But, I am still getting similar results to those shown above -- You received this message because you are subscribed to the Google Groups "julia-opt" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. Visit this group at https://groups.google.com/group/julia-opt. For more options, visit https://groups.google.com/d/optout.
 Increasing the values of "feastol" and "feastol_abs" to match the feasibility level you consider "good enough" to declare optimality.  See this section on the termination criteria in Knitro:https://www.artelys.com/tools/knitro_doc/2_userGuide/termination.htmland in particular note the "stop1" condition.  Set "feastol" to something very large (say, 1e20) so that the feasibility condition is only determined by "feastol_abs".  Then try setting "feastol_abs"  to something like 1e-2 or 1e-3 (or whatever works.Also, I ended up having to do the same with `opttol. So, that the problem converges without worrying about accuracy too much` -- You received this message because you are subscribed to the Google Groups "julia-opt" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. Visit this group at https://groups.google.com/group/julia-opt. For more options, visit https://groups.google.com/d/optout.