Struct totsu::ProbLP

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

Linear program

The problem is \[ \begin{array}{ll} {\rm minimize} & c^Tx + d \\ {\rm subject \ to} & G x \preceq h \\ & A x = b, \end{array} \] where

  • variables \( x \in \mathbb{R}^n \)
  • \( c \in \mathbb{R}^n,\ d \in \mathbb{R} \)
  • \( G \in \mathbb{R}^{m \times n},\ h \in \mathbb{R}^m \)
  • \( A \in \mathbb{R}^{p \times n},\ b \in \mathbb{R}^p \).

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

The representation as a conic linear program is as follows: \[ \begin{array}{ll} {\rm minimize} & c^Tx \\ {\rm subject \ to} & \left[ \begin{array}{c} G \\ A \end{array} \right] x + s = \left[ \begin{array}{c} h \\ b \end{array} \right] \\ & s \in \mathbb{R}_+^m \times \lbrace 0 \rbrace^n. \end{array} \]

Implementations§

Creates a LP with given data.

Returns the ProbLP instance.

  • vec_c is \(c\).
  • mat_g is \(G\).
  • vec_h is \(h\).
  • 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.