Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions. More...
#include <differential_equation.hpp>
Public Member Functions | |
DifferentialEquation & | addAlgebraic (const Expression &arg) |
DifferentialEquation & | addAlgebraic (const double &arg) |
DifferentialEquation & | addAlgebraic (const DVector &arg) |
DifferentialEquation & | addAlgebraic (const DMatrix &arg) |
DifferentialEquation & | addDifferential (const Expression &arg) |
DifferentialEquation & | addDifferential (const double &arg) |
DifferentialEquation & | addDifferential (const DVector &arg) |
DifferentialEquation & | addDifferential (const DMatrix &arg) |
virtual DifferentialEquation * | clone () 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 () |
DifferentialEquation & | operator<< (const Expression &arg) |
DifferentialEquation & | operator<< (const int &arg) |
DifferentialEquation & | operator= (const DifferentialEquation &arg) |
DifferentialEquation & | operator== (const Expression &arg) |
DifferentialEquation & | operator== (const double &arg) |
DifferentialEquation & | operator== (const DVector &arg) |
DifferentialEquation & | operator== (const DMatrix &arg) |
DifferentialEquation & | operator== (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< T > | evaluate (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 |
Operator * | getExpression (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) |
Function & | operator<< (const Expression &arg) |
Function & | operator<< (const double &arg) |
Function & | operator<< (const DVector &arg) |
Function & | operator<< (const DMatrix &arg) |
Function & | operator= (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 |
Parameter * | T1 |
double | t1 |
Parameter * | T2 |
double | t2 |
Protected Attributes inherited from Function | |
FunctionEvaluationTree | evaluationTree |
int | memoryOffset |
double * | result |
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.
Definition at line 55 of file differential_equation.hpp.
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.
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.
|
virtual |
Destructor.
Definition at line 162 of file differential_equation.cpp.
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.
|
virtual |
Clone constructor (deep copy).
Reimplemented in DiscretizedDifferentialEquation.
Definition at line 191 of file differential_equation.cpp.
|
protected |
Protected version of the copy constructor.
Definition at line 120 of file differential_equation.cpp.
|
inline |
|
inline |
|
inline |
Returns the end time of the horizon of the differential equation
or +INFTY for the case that the start time is not defined.
|
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
Lyapunov DifferentialEquation::getLyapunovObject | ( | ) | const |
Definition at line 346 of file differential_equation.cpp.
|
inline |
Returns the number of algebraic equations
|
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.
order | the order of Taylor expansion. |
Definition at line 402 of file differential_equation.cpp.
|
inline |
Returns the start time of the horizon of the differential equation
or -INFTY for the case that the start time is not defined.
|
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
|
inline |
|
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.
|
virtual |
Ask whether the differential equation is discretized (in time).
Definition at line 427 of file differential_equation.cpp.
|
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.
|
virtual |
Adds DifferentialStateDerivative if the differential
equation is an 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.
|
protected |
Setup routine (for internal use only)
Definition at line 107 of file differential_equation.cpp.
|
protected |
Definition at line 267 of file differential_equation.hpp.
|
protected |
Definition at line 266 of file differential_equation.hpp.
|
protected |
Definition at line 262 of file differential_equation.hpp.
|
protected |
Definition at line 264 of file differential_equation.hpp.
|
protected |
Definition at line 263 of file differential_equation.hpp.
|
protected |
Definition at line 273 of file differential_equation.hpp.
|
protected |
Definition at line 272 of file differential_equation.hpp.
|
protected |
Definition at line 269 of file differential_equation.hpp.
|
protected |
Definition at line 270 of file differential_equation.hpp.
|
protected |
Definition at line 269 of file differential_equation.hpp.
|
protected |
Definition at line 270 of file differential_equation.hpp.