Stores a DifferentialEquation together with an OutputFcn. More...
#include <dynamic_system.hpp>
Stores a DifferentialEquation together with an OutputFcn.
The class DynamicSystem is a data class for storing a DifferentialEquation together with an OutputFcn. The dynamic system might be of hybrid nature, i.e. differential equation and output function might switch depending on a state-dependend switch function.
Definition at line 57 of file dynamic_system.hpp.
< Default Constructor.
Definition at line 44 of file dynamic_system.cpp.
DynamicSystem::DynamicSystem | ( | const DifferentialEquation & | _diffEqn | ) |
Constructor which takes differential equation of first stage.
[in] | _diffEqn | Differential equation. |
Definition at line 57 of file dynamic_system.cpp.
DynamicSystem::DynamicSystem | ( | const DifferentialEquation & | _diffEqn, |
const OutputFcn & | _outputFcn | ||
) |
Constructor which takes differential equation and output function of first stage.
[in] | _diffEqn | Differential equation. |
[in] | _outputFcn | Output function. |
Definition at line 76 of file dynamic_system.cpp.
DynamicSystem::DynamicSystem | ( | const DynamicSystem & | rhs | ) |
Copy constructor (deep copy).
[in] | rhs | Right-hand side object. |
Definition at line 94 of file dynamic_system.cpp.
Destructor. Assignment Operator (deep copy).
[in] | rhs | Right-hand side object. |
Definition at line 136 of file dynamic_system.cpp.
returnValue DynamicSystem::addSubsystem | ( | const DifferentialEquation & | _diffEqn | ) |
Adds a new dynamic system stage comprising the given differential equation.
[in] | _diffEqn | Differential equation. |
Definition at line 237 of file dynamic_system.cpp.
returnValue DynamicSystem::addSubsystem | ( | const DifferentialEquation & | _diffEqn, |
const OutputFcn & | _outputFcn | ||
) |
Adds a new dynamic system stage comprising the given differential equation and output function.
[in] | _diffEqn | Differential equation. |
[in] | _outputFcn | Output function. |
Definition at line 244 of file dynamic_system.cpp.
returnValue DynamicSystem::addSwitchFunction | ( | const Function & | _switchFcn | ) |
(not yet documented)
[in] | _switchFcn | . |
Definition at line 268 of file dynamic_system.cpp.
const DifferentialEquation& DynamicSystem::getDifferentialEquation | ( | uint | stageIdx = 0 | ) | const [inline] |
Returns differential equation at given stage.
[in] | stageIdx | Index of stage. |
uint DynamicSystem::getNumAlgebraicEquations | ( | ) | const [inline] |
Returns number of algebraic equations of the dynamic system.
uint DynamicSystem::getNumControls | ( | ) | const [inline] |
Returns maximum number of controls of the dynamic system.
uint DynamicSystem::getNumDisturbances | ( | ) | const [inline] |
Returns maximum number of disturbances of the dynamic system.
uint DynamicSystem::getNumDynamicEquations | ( | ) | const [inline] |
Returns number of dynamic equations of the dynamic system.
uint DynamicSystem::getNumOutputs | ( | ) | const [inline] |
Returns number of outputs of the dynamic system.
uint DynamicSystem::getNumParameters | ( | ) | const [inline] |
Returns maximum number of parameters of the dynamic system.
uint DynamicSystem::getNumSubsystems | ( | ) | const [inline] |
Returns number of subsystems (i.e. stages) of the dynamic system.
uint DynamicSystem::getNumSwitchFunctions | ( | ) | const [inline] |
Returns number of switch functions of the dynamic system.
const OutputFcn& DynamicSystem::getOutputFcn | ( | uint | stageIdx = 0 | ) | const [inline] |
Returns output function at given stage.
[in] | stageIdx | Index of stage. |
double DynamicSystem::getSampleTime | ( | ) | const [inline] |
Returns sample time of the dynamic system.
returnValue DynamicSystem::getSelectFunction | ( | Function & | _selectFcn | ) | const [inline] |
(not yet documented)
[in] | _selectFcn | . |
returnValue DynamicSystem::getSubsystem | ( | uint | stageIdx, |
DifferentialEquation & | _diffEqn, | ||
OutputFcn & | _outputFcn | ||
) | const [inline] |
Returns dynamic subsystem at given stage.
[in] | stageIdx | Index of stage. |
[out] | _diffEqn | Differential equation at given stage. |
[out] | _outputFcn | Output function at given stage. |
returnValue DynamicSystem::getSwitchFunction | ( | uint | idx, |
Function & | _switchFcn | ||
) | const [inline] |
(not yet documented)
[in] | _switchFcn | . |
BooleanType DynamicSystem::hasImplicitSwitches | ( | ) | const [inline] |
Returns whether dynamic system has implicit switches.
BooleanType DynamicSystem::isConsistentDiffEqn | ( | const DifferentialEquation & | _diffEqn | ) | const [protected] |
Returns whether given differential equation is consistent with the existing ones at other stages.
[in] | _diffEqn | Differential equation. |
Definition at line 300 of file dynamic_system.cpp.
BooleanType DynamicSystem::isConsistentOutputFcn | ( | const OutputFcn & | _outputFcn | ) | const [protected] |
Returns whether given output function is consistent with the corresponding differential equation and existing output functions at other stages.
[in] | _outputFcn | Output function. |
Definition at line 319 of file dynamic_system.cpp.
BooleanType DynamicSystem::isContinuous | ( | ) | const [inline] |
Returns whether dynamic system is continuous in time.
BooleanType DynamicSystem::isDAE | ( | ) | const [inline] |
Returns whether dynamic system is a DAE.
BooleanType DynamicSystem::isDiscretized | ( | ) | const [inline] |
Returns whether dynamic system is discretized in time.
BooleanType DynamicSystem::isODE | ( | ) | const [inline] |
Returns whether dynamic system is an ODE.
DynamicSystem & DynamicSystem::operator= | ( | const DynamicSystem & | rhs | ) |
Definition at line 164 of file dynamic_system.cpp.
returnValue DynamicSystem::setSelectFunction | ( | const Function & | _selectFcn | ) |
(not yet documented)
[in] | _selectFcn | . |
Definition at line 282 of file dynamic_system.cpp.
DifferentialEquation** DynamicSystem::diffEqn [protected] |
Differential equation(s) describing the states of the dynamic system.
Definition at line 331 of file dynamic_system.hpp.
uint DynamicSystem::nDiffEqn [protected] |
Number of differential equations.
Definition at line 328 of file dynamic_system.hpp.
uint DynamicSystem::nSwitchFcn [protected] |
Number of switch functions.
Definition at line 329 of file dynamic_system.hpp.
OutputFcn** DynamicSystem::outputFcn [protected] |
Output function(s) for evaluating the output of the dynamic system.
Definition at line 332 of file dynamic_system.hpp.
Function* DynamicSystem::selectFcn [protected] |
Function for selecting the current differential equation based on the values of the switch function(s).
Definition at line 335 of file dynamic_system.hpp.
Function** DynamicSystem::switchFcn [protected] |
Function(s) for determining switches between different differential equations.
Definition at line 334 of file dynamic_system.hpp.