Exporting an SDP in an kernel representation

15 views
Skip to first unread message

Tomas Prijmeni

unread,
Mar 9, 2020, 9:25:54 AM3/9/20
to YALMIP
Hello, is it possible to extract the kernel representation (primal) of an SDP problem in YALMIP?
I see there is an "export" function, but can't make heads or tails of the variables.
If I pass in the sdpsettings solver = sedumi, but I get the dual form instead.

As a proof of concept, it would really help if someone could show me on an example, where you
setup an sdp model; extract the variables; and pass them back in as a model in the kernel representation.

I'm imagining something vaguely like the following:

example_objective = ...
example_constraints = ...

[A, C, b] = export(example_objective, example_constraints)

X = sdpvar(...)
primal_objective = trace(C' * X)
primal_constraints = [X >= 0, trace(A(:,1)' * X) == b(:,1), ...]

optimize(primal_objective, primal_constraints)

The test in this case would obviously be, that the solution from the original model and the exported one should agree.

Is something like that possible? Thank you very much!

Johan Löfberg

unread,
Mar 9, 2020, 9:28:02 AM3/9/20
to YALMIP

Tomas Prijmeni

unread,
Mar 9, 2020, 9:33:57 AM3/9/20
to YALMIP
Aha! And that will change the output variables from the "export" function?
Great, thanks, I'll try that! :)

(Also, BTW, wow you are fast with your responses!)
Reply all
Reply to author
Forward
0 new messages