module Sdpa:sig
..end
Interface towards SDPA{,-GMP}.
SDPA is a semidefinite programming optimization procedure. You may be interested in the slightly higher level interface Sdp.
See Sdp for definition of SDP with primal and dual.
typematrix =
(int * int * float) list
Matrices. Sparse representation as triplet (i, j, x)
meaning
that the coefficient at line i
>= 0 and column j
>= 0 has
value x
. All forgotten coefficients are assumed to be
0.0
. Since matrices are symmetric, only the lower triangular
part (j <= i) must be given. No duplicates are allowed.
typeblock_diag_matrix =
(int * matrix) list
Block diagonal matrices (sparse representation, forgetting null
blocks). For instance, [(1, m1), (3, m2)]
will be transformed
into [m1; 0; m2]
. No duplicates are allowed. There is no
requirement for indices to be sorted.
type
solver =
| |
Sdpa |
| |
SdpaGmp |
| |
SdpaDd |
type
options = {
|
solver : |
(* | default: Sdpa | *) |
|
verbose : |
(* | verbosity level, non negative integer, 0 (default) means no output | *) |
|
max_iteration : |
(* | maxIteration (default: 100) | *) |
|
stop_criterion : |
(* | epsilonStar and epsilonDash (default: 1.0E-7) | *) |
|
initial : |
(* | lambdaStar (default: 1.0E2) | *) |
|
precision : |
(* | precision (only for SDPA-GMP, default: 200) | *) |
}
Options for calling SDPA.
val default : options
Default values above.
val solve : ?options:options ->
?init:(int * float array array) list * float array *
(int * float array array) list ->
block_diag_matrix ->
(block_diag_matrix * float) list ->
SdpRet.t * (float * float) *
((int * float array array) list * float array *
(int * float array array) list)
solve obj constraints
solves the SDP problem: max{ tr(obj X) |
tr(A_1 X) = a_1,..., tr(A_n X) = a_n, X psd } with [(A_1,
a_1);...; (A_n, a_n)]
the constraints
list. It returns both
the primal and dual objective values and a witness for X (primal)
and y and Z (dual, see Sdp). In case of success (or
partial success), the block diagonal matrices returned for X and Z
contain exactly the indices, sorted by increasing order, that
appear in the objective or one of the constraints. Size of each
diagonal block in X or Z is the maximum size appearing for that
block in the objective or one of the constraints. In case of
success (or partial success), the array returned for y has the
same size and same order than the input list of constraints.