[Ipopt] [*****SPAM*****] Ipopt Digest, Vol 94, Issue 13
Edson Cordeiro do Valle
edsoncv at enq.ufrgs.br
Mon Oct 15 08:19:53 EDT 2012
Em 15-10-2012 05:23, ipopt-request at list.coin-or.org escreveu:
> 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. C++ Interface and Auxiliary Data, Using BFGS
> (AliReza Khoshgoftar Monfared)
> 2. Post-doc research position at INRA/AgroParisTech (France) to
> work on a model using IPOPT (Antonello Lobianco)
> 3. Re: segmentation fault for unbounded convex QP with
> mehrotra_algorithm (Stefan Vigerske)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 14 Oct 2012 21:44:31 -0400
> From: AliReza Khoshgoftar Monfared <khoshgoftar at gmail.com>
> To: ipopt at list.coin-or.org
> Subject: [Ipopt] C++ Interface and Auxiliary Data, Using BFGS
> Message-ID:
> <CABoSzTsbGHuUp33oNgvN3PhaW7RJqAsAN_bU+eNgEGLfZutB6g at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
Alireza
I'll answer questions 1 and 2, the others I'm not familiar to.
1) You can pass additional parameters to function evaluations using a void pointer. The function evaluations are overloaded to do this.
You need to create a structure/object and inside the function evaluation cast back this structure, like in the code bellow (for H evaluation):
Bool eval_H(Index n, Number *x, Bool new_x, Number obj_factor,
Index ng, Number *lambda, Bool new_lambda,
Index nele_hess, Index *h_iRow, Index *h_jCol,
Number *A, UserDataPtr userData){
MyStructure *Mystr = (MyStructure*)userData;
them, retrieve data from Mystr pointer.
2)If you want use BFGS you need to "return FALSE" in your eval_H function.
Regards
> Hi,
>
> I have a couple of questions regarding the C++ interface of Ipopt:
>
> 1) Is there a convenient way to pass auxiliary data to Ipopt when
> interfacing through C++?
>
> I have been using the MatlabInterface previously, and as seen in
> "/Ipopt/contrib/MatlabInterface/examples/lasso.m", by assigning a value to
> "auxdata" in the solver options, this parameter can be passed and unpacked
> in any of the callbacks (objective, gradient, etc...) to access extra
> information. What will the equivalent for C++ interface be?
>
> 2) If I use "limiteed-memory" mode for "hessian_approximation" option, do I
> still need to implement all the functions mentioned in the tutorial? (
> http://www.coin-or.org/Ipopt/documentation/node32.html) I assume that I
> won't need "eval_h()". Is that true? or should I make an empty template?
>
> 3) For setting the solver name and the limited-memory mode, Sholud I still
> use "app->Options()"?i.e., sth like:
>
>
>> app->Options()->SetStringValue("linear_solver", "ma27");
>> app->Options()->SetStringValue("hessian_approximation",
>> "limited-memory");
>
> 4) Out of curiosity, Is there any other examples of using C++ interface
> using auxiliary data and limited-memory or other options of Ipopt?
>
> 5) Is there any sample statistics about the execution time saved using C++
> interface? I am currently solving my problem using MalabInterface, and it
> takes about 30 minutes on a Quad Core with 8GB RAM, I was wondering how
> much save can I expect if I port the whole thing to C++?
>
> Thanks
> Alireza
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20121014/4157ba4e/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 15 Oct 2012 09:14:24 +0200
> From: Antonello Lobianco <antonello at lobianco.org>
> To: Ipopt mailing list <ipopt at list.coin-or.org>
> Subject: [Ipopt] Post-doc research position at INRA/AgroParisTech
> (France) to work on a model using IPOPT
> Message-ID:
> <CAOibvJFy15NLnBwXH7pKnfFOprO4EwtEMknpLiRs2AWD3Wydpg at mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> I forward the following announcement on a post-doc research position to
> work on a economic model that uses Ipopt (trough the C++ API).
> Those interested should contact Philippe Delacote (see the announcement).
>
> /Antonello
>
> *Post-doctoral position:*
>
> *The long term adequacy in the French Forest Sector Model*
>
>
> *Object: *
>
>
> The Laboratory of Forest Economics (LEF, an INRA- AgroParisTech research
> unit) is seeking a researcher in economics, for a 12 months post-doctoral
> position (starting January 2013), to work on the opportunities and risks
> under climate change (ORACLE project).
>
>
> The objective of this position is to adapt the French Forest Sector Model
> (FFSM), in order to consistently describe the long term evolutions of the
> forest sector (changes in forest management, investment, adaptation to
> climate change) and to run simulations that analyze the adaptation of the
> forest sector to climate change.
>
>
> The researcher will implement the necessary changes in the model, in
> collaboration with the FFSM team. As a part of the modeling team, she/he
> will have to work on the adjustments (investment and land-use change
> theory), to implement and program them in order for the model to become a
> long term projection tool (50-100 years time horizon). Then the researcher
> will have to run long term simulations to assess the potential long term
> evolution of the French forest sector, as well as the potential forest-
> agriculture interactions in term of land use. She/he will be in close
> collaboration with researchers working on the impact of climate change on
> timber species productivity and probability of presence (from LERFOB,
> INRA-AgroParisTech research unit).
>
>
> *Context: *
>
>
> FFSM is composed of two interconnected modules: an economic module which
> represents forest sector in a partial equilibrium framework and a resource
> module that describes forest resource dynamics. So far, the model is
> consistent to model the forest sector's evolutions in the relatively short
> run (15-20 years time horizon) and it has been used to simulate the impacts
> of climatic and energy public policies on the forest sector. A new module
> of forest management, including long term investment decisions is actually
> being built and constitutes the main adjustment of FFSM for long term
> simulations.
>
>
> *Required skills:* modeling and mathematical optimization, knowledge in
> economics, C++ and modeling tools, knowledge in forest sector (preferably),
> team work, multi-disciplinary work, French and/or English language.
>
>
>
>
>
>
>
> *FFSM outputs: *
>
>
> Sauquet, A., Lecocq, F., Delacote, P., Caurla, S., Barkaoui, A., Garcia,
> S. 2011. Estimating Armington elasticities for sawnwood and application to
> the French Forest Sector Model. Resource and Energy Economics 33(4):771-781
>
>
> Delacote, P., F. Lecocq. 2011. Fuelwood, timber and climate change:
> Insights from forest sector modeling?An introduction, Journal of Forest
> Economics 17(02):107-109.
>
>
> Lecocq F., P. Delacote, S. Caurla, A. Barkaoui, A. Sauquet. 2011. Paying
> for forest carbon or stimulating fuelwood demand? Insights from the French
> Forest Sector Model, Journal of Forest Economics 17(2):157-168.
>
>
> Caurla, S., Lecocq, F., Delacote, P. Et Barkoui, A., *"The French Forest
> Sector Model: version 1.0. Presentation and theoretical
> foundations<http://www.nancy.inra.fr/lef/content/download/3310/33596/version/1/file/doc_LEF_n2010-03.pdf>
> **"*. Cahiers du LEF N?2010-03.
>
>
> Lecocq, F., Caurla, S. Delacote, P., Barkaoui, A. et Sauquet, A.,
> *"Retribution
> of carbon sinks in forest biomass Vs stimulation of timber consumption:
> what impacts on the French forest sector?".
> <https://www.nancy.inra.fr/lef/content/download/3259/33087/version/1/file/doc_LEF_n2010-02.pdf>Cahiers
> du LEF, <http://www.nancy.inra.fr/lef/cahiers_du_lef>* N?2010-02.
>
>
> Caurla, S., Lecocq, F., Delacote, P. et Barkaoui, A., *"Fuelwood
> Consumption, Uncertainty over Resources and Public Policies: Which Impacts
> on the French Forest
> Sector?"<http://www.nancy.inra.fr/lef/content/download/3111/31342/version/1/file/2009-03.pdf>
> *. *Cahiers du LEF <http://www.nancy.inra.fr/lef/cahiers_du_lef>*, N?2009
> -03.
>
>
> *Contact: *
>
>
> Philippe Delacote
>
> *pdelacote**@nancy-engref.inra.fr <franck.lecocq at nancy-engref.inra.fr>*
>
> +33 (0)3 83 39 68 53
>
>
>
> --
> Antonello Lobianco
> INRA, Laboratoire d'Economie Foresti?re
> 14 Rue Girardet - 54000 Nancy, France
> Tel: +33.652392310
> Email: antonello.lobianco at nancy-engref.inra.fr
> http://antonello.lobianco.org
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20121015/00b26379/attachment-0001.html>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 15 Oct 2012 10:23:21 +0200
> From: Stefan Vigerske <stefan at math.hu-berlin.de>
> To: Joris Gillis <Joris.Gillis at mech.kuleuven.be>
> Cc: "'ipopt at list.coin-or.org'" <ipopt at list.coin-or.org>
> Subject: Re: [Ipopt] segmentation fault for unbounded convex QP with
> mehrotra_algorithm
> Message-ID: <507BC7F9.2080706 at math.hu-berlin.de>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> Hi,
>
> based on a C++ example to reproduce this issue by Tony, Andreas made a
> fix in Ipopt/trunk (which I am now announcing here :-)):
> https://projects.coin-or.org/Ipopt/changeset/2114/
>
> Can you try whether that works for you?
>
> Best,
> Stefan
>
> On 10/12/2012 01:27 AM, Joris Gillis wrote:
>> Hello all,
>>
>> Thanks to Jonathan for helping me out in a private thread.
>> However, he was not able to reproduce this using the matlab interface.
>>
>> Further details of my situation: the same fault occurs with ma57, ma27, mumps.
>>
>> The programs outputs:
>>
>> This is Ipopt version 3.10.2, running with linear solver ma27.
>>
>> Number of nonzeros in equality constraint Jacobian...: 0
>> Number of nonzeros in inequality constraint Jacobian.: 0
>> Number of nonzeros in Lagrangian Hessian.............: 0
>>
>> Total number of variables............................: 5
>> variables with only lower bounds: 0
>> variables with lower and upper bounds: 5
>> variables with only upper bounds: 0
>> Total number of equality constraints.................: 0
>> Total number of inequality constraints...............: 0
>> inequality constraints with only lower bounds: 0
>> inequality constraints with lower and upper bounds: 0
>> inequality constraints with only upper bounds: 0
>>
>> iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
>> 0 0.0000000e+00 0.00e+00 1.00e+00 0.0 0.00e+00 - 0.00e+00 0.00e+00 0
>> 1 -2.4999996e+00 0.00e+00 3.85e-06 -5.0 1.00e+00 - 9.90e-01 1.00e+00f 1
>> 2 -2.5000000e+00 0.00e+00 3.81e-06 -11.0 3.84e-04 - 9.90e-01 1.00e+00f 1
>> 3 -2.5000000e+00 0.00e+00 3.81e-08 -11.0 1.54e-11 - 9.90e-01 1.00e+00f 1
>> 4 -2.5000000e+00 0.00e+00 3.81e-10 -11.0 3.55e-17 - 9.90e-01 1.00e+00 0
>> 5 -2.5000000e+00 0.00e+00 3.81e-14 -11.0 3.55e-17 - 1.00e+00 1.00e+00T 0
>> Segmentation fault (core dumped)
>>
>>
>> Stack trace:
>>
>>
>> #0 0x00007ffff3852eb2 in std::vector<Ipopt::SmartPtr<Ipopt::Vector>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector> > >::operator[] (this=0xd0, __n=4)
>> at /usr/include/c++/4.6/bits/stl_vector.h:711
>> #1 0x00007ffff38525aa in Ipopt::CompoundVector::IsCompNull (this=0x0, i=4)
>> at ../../../../Ipopt/src/Interfaces/../LinAlg/IpCompoundVector.hpp:79
>> #2 0x00007ffff385284c in Ipopt::IteratesVector::GetIterateFromComp (this=0x0,
>> i=4)
>> at ../../../../Ipopt/src/Interfaces/../Algorithm/IpIteratesVector.hpp:501
>> #3 0x00007ffff3852798 in Ipopt::IteratesVector::z_L (this=0x0)
>> at ../../../../Ipopt/src/Interfaces/../Algorithm/IpIteratesVector.hpp:233
>> #4 0x00007ffff3941482 in Ipopt::PDSearchDirCalculator::ComputeSearchDirection
>> (this=0x10819f0)
>> at ../../../../Ipopt/src/Algorithm/IpPDSearchDirCalc.cpp:88
>> #5 0x00007ffff38d803e in Ipopt::IpoptAlgorithm::ComputeSearchDirection (
>> this=0x1081a40) at ../../../../Ipopt/src/Algorithm/IpIpoptAlg.cpp:507
>> #6 0x00007ffff38d7176 in Ipopt::IpoptAlgorithm::Optimize (this=0x1081a40,
>> isResto=false) at ../../../../Ipopt/src/Algorithm/IpIpoptAlg.cpp:314
>> #7 0x00007ffff384e438 in Ipopt::IpoptApplication::call_optimize (
>> this=0xb2ed30)
>> at ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:816
>> #8 0x00007ffff384d59a in Ipopt::IpoptApplication::OptimizeNLP (this=0xb2ed30,
>> nlp=..., alg_builder=...)
>> at ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:713
>> ---Type <return> to continue, or q <return> to quit---
>> #9 0x00007ffff384d291 in Ipopt::IpoptApplication::OptimizeNLP (this=0xb2ed30,
>> nlp=...) at ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:676
>> #10 0x00007ffff384ce64 in Ipopt::IpoptApplication::OptimizeTNLP (
>> this=0xb2ed30, tnlp=...)
>> at ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:655
>>
>> Any more ideas to debug this?
>>
>> Thanks in advance,
>> Joris Gillis
>> ________________________________
>> From: Jonathan Currie [jonathan.currie at aut.ac.nz]
>> Sent: Wednesday, October 10, 2012 11:49 PM
>> To: Joris Gillis; 'ipopt at list.coin-or.org'
>> Subject: RE: segmentation fault for unbounded convex QP with mehrotra_algorithm
>>
>> Using the Matlab interface with the option ?mehrotra_algorithm? = ?yes? gives the following exception:
>>
>> Exception of type: OPTION_INVALID in file "..\..\..\src\Algorithm\IpAlgBuilder.cpp" at line 724:
>> Exception message: !mehrotra_algorithm || smuoracle=="probing" evaluated false: If mehrotra_algorithm=yes, mu_oracle must be "probing".
>>
>> EXIT: Invalid option encountered.
>>
>>
>> Have you enabled mu_oracle as per the above? If not, and you are not catching the exception, this could be your problem.
>>
>> Jonathan
>>
>> From: ipopt-bounces at list.coin-or.org [mailto:ipopt-bounces at list.coin-or.org] On Behalf Of Joris Gillis
>> Sent: Thursday, 11 October 2012 5:29 a.m.
>> To: ipopt at list.coin-or.org
>> Subject: [Ipopt] segmentation fault for unbounded convex QP with mehrotra_algorithm
>>
>> Dear all,
>>
>> I?m experiencing a segmentation fault that occurs in PDSearchDirCalculator::ComputeSearchDirection for a problem with the following characteristics:
>> Sparse convex QP
>> No constraints
>> Decision variable bounds that are large but finite
>> mehrotra_algorithm active
>> Hessian approximation exact or limited-memory, does not matter.
>>
>> Since we are using our own python interface (CasADi), it is possible that the error lies in our interface.
>> So could someone here please reconstruct this problem by more conventional means so I can file a proper ticket?
>>
>> I?m adding the code of the failing case here for further reference:
>>
>> ======
>> from casadi import *
>>
>> N = 5
>>
>> x = ssym("x",N)
>> x0 = DMatrix.ones(N,1)
>> H = DMatrix.eye(N)
>> A = DMatrix.ones(0,N)
>> G = mul(H,x0)
>> obj = 0.5*mul([x.T,H,x])-mul(G.T,x)
>>
>> f = SXFunction([x],[obj])
>> g = SXFunction([x],[mul(A,x)])
>> j = SXFunction([x],[A])
>>
>> solver = IpoptSolver(f,g,FX(),j)
>> solver.setOption("mehrotra_algorithm","yes");
>> solver.init()
>> solver.input(NLP_LBX).setAll(-1000)
>> solver.input(NLP_UBX).setAll(1000)
>>
>> solver.solve()
>> ======
>>
>> Best regards,
>> Joris Gillis
>>
>>
>>
>>
>> _______________________________________________
>> Ipopt mailing list
>> Ipopt at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/ipopt
>>
>
>
> ------------------------------
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
>
> End of Ipopt Digest, Vol 94, Issue 13
> *************************************
More information about the Ipopt
mailing list