nmpc_cgmres
Public Types | Public Member Functions | Public Attributes | List of all members
nmpc_cgmres::CgmresProblem Class Referenceabstract

C/GMRES problem. More...

#include <CgmresProblem.h>

Public Types

using RefFunc = std::function< void(double, Eigen::Ref< Eigen::VectorXd >)>
 Type of function to return reference state. More...
 

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW CgmresProblem ()
 Constructor. More...
 
virtual void stateEquation (double t, const Eigen::Ref< const Eigen::VectorXd > &x, const Eigen::Ref< const Eigen::VectorXd > &u, Eigen::Ref< Eigen::VectorXd > dotx)=0
 Calculate the state equation. More...
 
virtual void costateEquation (double t, const Eigen::Ref< const Eigen::VectorXd > &lmd, const Eigen::Ref< const Eigen::VectorXd > &xu, Eigen::Ref< Eigen::VectorXd > dotlmd)=0
 Calculate the costate equation. More...
 
virtual void calcDphiDx (double t, const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::Ref< Eigen::VectorXd > DphiDx)=0
 Calculate $ \frac{\partial \phi}{\partial x} $. More...
 
virtual void calcDhDu (double t, const Eigen::Ref< const Eigen::VectorXd > &x, const Eigen::Ref< const Eigen::VectorXd > &u, const Eigen::Ref< const Eigen::VectorXd > &lmd, Eigen::Ref< Eigen::VectorXd > DhDu)=0
 Calculate $ \frac{\partial h}{\partial u} $. More...
 
virtual void dumpData (std::ofstream &ofs)
 Dump model parameters. More...
 

Public Attributes

int dim_x_
 
int dim_u_
 
int dim_c_
 
int dim_uc_
 
Eigen::VectorXd state_eq_param_
 
Eigen::VectorXd x_initial_
 
Eigen::VectorXd u_initial_
 
const Eigen::IOFormat vecfmt_dump_ = Eigen::IOFormat(Eigen::StreamPrecision, 0, ", ", ", ", "", "", "", "")
 

Detailed Description

C/GMRES problem.

Definition at line 14 of file CgmresProblem.h.

Member Typedef Documentation

◆ RefFunc

using nmpc_cgmres::CgmresProblem::RefFunc = std::function<void(double, Eigen::Ref<Eigen::VectorXd>)>

Type of function to return reference state.

Definition at line 18 of file CgmresProblem.h.

Constructor & Destructor Documentation

◆ CgmresProblem()

EIGEN_MAKE_ALIGNED_OPERATOR_NEW nmpc_cgmres::CgmresProblem::CgmresProblem ( )
inline

Constructor.

Definition at line 24 of file CgmresProblem.h.

Member Function Documentation

◆ calcDhDu()

virtual void nmpc_cgmres::CgmresProblem::calcDhDu ( double  t,
const Eigen::Ref< const Eigen::VectorXd > &  x,
const Eigen::Ref< const Eigen::VectorXd > &  u,
const Eigen::Ref< const Eigen::VectorXd > &  lmd,
Eigen::Ref< Eigen::VectorXd >  DhDu 
)
pure virtual

Calculate $ \frac{\partial h}{\partial u} $.

◆ calcDphiDx()

virtual void nmpc_cgmres::CgmresProblem::calcDphiDx ( double  t,
const Eigen::Ref< const Eigen::VectorXd > &  x,
Eigen::Ref< Eigen::VectorXd >  DphiDx 
)
pure virtual

Calculate $ \frac{\partial \phi}{\partial x} $.

◆ costateEquation()

virtual void nmpc_cgmres::CgmresProblem::costateEquation ( double  t,
const Eigen::Ref< const Eigen::VectorXd > &  lmd,
const Eigen::Ref< const Eigen::VectorXd > &  xu,
Eigen::Ref< Eigen::VectorXd >  dotlmd 
)
pure virtual

Calculate the costate equation.

◆ dumpData()

virtual void nmpc_cgmres::CgmresProblem::dumpData ( std::ofstream &  ofs)
inlinevirtual

Dump model parameters.

Definition at line 51 of file CgmresProblem.h.

◆ stateEquation()

virtual void nmpc_cgmres::CgmresProblem::stateEquation ( double  t,
const Eigen::Ref< const Eigen::VectorXd > &  x,
const Eigen::Ref< const Eigen::VectorXd > &  u,
Eigen::Ref< Eigen::VectorXd >  dotx 
)
pure virtual

Calculate the state equation.

Member Data Documentation

◆ dim_c_

int nmpc_cgmres::CgmresProblem::dim_c_

Definition at line 59 of file CgmresProblem.h.

◆ dim_u_

int nmpc_cgmres::CgmresProblem::dim_u_

Definition at line 58 of file CgmresProblem.h.

◆ dim_uc_

int nmpc_cgmres::CgmresProblem::dim_uc_

Definition at line 60 of file CgmresProblem.h.

◆ dim_x_

int nmpc_cgmres::CgmresProblem::dim_x_

Definition at line 57 of file CgmresProblem.h.

◆ state_eq_param_

Eigen::VectorXd nmpc_cgmres::CgmresProblem::state_eq_param_

Definition at line 62 of file CgmresProblem.h.

◆ u_initial_

Eigen::VectorXd nmpc_cgmres::CgmresProblem::u_initial_

Definition at line 65 of file CgmresProblem.h.

◆ vecfmt_dump_

const Eigen::IOFormat nmpc_cgmres::CgmresProblem::vecfmt_dump_ = Eigen::IOFormat(Eigen::StreamPrecision, 0, ", ", ", ", "", "", "", "")

Definition at line 67 of file CgmresProblem.h.

◆ x_initial_

Eigen::VectorXd nmpc_cgmres::CgmresProblem::x_initial_

Definition at line 64 of file CgmresProblem.h.


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