stateObservation::DynamicalSystemSimulator Class Reference

The class gives a small encapsulation of the dynamics functor, which enables the simulation of the dynamics and the storage of states, inputs and measurements. More...

#include <state-observation/dynamical-system/dynamical-system-simulator.hpp>

Collaboration diagram for stateObservation::DynamicalSystemSimulator:

Public Member Functions

 DynamicalSystemSimulator ()
 Constructor. More...
 
virtual ~DynamicalSystemSimulator ()
 Virtual destructor. More...
 
virtual void setDynamicsFunctor (DynamicalSystemFunctorBase *)
 
virtual void setState (const Vector &x, TimeIndex k)
 Sets the state value at instant k. More...
 
virtual void setInput (const Vector &u, TimeIndex k)
 
virtual Vector getCurrentState () const
 Gets the state of the current time. More...
 
virtual TimeIndex getCurrentTime () const
 Gets the current time. More...
 
virtual void simulateDynamics ()
 Runs one loop of the dynamics simulation. More...
 
virtual void simulateDynamicsTo (TimeIndex k)
 Runs the simulation until a given time index. More...
 
virtual Vector getInput (TimeIndex k) const
 
virtual Vector getMeasurement (TimeIndex k)
 
virtual Vector getState (TimeIndex k)
 
virtual IndexedVectorArray getMeasurementArray (TimeIndex startingTime, TimeSize duration)
 
virtual IndexedVectorArray getStateArray (TimeIndex startingTime, TimeSize duration)
 
virtual void resetDynamics ()
 resets all the states, the measurements and the inputs More...
 
virtual void resetSimulator ()
 resets all the simulator with even the dynamics functor More...
 

Protected Attributes

DynamicalSystemFunctorBasef_
 
IndexedVectorArray x_
 
IndexedVectorArray y_
 
std::map< TimeIndex, Vectoru_
 

Detailed Description

The class gives a small encapsulation of the dynamics functor, which enables the simulation of the dynamics and the storage of states, inputs and measurements.

Constructor & Destructor Documentation

◆ DynamicalSystemSimulator()

stateObservation::DynamicalSystemSimulator::DynamicalSystemSimulator ( )

Constructor.

◆ ~DynamicalSystemSimulator()

virtual stateObservation::DynamicalSystemSimulator::~DynamicalSystemSimulator ( )
virtual

Virtual destructor.

Member Function Documentation

◆ getCurrentState()

virtual Vector stateObservation::DynamicalSystemSimulator::getCurrentState ( ) const
virtual

Gets the state of the current time.

◆ getCurrentTime()

virtual TimeIndex stateObservation::DynamicalSystemSimulator::getCurrentTime ( ) const
virtual

Gets the current time.

◆ getInput()

virtual Vector stateObservation::DynamicalSystemSimulator::getInput ( TimeIndex  k) const
virtual

Gets the input of a given time index, if the Input is not available the previous input is provided

◆ getMeasurement()

virtual Vector stateObservation::DynamicalSystemSimulator::getMeasurement ( TimeIndex  k)
virtual

Gets the measurement value at a given time index if the value is not available, the dynamics is simulated to the time k

◆ getMeasurementArray()

virtual IndexedVectorArray stateObservation::DynamicalSystemSimulator::getMeasurementArray ( TimeIndex  startingTime,
TimeSize  duration 
)
virtual

Gives a IndexedVectorArray of the measurements starting at startingTime and having the given duration

◆ getState()

virtual Vector stateObservation::DynamicalSystemSimulator::getState ( TimeIndex  k)
virtual

Gets the state value at a given time index if the value is not available, the dynamics is simulated to the time k

◆ getStateArray()

virtual IndexedVectorArray stateObservation::DynamicalSystemSimulator::getStateArray ( TimeIndex  startingTime,
TimeSize  duration 
)
virtual

Gives a IndexedVectorArray of the states starting at startingTime and having the given duration

◆ resetDynamics()

virtual void stateObservation::DynamicalSystemSimulator::resetDynamics ( )
virtual

resets all the states, the measurements and the inputs

◆ resetSimulator()

virtual void stateObservation::DynamicalSystemSimulator::resetSimulator ( )
virtual

resets all the simulator with even the dynamics functor

◆ setDynamicsFunctor()

virtual void stateObservation::DynamicalSystemSimulator::setDynamicsFunctor ( DynamicalSystemFunctorBase )
virtual

Sets a pointer to the dynamics Functor (the class does not destroy the Functor when the class is destroyed.)

◆ setInput()

virtual void stateObservation::DynamicalSystemSimulator::setInput ( const Vector u,
TimeIndex  k 
)
virtual

Set the value of the input at instant k If no value of the input is available when simulating the system the previous input value is automatically set.

◆ setState()

virtual void stateObservation::DynamicalSystemSimulator::setState ( const Vector x,
TimeIndex  k 
)
virtual

Sets the state value at instant k.

◆ simulateDynamics()

virtual void stateObservation::DynamicalSystemSimulator::simulateDynamics ( )
virtual

Runs one loop of the dynamics simulation.

◆ simulateDynamicsTo()

virtual void stateObservation::DynamicalSystemSimulator::simulateDynamicsTo ( TimeIndex  k)
virtual

Runs the simulation until a given time index.

Member Data Documentation

◆ f_

DynamicalSystemFunctorBase* stateObservation::DynamicalSystemSimulator::f_
protected

◆ u_

std::map<TimeIndex, Vector> stateObservation::DynamicalSystemSimulator::u_
protected

◆ x_

IndexedVectorArray stateObservation::DynamicalSystemSimulator::x_
protected

◆ y_

IndexedVectorArray stateObservation::DynamicalSystemSimulator::y_
protected

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