# [Ipopt] Objective function decreases extremely slowly

Ana Maria Barragan Montero ana.barragan at uclouvain.be
Mon Aug 17 04:17:13 EDT 2015

```

________________________________
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!

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?

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

% 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.

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-0001.html>
```