[Ipopt] Slow convergence of Ipopt

Stefan Vigerske stefan at math.hu-berlin.de
Mon Aug 7 05:51:48 EDT 2017


Hi,

the last lines of the log look as if Ipopt fails to prove local 
optimality (inf_du is still too large, but inf_pr is fine, and the 
objective makes only little progress). One reason could be that the 
Hessian is only approximated. Also the Nlopt message about roundoff 
erros indicate some numerical problems.
You could increase the tolerances to make Ipopt stop faster, or play 
with the acceptable_tol and related options to make Ipopt early if 
progress is low. Of course, providing an exact Hessian could help, too.

Stefan

On 08/04/2017 02:48 PM, Castellana Michele wrote:
> Dear all,
> I have been trying to use ipopt for an optimization problem with both equality and inequality constraints, but the code is extremely slow and does not converge. I have read this post https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_pipermail_ipopt_2011-2DFebruary_002340.html&d=DwIGaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=oVF37nZa6pcUH-GHd7yBlAWiF-_ukNzs7U7r2jOUSuE&s=t2cJV-B1SOUHOg12GJ6d2OIVE4dP3XkpuInFMxFYw94&e=  but the proposed solutions do not work in my case.
> 
> I have implemented the exact same problem with Ipopt and Nlopt (https://urldefense.proofpoint.com/v2/url?u=http-3A__ab-2Dinitio.mit.edu_wiki_index.php_NLopt-29-3A&d=DwIGaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=oVF37nZa6pcUH-GHd7yBlAWiF-_ukNzs7U7r2jOUSuE&s=6IJv5IXxTJAo3veOAs_WkVR6Uy1hBsBG1N5IVrNNRDk&e=  For a small number of variables, Ipopt converges in a reasonable time, while Nlopt is much faster and also converges. Both return very similar values of the objective function f(x), but very different values of the optimizer x. Also, Nlopt terminates with error code -4: 'Halted because roundoff errors limited progress. (In this case, the optimization still typically returns a useful result.)’, see https://urldefense.proofpoint.com/v2/url?u=http-3A__ab-2Dinitio.mit.edu_wiki_index.php_NLopt-5FReference-23Error-5Fcodes-5F.28negative-5Freturn-5Fvalues.29&d=DwIGaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=oVF37nZa6pcUH-GHd7yBlAWiF-_ukNzs7U7r2jOUSuE&s=to5pIBbwf-Lwk9RN7IZ56VBwPtsknM3aoXofnbs0aAs&e=  .
> 
> For a larger number of variables, Nlopt gives the same error message, while Ipopt keeps running and is very slow. Please find enclosed the output of the first few optimization steps:
> 
> ******************************************************************************
> This program contains Ipopt, a library for large-scale nonlinear optimization.
>   Ipopt is released as open source code under the Eclipse Public License (EPL).
>           For more information visit https://urldefense.proofpoint.com/v2/url?u=http-3A__projects.coin-2Dor.org_Ipopt&d=DwIGaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=oVF37nZa6pcUH-GHd7yBlAWiF-_ukNzs7U7r2jOUSuE&s=GYhwHzX1bwFeG0cu9G_FIsYr4M7nU36E-zi8_OHyw7o&e=
> ******************************************************************************
> 
> This is Ipopt version 3.12.8, running with linear solver ma27.
> 
> Number of nonzeros in equality constraint Jacobian...:      800
> Number of nonzeros in inequality constraint Jacobian.:    13200
> Number of nonzeros in Lagrangian Hessian.............:        0
> 
> Total number of variables............................:      400
>                       variables with only lower bounds:      400
>                  variables with lower and upper bounds:        0
>                       variables with only upper bounds:        0
> Total number of equality constraints.................:        2
> Total number of inequality constraints...............:      432
>          inequality constraints with only lower bounds:        0
>     inequality constraints with lower and upper bounds:        0
>          inequality constraints with only upper bounds:      432
> 
> iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
>     0  5.8573432e-01 3.55e+01 1.00e+00  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0
>     1  5.8667165e+00 8.10e+00 2.26e+01  -1.0 1.55e+01    -  4.33e-02 1.00e+00f  1
>     2  5.8735122e+00 8.02e+00 2.24e+01  -1.0 3.19e+01    -  1.30e-01 1.02e-02h  1
>     3  6.5049917e+00 4.44e+00 1.03e+01  -1.0 5.17e+01    -  4.75e-01 5.29e-01f  1
>     4  6.7514177e+00 3.54e+00 8.06e+00  -1.0 3.94e+01    -  4.15e-01 2.12e-01f  1
>     5  7.1210292e+00 2.40e+00 7.43e+00  -1.0 2.76e+01    -  7.30e-01 3.34e-01f  1
>     6  7.9960946e+00 3.57e-02 6.89e-02  -1.0 1.60e+01    -  1.00e+00 1.00e+00f  1
>     7  7.9830592e+00 1.49e-05 4.44e-03  -1.7 1.01e+00    -  1.00e+00 1.00e+00h  1
>     8  7.9829901e+00 2.69e-08 6.90e-05  -3.8 2.66e-01    -  9.84e-01 1.00e+00h  1
>     9  7.9758753e+00 5.48e-04 7.65e-03  -5.7 2.24e+01    -  1.09e-01 1.00e+00f  1
> iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
>    10  7.9654460e+00 1.25e-03 4.39e-03  -5.7 2.20e+01    -  3.39e-01 1.00e+00h  1
>    11  7.9650046e+00 7.57e-08 8.18e-05  -5.7 1.71e-03    -  1.00e+00 1.00e+00h  1
>    12  7.9645656e+00 1.86e-06 1.22e-04  -5.7 4.99e-01    -  7.80e-01 9.60e-01f  1
>    13  7.9619671e+00 5.92e-05 1.60e-04  -5.7 9.25e+01    -  3.52e-02 2.33e-02f  1
>    14  7.9602161e+00 9.25e-05 1.84e-04  -5.7 8.94e+01    -  1.08e-01 1.79e-02f  1
>    15  7.9490928e+00 2.01e-03 5.78e-04  -5.7 8.53e+01    -  3.00e-01 1.28e-01f  1
>    16  7.9484272e+00 1.30e-07 2.00e-01  -5.7 1.99e-01    -  1.00e+00 1.00e+00f  1
>    17  7.9457169e+00 1.68e-04 1.70e-01  -5.7 7.55e+01    -  1.50e-01 4.02e-02f  1
>    18  7.9329163e+00 4.45e-03 8.87e-02  -5.7 7.74e+01    -  4.74e-01 1.82e-01f  1
>    19  7.9167068e+00 1.11e-02 7.65e-02  -5.7 8.62e+01    -  1.36e-01 1.57e-01f  1
> 
> 
> and of the ‘last ones’
> 
> iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
> 307850  7.6043552e+00 1.22e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307851  7.6043549e+00 1.20e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307852  7.6043546e+00 1.23e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307853  7.6043543e+00 1.16e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307854  7.6043540e+00 1.23e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307855  7.6043538e+00 1.19e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307856  7.6043535e+00 1.18e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307857  7.6043532e+00 1.20e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307858  7.6043529e+00 1.21e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307859  7.6043527e+00 1.21e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
> 307860  7.6043524e+00 1.21e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307861  7.6043521e+00 1.18e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307862  7.6043518e+00 1.18e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307863  7.6043515e+00 1.22e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307864  7.6043513e+00 1.22e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307865  7.6043510e+00 1.18e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307866  7.6043507e+00 1.23e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307867  7.6043504e+00 1.15e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307868  7.6043502e+00 1.26e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 307869  7.6043499e+00 1.13e-12 1.29e-04  -5.7 1.29e-04    -  1.00e+00 1.00e+00h  1
> 
> Also, here is the content of the .opt file
> 
> hessian_approximation limited-memory
> 
> Do you have any idea of how to fix this?
> 
> Thank you
> Best,
> Michele
> 
> 
> 
> 
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_ipopt&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=oVF37nZa6pcUH-GHd7yBlAWiF-_ukNzs7U7r2jOUSuE&s=XXuxo83GV6UkEjubQnu13rT7cxVrXyqF1IgCxFIWUX4&e=
> 


-- 
http://www.gams.com/~stefan



More information about the Ipopt mailing list