Struct totsu::ProbSOCP

source ·
pub struct ProbSOCP<L: LinAlgEx> { /* private fields */ }
Expand description

Second-order cone program

The problem is \[ \begin{array}{ll} {\rm minimize} & f^T x \\ {\rm subject \ to} & \| G_i x + h_i \|_2 \le c_i^T x + d_i \quad (i = 0, \ldots, m - 1) \\ & A x = b, \end{array} \] where

  • variables \( x \in \mathbb{R}^n \)
  • \( f \in \mathbb{R}^n \)
  • \( G_i \in \mathbb{R}^{n_i \times n},\ h_i \in \mathbb{R}^{n_i},\ c_i \in \mathbb{R}^n,\ d_i \in \mathbb{R} \)
  • \( A \in \mathbb{R}^{p \times n},\ b \in \mathbb{R}^p \).

The representation as a conic linear program is as follows: \[ \begin{array}{ll} {\rm minimize} & f^T x \\ {\rm subject \ to} & \left[ \begin{array}{c} -c_0^T \\ -G_0 \\ \vdots \\ -c_{m - 1}^T \\ -G_{m - 1} \\ A \end{array} \right] x + s = \left[ \begin{array}{c} d_0 \\ h_0 \\ \vdots \\ d_{m - 1} \\ h_{m - 1} \\ b \end{array} \right] \\ & s \in \mathcal{Q}^{1 + n_0} \times \cdots \times \mathcal{Q}^{1 + n_{m - 1}} \times \lbrace 0 \rbrace^p. \end{array} \]

\( \mathcal{Q} \) is a second-order (or quadratic) cone (see ConeSOC).

Implementations§

Creates a SOCP with given data.

Returns the ProbSOCP instance.

  • vec_f is \(f\).
  • mats_g is \(G_0, \ldots, G_{m-1}\).
  • vecs_h is \(h_0, \ldots, h_{m-1}\).
  • vecs_c is \(c_0, \ldots, c_{m-1}\).
  • scls_d is \(d_0, \ldots, d_{m-1}\).
  • mat_a is \(A\).
  • vec_b is \(b\).

Generates the problem data structures to be fed to Solver::solve.

Returns a tuple of operators, a cone and a work slice.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.