A MATLAB implementation of a quadratic-cone relaxation-based algorithm for semidefinite programming (https://arxiv.org/abs/1410.6734).
Files:
-
test.m
A test script. Calls
generateProblem
to randomly generate a test SDP and callsQCRBASDP
, the main function, to solve the generated SDP. -
generateProblem.m
Generates an SDP instance with variable X that is an nxn symmetric matrix, with m constraints.
- Inputs:
- m = number of constraints
- n = number of rows/columns of the decision variable X
- a = specifies the seed for the first pseudorandom number generator.
- Outputs:
- data for the SDP instance: A in R^(m x N), b in R^m, c in R^N (Note: N = n*(n+1)/2)
- seed = a record of all seeds for the randomly generated entries
- Inputs:
-
QCRBASDP.m
A "Quadratic Cone Relaxation-Based Algorithm for SDP".
- Solves: Min trace(CX), st. trace(A_iX) = b, X in S^(nxn)
- Inputs:
- data: A_i in S^(nxn), b in R^m, C in S^(nxn);
- initial iterate: E0 in S^(nxn);
- maxIt = max num of iterations;
- dualityGapBound = terminating condition
- Outputs:
- XOpt = final opt solution iterate;
- E = final center direction iterate;
- xOptVec = sequence of all symvec(XOpt)'s
- EVec = sequence of all E's
- val = final objective value
- exitFlag = 0: Optimal solution found; -1: Stops because reaches max number of iterations; -2: within the max number of iterations but duality gap is negative; -3: Else
- Calls QPSolve2 to solve subproblems
-
QPSolve2.m
- Solves QP(E, r): min trace(CX), s.t. trace(A_i, X) = b_i; trace(E^{-1/2}XE^{-1/2})^2 - r^2||E^{-1/2}XE^{-1/2}||^2 >= 0
- Inputs:
- data: A in R^(m x N), b in R^m, c in R^N (Note: N = n*(n+1)/2)
- cone-width parameter: r in (0, 1)
- initial iterate: e = a strictly feasible solution to the main SDP
- Outputs:
- xOpt = the optimal solution
- val = the value of the optimal solution
- solutionExists = true if the input problem to QPSolve2 has an optimal solution
-
initialize.m
- Finds a strictly feasible solution to the main SDP, by finding the analytic center of the feasible region. Uses CVX
- Inputs: Data: A in R^(m x N), b in R^m (Note: N = n*(n+1)/2 )
- Output: e = a strictly feasible solution to the main SDP
-
symvec.m
- Converts an nxn symmetric matrix into a vector in R^N, where N = n*(n+1)/2
- Input: A = an nxn symmetric matrix
- Output: v = a vector in R^N
-
symvecinv.m
- Converts a vector in R^N into an nxn symmetric matrix, where N = n*(n+1)/2
- Input: v = a vector in R^N
- Output: A = an nxn symmetric matrix