Public Member Functions | Protected Attributes | List of all members

Manages the indices of SymbolicVariables. More...

#include <symbolic_index_list.hpp>

Public Member Functions

BooleanType addNewElement (VariableType variableType_, int index_)
 
int addOperatorPointer (Operator *intermediateOperator, int comp_)
 
returnValue clearVariableIndexList ()
 
BooleanType determineCExpressionIndices (uint dimension, uint ID, int *idx)
 
int determineVariableIndex (VariableType variableType_, int index_, double scale)
 
int getNDX () const
 
int getNP () const
 
int getNPI () const
 
int getNT () const
 
int getNU () const
 
int getNUI () const
 
int getNumberOfOperators ()
 
int getNumberOfVariables () const
 
int getNW () const
 
int getNX () const
 
int getNXA () const
 
int getOD () const
 
returnValue getOperators (Operator **sub, int *comp_, int *n)
 
int index (VariableType variableType_, int index_) const
 
int makeImplicit (int dim)
 
SymbolicIndexListoperator= (const SymbolicIndexList &arg)
 
double scale (VariableType variableType_, int index_) const
 
SymbolicIndexListsubstitute (VariableType variableType_, int index_)
 
 SymbolicIndexList ()
 
 SymbolicIndexList (const SymbolicIndexList &arg)
 
 ~SymbolicIndexList ()
 

Protected Attributes

uintcDim
 
BooleanTypecExist
 
int ** cIdx
 
int * comp
 
BooleanType ** entryExists
 
Operator ** expression
 
int * maxNumberOfEntries
 
int nC
 
int numberOfOperators
 
int variableCounter
 
int ** variableIndex
 
double ** variableScale
 

Detailed Description

Manages the indices of SymbolicVariables.

The class SymbolicIndexList manages the indices of SymbolicVariables.

\author Boris Houska, Hans Joachim Ferreau

Definition at line 60 of file symbolic_index_list.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO SymbolicIndexList::SymbolicIndexList ( )

Default constructor.

Definition at line 45 of file symbolic_index_list.cpp.

SymbolicIndexList::~SymbolicIndexList ( )

Default destructor.

Definition at line 81 of file symbolic_index_list.cpp.

SymbolicIndexList::SymbolicIndexList ( const SymbolicIndexList arg)

Copy constructor (deep copy).

Definition at line 124 of file symbolic_index_list.cpp.

Member Function Documentation

BooleanType SymbolicIndexList::addNewElement ( VariableType  variableType_,
int  index_ 
)

Adds a new element to the list.

Returns
BT_TRUE if the element is successfully added
BT_FALSE if the element has already been added
before.
Parameters
variableType_The type of the element to add.
index_The index of the element to add

Definition at line 385 of file symbolic_index_list.cpp.

int SymbolicIndexList::addOperatorPointer ( Operator intermediateOperator,
int  comp_ 
)

Adds new Intermediate Operators to the stack.

Returns
SUCCESSFUL_RETURN
Parameters
intermediateOperatorThe intermediate OperatorPointer to be added.
comp_The corresponding index

Definition at line 356 of file symbolic_index_list.cpp.

returnValue SymbolicIndexList::clearVariableIndexList ( )

Sets all variable indices to -1 (default) and the variable
counter to 0.

Returns
SUCCESSFUL_RETURN

Definition at line 882 of file symbolic_index_list.cpp.

BooleanType SymbolicIndexList::determineCExpressionIndices ( uint  dimension,
uint  ID,
int *  idx 
)

This routine is for the communication with the C expressions.
It determines the index list for the C expression and returns
whether the current call is the first.

Parameters
dimensionThe dimension of the C expression
IDThe ID of the C expression
idxThe index list to be returned

Definition at line 669 of file symbolic_index_list.cpp.

int SymbolicIndexList::determineVariableIndex ( VariableType  variableType_,
int  index_,
double  scale 
)

Determines the variableIndex of a given variable.
If variableIndex[variableType_][index_] already exists
(i.e. the index is not equal to the default value -1).
the returned index is equal to the variableCounter
and this counter will be increased by one. Otherwise, if
the variable has already an index this index will be
returned (without increasing the counter)

Returns
The new variableIndex
or -1 if the index is out of range.
Parameters
variableType_The type of the variable
index_The index of the variable
scaleThe scale of the variable

Definition at line 708 of file symbolic_index_list.cpp.

int SymbolicIndexList::getNDX ( ) const
inline

Returns the number of d-differential states

Returns
The requested number of d-differential states.
int SymbolicIndexList::getNP ( ) const
inline

Returns the number of parameters

Returns
The requested number of parameters.
int SymbolicIndexList::getNPI ( ) const
inline

Returns the number of integer parameters

Returns
The requested number of integer parameters.
int SymbolicIndexList::getNT ( ) const
inline

Returns the number of time variables

Returns
The requested number of time variables.
int SymbolicIndexList::getNU ( ) const
inline

Returns the number of controls

Returns
The requested number of controls.
int SymbolicIndexList::getNUI ( ) const
inline

Returns the number of integer controls

Returns
The requested number of integer controls.
int SymbolicIndexList::getNumberOfOperators ( )
inline

Returns the number of new Operators

Returns
SUCCESSFUL_RETURN
int SymbolicIndexList::getNumberOfVariables ( ) const
inline

Returns the variable counter.

Returns
The number of variables
int SymbolicIndexList::getNW ( ) const
inline

Returns the number of disturbances

Returns
The requested number of disturbances.
int SymbolicIndexList::getNX ( ) const
inline

Returns the number of differential states

Returns
The requested number of differential states.
int SymbolicIndexList::getNXA ( ) const
inline

Returns the number of algebraic states

Returns
The requested number of algebraic states.
int SymbolicIndexList::getOD ( ) const
inline

Return number of "online data" objects.

returnValue SymbolicIndexList::getOperators ( Operator **  sub,
int *  comp_,
int *  n 
)

Returns a copy of all intermediate Operators

Returns
SUCCESSFUL_RETURN

Definition at line 372 of file symbolic_index_list.cpp.

int SymbolicIndexList::index ( VariableType  variableType_,
int  index_ 
) const
inline

Returns the index of a given variable.

Returns
The requested index or
The indexCounter of the index is
out of range.
int SymbolicIndexList::makeImplicit ( int  dim)
inline
SymbolicIndexList & SymbolicIndexList::operator= ( const SymbolicIndexList arg)

Assignment Operator (deep copy).

Definition at line 218 of file symbolic_index_list.cpp.

double SymbolicIndexList::scale ( VariableType  variableType_,
int  index_ 
) const
inline

Returns the scale of a given variable.

Returns
The requested scale or
1.0 if index is out of range
SymbolicIndexList* SymbolicIndexList::substitute ( VariableType  variableType_,
int  index_ 
)
inline

Optimizes the index list for the case that a variable has
has been substituted.

Returns
The new index list.

Member Data Documentation

uint* SymbolicIndexList::cDim
protected

dimesions of C expressions

Definition at line 267 of file symbolic_index_list.hpp.

BooleanType* SymbolicIndexList::cExist
protected

Indicates whether a C
expression is already
regirstered.

Definition at line 260 of file symbolic_index_list.hpp.

int** SymbolicIndexList::cIdx
protected

Index list of existing C
expressions

Definition at line 264 of file symbolic_index_list.hpp.

int* SymbolicIndexList::comp
protected

The components of the intermediate states.

Definition at line 247 of file symbolic_index_list.hpp.

BooleanType** SymbolicIndexList::entryExists
protected

Indicates whether the entry
has already been added.

Definition at line 254 of file symbolic_index_list.hpp.

Operator** SymbolicIndexList::expression
protected

Pointer to the expressions
of the intermediate states.

Definition at line 244 of file symbolic_index_list.hpp.

int* SymbolicIndexList::maxNumberOfEntries
protected

Maximum number of entries
in the lists.

Definition at line 273 of file symbolic_index_list.hpp.

int SymbolicIndexList::nC
protected

Maximum number of existing C
expressions

Definition at line 257 of file symbolic_index_list.hpp.

int SymbolicIndexList::numberOfOperators
protected

The number of Intermediate
expressions.

Definition at line 250 of file symbolic_index_list.hpp.

int SymbolicIndexList::variableCounter
protected

Counter for the variables
that are added

Definition at line 276 of file symbolic_index_list.hpp.

int** SymbolicIndexList::variableIndex
protected

The indices of the variables.

Definition at line 269 of file symbolic_index_list.hpp.

double** SymbolicIndexList::variableScale
protected

The scales of the variables.

Definition at line 270 of file symbolic_index_list.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:27