[Coin-ipopt] derivative checker

Andreas Waechter andreasw at watson.ibm.com
Mon Jan 7 12:42:28 EST 2008


Hi Liliya,

> I figured out what was the issue with the derivative_test. For my 
> problem I need to change the value of the point_perturbation_radius 
> option to something smaller than default 10.
>
> However my program still crashes whenever I delete TNLP child class..

When you create a TNLP object in your code, you MUST use a SmartPtr to 
store the resulting pointer in; otherwise the reference counter in the 
TNLP object is one number too less, and the TNLP class will be deleted 
when the last reference in the IpoptAppliction stops pointing to it, and 
your delete will try to delete it a second time.  Also, don't use a 
'delete' to delete your TNLP object; instead, just set the SmartPtr to 
NULL, and it will automatically delete the object if no other SmartPtr is 
anymore pointing to this object.

The Appendix "The Smart Pointer Implementation" in the Ipopt documentation 
briefly describes the issue:

http://www.coin-or.org/Ipopt/documentation/node54.html

So, make sure that you store your TNLP in a SmartPrt, as it is done in the 
in the hs071_main.cpp example at

http://www.coin-or.org/Ipopt/documentation/node39.html

I hope this helps.  Otherwise, please open a ticket at the Ipopt trac 
page, and include a description of your compilation environment and sample 
code to reproduce the problem.

Thanks,

Andreas

>
> Lily
>
> ----- Original Message ----
> From: Liliya Kharevych <lilyukma at yahoo.com>
> To: coin-ipopt mailing list <coin-ipopt at list.coin-or.org>
> Sent: Sunday, December 30, 2007 5:51:03 PM
> Subject: [Coin-ipopt] derivative checker
>
>
> Hello,
>
> I am trying to use derivative_test option (with Ipopt 3.3.3 compliled
> for VS8), and whenever it does derivative test, instead of using my
> starting point, it uses values which are very far away from the starting
> point, but still are some reasonable numbers. When the solve is starting
> it uses the correct values. I tried to both set and not set
> derivative_test_perturbation option but it does not seem to change anything. Is
> there are another way to give starting point for derivative checker?
>
> Another problem is that whenever I try to destroy the class that
> inherits TNLP, my program crashes somewhere in Ipopt. Do you think this
> happens because SmartPtr<IpoptApplication> is a member of that class, or for
> some other reason?
>
> Thank you,
> Lily
>
>
>
>
>
>  ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
>  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> _______________________________________________
> Coin-ipopt mailing list
> Coin-ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-ipopt
>
>
>
>
>
>      ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
> _______________________________________________
> Coin-ipopt mailing list
> Coin-ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-ipopt
>



More information about the Coin-ipopt mailing list