[Ipopt] How to deal with out of constraints evaluation requests ?

aurelien lambert aurelien-lambert2 at wanadoo.fr
Tue Apr 23 04:06:09 EDT 2013


g defintly send a useful value, which is out of bound I checked it. So in this case ipopt would be supposed to try a closer point, but does not. More specificly, my constraint is for a matrix to be positive definite, so I check that its determinent is positive. log(det) is a good barrier for positive definite matricix, but not a good check, so I check that my matrix is positive definite by Cholesky, and then return a negative determinent if not, such that I still have a continous g.

I'll try to figure out how to use secondary variables, but it definintly looks complicated since deriving determinent implied inverse matrix

 

Thank you




> Message du 18/04/13 20:23
> De : "Stefan Vigerske" 
> A : "aurelien lambert" 
> Copie à : ipopt at list.coin-or.org
> Objet : Re: [Ipopt] How to deal with out of constraints evaluation requests ?
> 
> Hi,
> 
> On 04/17/2013 02:48 PM, aurelien lambert wrote:
> > Hello
> >
> >
> >
> > Im using Ipopt with its python interface in my internship, and it seems to do well, thank you for this nice job :-) I compiled the last sources of every needed libraries (including MUMPS, on Ubuntu), so I should be up to date. But my problem is I cant evaluate f, grad_f and jac_g (no h because in quasi-Newton mode) when Im out of my constraints, because I need to compute inverse of some matrices constrained to be positive definite, but which can have non inverse when not. So how can I do that ?
> >
> >
> >
> > * If g returns false (which make python return false in the C++ interface according to the source code), I have the message "Warning: Cutting back alpha due to evaluation error". It's just a warning and works fine, but if I lower the output level in order to not write these warnings, I have no useful output left.
> 
> One solution is to comment out the printing of the warning in
> Ipopt/src/Algorithm/IpBacktrackingLineSearch.cpp
> 
> Alternatively, but I don't know if that's possible via the python 
> interface, you can set a specific printlevel only for the J_LINE_SEARCH 
> category via the Ipopt::Journal::SetPrintLevel() function.
> The Journal that prints to the stdout you can get from the Ipopt 
> Journalist via the GetJournal("console"), I believe (haven't tried it).
> 
> > * If I compute g (which gives out of constraint g, I checked it), ipopt also try to evaluate f and grad_f, and grad_f returning false gives "EXIT: Invalid number in NLP function or derivative detected.", which stops the algorithm.
> 
> Maybe there is a way that you can modify the implementation of your 
> function g() so that it still reports useful values in points where it 
> is not defined.
> You will still have the constraints that tell Ipopt that this point is 
> infeasible, so better return some numeric value instead of NaN.
> Maybe you can use a generalized inverse / pseudoinverse for this purpose.
> 
> > Is there a way to disable these warnings ? Is not ipopt suppose to handle silently false return value, or detect out of constraints g ?
> 
> Ipopt expects that all functions are smooth within the box, so it is a 
> failure if a function cannot be evaluated. The "cutting back alpha" 
> procedure is a feature that allow to sometimes still work with functions 
> that cannot be evaluated everywhere.
> 
> Sometimes, introducing new variables helps, since variable bounds are 
> always obeyed by Ipopt, e.g., rewriting a constraint like log(f(x)) >= 1
> as log(z) >= 1, z = f(x), z >= 1e-6.
> 
> Hope that helps,
> Stefan
> 
> >
> >
> >
> > Thank you
> >
> >
> >
> >
> >
> > PS : I dont give my source code because it's quite long, and my problem doesnt seem to be related to it. But if you need it I can ...
> >
> >
> >
> > _______________________________________________
> > Ipopt mailing list
> > Ipopt at list.coin-or.org
> > http://list.coin-or.org/mailman/listinfo/ipopt
> >
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20130423/bc42ce1f/attachment.html>


More information about the Ipopt mailing list