IPOPT termination criteria ignored

153 views
Skip to first unread message

Stefan ten Eikelder

unread,
Dec 4, 2018, 5:26:18 AM12/4/18
to OPTI Toolbox Forum

Hi,


I am having trouble setting the termination criteria for the IPOPT solver for my NLP. Currently, I can set the following options:


ip_opts = ipoptset('dual_inf_tol',10^(10));

opts = optiset('solver','ipopt','display','iter','solverOpts',ip_opts);

opts.tolrfun = 10^(10);

 

I then construct the problem

Opt = opti(…,'options',opts)

And call

solve(Opt,x0);

Clearly, the set termination criteria are way too high, but I can still get a solution. It seems to me that the termination criteria (both the 'tolrfun' and the solverOpts criteria) are ignored. The function ‘solveOpti.m’ passes the created ‘opts’ structure to the function solveNLP. The function solveNLP then calls the wrapper opti_ipopt.m, but it does not pass the ‘opts’ structure.

 

I am using Matlab R2018b. I downloaded the latest OPTI master branch on November 26 as a zip file.


Thanks in advance for any help.

Jonathan Currie

unread,
Dec 5, 2018, 2:24:55 AM12/5/18
to stefante...@gmail.com, OPTI Toolbox Forum
Hi,

If you set a break point in opti_ipopt.m at line 32, then run the following statement, you will see something like the below:

>> nlprob.options.ipopt

ans = 

  struct with fields:

             dual_inf_tol: 1.0000e+10
              print_level: 5
                 max_iter: 1500
             max_cpu_time: 1000
                      tol: 1.0000e+10
    hessian_approximation: 'limited-memory'

This is how the options are passed in.

Regarding tolerances, generally either tolafun (absolute) or tolrfun (relative) will be used the convergence criteria. Only specifying one of those may be the issue.

An example of tolrfun in use:

obj = @(x) sin(pi*x(1)/12)*cos(pi*x(2)/16);
nlcon = @(x) 4*x(1)-3*x(2);
nlrhs = 0;
nle = 0;
x0 = [0;0];

opts = optiset('tolrfun',0.1,'display','iter','solver','ipopt');


Opt = opti('obj',obj,'nl',nlcon,0,0,'x0',x0, 'options',opts)

[x,fval,exitflag,info] = solve(Opt)

I hope this helps.

Jonathan

--
You received this message because you are subscribed to the Google Groups "OPTI Toolbox Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opti-toolbox-fo...@googlegroups.com.
To post to this group, send email to opti-tool...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stefan ten Eikelder

unread,
Dec 12, 2018, 8:49:51 AM12/12/18
to OPTI Toolbox Forum
Hi Jonathan,

Thank you for your reply! Do I understand correctly that if I specify both tolrfun and and the IPOPT optimality tolerance (i.e, "ipoptset('dual_inf_tol',10^(10))"), that OPTI takes the minimum of those?

Best,
Stefan
Reply all
Reply to author
Forward
0 new messages