[][src]Trait totsu::qp::QP

pub trait QP {
    fn solve_qp<L>(
        &mut self,
        param: &PDIPMParam,
        log: &mut L,
        mat_p: &Mat,
        vec_q: &Mat,
        mat_g: &Mat,
        vec_h: &Mat,
        mat_a: &Mat,
        vec_b: &Mat
    ) -> Result<Mat, String>
    where
        L: Write
; }

Quadratic program

The problem is \[ \begin{array}{ll} {\rm minimize} & {1 \over 2} x^T P x + q^T x + r \
{\rm subject \ to} & G x \preceq h \
& A x = b, \end{array} \] where

  • variables \( x \in {\bf R}^n \)
  • \( P \in {\bf S}_{+}^n \), \( q \in {\bf R}^n \), \( r \in {\bf R} \)
  • \( G \in {\bf R}^{m \times n} \), \( h \in {\bf R}^m \)
  • \( A \in {\bf R}^{p \times n} \), \( b \in {\bf R}^p \).

Internally a slack variable \( s \in {\bf R} \) is introduced for the infeasible start method as follows: \[ \begin{array}{ll} {\rm minimize}_{x,s} & {1 \over 2} x^T P x + q^T x + r \
{\rm subject \ to} & G x \preceq h + s {\bf 1} \
& A x = b \
& s = 0. \end{array} \]

In the following, \( r \) does not appear since it does not matter.

Required methods

fn solve_qp<L>(
    &mut self,
    param: &PDIPMParam,
    log: &mut L,
    mat_p: &Mat,
    vec_q: &Mat,
    mat_g: &Mat,
    vec_h: &Mat,
    mat_a: &Mat,
    vec_b: &Mat
) -> Result<Mat, String> where
    L: Write

Loading content...

Implementors

impl QP for PDIPM[src]

fn solve_qp<L>(
    &mut self,
    param: &PDIPMParam,
    log: &mut L,
    mat_p: &Mat,
    vec_q: &Mat,
    mat_g: &Mat,
    vec_h: &Mat,
    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.
  • mat_p is \(P\).
  • vec_q is \(q\).
  • mat_g is \(G\).
  • vec_h is \(h\).
  • mat_a is \(A\).
  • vec_b is \(b\).
Loading content...