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

Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions. More...

#include <differential_equation.hpp>

Inheritance diagram for DifferentialEquation:
Inheritance graph
[legend]

Public Member Functions

DifferentialEquationaddAlgebraic (const Expression &arg)
 
DifferentialEquationaddAlgebraic (const double &arg)
 
DifferentialEquationaddAlgebraic (const DVector &arg)
 
DifferentialEquationaddAlgebraic (const DMatrix &arg)
 
DifferentialEquationaddDifferential (const Expression &arg)
 
DifferentialEquationaddDifferential (const double &arg)
 
DifferentialEquationaddDifferential (const DVector &arg)
 
DifferentialEquationaddDifferential (const DMatrix &arg)
 
virtual DifferentialEquationclone () const
 
 DifferentialEquation ()
 
 DifferentialEquation (const double &tStart, const double &tEnd)
 
 DifferentialEquation (const double &tStart, const Parameter &tEnd)
 
 DifferentialEquation (const Parameter &tStart, const double &tEnd)
 
 DifferentialEquation (const Parameter &tStart, const Parameter &tEnd)
 
 DifferentialEquation (const DifferentialEquation &arg)
 
int * getComponents () const
 
DVector getDifferentialStateComponents () const
 
double getEndTime () const
 
int getEndTimeIdx () const
 
Lyapunov getLyapunovObject () const
 
int getNumAlgebraicEquations () const
 
int getNumDynamicEquations () const
 
Expression getODEexpansion (const int &order) const
 
double getStartTime () const
 
int getStartTimeIdx () const
 
int getStateEnumerationIndex (int index_)
 
virtual double getStepLength () const
 
BooleanType hasLyapunovEquation () const
 
BooleanType isDAE () const
 
virtual BooleanType isDiscretized () const
 
BooleanType isImplicit () const
 
BooleanType isODE () const
 
virtual BooleanType makeImplicit ()
 
DifferentialEquationoperator<< (const Expression &arg)
 
DifferentialEquationoperator<< (const int &arg)
 
DifferentialEquationoperator= (const DifferentialEquation &arg)
 
DifferentialEquationoperator== (const Expression &arg)
 
DifferentialEquationoperator== (const double &arg)
 
DifferentialEquationoperator== (const DVector &arg)
 
DifferentialEquationoperator== (const DMatrix &arg)
 
DifferentialEquationoperator== (const Lyapunov &arg)
 
virtual ~DifferentialEquation ()
 
- Public Member Functions inherited from Function
returnValue AD_backward (const DVector &seed, EvaluationPoint &df, const int &number=0)
 
returnValue AD_backward (int number, double *seed, double *df)
 
returnValue AD_backward2 (int number, double *seed1, double *seed2, double *df, double *ddf)
 
DVector AD_forward (const EvaluationPoint &x, const int &number=0)
 
returnValue AD_forward (int number, double *seed, double *df)
 
returnValue AD_forward2 (int number, double *seed1, double *seed2, double *df, double *ddf)
 
BooleanType ADisSupported () const
 
returnValue clearBuffer ()
 
DVector evaluate (const EvaluationPoint &x, const int &number=0)
 
template<typename T >
Tmatrix< Tevaluate (const TevaluationPoint< T > &x)
 
returnValue evaluate (int number, double *x, double *_result)
 
returnValue exportCode (std::ostream &stream, const char *fcnName="ACADOfcn", const char *realString="double", uint _numX=0, uint _numXA=0, uint _numU=0, uint _numP=0, uint _numDX=0, uint _numOD=0, bool allocateMemory=true, bool staticMemory=false) const
 
returnValue exportForwardDeclarations (std::ostream &stream, const char *fcnName="ACADOfcn", const char *realString="double") const
 
 Function ()
 
 Function (const Function &rhs)
 
int getDim () const
 
returnValue getExpression (Expression &expression) const
 
OperatorgetExpression (uint componentIdx) const
 
std::string getGlobalExportVariableName () const
 
unsigned getGlobalExportVariableSize () const
 
int getN () const
 
int getN (VariableType &variableType_) const
 
int getNDX () const
 
int getNOD () const
 
int getNP () const
 
int getNPI () const
 
int getNT () const
 
int getNU () const
 
int getNUI () const
 
int getNumberOfVariables () const
 
int getNW () const
 
int getNX () const
 
int getNXA () const
 
int index (VariableType variableType_, int index_) const
 
BooleanType isAffine ()
 
BooleanType isConcave ()
 
BooleanType isConstant ()
 
BooleanType isConvex ()
 
BooleanType isDependingOn (const Expression &variable)
 
BooleanType isLinearIn (const Expression &variable)
 
BooleanType isNondecreasing ()
 
BooleanType isNonincreasing ()
 
NeutralElement isOneOrZero ()
 
BooleanType isPolynomialIn (const Expression &variable)
 
BooleanType isRationalIn (const Expression &variable)
 
BooleanType isSymbolic () const
 
returnValue jacobian (DMatrix &x)
 calculate the jacobian of an evaluated function More...
 
Function operator() (uint idx) const
 
DVector operator() (const EvaluationPoint &x, const int &number=0)
 
Functionoperator<< (const Expression &arg)
 
Functionoperator<< (const double &arg)
 
Functionoperator<< (const DVector &arg)
 
Functionoperator<< (const DMatrix &arg)
 
Functionoperator= (const Function &rhs)
 
returnValue print (std::ostream &stream, const char *fcnName="ACADOfcn", const char *realString="double") const
 
returnValue reset ()
 
double scale (VariableType variableType_, int index_) const
 
returnValue setGlobalExportVariableName (const std::string &var)
 
returnValue setMemoryOffset (int memoryOffset_)
 
returnValue setScale (double *scale_)
 
returnValue substitute (VariableType variableType_, int index_, double sub_)
 
virtual ~Function ()
 

Protected Member Functions

void copy (const DifferentialEquation &arg)
 
void setup ()
 

Protected Attributes

int * component
 
int counter
 
DifferentialEquationType det
 
BooleanType is_discretized
 
BooleanType is_implicit
 
Lyapunov lyap
 
double stepLength
 
ParameterT1
 
double t1
 
ParameterT2
 
double t2
 
- Protected Attributes inherited from Function
FunctionEvaluationTree evaluationTree
 
int memoryOffset
 
double * result
 

Detailed Description

Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.

The class DifferentialEquation allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.

Author
Boris Houska, Hans Joachim Ferreau

Definition at line 55 of file differential_equation.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO DifferentialEquation::DifferentialEquation ( )

Default constructor.

Definition at line 50 of file differential_equation.cpp.

DifferentialEquation::DifferentialEquation ( const double &  tStart,
const double &  tEnd 
)

Default constructor.

Definition at line 60 of file differential_equation.cpp.

DifferentialEquation::DifferentialEquation ( const double &  tStart,
const Parameter tEnd 
)

Default constructor.

Definition at line 70 of file differential_equation.cpp.

DifferentialEquation::DifferentialEquation ( const Parameter tStart,
const double &  tEnd 
)

Default constructor.

Definition at line 82 of file differential_equation.cpp.

DifferentialEquation::DifferentialEquation ( const Parameter tStart,
const Parameter tEnd 
)

Default constructor.

Definition at line 94 of file differential_equation.cpp.

DifferentialEquation::DifferentialEquation ( const DifferentialEquation arg)

Copy constructor (deep copy).

Definition at line 154 of file differential_equation.cpp.

DifferentialEquation::~DifferentialEquation ( )
virtual

Destructor.

Definition at line 162 of file differential_equation.cpp.

Member Function Documentation

DifferentialEquation & DifferentialEquation::addAlgebraic ( const Expression arg)

Loading Expressions (deep copy).

Definition at line 274 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::addAlgebraic ( const double &  arg)

Loading Expressions (deep copy).

Definition at line 282 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::addAlgebraic ( const DVector arg)

Loading Symbolic DVector (deep copy).

Definition at line 302 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::addAlgebraic ( const DMatrix arg)

Loading Symbolic DMatrix (deep copy).

Definition at line 325 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::addDifferential ( const Expression arg)

Loading Expressions (deep copy).

Definition at line 237 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::addDifferential ( const double &  arg)

Loading Expressions (deep copy).

Definition at line 266 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::addDifferential ( const DVector arg)

Loading Symbolic DVector (deep copy).

Definition at line 291 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::addDifferential ( const DMatrix arg)

Loading Symbolic DMatrix (deep copy).

Definition at line 313 of file differential_equation.cpp.

DifferentialEquation * DifferentialEquation::clone ( ) const
virtual

Clone constructor (deep copy).

Reimplemented in DiscretizedDifferentialEquation.

Definition at line 191 of file differential_equation.cpp.

void DifferentialEquation::copy ( const DifferentialEquation arg)
protected

Protected version of the copy constructor.

Definition at line 120 of file differential_equation.cpp.

int* DifferentialEquation::getComponents ( ) const
inline
DVector DifferentialEquation::getDifferentialStateComponents ( ) const
inline
double DifferentialEquation::getEndTime ( ) const
inline

Returns the end time of the horizon of the differential equation
or +INFTY for the case that the start time is not defined.

Returns
the end time.
int DifferentialEquation::getEndTimeIdx ( ) const
inline

Returns the index of the parameter associated with the start time
of the time horizon of the differential equation or -1 for the
that the start time is constant

Returns
the start time.
Lyapunov DifferentialEquation::getLyapunovObject ( ) const

Definition at line 346 of file differential_equation.cpp.

int DifferentialEquation::getNumAlgebraicEquations ( ) const
inline

Returns the number of algebraic equations

int DifferentialEquation::getNumDynamicEquations ( ) const
inline

Returns the number of dynamic equations

Expression DifferentialEquation::getODEexpansion ( const int &  order) const

Returning an Expression that contains a Taylor expansion
of the ODE-solution trajectory.

Parameters
orderthe order of Taylor expansion.
Returns
A matrix valued expression C of dimension
n_x times (order+2) ,
whose rows contain the Taylor coefficients.
C = [ x,f(x),f'(x)f(x),f''(x)f(x)f(x)+f'(x)f'(x)f(x), ... ].

Definition at line 402 of file differential_equation.cpp.

double DifferentialEquation::getStartTime ( ) const
inline

Returns the start time of the horizon of the differential equation
or -INFTY for the case that the start time is not defined.

Returns
the start time.
int DifferentialEquation::getStartTimeIdx ( ) const
inline

Returns the index of the parameter associated with the start time
of the time horizon of the differential equation or -1 for the
that the start time is constant

Returns
the start time.
int DifferentialEquation::getStateEnumerationIndex ( int  index_)
inline
double DifferentialEquation::getStepLength ( ) const
virtual

Always returns -INFTY in the time-continuous case.

Definition at line 433 of file differential_equation.cpp.

BooleanType DifferentialEquation::hasLyapunovEquation ( ) const

Definition at line 351 of file differential_equation.cpp.

BooleanType DifferentialEquation::isDAE ( ) const

Ask whether the differential equation is a DAE.

Definition at line 388 of file differential_equation.cpp.

BooleanType DifferentialEquation::isDiscretized ( ) const
virtual

Ask whether the differential equation is discretized (in time).

Definition at line 427 of file differential_equation.cpp.

BooleanType DifferentialEquation::isImplicit ( ) const
inline

Ask whether the differential equation is given in implicit form.

BooleanType DifferentialEquation::isODE ( ) const

Ask whether the differential equation is a ODE.

Definition at line 395 of file differential_equation.cpp.

BooleanType DifferentialEquation::makeImplicit ( )
virtual

Adds DifferentialStateDerivative if the differential
equation is an ODE.

Returns
BT_TRUE if the ODE is made implicit
BT_FALSE if the differential equation is no
ODE.

Definition at line 414 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::operator<< ( const Expression arg)

Loading Expressions (deep copy).

Definition at line 198 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::operator<< ( const int &  arg)

Loading Expressions (deep copy).

Definition at line 225 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::operator= ( const DifferentialEquation arg)

Assignment operator (deep copy).

Definition at line 173 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::operator== ( const Expression arg)

Loading Expressions (deep copy).

Definition at line 359 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::operator== ( const double &  arg)

Loading Expressions (deep copy).

Definition at line 366 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::operator== ( const DVector arg)

Loading Symbolic DVector (deep copy).

Definition at line 373 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::operator== ( const DMatrix arg)

Loading Symbolic DMatrix (deep copy).

Definition at line 380 of file differential_equation.cpp.

DifferentialEquation & DifferentialEquation::operator== ( const Lyapunov arg)

Definition at line 337 of file differential_equation.cpp.

void DifferentialEquation::setup ( )
protected

Setup routine (for internal use only)

Definition at line 107 of file differential_equation.cpp.

Member Data Documentation

int* DifferentialEquation::component
protected

Definition at line 267 of file differential_equation.hpp.

int DifferentialEquation::counter
protected

Definition at line 266 of file differential_equation.hpp.

DifferentialEquationType DifferentialEquation::det
protected

Definition at line 262 of file differential_equation.hpp.

BooleanType DifferentialEquation::is_discretized
protected

Definition at line 264 of file differential_equation.hpp.

BooleanType DifferentialEquation::is_implicit
protected

Definition at line 263 of file differential_equation.hpp.

Lyapunov DifferentialEquation::lyap
protected

Definition at line 273 of file differential_equation.hpp.

double DifferentialEquation::stepLength
protected

Definition at line 272 of file differential_equation.hpp.

Parameter* DifferentialEquation::T1
protected

Definition at line 269 of file differential_equation.hpp.

double DifferentialEquation::t1
protected

Definition at line 270 of file differential_equation.hpp.

Parameter * DifferentialEquation::T2
protected

Definition at line 269 of file differential_equation.hpp.

double DifferentialEquation::t2
protected

Definition at line 270 of file differential_equation.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