nmpc_fmpc
Public Types | Public Member Functions | List of all members
nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim > Class Template Referenceabstract

Fast MPC problem. More...

#include <FmpcProblem.h>

Inheritance diagram for nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >:
Inheritance graph
[legend]
Collaboration diagram for nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >:
Collaboration graph
[legend]

Public Types

using StateDimVector = typename nmpc_ddp::DDPProblem< StateDim, InputDim >::StateDimVector
 Type of vector of state dimension. More...
 
using InputDimVector = typename nmpc_ddp::DDPProblem< StateDim, InputDim >::InputDimVector
 Type of vector of input dimension. More...
 
using IneqDimVector = Eigen::Matrix< double, IneqDim, 1 >
 Type of vector of inequality dimension. More...
 
using StateStateDimMatrix = typename nmpc_ddp::DDPProblem< StateDim, InputDim >::StateStateDimMatrix
 Type of matrix of state x state dimension. More...
 
using InputInputDimMatrix = typename nmpc_ddp::DDPProblem< StateDim, InputDim >::InputInputDimMatrix
 Type of matrix of input x input dimension. More...
 
using StateInputDimMatrix = typename nmpc_ddp::DDPProblem< StateDim, InputDim >::StateInputDimMatrix
 Type of matrix of state x input dimension. More...
 
using InputStateDimMatrix = typename nmpc_ddp::DDPProblem< StateDim, InputDim >::InputStateDimMatrix
 Type of matrix of input x state dimension. More...
 
using IneqStateDimMatrix = Eigen::Matrix< double, IneqDim, StateDim >
 Type of matrix of inequality x state dimension. More...
 
using IneqInputDimMatrix = Eigen::Matrix< double, IneqDim, InputDim >
 Type of matrix of inequality x input dimension. More...
 

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW FmpcProblem (double dt)
 Constructor. More...
 
virtual int ineqDim () const
 Gets the inequality dimension. More...
 
virtual int ineqDim (double) const
 Gets the inequality dimension. More...
 
virtual IneqDimVector ineqConst (double t, const StateDimVector &x, const InputDimVector &u) const =0
 Calculate inequality constraints. More...
 
virtual void calcIneqConstDeriv (double t, const StateDimVector &x, const InputDimVector &u, Eigen::Ref< IneqStateDimMatrix > ineq_const_deriv_x, Eigen::Ref< IneqInputDimMatrix > ineq_const_deriv_u) const =0
 Calculate first-order derivatives of inequality constraints. More...
 

Detailed Description

template<int StateDim, int InputDim, int IneqDim>
class nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >

Fast MPC problem.

Template Parameters
StateDimstate dimension (fixed only)
InputDiminput dimension (fixed or dynamic (i.e., Eigen::Dynamic))
IneqDiminequality dimension (fixed or dynamic (i.e., Eigen::Dynamic))

Definition at line 15 of file FmpcProblem.h.

Member Typedef Documentation

◆ IneqDimVector

template<int StateDim, int InputDim, int IneqDim>
using nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::IneqDimVector = Eigen::Matrix<double, IneqDim, 1>

Type of vector of inequality dimension.

Definition at line 25 of file FmpcProblem.h.

◆ IneqInputDimMatrix

template<int StateDim, int InputDim, int IneqDim>
using nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::IneqInputDimMatrix = Eigen::Matrix<double, IneqDim, InputDim>

Type of matrix of inequality x input dimension.

Definition at line 43 of file FmpcProblem.h.

◆ IneqStateDimMatrix

template<int StateDim, int InputDim, int IneqDim>
using nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::IneqStateDimMatrix = Eigen::Matrix<double, IneqDim, StateDim>

Type of matrix of inequality x state dimension.

Definition at line 40 of file FmpcProblem.h.

◆ InputDimVector

template<int StateDim, int InputDim, int IneqDim>
using nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::InputDimVector = typename nmpc_ddp::DDPProblem<StateDim, InputDim>::InputDimVector

Type of vector of input dimension.

Definition at line 22 of file FmpcProblem.h.

◆ InputInputDimMatrix

template<int StateDim, int InputDim, int IneqDim>
using nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::InputInputDimMatrix = typename nmpc_ddp::DDPProblem<StateDim, InputDim>::InputInputDimMatrix

Type of matrix of input x input dimension.

Definition at line 31 of file FmpcProblem.h.

◆ InputStateDimMatrix

template<int StateDim, int InputDim, int IneqDim>
using nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::InputStateDimMatrix = typename nmpc_ddp::DDPProblem<StateDim, InputDim>::InputStateDimMatrix

Type of matrix of input x state dimension.

Definition at line 37 of file FmpcProblem.h.

◆ StateDimVector

template<int StateDim, int InputDim, int IneqDim>
using nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::StateDimVector = typename nmpc_ddp::DDPProblem<StateDim, InputDim>::StateDimVector

Type of vector of state dimension.

Definition at line 19 of file FmpcProblem.h.

◆ StateInputDimMatrix

template<int StateDim, int InputDim, int IneqDim>
using nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::StateInputDimMatrix = typename nmpc_ddp::DDPProblem<StateDim, InputDim>::StateInputDimMatrix

Type of matrix of state x input dimension.

Definition at line 34 of file FmpcProblem.h.

◆ StateStateDimMatrix

template<int StateDim, int InputDim, int IneqDim>
using nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::StateStateDimMatrix = typename nmpc_ddp::DDPProblem<StateDim, InputDim>::StateStateDimMatrix

Type of matrix of state x state dimension.

Definition at line 28 of file FmpcProblem.h.

Constructor & Destructor Documentation

◆ FmpcProblem()

template<int StateDim, int InputDim, int IneqDim>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::FmpcProblem ( double  dt)
inline

Constructor.

Parameters
dtdiscretization timestep [sec]

Definition at line 51 of file FmpcProblem.h.

Member Function Documentation

◆ calcIneqConstDeriv()

template<int StateDim, int InputDim, int IneqDim>
virtual void nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::calcIneqConstDeriv ( double  t,
const StateDimVector x,
const InputDimVector u,
Eigen::Ref< IneqStateDimMatrix ineq_const_deriv_x,
Eigen::Ref< IneqInputDimMatrix ineq_const_deriv_u 
) const
pure virtual

Calculate first-order derivatives of inequality constraints.

Parameters
ttime [sec]
xstate
uinput
ineq_const_deriv_xfirst-order derivative of inequality constraints w.r.t. state
ineq_const_deriv_ufirst-order derivative of inequality constraints w.r.t. input

◆ ineqConst()

template<int StateDim, int InputDim, int IneqDim>
virtual IneqDimVector nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::ineqConst ( double  t,
const StateDimVector x,
const InputDimVector u 
) const
pure virtual

Calculate inequality constraints.

Parameters
ttime [sec]
xcurrent state
ucurrent input
Returns
inequality constraints that must be less than or equal to zero

◆ ineqDim() [1/2]

template<int StateDim, int InputDim, int IneqDim>
virtual int nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::ineqDim ( ) const
inlinevirtual

Gets the inequality dimension.

Note
If inequality dimension is dynamic, this must not be called. Instead, ineqDim(t) must be called passing time as a parameter.

Definition at line 62 of file FmpcProblem.h.

◆ ineqDim() [2/2]

template<int StateDim, int InputDim, int IneqDim>
virtual int nmpc_fmpc::FmpcProblem< StateDim, InputDim, IneqDim >::ineqDim ( double  ) const
inlinevirtual

Gets the inequality dimension.

Parameters
ttime
Note
If inequality dimension is dynamic, this must be overridden.

Definition at line 75 of file FmpcProblem.h.


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