This method solves a semidefinite programming problem. There is an interface to the solvers CSDP, SDPA and MOSEK. The default solver is CSDP, which is preinstalled with Macaulay2. Alternatively, there is rudimentary dual interior point method implemented entirely in Macaulay2 language.
i1 : P = sdp(matrix{{1,0},{0,2}}, matrix{{0,1},{1,0}}, matrix{{-1}}); |
i2 : (X,y,Z) = optimize P; Executing CSDP Input file: /tmp/M2-4741-0/4.dat-s Output file: /tmp/M2-4741-0/5 Status: SDP solved, primal-dual feasible |
i3 : y o3 = | -1.41421 | 1 1 o3 : Matrix RR <--- RR 53 53 |
References: Convex Optimization, Boyd, Vandenberghe, Cambridge University Press (2004), pp. 618-619, pp. 463-466
The "M2" solver might fail if the dual problem is not strictly feasible. It also does not return the primal solution.