QRQP: Stopping criteria

669 views
Skip to first unread message

Gerd

unread,
Mar 8, 2021, 6:42:51 AM3/8/21
to CasADi

Hello,
are the following stopping criteria the only ones supported in QRQP:
- min_step_size
- max_iter
- tol_du (Stopping criterion for dual infeasabilit)
- tol_pr (Stopping criterion for primal infeasibilit)

Are there no separate stopping criterias directly for the residuals (e.g. similar to OSQP https://osqp.org/docs/solver/index.html#convergence)?

lu fr

unread,
Mar 9, 2021, 5:25:01 AM3/9/21
to CasADi
Dear Gerd,

just one question refering your post. How can I implement these stoppong criterias?
I tried to do it this way (in MATLAB): 

opti.solver('sqpmethod',struct('qpsol','qrqp','max_iter',5000));

but it's not working? When I make seperate structs it's not working either.

Best, Lukas

Gerd

unread,
Mar 9, 2021, 5:39:43 AM3/9/21
to CasADi
I pass them to the solver the following way (MATLAB syntax):
        opt = struct;
        opt.min_step_size = 1e-9;
        opt.max_iter = 100;
        opt.tol_du = 1e-9;
        opt.tol_pr = 1e-9;
        opt.qpsol = 'qrqp';
        optimizer = nlpsol('optimizer','sqpmethod',nlp,opt);   % generating the solver
 
        sol = optimizer('x0',x,'ubg',0,'lbg',0,'p',para);   % calculating the solution

lu fr

unread,
Mar 9, 2021, 6:03:01 AM3/9/21
to CasADi
Thanks for your fast reply! 
Unfortunately, this does not seem to work for me. I am also using the optistack however and with this code it does not take these properties into account:

opts = struct;
opts.max_iter = 100;
opts.qpsol = 'qrqp';
opti.solver('sqpmethod',opts);
sol = opti.solve();

Do you have any idea why?

Joris Gillis

unread,
Mar 12, 2021, 4:47:38 PM3/12/21
to CasADi
Dear Lukas,

The code you gave should be affecting the number of sqp iterations.
opti = Opti();
x=opti.variable();
opti.minimize((x-1)^20);
opts = struct;
opts.max_iter = 10;

opts.qpsol = 'qrqp';
opti.solver('sqpmethod',opts);
sol = opti.solve_limited();


If you want to set options on the qpsolver, you need an extra layer:
opts.qpsol_options.max_iter= 100;

Best regards,
  Joris

Joris Gillis

unread,
Mar 12, 2021, 4:49:05 PM3/12/21
to CasADi
Dear Gerd,

Perhaps you can convince Joel to add some?

Best regards,
  Joris
Reply all
Reply to author
Forward
0 new messages