Interface for a state simulator structure that performs numerical integration of not-closed-form state variables. More...
#include <state_sim.h>
Public Member Functions | |
virtual void | advance (double _arc)=0 |
Performs one simulation step to parametrized arc length _arc. More... | |
virtual void | advanceSet0 (const double &_tEnd, const double &_dt) |
virtual StateSimUPtr | cloneStateSim () const =0 |
Clone-to-base-class-ptr function. More... | |
StateSim & | operator= (const StateSim &)=default |
StateSim & | operator= (StateSim &&)=delete |
virtual ParamFuncs * | paramFuncs ()=0 |
Returns (if applicable) reference of the parametric functions structure. Otherwise returns nullptr. More... | |
virtual ParamFuncsDist * | paramFuncsDist ()=0 |
Returns (if applicable) reference of the parametric functions distance-extended structure. Otherwise returns nullptr. More... | |
virtual void | setDiscrType (const RungeKutta::DiscretizationType &_discrType)=0 |
Set discretization type used in the simulation. More... | |
virtual void | setState (StateSPtr &_otherState)=0 |
Sets the state variables to the values of _otherState. It also sets the control structure evaluation point at most at the new arc parametrization (if applicable). More... | |
virtual void | setStateCf (const double &_arc, const ParamFuncs::EvalArcGuarantee &_evalArcGuarantee=ParamFuncs::EvalArcGuarantee::AFTER_LAST)=0 |
Sets closed-form state at arc _arc. More... | |
virtual void | setStateCfNmStep (const double &_arc, const ParamFuncs::EvalArcGuarantee &_evalArcGuarantee=ParamFuncs::EvalArcGuarantee::AFTER_LAST) |
virtual State & | state0 ()=0 |
Reference to the initial state. More... | |
virtual double | stateArc () const =0 |
Value of the current arc parametrization of the state. More... | |
virtual State & | stateCf ()=0 |
Reference to the actual closed-form state. More... | |
virtual double | stateDist () const =0 |
Value of the current traveled distance of the state. More... | |
virtual State & | stateNm ()=0 |
Reference to the actual numerical-computed state. More... | |
StateSim ()=default | |
StateSim (const StateSim &)=default | |
StateSim (StateSim &&)=delete | |
virtual void | toState0 ()=0 |
Resets entire state to state0. It also sets the control structure evaluation point at most at the new arc parametrization (if applicable). More... | |
virtual | ~StateSim ()=default |
Public Member Functions inherited from tuw::State | |
virtual StateSPtr | cloneState () const =0 |
Clone-to-base-class-ptr function. More... | |
void | fromEIGENVec (const Eigen::VectorXd &_vec) |
Copies all values from an Eigen vector. The valueSize of the State object has to be equal with the Eigen vector size. More... | |
void | fromSTLVec (const std::vector< double > &_vec) |
Copies all values from an STL vector. The valueSize of the State object has to be equal with the STL vector size. More... | |
State & | operator= (const State &)=default |
State & | operator= (State &&)=default |
virtual void | resize (const size_t &_i) |
Resizes the array. More... | |
State (State *_parent) | |
State () | |
State (const State &)=default | |
State (State &&)=default | |
virtual StateSPtr & | state (const std::size_t &_i) |
Access sub-state based on index _i. More... | |
virtual size_t | stateSize () const |
Size of the sub-states. More... | |
void | toEIGENVec (Eigen::VectorXd &_vec) |
Converts all the array values to an Eigen vector. More... | |
void | toSTLVec (std::vector< double > &_vec) |
Converts all the array values to an STL vector. More... | |
virtual void | updateSize () |
Performs internal manipulation when any of the underlying arrays are being resized. More... | |
virtual double & | value (const std::size_t &_i)=0 |
Access state variable based on index _i. More... | |
virtual const double & | value (const std::size_t &_i) const =0 |
Const access state variable based on index _i. More... | |
virtual size_t | valueSize () const =0 |
Size of the state variables. More... | |
virtual | ~State ()=default |
Private Member Functions | |
virtual State & | stateNmDelta (const double &_dArc)=0 |
Computes numerical discrete state transition (return) based on internal closed-form state (stateCf ) and discretization interval _dArc. More... | |
virtual State & | stateNmDot ()=0 |
Computes numerical continuous arc state transition (return) based on internal closed-form state (stateCf ). More... | |
Friends | |
template<std::size_t StateSize, std::size_t RKOrder, typename... RKCoeff> | |
void | RungeKutta::discretize (StateSim &_stateSim, const double &_arc) |
template<std::size_t StateSize, std::size_t StateNmSize> | |
class | StateSimTemplate |
Additional Inherited Members | |
Static Public Member Functions inherited from tuw::State | |
static std::vector< double > & | minus (State &_lhs, State &_rhs, std::vector< double > &_ans) |
Performs substraction. Left and right operand are required to have the same valueSize. More... | |
static Eigen::VectorXd & | minus (State &_lhs, State &_rhs, Eigen::VectorXd &_ans) |
Performs substraction. Left and right operand are required to have the same valueSize. More... | |
static State & | minus (State &_lhs, State &_rhs, State &_ans) |
Performs substraction. Answer variable, left operand and right operand are required to have the same valueSize. More... | |
static std::vector< double > & | plus (State &_lhs, State &_rhs, std::vector< double > &_ans) |
Performs addition. Left and right operand are required to have the same valueSize. More... | |
static Eigen::VectorXd & | plus (State &_lhs, State &_rhs, Eigen::VectorXd &_ans) |
Performs addition. Left and right operand are required to have the same valueSize. More... | |
static State & | plus (State &_lhs, State &_rhs, State &_ans) |
Performs addition. Answer variable, left operand and right operand are required to have the same valueSize. More... | |
Protected Member Functions inherited from tuw::State | |
void | callRootUpdateSize () |
Calls (if present) the parent updateSize procedure. Otherwise performs root updateSize. More... | |
Protected Attributes inherited from tuw::State | |
State * | parent_ |
Pointer to the parent State structure. More... | |
Interface for a state simulator structure that performs numerical integration of not-closed-form state variables.
Definition at line 58 of file state_sim.h.
|
default |
|
virtualdefault |
|
default |
|
delete |
|
pure virtual |
Performs one simulation step to parametrized arc length _arc.
Implemented in tuw::StateSimTemplate< StateSize, StateNmSize >.
|
inlinevirtual |
Definition at line 113 of file state_sim.h.
|
pure virtual |
Clone-to-base-class-ptr function.
|
pure virtual |
Returns (if applicable) reference of the parametric functions structure. Otherwise returns nullptr.
|
pure virtual |
Returns (if applicable) reference of the parametric functions distance-extended structure. Otherwise returns nullptr.
|
pure virtual |
Set discretization type used in the simulation.
Implemented in tuw::StateSimTemplate< StateSize, StateNmSize >.
|
pure virtual |
Sets the state variables to the values of _otherState. It also sets the control structure evaluation point at most at the new arc parametrization (if applicable).
Implemented in tuw::StateSimTemplate< StateSize, StateNmSize >.
|
pure virtual |
Sets closed-form state at arc _arc.
|
inlinevirtual |
Definition at line 150 of file state_sim.h.
|
pure virtual |
Reference to the initial state.
Implemented in tuw::StateSimTemplate< StateSize, StateNmSize >.
|
pure virtual |
Value of the current arc parametrization of the state.
|
pure virtual |
Reference to the actual closed-form state.
Implemented in tuw::StateSimTemplate< StateSize, StateNmSize >.
|
pure virtual |
Value of the current traveled distance of the state.
|
pure virtual |
Reference to the actual numerical-computed state.
Implemented in tuw::StateSimTemplate< StateSize, StateNmSize >.
|
privatepure virtual |
Computes numerical discrete state transition (return) based on internal closed-form state (stateCf ) and discretization interval _dArc.
|
privatepure virtual |
Computes numerical continuous arc state transition (return) based on internal closed-form state (stateCf ).
|
pure virtual |
Resets entire state to state0. It also sets the control structure evaluation point at most at the new arc parametrization (if applicable).
Implemented in tuw::StateSimTemplate< StateSize, StateNmSize >.
|
friend |
|
friend |
Definition at line 167 of file state_sim.h.