ACADO Toolkit  1.2.0beta
Toolkit for Automatic Control and Dynamic Optimization
Public Member Functions | Protected Member Functions | Protected Attributes | Friends

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]

List of all members.

Public Member Functions

 DifferentialEquation ()
 Default constructor.
 DifferentialEquation (const double &tStart, const double &tEnd)
 Default constructor.
 DifferentialEquation (const double &tStart, const Parameter &tEnd)
 Default constructor.
 DifferentialEquation (const Parameter &tStart, const double &tEnd)
 Default constructor.
 DifferentialEquation (const Parameter &tStart, const Parameter &tEnd)
 Default constructor.
 DifferentialEquation (const DifferentialEquation &arg)
 Copy constructor (deep copy).
virtual ~DifferentialEquation ()
 Destructor.
DifferentialEquationoperator= (const DifferentialEquation &arg)
 Assignment operator (deep copy).
virtual DifferentialEquationclone () const
 Clone constructor (deep copy).
DifferentialEquationoperator<< (const Expression &arg)
 Loading Expressions (deep copy).
DifferentialEquationoperator<< (const int &arg)
 Loading Expressions (deep copy).
DifferentialEquationoperator== (const Expression &arg)
 Loading Expressions (deep copy).
DifferentialEquationoperator== (const double &arg)
 Loading Expressions (deep copy).
DifferentialEquationoperator== (const Vector &arg)
 Loading Symbolic Vector (deep copy).
DifferentialEquationoperator== (const Matrix &arg)
 Loading Symbolic Matrix (deep copy).
BooleanType isDAE () const
 Ask whether the differential equation is a DAE.
BooleanType isODE () const
 Ask whether the differential equation is a ODE.
BooleanType isImplicit () const
 Ask whether the differential equation is given in implicit form.
virtual BooleanType makeImplicit ()
 Adds DifferentialStateDerivative if the differential
equation is an ODE.
int getNumDynamicEquations () const
 Returns the number of dynamic equations
.
int getNumAlgebraicEquations () const
 Returns the number of algebraic equations
.
virtual BooleanType isDiscretized () const
 Ask whether the differential equation is discretized (in time).
double getStartTime () const
 Returns the start time of the horizon of the differential equation
or -INFTY for the case that the start time is not defined.
double getEndTime () const
 Returns the end time of the horizon of the differential equation
or +INFTY for the case that the start time is not defined.
int getStartTimeIdx () const
 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

.
int getEndTimeIdx () const
 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

.
virtual double getStepLength () const
 Always returns -INFTY in the time-continuous case.
int getStateEnumerationIndex (int index_)
Vector getDifferentialStateComponents () const
DifferentialEquationaddDifferential (const Expression &arg)
 Loading Expressions (deep copy).
DifferentialEquationaddDifferential (const double &arg)
 Loading Expressions (deep copy).
DifferentialEquationaddAlgebraic (const Expression &arg)
 Loading Expressions (deep copy).
DifferentialEquationaddAlgebraic (const double &arg)
 Loading Expressions (deep copy).
DifferentialEquationaddDifferential (const Vector &arg)
 Loading Symbolic Vector (deep copy).
DifferentialEquationaddAlgebraic (const Vector &arg)
 Loading Symbolic Vector (deep copy).
DifferentialEquationaddDifferential (const Matrix &arg)
 Loading Symbolic Matrix (deep copy).
DifferentialEquationaddAlgebraic (const Matrix &arg)
 Loading Symbolic Matrix (deep copy).
DifferentialEquationoperator== (const Lyapunov &arg)
Lyapunov getLyapunovObject () const
BooleanType hasLyapunovEquation () const
Expression getODEexpansion (const int &order) const
 Returning an Expression that contains a Taylor expansion
of the ODE-solution trajectory.
int * getComponents () const
Functionoperator<< (const double &arg)
 Loading Expressions (deep copy).
Functionoperator<< (const Vector &arg)
 Loading Symbolic Vector (deep copy).
Functionoperator<< (const Matrix &arg)
 Loading Symbolic Matrix (deep copy).
Function operator() (uint idx) const
Vector operator() (const EvaluationPoint &x, const int &number=0)
 Redundant evaluation routine which is equivalent to
to the evaluate routine above.
returnValue getExpression (Expression &expression) const
OperatorgetExpression (uint componentIdx) const
 Returns the symbolic expression of the given component of the function.
returnValue reset ()
int getDim () const
 Returns the dimension of the function
.
int getN () const
 Returns the number of intermediate expressions that have
been detected in the function.
int getN (VariableType &variableType_) const
 Returns the number of differential states
.
int getNX () const
 Returns the number of differential states
.
int getNXA () const
 Returns the number of algebraic states
.
int getNDX () const
 Returns the number of differential states derivatives
.
int getNU () const
 Returns the number of controls
.
int getNUI () const
 Returns the number of integer controls
.
int getNP () const
 Returns the number of parameters
.
int getNPI () const
 Returns the number of integer parameters
.
int getNW () const
 Returns the number of disturbances
.
int getNT () const
 Returns the number of time variables
.
int index (VariableType variableType_, int index_) const
 Returns the index of the variable with specified type and
component.
double scale (VariableType variableType_, int index_) const
 Returns the scale of a given variable.
int getNumberOfVariables () const
 Returns the variable counter.
Vector evaluate (const EvaluationPoint &x, const int &number=0)
 Evaluates the function.
template<typename T >
Tmatrix< T > evaluate (const TevaluationPoint< T > &x)
 Evaluates the function at a templated
evaluation point.
returnValue evaluate (int number, double *x, double *_result)
 Evaluates the function and stores the intermediate
results in a buffer (needed for automatic differentiation
in backward mode)
.
returnValue substitute (VariableType variableType_, int index_, double sub_)
 Substitutes var(index) with the double sub.
NeutralElement isOneOrZero ()
 Checks whether the function is zero or one
.
BooleanType isDependingOn (const Expression &variable)
 Checks whether the function is depending on
var(index)
.
BooleanType isLinearIn (const Expression &variable)
 Checks whether the function is linear in
(or not depending on) var(index)
.
BooleanType isPolynomialIn (const Expression &variable)
 Checks whether the function is polynomial in
the variable var(index)
.
BooleanType isRationalIn (const Expression &variable)
 Checks whether the function is rational in
the variable var(index)
.
BooleanType isNondecreasing ()
 Checks whether the function is nondecreasing.
BooleanType isNonincreasing ()
 Checks whether the function is nonincreasing.
BooleanType isAffine ()
 Checks whether the function is affine.
BooleanType isConvex ()
 Checks whether the function is convex.
BooleanType isConcave ()
 Checks whether the function is concave.
Vector AD_forward (const EvaluationPoint &x, const int &number=0)
 Automatic Differentiation in forward mode.
returnValue AD_forward (int number, double *seed, double *df)
 Automatic Differentiation in forward mode.
returnValue AD_backward (const Vector &seed, EvaluationPoint &df, const int &number=0)
 Automatic Differentiation in backward mode.
returnValue AD_backward (int number, double *seed, double *df)
 Automatic Differentiation in backward mode based on
buffered values
.
returnValue AD_forward2 (int number, double *seed1, double *seed2, double *df, double *ddf)
 Automatic Differentiation in forward mode for
2nd derivatives.
returnValue AD_backward2 (int number, double *seed1, double *seed2, double *df, double *ddf)
 Automatic Differentiation in backward mode for 2nd order
derivatives based on buffered values.
returnValue jacobian (Matrix &x)
 calculate the jacobian of an evaluated function
returnValue print (FILE *file, const char *fcnName="ACADOfcn", const char *realString="double", int precision=16) const
 Prints the function in form of plain C-code into a file.
returnValue exportHeader (FILE *file, const char *fcnName="ACADOfcn", const char *realString="double") const
returnValue exportForwardDeclarations (FILE *file, const char *fcnName="ACADOfcn", const char *realString="double") const
returnValue exportCode (FILE *file, const char *fcnName="ACADOfcn", const char *realString="double", int precision=16, uint _numX=0, uint _numXA=0, uint _numU=0, uint _numP=0, uint _numDX=0) const
returnValue clearBuffer ()
 Clears the buffer and resets the buffer size
to 1.
returnValue setScale (double *scale_)
 Defines a scale for the case that a C-function is used
.
BooleanType isSymbolic () const
 Returns whether the function is symbolic or not.
BooleanType ADisSupported () const
returnValue setMemoryOffset (int memoryOffset_)
returnValue setGlobalExportVariableName (const String &var)
 Set name of the variable that holds intermediate values.
String getGlobalExportVariableName () const
 Get name of the variable that holds intermediate values.
unsigned getGlobalExportVariableSize () const
 Get size of the variable that holds intermediate values.

Protected Member Functions

void setup ()
 Setup routine (for internal use only)
void copy (const DifferentialEquation &arg)
 Protected version of the copy constructor.

Protected Attributes

DifferentialEquationType det
BooleanType is_implicit
BooleanType is_discretized
int counter
int * component
ParameterT1
ParameterT2
double t1
double t2
double stepLength
Lyapunov lyap
FunctionEvaluationTree evaluationTree
int memoryOffset
double * result

Friends

returnValue operator<< (FILE *file, Function &arg)
 Prints the function into a file.

Detailed Description

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

Author:
Boris Houska, Hans Joachim Ferreau

Constructor & Destructor Documentation

References setup(), T1, t1, T2, and t2.

Referenced by clone().

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

References setup(), T1, t1, T2, and t2.

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

References ASSERT, Expression::getDim(), setup(), T1, t1, T2, and t2.

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

References ASSERT, Expression::getDim(), setup(), T1, t1, T2, and t2.

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

References ASSERT, Expression::getDim(), setup(), T1, t1, T2, and t2.

References copy().

References component, T1, and T2.


Member Function Documentation

returnValue Function::AD_backward ( const Vector seed,
EvaluationPoint df,
const int &  number = 0 
) [inherited]
returnValue Function::AD_backward ( int  number,
double *  seed,
double *  df 
) [inherited]
Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberthe buffer position
seedthe seed
dfthe derivative of the expression

References FunctionEvaluationTree::AD_backward(), Function::evaluationTree, and Function::memoryOffset.

returnValue Function::AD_backward2 ( int  number,
double *  seed1,
double *  seed2,
double *  df,
double *  ddf 
) [inherited]


IMPORTANT REMARK: run AD_forward first to define
the point x and to compute f and df.

Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberthe buffer position
seed1the seed1
seed2the seed2
dfthe 1st derivative of the expression
ddfthe 2nd derivative of the expression

References FunctionEvaluationTree::AD_backward2(), Function::evaluationTree, and Function::memoryOffset.

Referenced by MayerTerm::evaluateSensitivities().

Vector Function::AD_forward ( const EvaluationPoint x,
const int &  number = 0 
) [inherited]



Parameters:
xthe evaluation point
numberthe storage position

Returns:
The result of the evaluation.

References Function::getDim(), EvaluationPoint::getEvaluationPointer(), and Function::result.

Referenced by Function::AD_backward(), Integrator::diffTransitionForward(), MayerTerm::evaluateSensitivities(), and LSQTerm::evaluateSensitivitiesGN().

returnValue Function::AD_forward ( int  number,
double *  seed,
double *  df 
) [inherited]


This function uses the intermediate
results from a buffer

Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberstorage position
seedthe seed
dfthe derivative of the expression

References FunctionEvaluationTree::AD_forward(), Function::evaluationTree, and Function::memoryOffset.

returnValue Function::AD_forward2 ( int  number,
double *  seed1,
double *  seed2,
double *  df,
double *  ddf 
) [inherited]


This function uses intermediate
results from a buffer.

Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberthe buffer position
seed1the seed
seed2the seed for the first derivative
dfthe derivative of the expression
ddfthe 2nd derivative of the expression

References FunctionEvaluationTree::AD_forward2(), Function::evaluationTree, and Function::memoryOffset.

References addDifferential().

BooleanType Function::ADisSupported ( ) const [inline, inherited]


Returns:
SUCCESFUL_RETURN

References FunctionEvaluationTree::clearBuffer(), and Function::evaluationTree.

void DifferentialEquation::copy ( const DifferentialEquation arg) [protected]
Vector Function::evaluate ( const EvaluationPoint x,
const int &  number = 0 
) [inherited]
template<typename T >
Tmatrix< T > Function::evaluate ( const TevaluationPoint< T > &  x) [inherited]



Parameters:
xthe evaluation point

Returns:
The result of the evaluation.

References FunctionEvaluationTree::evaluate(), Function::evaluationTree, Function::getDim(), and TevaluationPoint< T >::getEvaluationPointer().

returnValue Function::evaluate ( int  number,
double *  x,
double *  _result 
) [inherited]
Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberstorage position
xthe input variable x
_resultthe result

References FunctionEvaluationTree::evaluate(), Function::evaluationTree, Function::memoryOffset, and SUCCESSFUL_RETURN.

returnValue Function::exportCode ( FILE *  file,
const char *  fcnName = "ACADOfcn",
const char *  realString = "double",
int  precision = 16,
uint  _numX = 0,
uint  _numXA = 0,
uint  _numU = 0,
uint  _numP = 0,
uint  _numDX = 0 
) const [inherited]
returnValue Function::exportForwardDeclarations ( FILE *  file,
const char *  fcnName = "ACADOfcn",
const char *  realString = "double" 
) const [inherited]
returnValue Function::exportHeader ( FILE *  file,
const char *  fcnName = "ACADOfcn",
const char *  realString = "double" 
) const [inherited]
int * DifferentialEquation::getComponents ( ) const [inline]

References component.

Referenced by EllipsoidalIntegrator::init().

BEGIN_NAMESPACE_ACADO int Function::getDim ( ) const [inline, inherited]
Returns:
The requested dimension.

References Function::evaluationTree, and FunctionEvaluationTree::getDim().

Referenced by Function::AD_backward(), Function::AD_forward(), PointConstraint::add(), CoupledPathConstraint::add(), BoundaryConstraint::add(), PathConstraint::add(), Curve::add(), PointConstraint::computeForwardSensitivityBlock(), AlgebraicConsistencyConstraint::computeForwardSensitivityBlock(), ConstraintElement::ConstraintElement(), OutputFcn::evaluate(), PointConstraint::evaluate(), PathConstraint::evaluate(), LSQTerm::evaluate(), LSQEndTerm::evaluate(), Function::evaluate(), PointConstraint::evaluateSensitivities(), LSQTerm::evaluateSensitivities(), PathConstraint::evaluateSensitivities(), AlgebraicConsistencyConstraint::evaluateSensitivities(), LSQTerm::evaluateSensitivitiesGN(), LSQEndTerm::evaluateSensitivitiesGN(), Function::exportCode(), Function::exportForwardDeclarations(), Function::exportHeader(), Function::Function(), ConstraintElement::get(), Integrator::getBackwardSensitivities(), Expression::getDependencyPattern(), PathConstraint::getDim(), BoundaryConstraint::getNC(), PointConstraint::getNC(), CoupledPathConstraint::getNC(), getNumDynamicEquations(), DynamicSystem::getNumOutputs(), Integrator::getX(), Integrator::getXA(), ModelData::hasDifferentialEquation(), ModelContainer::hasDifferentialEquation(), IntegratorBDF::init(), IntegratorRK::init(), IntegratorLYAPUNOV::init(), EllipsoidalIntegrator::init(), Integrator::integrate(), Integrator::integrateSensitivities(), DynamicSystem::isConsistentOutputFcn(), Function::jacobian(), LSQEndTerm::LSQEndTerm(), LSQTerm::LSQTerm(), makeImplicit(), OCP::minimizeLSQ(), OCP::minimizeLSQEndTerm(), Function::operator()(), Function::operator<<(), ConstraintElement::operator=(), Function::operator=(), LSQTerm::operator=(), LSQEndTerm::operator=(), Function::print(), ExportNLPSolver::setConstraints(), LSQTerm::setGrid(), IntegratorExport::setModelData(), and ExportNLPSolver::setObjective().

double DifferentialEquation::getEndTime ( ) const [inline]



Returns:
the end time.

References INFTY, T2, and t2.

Referenced by ShootingMethod::addStage().

int DifferentialEquation::getEndTimeIdx ( ) const [inline]
Returns:
the start time.

References Expression::getComponent(), and T2.

Referenced by ShootingMethod::addStage().

returnValue Function::getExpression ( Expression expression) const [inherited]
Operator * Function::getExpression ( uint  componentIdx) const [inherited]


Returns:
The symbolic expression

References Function::evaluationTree, and FunctionEvaluationTree::getExpression().

unsigned Function::getGlobalExportVariableSize ( ) const [inherited]

References lyap.

Referenced by IntegratorLYAPUNOV::init().

int Function::getN ( ) const [inline, inherited]


Returns:
The requested number of intermediate states.

References Function::evaluationTree, and FunctionEvaluationTree::getN().

Referenced by Function::getN(), IntegratorBDF::init(), IntegratorLYAPUNOV::init(), and IntegratorRK::init().

int Function::getN ( VariableType variableType_) const [inherited]
int Function::getNDX ( ) const [inherited]
int Function::getNP ( ) const [inherited]
int Function::getNPI ( ) const [inherited]
int Function::getNT ( ) const [inherited]
int Function::getNU ( ) const [inherited]
int Function::getNUI ( ) const [inherited]
int Function::getNumberOfVariables ( ) const [inherited]


Returns:
The number of variables

References Function::evaluationTree, and FunctionEvaluationTree::getNumberOfVariables().

Referenced by Function::AD_backward(), IntegratorLYAPUNOV::allocateMemory(), IntegratorRK::allocateMemory(), IntegratorBDF::allocateMemory(), PointConstraint::computeForwardSensitivityBlock(), IntegratorRK::constructAll(), IntegratorLYAPUNOV::constructAll(), IntegratorBDF::constructAll(), IntegratorLYAPUNOV::determineEtaHBackward(), IntegratorRK::determineEtaHBackward(), IntegratorLYAPUNOV::determineEtaHBackward2(), IntegratorRK::determineEtaHBackward2(), MayerTerm::evaluateSensitivities(), PointConstraint::evaluateSensitivities(), BoundaryConstraint::evaluateSensitivities(), LSQTerm::evaluateSensitivities(), PathConstraint::evaluateSensitivities(), CoupledPathConstraint::evaluateSensitivities(), IntegratorLYAPUNOV::evaluateSensitivities(), IntegratorRK::evaluateSensitivities(), LSQTerm::evaluateSensitivitiesGN(), LSQEndTerm::evaluateSensitivitiesGN(), Expression::getDependencyPattern(), TevaluationPoint< T >::init(), EvaluationPoint::init(), Function::jacobian(), IntegratorDiscretizedODE::performADbackwardStep(), IntegratorDiscretizedODE::performADbackwardStep2(), IntegratorLYAPUNOV::setBackwardSeed2(), IntegratorRK::setBackwardSeed2(), IntegratorLYAPUNOV::setForwardSeed2(), IntegratorRK::setForwardSeed2(), IntegratorLYAPUNOV::setProtectedBackwardSeed(), IntegratorRK::setProtectedBackwardSeed(), IntegratorLYAPUNOV::setProtectedForwardSeed(), and IntegratorRK::setProtectedForwardSeed().

int Function::getNW ( ) const [inherited]
int Function::getNX ( ) const [inherited]
int Function::getNXA ( ) const [inherited]
Expression DifferentialEquation::getODEexpansion ( const int &  order) const



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), ... ].

References ACADOERROR, component, Function::getExpression(), Expression::getODEexpansion(), and RET_INDEX_OUT_OF_BOUNDS.

Referenced by EllipsoidalIntegrator::init().

double DifferentialEquation::getStartTime ( ) const [inline]



Returns:
the start time.

References INFTY, T1, and t1.

Referenced by ShootingMethod::addStage().

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

References Expression::getComponent(), and T1.

Referenced by ShootingMethod::addStage().

int DifferentialEquation::getStateEnumerationIndex ( int  index_) [inline]
double DifferentialEquation::getStepLength ( ) const [virtual]
int Function::index ( VariableType  variableType_,
int  index_ 
) const [inherited]


Returns:
BT_FALSE if the expression is not affine
BT_TRUE otherwise

References BT_FALSE, BT_TRUE, Function::isConcave(), and Function::isConvex().

Referenced by Integrator::isDifferentialEquationAffine(), LSQTerm::isQuadratic(), and LSQEndTerm::isQuadratic().


Returns:
BT_FALSE if the expression is not (DCP-) concave
BT_TRUE otherwise

References BT_FALSE, BT_TRUE, CT_AFFINE, CT_CONCAVE, CT_CONSTANT, Function::evaluationTree, and FunctionEvaluationTree::getCurvature().

Referenced by Function::isAffine().


Returns:
BT_FALSE if the expression is not (DCP-) convex
BT_TRUE otherwise

References BT_FALSE, BT_TRUE, CT_AFFINE, CT_CONSTANT, CT_CONVEX, Function::evaluationTree, and FunctionEvaluationTree::getCurvature().

Referenced by Function::isAffine().

BooleanType Function::isDependingOn ( const Expression variable) [inherited]
Returns:
BT_FALSE if no dependence is detected
BT_TRUE otherwise

References Function::evaluationTree, and FunctionEvaluationTree::isDependingOn().

References is_implicit.

BooleanType Function::isLinearIn ( const Expression variable) [inherited]
Returns:
BT_FALSE if no linearity is
detected
BT_TRUE otherwise

References Function::evaluationTree, and FunctionEvaluationTree::isLinearIn().


Returns:
BT_FALSE if the expression is not nondecreasing
BT_TRUE otherwise

References BT_FALSE, BT_TRUE, Function::evaluationTree, FunctionEvaluationTree::getMonotonicity(), MT_CONSTANT, and MT_NONDECREASING.


Returns:
BT_FALSE if the expression is not nonincreasing
BT_TRUE otherwise

References BT_FALSE, BT_TRUE, Function::evaluationTree, FunctionEvaluationTree::getMonotonicity(), MT_CONSTANT, and MT_NONINCREASING.

Returns:
NE_ZERO
NE_ONE
NE_NEITHER_ONE_NOR_ZERO

References Function::evaluationTree, and FunctionEvaluationTree::isOneOrZero().

Referenced by ExportNLPSolver::setObjective().

BooleanType Function::isPolynomialIn ( const Expression variable) [inherited]
Returns:
BT_FALSE if the expression is not polynomial
BT_TRUE otherwise

References Function::evaluationTree, and FunctionEvaluationTree::isPolynomialIn().

BooleanType Function::isRationalIn ( const Expression variable) [inherited]
Returns:
BT_FALSE if the expression is not rational
BT_TRUE otherwise

References Function::evaluationTree, and FunctionEvaluationTree::isRationalIn().

BooleanType Function::isSymbolic ( ) const [inline, inherited]

If BT_TRUE
is returned, automatic differentiation will be used by
default.

References Function::evaluationTree, and FunctionEvaluationTree::isSymbolic().

Referenced by Function::ADisSupported(), LSQTerm::isQuadratic(), and Function::substitute().

returnValue Function::jacobian ( Matrix x) [inherited]

Calculates the matrix diff(fun(x,u,v,p,q,w),x)

Parameters:
xwill be assigned jacobian(fun,differential states)

References Function::AD_backward(), Function::getDim(), Function::getNumberOfVariables(), Function::getNX(), Function::index(), VectorspaceElement::setAll(), SUCCESSFUL_RETURN, and VT_DIFFERENTIAL_STATE.


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

References BT_FALSE, BT_TRUE, Function::evaluationTree, Function::getDim(), getNumAlgebraicEquations(), is_implicit, and FunctionEvaluationTree::makeImplicit().

Referenced by IntegratorBDF::init().

Function Function::operator() ( uint  idx) const [inherited]
Vector Function::operator() ( const EvaluationPoint x,
const int &  number = 0 
) [inline, inherited]



Parameters:
xthe evaluation point
numberthe storage position

Returns:
The result of the evaluation.

References Function::evaluate().

Function & Function::operator<< ( const double &  arg) [inherited]
Function & Function::operator<< ( const Vector arg) [inherited]
Function & Function::operator<< ( const Matrix arg) [inherited]
DifferentialEquation & DifferentialEquation::operator<< ( const Expression arg)
DifferentialEquation & DifferentialEquation::operator<< ( const int &  arg)
DifferentialEquation & DifferentialEquation::operator= ( const DifferentialEquation arg)

References component, copy(), T1, and T2.

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

References addAlgebraic(), addDifferential(), det, and DET_DAE.

Referenced by operator==().

DifferentialEquation & DifferentialEquation::operator== ( const double &  arg)
DifferentialEquation & DifferentialEquation::operator== ( const Vector arg)
DifferentialEquation & DifferentialEquation::operator== ( const Matrix arg)
DifferentialEquation & DifferentialEquation::operator== ( const Lyapunov arg)
returnValue Function::print ( FILE *  file,
const char *  fcnName = "ACADOfcn",
const char *  realString = "double",
int  precision = 16 
) const [inherited]

The integer
"precision" must be in [1,16] and defines the number of internal decimal places
which occur in "double" - valued parts of the expression tree.

Parameters:
fileThe file to which the expression should be printed.
fcnNameThe name of the generated function (default: "ACADOfcn").
precisionThe number of internal dec. places to be printed (default: 16).

Returns:
SUCCESFUL_RETURN

References FunctionEvaluationTree::C_print(), Function::evaluationTree, Function::getDim(), and SUCCESSFUL_RETURN.

Referenced by operator<<().

returnValue Function::reset ( ) [inherited]
double Function::scale ( VariableType  variableType_,
int  index_ 
) const [inherited]
returnValue Function::setMemoryOffset ( int  memoryOffset_) [inline, inherited]
returnValue Function::setScale ( double *  scale_) [inherited]
Returns:
SUCCESSFUL_RETURN

References Function::evaluationTree, and FunctionEvaluationTree::setScale().

void DifferentialEquation::setup ( ) [protected]
returnValue Function::substitute ( VariableType  variableType_,
int  index_,
double  sub_ 
) [inherited]


Returns:
The substituted expression.
Parameters:
index_subst. index
sub_the substitution

References ACADOERROR, BT_TRUE, Function::evaluationTree, Function::isSymbolic(), RET_ONLY_SUPPORTED_FOR_SYMBOLIC_FUNCTIONS, FunctionEvaluationTree::substitute(), and SUCCESSFUL_RETURN.


Friends And Related Function Documentation

returnValue operator<< ( FILE *  file,
Function arg 
) [friend, inherited]


Returns:
SUCCESSFUL_RETURN

Member Data Documentation

int Function::memoryOffset [protected, inherited]
double* Function::result [protected, inherited]
double DifferentialEquation::t1 [protected]
double DifferentialEquation::t2 [protected]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines