autogenu-jupyter
An automatic code generator and the continuation/GMRES (C/GMRES) based numerical solvers for nonlinear MPC
Loading...
Searching...
No Matches
cgmres::Horizon Class Reference

Horizon of MPC. More...

#include <horizon.hpp>

Public Member Functions

 Horizon (const Scalar Tf, const Scalar alpha=0.0, const Scalar t0=0.0)
 Constructs the horizon. If alpha <= 0.0, then the fixed-length Tf is used. If alpha > 0.0, then the time-varying length Tf * (1.0-exp(-alpha * (t-t0))) is used. More...
 
 Horizon ()=default
 Default constructor. More...
 
 ~Horizon ()=default
 Default destructor. More...
 
Scalar T (const Scalar t) const
 Gets the length of the horizon. More...
 
void reset (const Scalar t0)
 Resets the length of the horizon (for time-varying horizon). More...
 
void disp (std::ostream &os) const
 

Friends

std::ostream & operator<< (std::ostream &os, const Horizon &horizon)
 

Detailed Description

Horizon of MPC.

Constructor & Destructor Documentation

◆ Horizon() [1/2]

cgmres::Horizon::Horizon ( const Scalar  Tf,
const Scalar  alpha = 0.0,
const Scalar  t0 = 0.0 
)
inline

Constructs the horizon. If alpha <= 0.0, then the fixed-length Tf is used. If alpha > 0.0, then the time-varying length Tf * (1.0-exp(-alpha * (t-t0))) is used.

Parameters
[in]TfThe parameter of the horizon length. Must be positive.
[in]alphaThe parameter of the time-varying horizon length. Default is 0.0 (i.e., fixed-length horizon).
[in]t0The parameter of the time-varying horizon length. Default is 0.0.

◆ Horizon() [2/2]

cgmres::Horizon::Horizon ( )
default

Default constructor.

◆ ~Horizon()

cgmres::Horizon::~Horizon ( )
default

Default destructor.

Member Function Documentation

◆ disp()

void cgmres::Horizon::disp ( std::ostream &  os) const
inline

◆ reset()

void cgmres::Horizon::reset ( const Scalar  t0)
inline

Resets the length of the horizon (for time-varying horizon).

Parameters
[in]t0The parameter of the time-varying horizon length.

◆ T()

Scalar cgmres::Horizon::T ( const Scalar  t) const
inline

Gets the length of the horizon.

Parameters
[in]tThe initial time of the horizon. If this horizon is time-varying (i.e., alpha > 0.0), then this value must not be less than t0.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Horizon horizon 
)
friend

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