[Ipopt] Ipopt Digest, Vol 38, Issue 6

ZhangWeizhong greatzwz at hotmail.com
Tue Feb 12 17:25:35 EST 2008


Hi, all
     Thank Dr Andreas for making it clear about "Hessian approximation".
     And I have used valgrind to test my program.

     The errors are  
     "Conditional jump or move depends on uninitialised value(s)"
     "Use of uninitialised value of size 4".
     "Too few degrees of freedom (n_x = 0, n_c = 104). Trying fixed_variable_treatment = RELAX_BOUNDS"

     My program is modified from "MyExample" from IPOPT package
     The main program is  "dmocexample.cpp", in which it call mynlp(mynlp= new DMOC_NLP();)

     The program which defines the methods such as get_nlp_info()  is called dmoc_nlp.cpp
     
    My question is
   " Can I initialize the variables  before "constructor" , "destructtor" and the methods in dmoc_nlp.cpp?" 
    Or I have to initialize the variables in different functions like "get_nlp_info()" and so on?

    It seems that I can not define the global variables in the main program"dmocexample.cpp" so that I do not have to define them in the "dmoc_nlp.cpp".  And even I initialized variables in "dmoc_nlp.cpp" outsides of the functions, it seems it is not successfully initialized.

    Anyone can give some suggestions? Thank you so much.
                                                                           Weizhong Zhang
                                                                           Electrical and Computer Engieering Dept
                                                                           University of Louisville             
    
   
      
     



----------------------------------------
> From: ipopt-request at list.coin-or.org
> Subject: Ipopt Digest, Vol 38, Issue 6
> To: ipopt at list.coin-or.org
> Date: Mon, 11 Feb 2008 12:00:02 -0500
> 
> Send Ipopt mailing list submissions to
> 	ipopt at list.coin-or.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://list.coin-or.org/mailman/listinfo/ipopt
> or, via email, send a message with subject or body 'help' to
> 	ipopt-request at list.coin-or.org
> 
> You can reach the person managing the list at
> 	ipopt-owner at list.coin-or.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Ipopt digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: [Coin-ipopt] FW: Help on "Hessian Approximation" of my
>       optimization problem (Andreas Waechter)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 11 Feb 2008 11:01:45 -0500 (EST)
> From: Andreas Waechter 
> Subject: Re: [Ipopt] [Coin-ipopt] FW: Help on "Hessian Approximation"
> 	of my optimization problem
> To: ZhangWeizhong 
> Cc: coin-ipopt at list.coin-or.org
> Message-ID: 
> Content-Type: text/plain; charset="x-unknown"
> 
> Hi,
> 
> It is correct that you don't need to overload the bool eval_h function if 
> you want to use the quasi-Newton option of Ipopt.
> 
> But you should not change the argument list for the get_nlp_info function 
> - if you do that, the Ipopt code will still try to call the original 
> function, and as you saw, this doesn't work since this is then a pure 
> virtual function, and you can't run the program.  Just set nnz_h_lag to 
> zero in your implementation of the original method of TNLP.
> 
> As for the segmentation fault, it probably means that there is something 
> wrong in the way you call Ipopt.  The easiest way to debug such memory 
> problems is to use a memory checker, such as the free valgrind program for 
> Linux.
> 
> Regards,
> 
> Andreas
> 
> 
> On Thu, 7 Feb 2008, ZhangWeizhong wrote:
> 
>>
>>     Sorry, I forgot the detailed information
>>     IPOPT version: 3.3.3
>>     My computer is i686 2.6.20-16-generic, ubuntu 7.10
>>
>>
>> From: greatzwz at hotmail.comTo: greatzwz at hotmail.comSubject: Help on 
>> "Hessian Approximation" of my optimization problemDate: Wed, 6 Feb 2008 
>> 16:29:04 -0500
>>
>>
>> Hi, friends:  Sorry to bother you.  I have one problem regarding 
>> "Hessian Approximation" in IPOPT application.  In the main program, the 
>> option is configured as "app->Options()- 
>> SetStringValue("hessian_approximation","limited-memory")".  It is 
>> indicated in the menu, I do not have to implement "bool eval_h()", so I 
>> commented it out in my_program.cpp and my_program.hpp.  Then my program 
>> can be compiled successfully, however the resulted executable program is 
>> not working, the error message is "Segmentation fault(core dumped)".  I 
>> thought maybe that I did not provide the hessian informationin the 
>> method "get_nlp_info(.... Index&nnz_h_lag...)". Thus I commented this 
>> parameter out in my_program.cpp and my_program.hpp correspondingly. 
>> Afterwards, I compiled the program. It still is successfully compiled. 
>> Now when I execute it, the error message is "pure virtual method called 
>> terminate called without an active exception"  I have searched the 
>> websit! e, it seems all the methods I used did not include itself or 
>> other methods which are not defined previously.Thus I do not know why 
>> the error indicates "pure virtual method called".  If anybody can help, 
>> I would appreciate that.  Thank you so much.  Weizhong Zhang> Subject: 
>> Welcome to the "Coin-ipopt" mailing list (Digest mode)> From: 
>> coin-ipopt-request at list.coin-or.org> To: greatzwz at hotmail.com> Date: 
>> Wed, 6 Feb 2008 16:09:16 -0500>> Welcome to the 
>> Coin-ipopt at list.coin-or.org mailing list!>> To post to this list, send 
>> your email to:>> coin-ipopt at list.coin-or.org>> General information 
>> about the mailing list is at:>> 
>> http://list.coin-or.org/mailman/listinfo/coin-ipopt>> If you ever want 
>> to unsubscribe or change your options (eg, switch to> or from digest 
>> mode, change your password, etc.), visit your> subscription page at:>> 
>> http://list.coin-or.org/mailman/options/coin-ipopt/greatzwz%40hotmail.com> 
>>>> You can also!
>>  make such adjustments via email by sending a message to:>> Coin-ipop
>>
>> t-request at list.coin-or.org>> with the word `help' in the subject or body (don't include the> quotes), and you will get back a message with instructions.>> You must know your password to change your options (including changing> the password, itself) or to unsubscribe. It is:>> 8686>> Normally, Mailman will remind you of your list.coin-or.org mailing> list passwords once every month, although you can disable this if you> prefer. This reminder will also include instructions on how to> unsubscribe or change your account options. There is also a button on> your options page that will email your current password to you.
>>
>> ?? Windows Live Spaces ?????????????????????????????? ??????????????
>> _________________________________________________________________
>> ?????????? MSN ????????????????????
>> http://mobile.msn.com.cn/
> 
> ------------------------------
> 
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
> 
> 
> End of Ipopt Digest, Vol 38, Issue 6
> ************************************

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


More information about the Ipopt mailing list