Optimo  0.1.0
A C++ header library for optimization
 All Classes Functions Variables Pages
optimo::solvers::PrimalDualLP< Scalar, n, m, p > Class Template Reference

Solves a constrained linear program (LP) More...

#include <primal_dual_lp_api.h>

Inheritance diagram for optimo::solvers::PrimalDualLP< Scalar, n, m, p >:
optimo::solvers::Solver< Scalar >

Classes

struct  Params
 Linear Program (LP) Parameters defining the problem. More...
 

Public Member Functions

TERMINATION_TYPE operator() (const Params &params, Matrix< Scalar, Dynamic, 1 > *y, Scalar *min_value)
 Solves the LP program defined in params.
 

Additional Inherited Members

- Public Attributes inherited from optimo::solvers::Solver< Scalar >
struct
optimo::solvers::Solver::Options 
options
 Solver parameters.
 

Detailed Description

template<typename Scalar, uint n, uint m, uint p>
class optimo::solvers::PrimalDualLP< Scalar, n, m, p >

Solves a constrained linear program (LP)

Solves the following constrained Linear Program (LP):

\begin{eqnarray*} \underset{\mathbf{x}}{\text{minimize}} & \mathbf{c}^T \mathbf{x} & \\ \text{subject to} & & \\ A_{\text{in}} \mathbf{x} & \leq & \mathbf{b}_{\text{in}} \\ A_{\text{eq}} \mathbf{x} & = & \mathbf{b}_{\text{eq}} \\ \end{eqnarray*}

where \(A_{\text{in}} \in \mathbb{R}^{m \times n} \), \(A_{\text{eq}} \in \mathbb{R}^{p \times n} \), \(\mathbf{b}_{\text{in}} \in \mathbb{R}^{m}\), \(\mathbf{b}_{\text{eq}} \in \mathbb{R}^{p}\), \(\mathbf{c} \in \mathbb{R}^n\), and \( \mathbf{x} \in \mathbb{R}^n \).

This LP solver implements a primal dual interior point method where

  • n: Number of unkowns
  • m: Number of inequalities
  • p: Number of equalities

This solver is recomended for small problems (n + m + p < 100). For larger problems consider using the SparsePrimalDualLP solver.

The solver requires a vector

\[ \mathbf{y} = \begin{bmatrix} \mathbf{x}^T & \lambda^T & \nu^T \end{bmatrix}^T \]

where the primal and dual variables are stored.


The documentation for this class was generated from the following file: