solvesos type diagnostics from optimize or optimizer?

51 views
Skip to first unread message

gyi

unread,
Nov 24, 2014, 11:18:15 AM11/24/14
to yal...@googlegroups.com
Is it possible to get diagnostics (sol), Q, or residuals from optimize and/or optimizer as I am able to do from solvesos?

[sol,m,Q,residuals,everything] = solvesos(F,obj,options,params,candidateMonomials)

Thanks.

Johan Löfberg

unread,
Nov 24, 2014, 11:21:49 AM11/24/14
to yal...@googlegroups.com
No

Johan Löfberg

unread,
Nov 24, 2014, 11:22:33 AM11/24/14
to yal...@googlegroups.com
well, diagnostics of  course, as it is the seond output from the optimzer call as always

gyi

unread,
Nov 24, 2014, 11:29:31 AM11/24/14
to yal...@googlegroups.com
I suppose I can find residuals manually using  check?

Johan Löfberg

unread,
Nov 24, 2014, 12:48:08 PM11/24/14
to yal...@googlegroups.com
No, the internal structures are not updated when optimizer is used (it does as little as possible while still trying to return the data you say you are interested in). You would have to do some pretty advanced programming

sdpvar x t a
p
= x^2-a*x; % Check lower bound of this w.r.t a
[F,obj,monoms,etc] = compilesos(sos(p-t),-t,sdpsettings('sos.model',2,'sos.scale',0),[a;t]);
sossolver
= optimizer(F,obj,sdpsettings('solver','mosek'),a,{t,etc.BlockedQ{1}{1}});
sol
= sossolver{0};
coefficients
(replace(p,a,0)-sol{1})-monoms{1}'*sol{2}'*monoms{1},x)


Reply all
Reply to author
Forward
0 new messages