[Ipopt] Ipopt Digest, Vol 38, Issue 8

ZhangWeizhong greatzwz at hotmail.com
Tue Feb 26 16:51:45 EST 2008


Hi,all:
     Do we must supply "values" in eval_jac_g manually because IPOPT can not provide these automatically?
     It seems that we do not have to provide the values(just index of the jacobian matrix is fine) to NAG.
     The two differences between NAG and IPOPT now for me are
      1. IPOPT needs to be provided with the derivative of the objective function, which is not required in NAG.
      2. IPOPT needs to be provided with the jacobian of the constraints manually, in NAG, just the structure of the jacobian is needed.
     Am I right for these?
     Thank you.
                                 Weizhong Zhang
   

----------------------------------------
> From: greatzwz at hotmail.com
> To: stefan at math.hu-berlin.de
> Subject: RE: [Ipopt] Ipopt Digest, Vol 38, Issue 8
> Date: Tue, 26 Feb 2008 15:21:14 -0500
> 
> 
> Hi,Stefan:
>     Thank you so much for your help.
>      I think now I may know where the problem is.
>      It is in 
>      eval_jac_g(Index n, const Number* x, bool new_x, Index m, Index nele_jac, Index* iRow, Index *jCol, Number* values).
> 
>      I have supplied iRow, jCol, but  the values for the Jacobian of the constraints at the point x were not provided, I assumed it will be zero which is defined as the same as in NAG.
> 
>     I will check that, thank you so much.
>                                Weizhong Zhang
> 
> 
>    
> 
>    
> ----------------------------------------
>> Date: Tue, 26 Feb 2008 20:37:23 +0100
>> From: stefan at math.hu-berlin.de
>> To: ipopt at list.coin-or.org
>> CC: greatzwz at hotmail.com
>> Subject: Re: [Ipopt] Ipopt Digest, Vol 38, Issue 8
>> 
>> Hi,
>> 
>> ZhangWeizhong wrote:
>>> hI, all:     Now the problem is " Invalid number in NLP function or derivative detected"     And  number of iteration is "0"    Can anyone give me any suggestions?
>> 
>> Probably your code that computes function values and jacobian returns an
>> invalid number.
>> From the valgrind message you send I would guess that you might not set
>> all values in the arrays that Ipopt provides you when it asks for a
>> function or jacobian evaluation.
>> 
>> You should make sure that you implemented the evaluation routines
>> eval_f, eval_grad_f, eval_g, and eval_jac_g such that you return correct
>> numbers in obj_value, grad_f, g, and values, repectively.
>> E.g., in the eval_jac_g routine make sure that you have set all nele_jac
>> entries of values and did not leave some out.
>> Also you should not assume that values array is initialized with 0'th.
>> 
>> Adding some printf's in your evaluation routines that tell which values
>> you return to Ipopt should help to find the problem.
>> 
>> (Andreas, you could make this error message a bit clearer by at least
>> telling whether it was a function value or a gradient :-).)
>> 
>> Best,
>> Stefan
>> 
>> 
>> -- 
>> Stefan Vigerske
>> Humboldt University Berlin, Numerical Mathematics
>> http://www.math.hu-berlin.de/~stefan
> 
> _________________________________________________________________
> 手机也能上 MSN 聊天了,快来试试吧!
> http://mobile.msn.com.cn/

_________________________________________________________________
MSN圣诞礼物火热登场,免费发放中,快来领取吧!
http://im.live.cn/emoticons/?ID=18


More information about the Ipopt mailing list