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§
Source§impl<L: LinAlgEx> ProbLP<L>
impl<L: LinAlgEx> ProbLP<L>
Sourcepub fn new(
vec_c: MatBuild<L>,
mat_g: MatBuild<L>,
vec_h: MatBuild<L>,
mat_a: MatBuild<L>,
vec_b: MatBuild<L>,
) -> Self
pub fn new( vec_c: MatBuild<L>, mat_g: MatBuild<L>, vec_h: MatBuild<L>, mat_a: MatBuild<L>, vec_b: MatBuild<L>, ) -> Self
Creates a LP with given data.
Returns the ProbLP instance.
vec_cis \(c\).mat_gis \(G\).vec_his \(h\).mat_ais \(A\).vec_bis \(b\).
Sourcepub fn problem(
&mut self,
) -> (ProbLPOpC<'_, L>, ProbLPOpA<'_, L>, ProbLPOpB<'_, L>, ProbLPCone<L>, &mut [L::F])
pub fn problem( &mut self, ) -> (ProbLPOpC<'_, L>, ProbLPOpA<'_, L>, ProbLPOpB<'_, L>, ProbLPCone<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.
Auto Trait Implementations§
impl<L> Freeze for ProbLP<L>
impl<L> RefUnwindSafe for ProbLP<L>
impl<L> Send for ProbLP<L>
impl<L> Sync for ProbLP<L>
impl<L> Unpin for ProbLP<L>
impl<L> UnwindSafe for ProbLP<L>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more