[][src]Trait totsu::socp::SOCP

pub trait SOCP {
    fn solve_socp<L>(
        &mut self,
        param: &PDIPMParam,
        log: &mut L,
        vec_f: &Mat,
        mat_g: &[Mat],
        vec_h: &[Mat],
        vec_c: &[Mat],
        scl_d: &[FP],
        mat_a: &Mat,
        vec_b: &Mat
    ) -> Result<Mat, String>
    where
        L: Write
; }

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 {\bf R}^n \)
  • \( f \in {\bf R}^n \)
  • \( G_i \in {\bf R}^{n_i \times n} \), \( h_i \in {\bf R}^{n_i} \), \( c_i \in {\bf R}^n \), \( d_i \in {\bf R} \)
  • \( A \in {\bf R}^{p \times n} \), \( b \in {\bf R}^p \).

Internally an approximately equivalent problem is formed and an auxiliary variable \( s \in {\bf R}^m \) is introduced for the infeasible start method as follows: \[ \begin{array}{lll} {\rm minimize}_{x,s} & f^T x \
{\rm subject \ to} & {\| G_i x + h_i \|_2^2 \over s_i} \le s_i & (i = 0, \ldots, m - 1) \
& s_i \ge \epsilon_{\rm bd} & (i = 0, \ldots, m - 1) \
& c_i^T x + d_i = s_i & (i = 0, \ldots, m - 1) \
& A x = b, \end{array} \] where \( \epsilon_{\rm bd} > 0 \) indicates the extent of approximation that excludes \( c_i^T x + d_i = 0 \) boundary.

Required methods

fn solve_socp<L>(
    &mut self,
    param: &PDIPMParam,
    log: &mut L,
    vec_f: &Mat,
    mat_g: &[Mat],
    vec_h: &[Mat],
    vec_c: &[Mat],
    scl_d: &[FP],
    mat_a: &Mat,
    vec_b: &Mat
) -> Result<Mat, String> where
    L: Write

Loading content...

Implementors

impl SOCP for PDIPM[src]

fn solve_socp<L>(
    &mut self,
    param: &PDIPMParam,
    log: &mut L,
    vec_f: &Mat,
    mat_g: &[Mat],
    vec_h: &[Mat],
    vec_c: &[Mat],
    scl_d: &[FP],
    mat_a: &Mat,
    vec_b: &Mat
) -> Result<Mat, String> where
    L: Write
[src]

Runs the solver with given parameters.

Returns Ok with optimal \(x\) or Err with message string.

  • param is solver parameters.
  • log outputs solver progress.
  • vec_f is \(f\).
  • mat_g is \(G_0, \ldots, G_{m-1}\).
  • vec_h is \(h_0, \ldots, h_{m-1}\).
  • vec_c is \(c_0, \ldots, c_{m-1}\).
  • scl_d is \(d_0, \ldots, d_{m-1}\).
  • mat_a is \(A\).
  • vec_b is \(b\).
Loading content...