pub struct ProbSDP<L: LinAlgEx> { /* private fields */ }
Expand description
Semidefinite program
The problem is \[ \begin{array}{ll} {\rm minimize} & c^Tx \\ {\rm subject \ to} & \sum_{i=0}^{n - 1} x_i F_i + F_n \preceq 0 \\ & A x = b, \end{array} \] where
- variables \( x \in \mathbb{R}^n \)
- \( c \in \mathbb{R}^n \)
- \( F_j \in \mathcal{S}^k \) for \( j = 0, \ldots, n \)
- \( A \in \mathbb{R}^{p \times n},\ b \in \mathbb{R}^p \).
This is already a conic problem and can be reformulated as follows: \[ \begin{array}{ll} {\rm minimize} & c^Tx \\ {\rm subject \ to} & \left[ \begin{array}{ccc} {\rm vec}(F_0) & \cdots & {\rm vec}(F_{n - 1}) \\ & A & \end{array} \right] x + s = \left[ \begin{array}{c} -{\rm vec}(F_n) \\ b \end{array} \right] \\ & s \in {\rm vec}(\mathcal{S}_+^k) \times \lbrace 0 \rbrace^p. \end{array} \]
\( {\rm vec}(X) = (X_{11}\ \sqrt2 X_{12}\ X_{22}\ \sqrt2 X_{13}\ \sqrt2 X_{23}\ X_{33}\ \cdots)^T \)
which extracts and scales the upper-triangular part of a symmetric matrix X in column-wise.
ConePSD
is used for \( {\rm vec}(\mathcal{S}_+^k) \).
Implementations§
source§impl<L: LinAlgEx> ProbSDP<L>
impl<L: LinAlgEx> ProbSDP<L>
sourcepub fn new(
vec_c: MatBuild<L>,
syms_f: Vec<MatBuild<L>>,
mat_a: MatBuild<L>,
vec_b: MatBuild<L>,
eps_zero: L::F
) -> Self
pub fn new(
vec_c: MatBuild<L>,
syms_f: Vec<MatBuild<L>>,
mat_a: MatBuild<L>,
vec_b: MatBuild<L>,
eps_zero: L::F
) -> Self
Creates a SDP with given data.
Returns a ProbSDP
instance.
vec_c
is \(c\).syms_f
is \(F_0, \ldots, F_n\) each of which shall belong toMatType::SymPack
.mat_a
is \(A\).vec_b
is \(b\).eps_zero
should be the same value astotsu_core::solver::SolverParam::eps_zero
.
sourcepub fn problem(
&mut self
) -> (ProbSDPOpC<'_, L>, ProbSDPOpA<'_, L>, ProbSDPOpB<'_, L>, ProbSDPCone<'_, L>, &mut [L::F])
pub fn problem(
&mut self
) -> (ProbSDPOpC<'_, L>, ProbSDPOpA<'_, L>, ProbSDPOpB<'_, L>, ProbSDPCone<'_, L>, &mut [L::F])
Generates the problem data structures to be fed to Solver::solve
.
Returns a tuple of operators, a cone and a work slice.