About the sol.solveroutput.lambda

39 views
Skip to first unread message

LIESEA LEUNG

unread,
Aug 20, 2019, 7:21:29 AM8/20/19
to YALMIP
Dear Johan,
I solve the case and i want to get the value of lambda. When I use Gurobi as the solver, I got  ‘Reference to non-existent field’. But when I use the fmincon as the solver, I can get the value of lambda. 
Does the Gurobi algorithm(like QCPdual, Quad) relate to this problem?

Johan Löfberg

unread,
Aug 20, 2019, 9:48:37 AM8/20/19
to YALMIP
If you are asking about how to manually extract duals from a quadratically constrained problem using gurobi, it would be

>> x = sdpvar(2,1);sol = optimize(x'*x <= 1,sum(x),sdpsettings('solver','gurobi','savesolveroutput',1,'gurobi.qcpdual',1));
>> sol.solveroutput.result.qcpi

ans =

   -0.7071



LIESEA LEUNG

unread,
Aug 21, 2019, 10:17:52 PM8/21/19
to YALMIP
Thanks, I check the result struct and the ' result.pi ' is what I want. What does the ' pi ' means?

Johan Löfberg

unread,
Aug 22, 2019, 1:31:34 AM8/22/19
to YALMIP
that's just the name gurobi happens to have on the duals. You would have to read the gurobi documentation on what it returns. this is not yalmip specific
Reply all
Reply to author
Forward
0 new messages