[Ipopt] Objective function decreases extremely slowly
Edson Cordeiro do Valle
edsoncv at enq.ufrgs.br
Mon Aug 17 11:10:23 EDT 2015
Ana
Did you tried to feed the Hessian to Ipopt?
This generally gives better results than BFGS approach.
Seems like your function is bilinear right? So it will be easy to get
the second order derivatives you need to build your Hessian Matrix.
Deppending on your problem, even a finite difference Hessian calculation
may give better results ( I think that Matlab have a function for it).
My tip is first to check the structure of your derivatives matrix and
then the Hessian. Ipopt have options that sets the linearity of
constraints and variables ( check
http://www.coin-or.org/Ipopt/documentation/node43.html#SECTION000114070000000000000
)
Regards
Edson Cordeiro do Valle, Professor
Telefone: +55 51 - 3662 - 78-14
Celular: 51 - 920-921 -02
Skype: edson.cv
On 17-08-2015 05:17, ipopt-request at list.coin-or.org wrote:
> 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: Objective function decreases extremely slowly
> (Ana Maria Barragan Montero)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 17 Aug 2015 08:17:13 +0000
> From: Ana Maria Barragan Montero <ana.barragan at uclouvain.be>
> To: "ipopt at list.coin-or.org" <ipopt at list.coin-or.org>
> Subject: Re: [Ipopt] Objective function decreases extremely slowly
> Message-ID: <1439799386632.28734 at uclouvain.be>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
>
>
>
>
> ________________________________
> Ana Mar?a Barrag?n Montero,
> PhD student
> Universit? catholique de Louvain
> Molecular Imaging, Radiotherapy and Oncology (MIRO)
> Avenue Hippocrate 54
> B-1200 Bruxelles, Belgium
> ana.barragan at uclouvain.be
> +32(0) 27649527
> ________________________________
> From: Ana Maria Barragan Montero
> Sent: Friday, August 14, 2015 4:45 PM
> To: Ipopt User
> Subject: Re: [Ipopt] Objective function decreases extremely slowly
>
>
> Hi!
>
>
> Thanks for your quick answer.
>
>
> I did run the derivative checker at the very beginning to check that my implementation was right and everything seems to be OK. Moreover, I guess that if the derivatives are not well calculated I would not get right results, isn't it? The results I get are OK, the problem is that I need a lot of iterations to achieve it.
>
>
> About my objective and constraint functions, ...here we go:
>
> I work in the field of radiation therapy for cancer patients. In my problem I need to find the optimal dose for the patient which is obtained by a weighted sum of small proton beams.
>
> * The weights for all these beamlets are my variables of optimization: w = [w1 w2 w3 ...w8500]. (with values usually between 0 and 10).
> * I need to be robust to different scenarios s (due to patient movement), so the dose to each scenario is then: d(s) = w*P(s), where P is a matrix mapping the weights to dose in scenario s.
> * I want to have a minimum dose in the target and no more than a certain dose in the organs, so I create a function to be minimized which is a weighted sum of dose objectives and will be my constraint function:
>
> f (d(w,s)) = impw1*f1 +impw2*f2+...
>
> where impwi is an 'important weight' which increases according to the importance that I give to the objective i,
> and fi are the dose objective functions which depend on the dose at each scenario, thus fi(d(w,s))
>
>
> * I attempt to be robust to all scenarios by being robust to the worst of them and I introduce a auxiliary variable t, so the problem to solve is the following:
>
>
> minimize t
>
> w, t
>
>
> subject to t => f(d(w,s)) for all scenarios s
>
> w => 0
>
>
> And I will have as many constraint functions as the number of scenarios we have which is usually <=20.
>
>
>
> IMPORTANT note: I realised that if I change the impw variables to a small values (<10) the objective function is changing more dinamically and faster than before, where I was using bigger values (500-1000). But anyway I need more than 500-1000 iterations to get a good result. Do you have any idea of what can I do to reduce the number of iterations?
>
>
>
> Thank you in advance,
>
>
> Ana
>
>
>
>
>
>
>
>
> ________________________________
> Ana Mar?a Barrag?n Montero,
> PhD student
> Universit? catholique de Louvain
> Molecular Imaging, Radiotherapy and Oncology (MIRO)
> Avenue Hippocrate 54
> B-1200 Bruxelles, Belgium
> ana.barragan at uclouvain.be
> +32(0) 27649527
> ________________________________
> From: Ipopt User <ipoptuser at gmail.com>
> Sent: Friday, August 14, 2015 3:31 PM
> To: Ana Maria Barragan Montero
> Subject: Re: [Ipopt] Objective function decreases extremely slowly
>
> Have you run the derivative checker? What do the objective and constraint functions look like?
>
> On Fri, Aug 14, 2015 at 5:25 AM, Ana Maria Barragan Montero <ana.barragan at uclouvain.be<mailto:ana.barragan at uclouvain.be>> wrote:
>
>
> Dear all,
>
>
> I am using IPOPT (through Matlab interface) with the option limited memory bfgs hessian approximation to solve a problem of the following characteristics (the total number of variables can change but it is often between 5000 and 10000).
>
>
> *************************************************************************
> This is Ipopt version 3.11.8, running with linear solver ma57.
>
> Number of nonzeros in equality constraint Jacobian...: 0
> Number of nonzeros in inequality constraint Jacobian.: 60613
> Number of nonzeros in Lagrangian Hessian.............: 0
>
> Total number of variables............................: 8659
> variables with only lower bounds: 8659
> variables with lower and upper bounds: 0
> variables with only upper bounds: 0
> Total number of equality constraints.................: 0
> Total number of inequality constraints...............: 7
> inequality constraints with only lower bounds: 7
> inequality constraints with lower and upper bounds: 0
> inequality constraints with only upper bounds: 0
>
>
> **************************************************************************
>
>
> Here below you can find the ipopt options I am using (those which do not appear are set by the program to their default value)
>
>
> % Initialization
> options.ipopt.bound_frac = 0.01;
> options.ipopt.bound_push = 0.001;
>
>
> options.ipopt.dual_inf_tol = 1;
> options.ipopt.constr_viol_tol = 0.0001;
> options.ipopt.compl_inf_tol = 0.0001;
> options.ipopt.acceptable_constr_viol_tol = 0.01;
>
> % NLP scaling
> options.ipopt.nlp_scaling_max_gradient = 100;
>
>
> % Quasi-Newton
> options.ipopt.hessian_approximation = 'limited-memory';
> options.ipopt.limited_memory_update_type = 'bfgs';
>
> % Barrier parameter
> options.ipopt.mu_strategy = 'monotone';
> options.ipopt.mu_init = 0.1;
>
>
>
> My problem is that I need a lot of iterations (more than 1500) to get a good result because the objective function (which has a very big value in the beginning) is decreasing extremely slowly. As an example here you have the print output for the iteration 10 and 500:
>
>
> iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
>
> 10 5.4760000e+10 0.00e+00 6.20e+02 -0.2 3.33e+02 - 6.13e-02 1.23e-02f 1 sigma=1.00e-06 qf=13Ws
>
>
> 500 2.9078333e+10 1.38e+10 1.00e+00 -2.9 9.18e+13 - 4.66e-09 3.06e-10f 1 sigma=6.04e-01 qf=12Wp
>
>
>
> I wonder if I could use any other ipopt options to make the objective function decrease faster so that I can reduce the number of iterations. Moreover, I am using ma57 solver, do you recommend me any other (as PARDISO for example) for large problems as this one?
>
> I guess that it is normal that the program takes longer at the beginning to find the good search direction since it does not have the information about the hessian because I am using the bfgs approx. In my case I have the information to calculate analytically the hessian. To calculate it at each iteration would increase considerably the computation time, however, I could calculate it at the beginning and thus initialize the hessian to the right value. Do you think that would reduce the number of iterations?
>
>
> I am new with IPOPT and I don't have much experience in the field of optimization so please let me know if you need more information about my problem (formulation, variables, etc..) that can help you to find a solution.
>
>
> Thank you in advance,
>
>
> Ana
>
>
> ________________________________
> Ana Mar?a Barrag?n Montero,
> PhD student
> Universit? catholique de Louvain
> Molecular Imaging, Radiotherapy and Oncology (MIRO)
> Avenue Hippocrate 54
> B-1200 Bruxelles, Belgium
> ana.barragan at uclouvain.be<mailto:ana.barragan at uclouvain.be>
> +32(0) 27649527<tel:%2B32%280%29%2027649527>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org<mailto: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/20150817/3c8b82d3/attachment.html>
>
> ------------------------------
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
>
> End of Ipopt Digest, Vol 128, Issue 10
> **************************************
More information about the Ipopt
mailing list