Public Member Functions | Protected Attributes | List of all members
BFL::SystemModel< T > Class Template Reference

#include <systemmodel.h>

Public Member Functions

Probability ProbabilityGet (const T &x_k, const T &x_kminusone, const T &u)
 Get the probability of arriving in a next state. More...
 
Probability ProbabilityGet (const T &x_k, const T &x_kminusone)
 Get the probability of arriving in a next state. More...
 
Simulate (const T &x, const T &u, int sampling_method=DEFAULT, void *sampling_args=NULL)
 Simulate the system. More...
 
Simulate (const T &x, int sampling_method=DEFAULT, void *sampling_args=NULL)
 Simulate the system (no input system) More...
 
int StateSizeGet () const
 Get State Size. More...
 
 SystemModel (ConditionalPdf< T, T > *systempdf=NULL)
 Constructor. More...
 
ConditionalPdf< T, T > * SystemPdfGet ()
 Get the SystemPDF. More...
 
void SystemPdfSet (ConditionalPdf< T, T > *pdf)
 Set the SystemPDF. More...
 
bool SystemWithoutInputs () const
 Has the system inputs or not. More...
 
virtual ~SystemModel ()
 Destructor. More...
 

Protected Attributes

ConditionalPdf< T, T > * _SystemPdf
 ConditionalPdf representing $ P(X_k | X_{k-1}, U_{k}) $. More...
 
bool _systemWithoutInputs
 System with no inputs? More...
 

Detailed Description

template<typename T>
class BFL::SystemModel< T >

Template class representing all possible (continu and discrete) System Models

Todo:
Check if there should be a "model" base class...
Bug:
Currently supports only systemmodels of the form P(x | x, u), where both u and x are continu or discrete. So it lacks support for mixed systems () and systems with extra parameters. You are welcome to provide an API and implementation for this :-)

Definition at line 48 of file systemmodel.h.

Constructor & Destructor Documentation

◆ SystemModel()

template<typename T>
BFL::SystemModel< T >::SystemModel ( ConditionalPdf< T, T > *  systempdf = NULL)

Constructor.

Parameters
systempdfConditionalPdf<T,T> representing $ P(X_k | X_{k-1}, U_{k}) $
See also
STATE_SIZE, INPUT_SIZE, _SystemPdf

Definition at line 21 of file systemmodel.cpp.

◆ ~SystemModel()

template<typename T >
BFL::SystemModel< T >::~SystemModel ( )
virtual

Destructor.

Definition at line 53 of file systemmodel.cpp.

Member Function Documentation

◆ ProbabilityGet() [1/2]

template<typename T>
Probability BFL::SystemModel< T >::ProbabilityGet ( const T &  x_k,
const T &  x_kminusone,
const T &  u 
)

Get the probability of arriving in a next state.

Parameters
x_kthe next state (at time k)
x_kminusonethe current state (at time k-1)
uthe input
Returns
the probability value

Definition at line 150 of file systemmodel.cpp.

◆ ProbabilityGet() [2/2]

template<typename T>
Probability BFL::SystemModel< T >::ProbabilityGet ( const T &  x_k,
const T &  x_kminusone 
)

Get the probability of arriving in a next state.

(no-input-system)

Parameters
x_kthe next state (at time k)
x_kminusonethe current state (at time k-1)
Returns
the probability value

Definition at line 160 of file systemmodel.cpp.

◆ Simulate() [1/2]

template<typename T>
T BFL::SystemModel< T >::Simulate ( const T &  x,
const T &  u,
int  sampling_method = DEFAULT,
void *  sampling_args = NULL 
)

Simulate the system.

Parameters
xcurrent state of the system
uinput to the system
Returns
State where we arrive by simulating the system model for 1 step
Parameters
sampling_methodthe sampling method to be used while sampling from the Conditional Pdf describing the system (if not specified = DEFAULT)
sampling_argsSometimes a sampling method can have some extra parameters (eg mcmc sampling)
Note
Maybe the return value would better be a Sample<T> instead of a T

Definition at line 126 of file systemmodel.h.

◆ Simulate() [2/2]

template<typename T>
T BFL::SystemModel< T >::Simulate ( const T &  x,
int  sampling_method = DEFAULT,
void *  sampling_args = NULL 
)

Simulate the system (no input system)

Parameters
xcurrent state of the system
Returns
State where we arrive by simulating the system model for 1 step
Note
Maybe the return value would better be a Sample<T> instead of a T
Parameters
sampling_methodthe sampling method to be used while sampling from the Conditional Pdf describing the system (if not specified = DEFAULT)
sampling_argsSometimes a sampling method can have some extra parameters (eg mcmc sampling)

Definition at line 139 of file systemmodel.h.

◆ StateSizeGet()

template<typename T >
int BFL::SystemModel< T >::StateSizeGet ( ) const

Get State Size.

Copy constructor SystemModel(const SystemModel<T>& model);

Returns
the statesize of the system

Definition at line 78 of file systemmodel.cpp.

◆ SystemPdfGet()

template<typename T >
ConditionalPdf< T, T > * BFL::SystemModel< T >::SystemPdfGet ( )

Get the SystemPDF.

Returns
a reference to the ConditionalPdf describing the system

Definition at line 91 of file systemmodel.cpp.

◆ SystemPdfSet()

template<typename T>
void BFL::SystemModel< T >::SystemPdfSet ( ConditionalPdf< T, T > *  pdf)

Set the SystemPDF.

Parameters
pdfa reference to the ConditionalPdf describing the system

Definition at line 98 of file systemmodel.cpp.

◆ SystemWithoutInputs()

template<typename T >
bool BFL::SystemModel< T >::SystemWithoutInputs ( ) const

Has the system inputs or not.

Definition at line 84 of file systemmodel.cpp.

Member Data Documentation

◆ _SystemPdf

template<typename T>
ConditionalPdf<T,T>* BFL::SystemModel< T >::_SystemPdf
protected

ConditionalPdf representing $ P(X_k | X_{k-1}, U_{k}) $.

Definition at line 59 of file systemmodel.h.

◆ _systemWithoutInputs

template<typename T>
bool BFL::SystemModel< T >::_systemWithoutInputs
protected

System with no inputs?

Definition at line 62 of file systemmodel.h.


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


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Feb 28 2022 21:56:34