Optimo  0.1.0
A C++ header library for optimization
 All Classes Functions Variables Pages
optimo::solvers::SparsePrimalDualLP< Scalar > Class Template Reference

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

#include <sparse_primal_dual_lp_api.h>

Inheritance diagram for optimo::solvers::SparsePrimalDualLP< Scalar >:
optimo::solvers::Solver< Scalar >

Classes

class  Params
 Sparse LP params. More...
 

Public Member Functions

TERMINATION_TYPE operator() (Params *params, Matrix< Scalar, Dynamic, 1 > *y, Scalar *min_value)
 Solves the LP problem. More...
 

Additional Inherited Members

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

Detailed Description

template<typename Scalar = double>
class optimo::solvers::SparsePrimalDualLP< Scalar >

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

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.

Member Function Documentation

template<typename Scalar = double>
TERMINATION_TYPE optimo::solvers::SparsePrimalDualLP< Scalar >::operator() ( Params params,
Matrix< Scalar, Dynamic, 1 > *  y,
Scalar *  min_value 
)

Solves the LP problem.

Parameters
paramsLP parameters
yVector of unkowns
min_valueMinimum value

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