This is a package for solving semidefinite programming (SDP) problems.
Given symmetric matrices C, Ai and a vector b, the primal SDP problem is
and the dual SDP problem is
We can construct a semidefinite program using the method sdp.
i1 : P = sdp(matrix{{1,0},{0,2}}, matrix{{0,1},{1,0}}, matrix{{-1}}) o1 = SDP{A => 1 : (| 0 1 |)} | 1 0 | b => | -1 | C => | 1 0 | | 0 2 | o1 : SDP |
The semidefinite program can be solved numerically using the method optimize.
i2 : (X,y,Z,stat) = optimize P; |
i3 : (X,y) o3 = (| .707109 -.5 |, | -1.41421 |) | -.5 .353555 | o3 : Sequence |
See Solver for a discussion of the available SDP solvers. The method refine can be used to improve the precision of the solution.
In small cases it is possible to solve the SDP symbolically, by forming the ideal of critical equations.
i4 : (I,X,y,Z) = criticalIdeal P; |
i5 : radical I 2 o5 = ideal (- 4x - y , - 2x - 1, - 2x - y , - y + 2) 2 0 1 0 0 0 o5 : Ideal of QQ[x , x , x , y ] 0 1 2 0 |