Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

Stores a DifferentialEquation together with an OutputFcn. More...

#include <dynamic_system.hpp>

Public Member Functions

returnValue addSubsystem (const DifferentialEquation &_diffEqn)
 
returnValue addSubsystem (const DifferentialEquation &_diffEqn, const OutputFcn &_outputFcn)
 
returnValue addSwitchFunction (const Function &_switchFcn)
 
 DynamicSystem ()
 
 DynamicSystem (const DifferentialEquation &_diffEqn)
 
 DynamicSystem (const DifferentialEquation &_diffEqn, const OutputFcn &_outputFcn)
 
 DynamicSystem (const DynamicSystem &rhs)
 
const DifferentialEquationgetDifferentialEquation (uint stageIdx=0) const
 
uint getNumAlgebraicEquations () const
 
uint getNumControls () const
 
uint getNumDisturbances () const
 
uint getNumDynamicEquations () const
 
uint getNumOutputs () const
 
uint getNumParameters () const
 
uint getNumSubsystems () const
 
uint getNumSwitchFunctions () const
 
const OutputFcngetOutputFcn (uint stageIdx=0) const
 
double getSampleTime () const
 
returnValue getSelectFunction (Function &_selectFcn) const
 
returnValue getSubsystem (uint stageIdx, DifferentialEquation &_diffEqn, OutputFcn &_outputFcn) const
 
returnValue getSwitchFunction (uint idx, Function &_switchFcn) const
 
BooleanType hasImplicitSwitches () const
 
BooleanType isContinuous () const
 
BooleanType isDAE () const
 
BooleanType isDiscretized () const
 
BooleanType isODE () const
 
DynamicSystemoperator= (const DynamicSystem &rhs)
 
returnValue setSelectFunction (const Function &_selectFcn)
 
 ~DynamicSystem ()
 

Protected Member Functions

BooleanType isConsistentDiffEqn (const DifferentialEquation &_diffEqn) const
 
BooleanType isConsistentOutputFcn (const OutputFcn &_outputFcn) const
 

Protected Attributes

DifferentialEquation ** diffEqn
 
uint nDiffEqn
 
uint nSwitchFcn
 
OutputFcn ** outputFcn
 
FunctionselectFcn
 
Function ** switchFcn
 

Detailed Description

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.

Author
Hans Joachim Ferreau, Boris Houska

Definition at line 57 of file dynamic_system.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO DynamicSystem::DynamicSystem ( )

< Default Constructor.

Definition at line 44 of file dynamic_system.cpp.

DynamicSystem::DynamicSystem ( const DifferentialEquation _diffEqn)

Constructor which takes differential equation of first stage.

@param[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.

Parameters
[in]_diffEqnDifferential equation.
[in]_outputFcnOutput function.

Definition at line 76 of file dynamic_system.cpp.

DynamicSystem::DynamicSystem ( const DynamicSystem rhs)

Copy constructor (deep copy).

@param[in] rhs      Right-hand side object.

Definition at line 94 of file dynamic_system.cpp.

DynamicSystem::~DynamicSystem ( )

Destructor.Assignment Operator (deep copy).

Parameters
[in]rhsRight-hand side object.

Definition at line 136 of file dynamic_system.cpp.

Member Function Documentation

returnValue DynamicSystem::addSubsystem ( const DifferentialEquation _diffEqn)

Adds a new dynamic system stage comprising the given differential equation.

@param[in] _diffEqn         Differential equation.

\return RET_NOT_YET_IMPLEMENTED, \n
        RET_INVALID_ARGUMENTS

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.

Parameters
[in]_diffEqnDifferential equation.
[in]_outputFcnOutput function.
Returns
RET_NOT_YET_IMPLEMENTED,
RET_INVALID_ARGUMENTS

Definition at line 244 of file dynamic_system.cpp.

returnValue DynamicSystem::addSwitchFunction ( const Function _switchFcn)

(not yet documented)

@param[in] _switchFcn               .

\return RET_NOT_YET_IMPLEMENTED

Definition at line 268 of file dynamic_system.cpp.

const DifferentialEquation& DynamicSystem::getDifferentialEquation ( uint  stageIdx = 0) const
inline

Returns differential equation at given stage.

@param[in]  stageIdx        Index of stage.

\return Differential equation at given stage
uint DynamicSystem::getNumAlgebraicEquations ( ) const
inline

Returns number of algebraic equations of the dynamic system.

Returns
Number of algebraic equations
uint DynamicSystem::getNumControls ( ) const
inline

Returns maximum number of controls of the dynamic system.

Returns
Maximum number of controls
uint DynamicSystem::getNumDisturbances ( ) const
inline

Returns maximum number of disturbances of the dynamic system.

Returns
Maximum number of disturbances
uint DynamicSystem::getNumDynamicEquations ( ) const
inline

Returns number of dynamic equations of the dynamic system.

Returns
Number of dynamic equations
uint DynamicSystem::getNumOutputs ( ) const
inline

Returns number of outputs of the dynamic system.

Returns
Number of outputs equations
uint DynamicSystem::getNumParameters ( ) const
inline

Returns maximum number of parameters of the dynamic system.

Returns
Maximum number of parameters
uint DynamicSystem::getNumSubsystems ( ) const
inline

Returns number of subsystems (i.e. stages) of the dynamic system.

Returns
Number of subsystems of the dynamic system
uint DynamicSystem::getNumSwitchFunctions ( ) const
inline

Returns number of switch functions of the dynamic system.

Returns
Number of switch functions of the dynamic system
const OutputFcn& DynamicSystem::getOutputFcn ( uint  stageIdx = 0) const
inline

Returns output function at given stage.

@param[in]  stageIdx        Index of stage.

\return Output function at given stage
double DynamicSystem::getSampleTime ( ) const
inline

Returns sample time of the dynamic system.

\return    > 0: sample time of discretized system, \n
        -INFTY: system is time-continuous
returnValue DynamicSystem::getSelectFunction ( Function _selectFcn) const
inline

(not yet documented)

@param[in] _selectFcn               .

\return RET_NOT_YET_IMPLEMENTED
returnValue DynamicSystem::getSubsystem ( uint  stageIdx,
DifferentialEquation _diffEqn,
OutputFcn _outputFcn 
) const
inline

Returns dynamic subsystem at given stage.

@param[in]  stageIdx                Index of stage.
@param[out] _diffEqn                Differential equation at given stage.
@param[out] _outputFcn              Output function at given stage.

\return SUCCESSFUL_RETURN
returnValue DynamicSystem::getSwitchFunction ( uint  idx,
Function _switchFcn 
) const
inline

(not yet documented)

@param[in] _switchFcn               .

\return RET_NOT_YET_IMPLEMENTED
BooleanType DynamicSystem::hasImplicitSwitches ( ) const
inline

Returns whether dynamic system has implicit switches.

\return BT_TRUE  iff dynamic system has implicit switches, \n
        BT_FALSE otherwise
BooleanType DynamicSystem::isConsistentDiffEqn ( const DifferentialEquation _diffEqn) const
protected

Returns whether given differential equation is consistent with the existing ones at other stages.

Parameters
[in]_diffEqnDifferential equation.
Returns
BT_TRUE iff differential equation is consistent,
BT_FALSE otherwise

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.

Parameters
[in]_outputFcnOutput function.
Returns
BT_TRUE iff output function is consistent,
BT_FALSE otherwise

Definition at line 319 of file dynamic_system.cpp.

BooleanType DynamicSystem::isContinuous ( ) const
inline

Returns whether dynamic system is continuous in time.

Returns
BT_TRUE iff dynamic system is continuous in time,
BT_FALSE otherwise
BooleanType DynamicSystem::isDAE ( ) const
inline

Returns whether dynamic system is a DAE.

Returns
BT_TRUE iff dynamic system is a DAE,
BT_FALSE otherwise
BooleanType DynamicSystem::isDiscretized ( ) const
inline

Returns whether dynamic system is discretized in time.

Returns
BT_TRUE iff dynamic system is discretized in time,
BT_FALSE otherwise
BooleanType DynamicSystem::isODE ( ) const
inline

Returns whether dynamic system is an ODE.

Returns
BT_TRUE iff dynamic system is an ODE,
BT_FALSE otherwise
DynamicSystem & DynamicSystem::operator= ( const DynamicSystem rhs)

Definition at line 164 of file dynamic_system.cpp.

returnValue DynamicSystem::setSelectFunction ( const Function _selectFcn)

(not yet documented)

@param[in] _selectFcn               .

\return RET_NOT_YET_IMPLEMENTED

Definition at line 282 of file dynamic_system.cpp.

Member Data Documentation

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.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:23