Rdsdp::dsdp | R Documentation |
Interface to DSDP semidefinite programming library.
dsdp(A,b,C,K,OPTIONS=NULL)
A |
An object of class |
b |
A numeric vector of length |
C |
An object of class |
K |
Describes the sizes of each block of the sdp problem. It is a list with the following elements:
|
OPTIONS |
A list of OPTIONS parameters passed to dsdp. It may contain any of the following fields: |
= k
to display output at each k iteration, else = 0 [default 10].
= 1
print timing information if set to 1.
to set the filename to save solution file in SDPA format.
= 1
to output full information about the solution statistics in STATS.
tolerance for duality gap as a fraction of the value of the objective functions [default 1e-6].
maximum number of iterations allowed [default 1000].
Please refer to DSDP User Guide for additional OPTIONS parameters available.
All problem matrices are assumed to be of block diagonal structure, the input matrix A
must be specified as follows:
The coefficients for nonnegative cone block are put in the first K$l
columns of A
.
The coefficients for positive semidefinite cone blocks are put after nonnegative cone block in the the same order as those in K$s
.
The i
th positive semidefinite cone block takes (K$s)[i]
times (K$s)[[i]]
columns, with each row defining
a symmetric matrix of size (K$s)[[i]]
.
This function does not check for symmetry in the problem data.
Returns a list of three objects:
X |
Optimal primal solution |
y |
Optimal dual solution |
STATS |
A list with three to eight fields that describe the solution of the problem:
The last five fields are optional, and only available when |
Steven J. Benson and Yinyu Ye:
DSDP5 User Guide — Software for Semidefinite Programming Technical Report ANL/MCS-TM-277, 2005
https://www.mcs.anl.gov/hs/software/DSDP/DSDP5-Matlab-UserGuide.pdf
K=NULL
K$s=c(2,3)
K$l=2
C=matrix(c(0,0,2,1,1,2,c(3,0,1,
0,2,0,
1,0,3)),1,15,byrow=TRUE)
A=matrix(c(0,1,0,0,0,0,c(3,0,1,
0,4,0,
1,0,5),
1,0,3,1,1,3,rep(0,9)), 2,15,byrow=TRUE)
b <- c(1,2)
OPTIONS=NULL
OPTIONS$gaptol=0.000001
OPTIONS$logsummary=0
OPTIONS$outputstats=1
result = dsdp(A,b,C,K,OPTIONS)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.