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

Implements the Runge-Kutta-12 scheme for integrating ODEs. More...

#include <integrator_runge_kutta12.hpp>

Inheritance diagram for IntegratorRK12:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IntegratorRK12 ()
 Default constructor.
 IntegratorRK12 (const DifferentialEquation &rhs_)
 Default constructor.
 IntegratorRK12 (const IntegratorRK12 &arg)
 Copy constructor (deep copy).
virtual ~IntegratorRK12 ()
 Destructor.
virtual IntegratorRK12operator= (const IntegratorRK12 &arg)
 Assignment operator (deep copy).
virtual Integratorclone () const
 The (virtual) copy constructor.
virtual returnValue init (const DifferentialEquation &rhs_)
 The initialization routine which takes the right-hand side of
the differential equation to be integrated.
virtual returnValue step (int number)
 Executes the next single step.
returnValue init (const DifferentialEquation &rhs_, const Transition &trs_)
 The initialization routine which takes the right-hand side of
the differential equation to be integrated.
virtual returnValue freezeMesh ()
 Freezes the mesh: Storage of the step sizes.
virtual returnValue freezeAll ()
 Freezes the mesh as well as all intermediate values.
virtual returnValue unfreeze ()
 Unfreezes the mesh: Gives the memory free that has previously
been allocated by "freeze".
virtual returnValue stop ()
 Stops the integration even if the final time has not been
reached yet.
virtual returnValue setDxInitialization (double *dx0)
 Sets an initial guess for the differential state derivatives
(consistency condition)
.
virtual int getNumberOfSteps () const
 Returns the number of accepted Steps.
virtual int getNumberOfRejectedSteps () const
 Returns the number of rejected Steps.
virtual double getStepSize () const
 Returns the current step size.
returnValue setTransition (const Transition &trs)
returnValue integrate (double t0, double tend, double *x0, double *xa=0, double *p=0, double *u=0, double *w=0)
 Starts the integration of the right hand side at time t0.
returnValue integrate (const Grid &t, double *x0, double *xa=0, double *p=0, double *u=0, double *w=0)
 Starts the integration of the right hand side at time t0.
returnValue integrate (double t0, double tend, const Vector &x0, const Vector &xa=emptyVector, const Vector &p=emptyVector, const Vector &u=emptyVector, const Vector &w=emptyVector)
 Starts the integration of the right hand side at time t0.
returnValue integrate (const Grid &t, const Vector &x0, const Vector &xa=emptyVector, const Vector &p=emptyVector, const Vector &u=emptyVector, const Vector &w=emptyVector)
 Starts the integration of the right hand side at time t0.
returnValue setForwardSeed (const int &order, const Vector &xSeed, const Vector &pSeed=emptyVector, const Vector &uSeed=emptyVector, const Vector &wSeed=emptyVector)
 Define a forward seed matrix.
returnValue setBackwardSeed (const int &order, const Vector &seed)
 Define a backward seed
.
virtual returnValue deleteAllSeeds ()
 Deletes all seeds that have been set with the methods above.
returnValue integrateSensitivities ()
 < Integrates forward and/or backward depending on the specified seeds.
returnValue getX (Vector &xEnd) const
 Returns the result for the differential states at the
time tend.
returnValue getX (VariablesGrid &X) const
 Returns the requested output on the specified grid.
returnValue getXA (Vector &xaEnd) const
 Returns the result for the algebraic states at the
time tend.
returnValue getXA (VariablesGrid &XA) const
 Returns the requested output on the specified grid.
returnValue getI (VariablesGrid &I) const
 Returns the requested output on the specified grid.
returnValue getForwardSensitivities (Vector &Dx, int order) const
 Returns the result for the forward sensitivities at the time tend.
returnValue getForwardSensitivities (VariablesGrid &Dx, int order) const
 Returns the result for the forward sensitivities on the grid.
returnValue getBackwardSensitivities (Vector &Dx_x0, Vector &Dx_p, Vector &Dx_u, Vector &Dx_w, int order) const
 Returns the result for the backward sensitivities at the time tend.
virtual BooleanType canHandleImplicitSwitches () const
 Returns if integrator is able to handle implicit switches.
virtual BooleanType isDifferentialEquationDefined () const
 Returns if the differential equation of the integrator is defined.
virtual BooleanType isDifferentialEquationAffine () const
 Returns if the differential equation of the integrator is affine.
virtual double getDifferentialEquationSampleTime () const
 Returns the.
virtual returnValue printRunTimeProfile () const
 Prints the run-time profile.
returnValue addOptionsList ()
 Adds an additional OptionsList to internal array.
returnValue set (OptionsName name, int value)
 Sets value of an existing option item of integer type to a given value.
returnValue set (OptionsName name, double value)
 Sets value of an existing option item of double type to a given value.
returnValue set (uint idx, OptionsName name, int value)
 Sets value of an existing option item of integer type within the option list of given index to a given value.
returnValue set (uint idx, OptionsName name, double value)
 Sets value of an existing option item of double type within the option list of given index to a given value.
returnValue setOptions (const Options &arg)
 Assigns a given Options object to this object.
returnValue setOptions (uint idx, const Options &arg)
 Assigns the option list with given index of a given Options object to option list with given index of this object.
Options getOptions (uint idx) const
 Returns an Options object containing exactly the option list with given index.
returnValue getAll (LogName _name, MatrixVariablesGrid &values) const
 Gets all numerical values at all time instants of the item with given name.
returnValue getFirst (LogName _name, Matrix &firstValue) const
 Gets numerical value at first time instant of the item with given name.
returnValue getFirst (LogName _name, VariablesGrid &firstValue) const
 Gets numerical value at first time instant of the item with given name (converts internally used Matrix into VariablesGrid).
returnValue getLast (LogName _name, Matrix &lastValue) const
 Gets numerical value at last time instant of the item with given name.
returnValue getLast (LogName _name, VariablesGrid &lastValue) const
 Gets numerical value at last time instant of the item with given name (converts internally used Matrix into VariablesGrid).
returnValue get (OptionsName name, int &value) const
 Returns value of an existing option item of integer type.
returnValue get (OptionsName name, double &value) const
 Returns value of an existing option item of double type.
returnValue get (uint idx, OptionsName name, int &value) const
 Returns value of an existing option item of integer type within the option list of given index.
returnValue get (uint idx, OptionsName name, double &value) const
 Returns value of an existing option item of double type within the option list of given index.
returnValue addOption (OptionsName name, int value)
 Add an option item with a given integer default value to the all option lists.
returnValue addOption (OptionsName name, double value)
 Add an option item with a given double default value to the all option lists.
returnValue addOption (uint idx, OptionsName name, int value)
 Add an option item with a given integer default value to option list with given index.
returnValue addOption (uint idx, OptionsName name, double value)
 Add an option item with a given double default value to option list with given index.
BooleanType haveOptionsChanged () const
 Determines whether options of at least one option list have been modified.
BooleanType haveOptionsChanged (uint idx) const
 Determines whether options of option list with given index have been modified.
returnValue setAll (LogName _name, const MatrixVariablesGrid &values)
 Sets all numerical values at all time instants of all items with given name within all records.
returnValue setLast (LogName _name, int lastValue, double time=-INFTY)
 Sets numerical value at last time instant of all items with given name within all records.
returnValue setLast (LogName _name, double lastValue, double time=-INFTY)
 Sets numerical value at last time instant of all items with given name within all records.
returnValue setLast (LogName _name, const Vector &lastValue, double time=-INFTY)
 Sets numerical value at last time instant of all items with given name within all records.
returnValue setLast (LogName _name, const Matrix &lastValue, double time=-INFTY)
 Sets numerical value at last time instant of all items with given name within all records.
returnValue setLast (LogName _name, const VariablesGrid &lastValue, double time=-INFTY)
 Sets numerical value at last time instant of all items with given name within all records.
int addLogRecord (LogRecord &_record)
 Adds a record to the log collection.
returnValue printLogRecord (int idx, LogPrintMode _mode=PRINT_ITEM_BY_ITEM) const
 Prints whole record with specified index into internally specified file; all items are printed according to the output format settings.
returnValue plot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 Plots all windows of the plot collection, each one into a new figure.
returnValue replot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 Plots all windows of the plot collection, each one into the corresponding existing figure, if possible.

Protected Member Functions

virtual void initializeButcherTableau ()
 This routine initializes the coefficients of the Butcher Tableau.
virtual int getDim () const
 Returns the dimension of the Differential Equation.
virtual returnValue evaluate (const Vector &x0, const Vector &xa, const Vector &p, const Vector &u, const Vector &w, const Grid &t_)
 Starts integration: cf.
virtual returnValue evaluateSensitivities ()
 < Integrates forward and/or backward depending on the specified seeds.
virtual returnValue setProtectedForwardSeed (const Vector &xSeed, const Vector &pSeed, const Vector &uSeed, const Vector &wSeed, const int &order)
 Define a forward seed.
virtual returnValue setProtectedBackwardSeed (const Vector &seed, const int &order)
 Define a backward seed
.
virtual returnValue getProtectedX (Vector *xEnd) const
 Returns the result for the state at the time tend.
virtual returnValue getProtectedForwardSensitivities (Matrix *Dx, int order) const
 Returns the result for the forward sensitivities at the time tend.
virtual returnValue getProtectedBackwardSensitivities (Vector &Dx_x0, Vector &Dx_p, Vector &Dx_u, Vector &Dx_w, int order) const
 Returns the result for the backward sensitivities at the time tend.
void deleteAll ()
 Implementation of the delete operator.
void constructAll (const IntegratorRK &arg)
 Implementation of the copy constructor.
void allocateMemory ()
 This routine is protected and sets up all
variables (i.e.
void initializeVariables ()
 This routine is protected and is basically used
to set all pointer-valued member to the NULL pointer.
double determineEta45 ()
 computes eta4 and eta5 (only for internal use)

double determineEta45 (int number)
 computes eta4 and eta5 (only for internal use)

void determineEtaGForward (int number)
 computes etaG in forward direction (only for internal use)

void determineEtaGForward2 (int number)
 computes etaG and etaG2 in forward direction
(only for internal use)

void determineEtaHBackward (int number)
 computes etaH in backward direction (only for internal use)

void determineEtaHBackward2 (int number)
 computes etaH2 in backward direction (only for internal use)

void printIntermediateResults ()
 prints intermediate results for the case that the PrintLevel is
HIGH.
returnValue setForwardSeed2 (const Vector &xSeed, const Vector &pSeed, const Vector &uSeed, const Vector &wSeed)
 Initializes a second forward seed.
virtual returnValue setBackwardSeed2 (const Vector &seed)
 Initializes a second backward seed.
void interpolate (int jj, double *e1, double *d1, double *e2, VariablesGrid &poly)
void logCurrentIntegratorStep (const Vector &currentX=emptyConstVector)
virtual returnValue setupOptions ()
virtual returnValue evaluateTransition (const double time, Vector &xd, const Vector &xa, const Vector &p, const Vector &u, const Vector &w)
 Evaluates the transtion (protected, only for internal use).
virtual returnValue diffTransitionForward (Vector &DX, const Vector &DP, const Vector &DU, const Vector &DW, const int &order)
virtual returnValue diffTransitionBackward (Vector &DX, Vector &DP, Vector &DU, Vector &DW, int &order)
virtual int getDimX () const
 Returns the number of Dynamic Equations in the Differential Equation.
void initializeOptions ()
 Initializes the options.
virtual returnValue setupLogging ()

Protected Attributes

int dim
 the dimension of the Butcher Tableau.
double ** A
 the coefficient A of the Butcher Tableau.
double * b4
 the 4th order coefficients of the Butcher Tableau.
double * b5
 the 5th order coefficients of the Butcher Tableau.
double * c
 the time coefficients of the Butcher Tableau.
double * eta4
 the result of order 4
double * eta5
 the result of order 5
double * eta4_
 the result of order 4
double * eta5_
 the result of order 5
double ** k
 the intermediate results
double ** k2
 the intermediate results
double ** l
 the intermediate results
double ** l2
 the intermediate results
double t
 the actual time
double * x
 the actual state (only internal use)
double err_power
 root order of the step size control
Vector fseed
 The forward seed (only internal use)
Vector bseed
 The backward seed (only internal use)
Vector fseed2
 The forward seed 2 (only internal use)
Vector bseed2
 The backward seed 2 (only internal use)
double * G
 Sensitivity matrix (only internal use)
double * etaG
 Sensitivity matrix (only internal use)
double * G2
 Sensitivity matrix (only internal use)
double * G3
 Sensitivity matrix (only internal use)
double * etaG2
 Sensitivity matrix (only internal use)
double * etaG3
 Sensitivity matrix (only internal use)
double * H
 Sensitivity matrix (only internal use)
double * etaH
 Sensitivity matrix (only internal use)
double * H2
 Sensitivity matrix (only internal use)
double * H3
 Sensitivity matrix (only internal use)
double * etaH2
 Sensitivity matrix (only internal use)
double * etaH3
 Sensitivity matrix (only internal use)
int maxAlloc
 size of the memory that is allocated to store
the trajectory and the mesh.
DifferentialEquationrhs
 the right-hand side to be integrated
short int m
 the dimension of the right-hand side
short int ma
 the number of algebraic states
short int mdx
 the dimension of differential state derivatives
short int mn
 the number of intermediate states in the rhs
short int mu
 the number of controls
short int mui
 the number of integer controls
short int mp
 the number of parameters
short int mpi
 the number of integer parameters
short int mw
 the number of disturbances
short int md
 number of differential states
Transitiontransition
 the transition to be evaluated at switches
double * h
 the initial step size = h[0]
double hini
 storage of the initial step size
double hmin
 the minimum step size
double hmax
 the maximum step size
double tune
 tuning parameter for the step size control.
double TOL
 the integration tolerance
int las
Grid timeInterval
 the type of linear algebra solver to be used
int * diff_index
 the index list for the differential states
int * ddiff_index
 the index list for the differential state derivatives
int * alg_index
 the index list for the algebraic states
int * control_index
 the index list for the controls
int * parameter_index
 the index list for the parameters
int * int_control_index
 the index list for the integer controls
int * int_parameter_index
 the index list for the integer parameters
int * disturbance_index
 the index list for the disturbances
int time_index
 the time index
int maxNumberOfSteps
 the maximum number of integrator steps.
int count
 a counter of the (accepted) steps
int count2
 number of steps after integration
int count3
 number of steps after integration
Vector diff_scale
 the scale of the differential states
int PrintLevel
 The PrintLevel (default: LOW)
int nFDirs
 The number of forward directions.
int nBDirs
 The number of backward directions.
int nFDirs2
 The number of second order forward directions.
int nBDirs2
 The number of second order backward directions.
StateOfAggregation soa
 the state of aggregation
RealClock totalTime
RealClock functionEvaluation
int nFcnEvaluations
Vector xE
Vector dX
Vector dP
Vector dU
Vector dW
Vector dXb
Vector dPb
Vector dUb
Vector dWb
VariablesGrid xStore
VariablesGrid dxStore
VariablesGrid ddxStore
VariablesGrid iStore
UserInteractionuserInteraction
 Pointer to top-level user interface.
BooleanType useModuleStandalone
 Flag indicating whether algorithmic module is used stand-alone.
int outputLoggingIdx
 Index of log record for algorithmic standard output to be optionally used within derived classes.

Detailed Description

The class IntegratorRK12 implements the Runge-Kutta-12 scheme for integrating ordinary differential equations (ODEs).

Author:
Boris Houska, Hans Joachim Ferreau

Constructor & Destructor Documentation

References IntegratorRK::A, and initializeButcherTableau().

Referenced by clone().


Member Function Documentation

int AlgorithmicBase::addLogRecord ( LogRecord _record) [inline, inherited]
Parameters:
[in]recordRecord to be added.
Returns:
>= 0: index of added record,
-RET_LOG_COLLECTION_CORRUPTED

References Logging::addLogRecord(), and AlgorithmicBase::userInteraction.

Referenced by SCPmethod::setupLogging(), DenseQPsolver::setupLogging(), DynamicDiscretization::setupLogging(), and Integrator::setupLogging().

returnValue AlgorithmicBase::addOption ( OptionsName  name,
int  value 
) [inline, inherited]
Parameters:
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

References Options::addOption(), and AlgorithmicBase::userInteraction.

Referenced by BandedCPsolver::setupOptions(), NLPsolver::setupOptions(), DynamicDiscretization::setupOptions(), and Integrator::setupOptions().

returnValue AlgorithmicBase::addOption ( OptionsName  name,
double  value 
) [inline, inherited]
Parameters:
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

References Options::addOption(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::addOption ( uint  idx,
OptionsName  name,
int  value 
) [inline, inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

References Options::addOption(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::addOption ( uint  idx,
OptionsName  name,
double  value 
) [inline, inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

References Options::addOption(), and AlgorithmicBase::userInteraction.

Returns:
SUCCESSFUL_RETURN

References Options::addOptionsList(), and AlgorithmicBase::userInteraction.

Referenced by ShootingMethod::addStage().

void IntegratorRK::allocateMemory ( ) [protected, inherited]
BooleanType Integrator::canHandleImplicitSwitches ( ) const [virtual, inherited]


Returns:
BT_TRUE: if integrator can handle implicit switches.
BT_FALSE: otherwise

References BT_FALSE.

Integrator * IntegratorRK12::clone ( ) const [virtual]

Implements IntegratorRK.

Reimplemented in IntegratorDiscretizedODE.

References IntegratorRK12().

void IntegratorRK::constructAll ( const IntegratorRK arg) [protected, inherited]
void IntegratorRK::deleteAll ( ) [protected, inherited]
returnValue Integrator::deleteAllSeeds ( ) [virtual, inherited]


This function will also give the corresponding memory free.

Returns:
SUCCESSFUL_RETURN
RET_NO_SEED_ALLOCATED

References Integrator::nBDirs, Integrator::nBDirs2, Integrator::nFDirs, Integrator::nFDirs2, and SUCCESSFUL_RETURN.

double IntegratorRK::determineEta45 ( ) [protected, inherited]
double IntegratorRK::determineEta45 ( int  number) [protected, inherited]
void IntegratorRK::determineEtaGForward ( int  number) [protected, inherited]
void IntegratorRK::determineEtaGForward2 ( int  number) [protected, inherited]
void IntegratorRK::determineEtaHBackward ( int  number) [protected, inherited]
void IntegratorRK::determineEtaHBackward2 ( int  number) [protected, inherited]
returnValue Integrator::diffTransitionBackward ( Vector DX,
Vector DP,
Vector DU,
Vector DW,
int &  order 
) [protected, virtual, inherited]
returnValue Integrator::diffTransitionForward ( Vector DX,
const Vector DP,
const Vector DU,
const Vector DW,
const int &  order 
) [protected, virtual, inherited]
returnValue IntegratorRK::evaluate ( const Vector x0,
const Vector xa,
const Vector p,
const Vector u,
const Vector w,
const Grid t_ 
) [protected, virtual, inherited]

integrate(...) for
more details.

Parameters:
x0the initial state
xathe initial algebraic state
pthe parameters
uthe controls
wthe disturbance
t_the time interval

Implements Integrator.

References ABSOLUTE_TOLERANCE, ACADOERROR, acadoPrintCopyrightNotice(), acadoPrintf(), ACADOWARNING, BT_TRUE, Integrator::control_index, Integrator::count, Integrator::count2, Integrator::count3, Integrator::diff_index, Integrator::diff_scale, Integrator::disturbance_index, EPS, IntegratorRK::eta4, IntegratorRK::eta5, IntegratorRK::etaG, fabs(), IntegratorRK::fseed, Integrator::functionEvaluation, VectorspaceElement::getDim(), Grid::getFirstTime(), Grid::getLastTime(), IntegratorRK::getNumberOfRejectedSteps(), Clock::getTime(), Integrator::h, HIGH, Integrator::hini, VariablesGrid::init(), Integrator::initializeOptions(), VectorspaceElement::isEmpty(), Integrator::iStore, LOG_NUMBER_OF_BDF_INTEGRATOR_JACOBIAN_EVALUATIONS, LOG_NUMBER_OF_INTEGRATOR_FUNCTION_EVALUATIONS, LOG_NUMBER_OF_INTEGRATOR_REJECTED_STEPS, LOG_NUMBER_OF_INTEGRATOR_STEPS, LOG_TIME_BDF_INTEGRATOR_JACOBIAN_DECOMPOSITION, LOG_TIME_BDF_INTEGRATOR_JACOBIAN_EVALUATION, LOG_TIME_INTEGRATOR, LOG_TIME_INTEGRATOR_FUNCTION_EVALUATIONS, Integrator::m, Integrator::maxNumberOfSteps, MEDIUM, Integrator::mn, Integrator::mp, Integrator::mu, Integrator::mw, Integrator::nFcnEvaluations, Integrator::nFDirs, NONE, Integrator::parameter_index, PRINT_INTEGRATOR_PROFILE, IntegratorRK::printIntermediateResults(), Integrator::printRunTimeProfile(), RET_FINAL_STEP_NOT_PERFORMED_YET, RET_INPUT_HAS_WRONG_DIMENSION, RET_MAX_NUMBER_OF_STEPS_EXCEEDED, RET_MISSING_INPUTS, RET_RK45_CAN_NOT_TREAT_DAE, RET_TO_SMALL_OR_NEGATIVE_TIME_INTERVAL, RET_TRIVIAL_RHS, Integrator::rhs, AlgorithmicBase::setLast(), Integrator::soa, SOA_EVERYTHING_FROZEN, SOA_MESH_FROZEN, SOA_MESH_FROZEN_FREEZING_ALL, RealClock::start(), IntegratorRK::step(), RealClock::stop(), IntegratorRK::t, Integrator::time_index, Integrator::timeInterval, Integrator::TOL, Integrator::totalTime, IntegratorRK::x, and Integrator::xStore.

Referenced by IntegratorRK::determineEta45(), and IntegratorDiscretizedODE::performDiscreteStep().

returnValue IntegratorRK::evaluateSensitivities ( ) [protected, virtual, inherited]
returnValue Integrator::evaluateTransition ( const double  time,
Vector xd,
const Vector xa,
const Vector p,
const Vector u,
const Vector w 
) [protected, virtual, inherited]
Parameters:
timethe time
xdthe state
xathe algebraic state
pthe parameters
uthe controls
wthe disturbance

References ASSERT, Function::evaluate(), VectorspaceElement::getDim(), EvaluationPoint::setT(), SUCCESSFUL_RETURN, and Integrator::transition.

Referenced by Integrator::integrate().

returnValue IntegratorRK::freezeAll ( ) [virtual, inherited]

This function
is necessary for the case that automatic differentiation in backward
mode should is used. (Note: This function might for large right hand
sides lead to memory problems as all intemediate values will be
stored!)

Returns:
SUCCESSFUL_RETURN
RET_ALREADY_FROZEN

Implements Integrator.

References ACADOWARNING, NONE, RET_ALREADY_FROZEN, Integrator::soa, SOA_FREEZING_ALL, SOA_UNFROZEN, and SUCCESSFUL_RETURN.

returnValue IntegratorRK::freezeMesh ( ) [virtual, inherited]

If the integrator is
freezed the mesh will be stored when calling the function integrate
for the first time. If the function integrate is called more than
once the same mesh will be reused (i.e. the step size control will
be turned off). Note that the mesh should be frozen if any kind of
sensitivity generation is used.

Returns:
SUCCESSFUL_RETURN
RET_ALREADY_FROZEN

Implements Integrator.

References ACADOWARNING, NONE, RET_ALREADY_FROZEN, Integrator::soa, SOA_FREEZING_MESH, SOA_UNFROZEN, and SUCCESSFUL_RETURN.

returnValue AlgorithmicBase::get ( OptionsName  name,
int &  value 
) const [inline, inherited]
Parameters:
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS

References Options::get(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::get ( OptionsName  name,
double &  value 
) const [inline, inherited]
Parameters:
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS

References Options::get(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::get ( uint  idx,
OptionsName  name,
int &  value 
) const [inline, inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_INDEX_OUT_OF_BOUNDS

References Options::get(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::get ( uint  idx,
OptionsName  name,
double &  value 
) const [inline, inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_INDEX_OUT_OF_BOUNDS

References Options::get(), and AlgorithmicBase::userInteraction.

BEGIN_NAMESPACE_ACADO returnValue AlgorithmicBase::getAll ( LogName  _name,
MatrixVariablesGrid values 
) const [inline, inherited]

If this item exists in more than one record, the first one is choosen as they are expected to have identical values anyhow.

Parameters:
[in]_nameInternal name of item.
[out]valuesAll numerical values at all time instants of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References Logging::getAll(), and AlgorithmicBase::userInteraction.

returnValue Integrator::getBackwardSensitivities ( Vector Dx_x0,
Vector Dx_p,
Vector Dx_u,
Vector Dx_w,
int  order 
) const [inherited]



Parameters:
Dx_x0backward sensitivities w.r.t. the initial states
Dx_pbackward sensitivities w.r.t. the parameters
Dx_ubackward sensitivities w.r.t. the controls
Dx_wbackward sensitivities w.r.t. the disturbance

Returns:
SUCCESSFUL_RETURN
RET_INPUT_OUT_OF_RANGE

References Integrator::dPb, Integrator::dUb, Integrator::dWb, DifferentialEquation::getDifferentialStateComponents(), Function::getDim(), VectorspaceElement::getDim(), Integrator::getProtectedBackwardSensitivities(), Integrator::rhs, and VectorspaceElement::setZero().

double Integrator::getDifferentialEquationSampleTime ( ) const [virtual, inherited]
int IntegratorRK::getDim ( ) const [protected, virtual, inherited]

Implements Integrator.

References Integrator::m.

Referenced by IntegratorRK::getProtectedX().

int Integrator::getDimX ( ) const [protected, virtual, inherited]

Reimplemented in IntegratorBDF.

References Integrator::getDim().

returnValue AlgorithmicBase::getFirst ( LogName  _name,
Matrix firstValue 
) const [inline, inherited]

If this item exists in more than one record, the first one is choosen as they are expected to have identical values anyhow.

Parameters:
[in]_nameInternal name of item.
[out]firstValueNumerical value at first time instant of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References Logging::getFirst(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::getFirst ( LogName  _name,
VariablesGrid firstValue 
) const [inline, inherited]

If this item exists in more than one record, the first one is choosen as they are expected to have identical values anyhow.

Parameters:
[in]_nameInternal name of item.
[out]firstValueNumerical value at first time instant of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References Logging::getFirst(), and AlgorithmicBase::userInteraction.

returnValue Integrator::getForwardSensitivities ( Vector Dx,
int  order 
) const [inherited]



Parameters:
Dxthe result for the forward sensitivities.
orderthe order.

Returns:
SUCCESSFUL_RETURN
RET_INPUT_OUT_OF_RANGE

References Integrator::dX, and SUCCESSFUL_RETURN.

returnValue Integrator::getForwardSensitivities ( VariablesGrid Dx,
int  order 
) const [inherited]



Parameters:
Dxthe result for the forward sensitivities.
orderthe order.

Returns:
SUCCESSFUL_RETURN
RET_INPUT_OUT_OF_RANGE

References Integrator::ddxStore, Integrator::dxStore, and SUCCESSFUL_RETURN.

returnValue Integrator::getI ( VariablesGrid I) const [inline, inherited]


The intermediate states constructed based on linear
interpolation.

Parameters:
Ithe intermediates states on the grid.

Returns:
SUCCESSFUL_RETURN
RET_TRAJECTORY_NOT_FROZEN

References Integrator::iStore, and SUCCESSFUL_RETURN.

Referenced by ShootingMethod::logTrajectory().

returnValue AlgorithmicBase::getLast ( LogName  _name,
Matrix lastValue 
) const [inline, inherited]

If this item exists in more than one record, the first one is choosen as they are expected to have identical values anyhow.

Parameters:
[in]_nameInternal name of item.
[out]lastValueNumerical value at last time instant of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References Logging::getLast(), and AlgorithmicBase::userInteraction.

Referenced by Process::simulate().

returnValue AlgorithmicBase::getLast ( LogName  _name,
VariablesGrid lastValue 
) const [inline, inherited]

If this item exists in more than one record, the first one is choosen as they are expected to have identical values anyhow.

Parameters:
[in]_nameInternal name of item.
[out]lastValueNumerical value at last time instant of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References Logging::getLast(), and AlgorithmicBase::userInteraction.

int IntegratorRK::getNumberOfRejectedSteps ( ) const [virtual, inherited]


Returns:
The requested number of rejected steps.

Implements Integrator.

References Integrator::count3.

Referenced by IntegratorRK::evaluate().

int IntegratorRK::getNumberOfSteps ( ) const [virtual, inherited]


Returns:
The requested number of accepted steps.

Implements Integrator.

References Integrator::count2.

Options AlgorithmicBase::getOptions ( uint  idx) const [inherited]
Parameters:
[in]idxIndex of option list.
Returns:
Options object containing exactly the option list with given index

References Options::getOptions(), and AlgorithmicBase::userInteraction.

Referenced by ShootingMethod::evaluate().

returnValue IntegratorRK::getProtectedBackwardSensitivities ( Vector Dx_x0,
Vector Dx_p,
Vector Dx_u,
Vector Dx_w,
int  order 
) const [protected, virtual, inherited]



Parameters:
Dx_x0backward sensitivities w.r.t. the initial states
Dx_pbackward sensitivities w.r.t. the parameters
Dx_ubackward sensitivities w.r.t. the controls
Dx_wbackward sensitivities w.r.t. the disturbance
orderthe order of the derivative

Returns:
SUCCESSFUL_RETURN
RET_INPUT_OUT_OF_RANGE

Implements Integrator.

References ACADOERROR, Integrator::control_index, Integrator::diff_index, Integrator::disturbance_index, IntegratorRK::etaH, IntegratorRK::etaH2, IntegratorRK::etaH3, VectorspaceElement::getDim(), Integrator::m, Integrator::mp, Integrator::mu, Integrator::mw, Integrator::nBDirs2, Integrator::parameter_index, RET_INPUT_OUT_OF_RANGE, and SUCCESSFUL_RETURN.

returnValue IntegratorRK::getProtectedForwardSensitivities ( Matrix Dx,
int  order 
) const [protected, virtual, inherited]


Returns:
SUCCESSFUL_RETURN
RET_INPUT_OUT_OF_RANGE
Parameters:
Dxthe result for the forward sensitivi- ties
orderthe order

Implements Integrator.

References ACADOERROR, IntegratorRK::etaG, IntegratorRK::etaG2, IntegratorRK::etaG3, Integrator::m, Integrator::nFDirs2, RET_INPUT_OUT_OF_RANGE, and SUCCESSFUL_RETURN.

returnValue IntegratorRK::getProtectedX ( Vector xEnd) const [protected, virtual, inherited]


Returns:
SUCCESSFUL_RETURN
Parameters:
xEndthe result for the states at the time tend.

Implements Integrator.

References IntegratorRK::eta4, IntegratorRK::getDim(), Integrator::m, RET_INPUT_HAS_WRONG_DIMENSION, and SUCCESSFUL_RETURN.

double IntegratorRK::getStepSize ( ) const [virtual, inherited]

Implements Integrator.

References Integrator::h.

BEGIN_NAMESPACE_ACADO returnValue Integrator::getX ( Vector xEnd) const [inline, inherited]



Parameters:
xEndthe result for the states at the time tend.

Returns:
SUCCESSFUL_RETURN

References Function::getDim(), VectorspaceElement::init(), Integrator::ma, DynamicDiscretization::N, Integrator::rhs, SUCCESSFUL_RETURN, and Integrator::xE.

Referenced by ShootingMethod::evaluate(), and ShootingMethod::logTrajectory().

returnValue Integrator::getX ( VariablesGrid X) const [inline, inherited]

Note
that the output X will be evaluated based on polynomial
interpolation depending on the order of the integrator.

Parameters:
Xthe differential states on the grid.

Returns:
SUCCESSFUL_RETURN
RET_TRAJECTORY_NOT_FROZEN

References ASSERT, DifferentialEquation::getDifferentialStateComponents(), Grid::getNumPoints(), MatrixVariablesGrid::getNumValues(), MatrixVariablesGrid::getTimePoints(), VariablesGrid::init(), Integrator::m, Integrator::ma, Integrator::rhs, SUCCESSFUL_RETURN, uint, and Integrator::xStore.

returnValue Integrator::getXA ( Vector xaEnd) const [inline, inherited]



Parameters:
xaEndthe result for the algebraic states at the time tend.

Returns:
SUCCESSFUL_RETURN

References Function::getDim(), VectorspaceElement::init(), Integrator::ma, DynamicDiscretization::N, Integrator::rhs, SUCCESSFUL_RETURN, and Integrator::xE.

Referenced by ShootingMethod::evaluate(), and ShootingMethod::logTrajectory().

returnValue Integrator::getXA ( VariablesGrid XA) const [inline, inherited]

Note
that the output X will be evaluated based on polynomial
interpolation depending on the order of the integrator.

Parameters:
XAthe algebraic states on the grid.

Returns:
SUCCESSFUL_RETURN
RET_TRAJECTORY_NOT_FROZEN

References Grid::getNumPoints(), MatrixVariablesGrid::getNumValues(), MatrixVariablesGrid::getTimePoints(), VariablesGrid::init(), Integrator::ma, Integrator::md, SUCCESSFUL_RETURN, uint, and Integrator::xStore.

BooleanType AlgorithmicBase::haveOptionsChanged ( ) const [inline, inherited]
Returns:
BT_TRUE iff options have been modified,
BT_FALSE otherwise

References Options::haveOptionsChanged(), and AlgorithmicBase::userInteraction.

BooleanType AlgorithmicBase::haveOptionsChanged ( uint  idx) const [inline, inherited]
Parameters:
[in]idxIndex of option list.
Returns:
BT_TRUE iff options have been modified,
BT_FALSE otherwise

References Options::haveOptionsChanged(), and AlgorithmicBase::userInteraction.



Parameters:
rhsthe right-hand side of the ODE/DAE.

Returns:
SUCCESSFUL_RETURN if all dimension checks succeed.
otherwise: integrator dependent error message.

Reimplemented from IntegratorRK.

Reimplemented in IntegratorDiscretizedODE.

BEGIN_NAMESPACE_ACADO returnValue IntegratorRK::init ( const DifferentialEquation rhs_,
const Transition trs_ 
) [inline, inherited]

In addition a
transition function can be set which is evaluated at the end
of the integration interval.

Parameters:
rhsthe right-hand side of the ODE/DAE.
trsthe transition to be evaluated at the end.

Returns:
SUCCESSFUL_RETURN if all dimension checks succeed.
otherwise: integrator dependent error message.

Reimplemented from Integrator.

References IntegratorRK::init().

void IntegratorRK12::initializeButcherTableau ( ) [protected, virtual]
void Integrator::initializeOptions ( ) [protected, inherited]

This routine should be called by the
integrators derived from this class in order to initialize
the following members based on the user options:

maxNumberOfSteps hmin hmax tune TOL las (cf. SETTINGS for more details)

References Integrator::hini, Integrator::hmax, Integrator::hmin, INITIAL_INTEGRATOR_STEPSIZE, INTEGRATOR_PRINTLEVEL, INTEGRATOR_TOLERANCE, Integrator::las, LINEAR_ALGEBRA_SOLVER, MAX_INTEGRATOR_STEPSIZE, MAX_NUM_INTEGRATOR_STEPS, Integrator::maxNumberOfSteps, MIN_INTEGRATOR_STEPSIZE, Integrator::PrintLevel, STEPSIZE_TUNING, Integrator::TOL, and Integrator::tune.

Referenced by IntegratorBDF::evaluate(), IntegratorRK::evaluate(), and IntegratorLYAPUNOV::evaluate().

void IntegratorRK::initializeVariables ( ) [protected, inherited]
returnValue Integrator::integrate ( double  t0,
double  tend,
double *  x0,
double *  xa = 0,
double *  p = 0,
double *  u = 0,
double *  w = 0 
) [inherited]


If neither the maximum number of allowed iteration is
exceeded nor any other error occurs the functions stops the
integration at time tend.

Returns:
SUCCESFUL_RETURN or
a error message that depends on the specific
integration routine. (cf. the corresponding header
file that implements the integration routine)
Parameters:
t0the start time
tendthe end time
x0the initial state
xathe initial algebraic state
pthe parameters
uthe controls
wthe disturbance

Referenced by Integrator::integrate().

returnValue Integrator::integrate ( const Grid t,
double *  x0,
double *  xa = 0,
double *  p = 0,
double *  u = 0,
double *  w = 0 
) [inherited]


If neither the maximum number of allowed iteration is
exceeded nor any other error occurs the functions stops the
integration at time tend.
In addition, results at intermediate grid points can be
stored. Note that these grid points are for storage only and
have nothing to do the integrator steps.

Returns:
SUCCESFUL_RETURN or
a error message that depends on the specific
integration routine. (cf. the corresponding header
file that implements the integration routine)
Parameters:
tthe grid [t0,tend]
x0the initial state
xathe initial algebraic state
pthe parameters
uthe controls
wthe disturbance

References ACADOERROR, DifferentialEquation::getDifferentialStateComponents(), VectorspaceElement::getDim(), Function::getNP(), Function::getNU(), Function::getNW(), Function::getNXA(), Integrator::integrate(), RET_TRIVIAL_RHS, and Integrator::rhs.

returnValue Integrator::integrate ( double  t0,
double  tend,
const Vector x0,
const Vector xa = emptyVector,
const Vector p = emptyVector,
const Vector u = emptyVector,
const Vector w = emptyVector 
) [inherited]


If neither the maximum number of allowed iteration is
exceeded nor any other error occurs the functions stops the
integration at time tend.

Returns:
SUCCESFUL_RETURN or
a error message that depends on the specific
integration routine. (cf. the corresponding header
file that implements the integration routine)
Parameters:
t0the start time
tendthe end time
x0the initial state
xathe initial algebraic state
pthe parameters
uthe controls
wthe disturbance

References Integrator::integrate().

returnValue Integrator::integrate ( const Grid t,
const Vector x0,
const Vector xa = emptyVector,
const Vector p = emptyVector,
const Vector u = emptyVector,
const Vector w = emptyVector 
) [inherited]


If neither the maximum number of allowed iteration is
exceeded nor any other error occurs the functions stops the
integration at time tend.
In addition, results at intermediate grid points can be
stored. Note that these grid points are for storage only and
have nothing to do the integrator steps.

Returns:
SUCCESFUL_RETURN or
a error message that depends on the specific
integration routine. (cf. the corresponding header
file that implements the integration routine)
Parameters:
tthe grid [t0,tend]
x0the initial state
xathe initial algebraic state
pthe parameters
uthe controls
wthe disturbance

References ACADOERROR, Integrator::evaluate(), Integrator::evaluateTransition(), DifferentialEquation::getDifferentialStateComponents(), Function::getDim(), VectorspaceElement::getDim(), Grid::getLastTime(), Integrator::getProtectedX(), VectorspaceElement::init(), Integrator::ma, RET_TRIVIAL_RHS, Integrator::rhs, VectorspaceElement::setZero(), SUCCESSFUL_RETURN, Integrator::transition, and Integrator::xE.

void IntegratorRK::interpolate ( int  jj,
double *  e1,
double *  d1,
double *  e2,
VariablesGrid poly 
) [protected, inherited]
BooleanType Integrator::isDifferentialEquationAffine ( ) const [virtual, inherited]


Returns:
BT_TRUE: if differential equation is affine.
BT_FALSE: otherwise

References BT_FALSE, Function::isAffine(), and Integrator::rhs.


Returns:
BT_TRUE: if differential equation is defined.
BT_FALSE: otherwise

References BT_FALSE, BT_TRUE, and Integrator::rhs.

void IntegratorRK::logCurrentIntegratorStep ( const Vector currentX = emptyConstVector) [protected, inherited]
IntegratorRK12 & IntegratorRK12::operator= ( const IntegratorRK12 arg) [virtual]
returnValue AlgorithmicBase::plot ( PlotFrequency  _frequency = PLOT_IN_ANY_CASE) [inline, inherited]
Parameters:
[in]_frequencyFrequency determining at which time instants the window is to be plotted.
Returns:
SUCCESSFUL_RETURN

References Plotting::plot(), and AlgorithmicBase::userInteraction.

void IntegratorRK::printIntermediateResults ( ) [protected, inherited]
returnValue AlgorithmicBase::printLogRecord ( int  idx,
LogPrintMode  _mode = PRINT_ITEM_BY_ITEM 
) const [inline, inherited]
Parameters:
[in]idxIndex of record to be printed.
[in]_modePrint mode: see documentation of LogPrintMode of details.
Returns:
SUCCESSFUL_RETURN,
RET_INDEX_OUT_OF_BOUNDS,
RET_INVALID_ARGUMENTS,
RET_UNKNOWN_BUG

References ACADOERROR, LogCollection::getNumLogRecords(), Logging::logCollection, LogCollection::print(), RET_INDEX_OUT_OF_BOUNDS, and AlgorithmicBase::userInteraction.

Referenced by SCPmethod::printIteration(), SCPmethod::printRuntimeProfile(), and Integrator::printRunTimeProfile().

returnValue Integrator::printRunTimeProfile ( ) const [virtual, inherited]

This routine
can be used after an integration run in
order to assess the performance.
Integrates forward and/or backward depending on the specified seeds.

Returns:
SUCCESSFUL_RETURN
RET_NO_SEED_ALLOCATED

References AlgorithmicBase::outputLoggingIdx, PRINT_LAST_ITER, and AlgorithmicBase::printLogRecord().

Referenced by IntegratorBDF::evaluate(), IntegratorRK::evaluate(), and IntegratorLYAPUNOV::evaluate().

returnValue AlgorithmicBase::replot ( PlotFrequency  _frequency = PLOT_IN_ANY_CASE) [inline, inherited]
Parameters:
[in]_frequencyFrequency determining at which time instants the window is to be plotted.
Returns:
SUCCESSFUL_RETURN

References Plotting::replot(), and AlgorithmicBase::userInteraction.

Referenced by SCPmethod::printIteration(), SCPmethod::solve(), and SCPmethod::step().

returnValue AlgorithmicBase::set ( OptionsName  name,
int  value 
) [inherited]
Parameters:
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

References Options::set(), and AlgorithmicBase::userInteraction.

Referenced by SCPmethod::initializeHessianProjection().

returnValue AlgorithmicBase::set ( OptionsName  name,
double  value 
) [inherited]
Parameters:
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

References Options::set(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::set ( uint  idx,
OptionsName  name,
int  value 
) [inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

References Options::set(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::set ( uint  idx,
OptionsName  name,
double  value 
) [inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

References Options::set(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::setAll ( LogName  _name,
const MatrixVariablesGrid values 
) [inline, inherited]
Parameters:
[in]_nameInternal name of item.
[in]valuesAll numerical values at all time instants of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_COLLECTION_CORRUPTED

References Logging::logCollection, LogCollection::setAll(), and AlgorithmicBase::userInteraction.

returnValue Integrator::setBackwardSeed ( const int &  order,
const Vector seed 
) [inherited]
Returns:
SUCCESFUL_RETURN
RET_INPUT_OUT_OF_RANGE
Parameters:
orderthe order of the seed.
seedthe backward seed

References Integrator::dXb, DifferentialEquation::getDifferentialStateComponents(), VectorspaceElement::getDim(), VectorspaceElement::init(), Integrator::rhs, Integrator::setProtectedBackwardSeed(), and uint.

Referenced by Integrator::integrateSensitivities().

returnValue IntegratorRK::setBackwardSeed2 ( const Vector seed) [protected, virtual, inherited]
returnValue IntegratorRK::setDxInitialization ( double *  dx0) [virtual, inherited]
Returns:
SUCCESSFUL_RETURN
Parameters:
dx0initial guess for the differential state derivatives

Implements Integrator.

References SUCCESSFUL_RETURN.

returnValue Integrator::setForwardSeed ( const int &  order,
const Vector xSeed,
const Vector pSeed = emptyVector,
const Vector uSeed = emptyVector,
const Vector wSeed = emptyVector 
) [inherited]


Returns:
SUCCESFUL RETURN
RET_INPUT_OUT_OF_RANGE
Parameters:
orderthe order of the seed.
xSeedthe seed w.r.t states
pSeedthe seed w.r.t parameters
uSeedthe seed w.r.t controls
wSeedthe seed w.r.t disturbances

References ACADOERROR, Integrator::dP, Integrator::dU, Integrator::dW, DifferentialEquation::getDifferentialStateComponents(), VectorspaceElement::getDim(), VectorspaceElement::init(), RET_TRIVIAL_RHS, Integrator::rhs, and Integrator::setProtectedForwardSeed().

returnValue IntegratorRK::setForwardSeed2 ( const Vector xSeed,
const Vector pSeed,
const Vector uSeed,
const Vector wSeed 
) [protected, inherited]
returnValue AlgorithmicBase::setLast ( LogName  _name,
int  lastValue,
double  time = -INFTY 
) [inline, inherited]
returnValue AlgorithmicBase::setLast ( LogName  _name,
double  lastValue,
double  time = -INFTY 
) [inline, inherited]
Parameters:
[in]_nameInternal name of item.
[in]lastValueNumerical value at last time instant of given item.
[in]timeTime label of the instant.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References Logging::logCollection, LogCollection::setLast(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::setLast ( LogName  _name,
const Vector lastValue,
double  time = -INFTY 
) [inline, inherited]
Parameters:
[in]_nameInternal name of item.
[in]lastValueNumerical value at last time instant of given item.
[in]timeTime label of the instant.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References Logging::logCollection, LogCollection::setLast(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::setLast ( LogName  _name,
const Matrix lastValue,
double  time = -INFTY 
) [inline, inherited]
Parameters:
[in]_nameInternal name of item.
[in]lastValueNumerical value at last time instant of given item.
[in]timeTime label of the instant.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References Logging::logCollection, LogCollection::setLast(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::setLast ( LogName  _name,
const VariablesGrid lastValue,
double  time = -INFTY 
) [inline, inherited]
Parameters:
[in]_nameInternal name of item.
[in]lastValueNumerical value at last time instant of given item.
[in]timeTime label of the instant.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References Logging::logCollection, LogCollection::setLast(), and AlgorithmicBase::userInteraction.

returnValue AlgorithmicBase::setOptions ( const Options arg) [inherited]
Parameters:
[in]argNew Options object to be assigned.
Note:
This routine is introduced only for convenience and is equivalent to the assignment operator.
Returns:
SUCCESSFUL_RETURN

References Options::setOptions(), and AlgorithmicBase::userInteraction.

Referenced by ShootingMethod::evaluate().

returnValue AlgorithmicBase::setOptions ( uint  idx,
const Options arg 
) [inherited]
Parameters:
[in]idxIndex of option list.
[in]argOptions object containing the option list to be assigned.
Returns:
SUCCESSFUL_RETURN

References Options::setOptions(), and AlgorithmicBase::userInteraction.

returnValue IntegratorRK::setProtectedBackwardSeed ( const Vector seed,
const int &  order 
) [protected, virtual, inherited]
returnValue IntegratorRK::setProtectedForwardSeed ( const Vector xSeed,
const Vector pSeed,
const Vector uSeed,
const Vector wSeed,
const int &  order 
) [protected, virtual, inherited]
returnValue Integrator::setTransition ( const Transition trs) [inherited]
returnValue Integrator::setupLogging ( ) [protected, virtual, inherited]
returnValue Integrator::setupOptions ( ) [protected, virtual, inherited]
returnValue IntegratorRK12::step ( int  number) [virtual]

This function can be used to
call the integrator step wise. Note that this function is e.g.
useful in real-time simulations where after each step a time
out limit has to be checked. This function will usually return

Returns:
RET_FINAL_STEP_NOT_PERFORMED_YET
for the case that the final step has not been
performed yet, i.e. the integration routine is not yet
at the time tend.
Otherwise it will either return
SUCCESSFUL_RETURN
or any other error message that might occur during
an integration step.

In most real situations you can define the maximum number of
step sizes to be 1 before calling the function integrate
Then the function integrate should return after one step with
the message
RET_MAXIMUM_NUMBER_OF_STEPS_EXCEEDED. After that you can call
step() until the final time is reached.
(You can use the PrintLevel NONE to avoid that the message
RET_MAXIMUM_NUMBER_OF_STEPS_EXCEEDED is printed.)

Parameters:
numberthe step number

Reimplemented from IntegratorRK.

Reimplemented in IntegratorDiscretizedODE.

returnValue IntegratorRK::stop ( ) [virtual, inherited]

This function will also give all memory free.
In particular, the function unfreeze() will be called.
(This function is designed for the usage in real-time
contexts in order to deal with error messages without
deleting and re-initializing the integrator.)

Returns:
SUCCESSFUL_RETURN

References ACADOERROR, and RET_NOT_IMPLEMENTED_YET.

returnValue IntegratorRK::unfreeze ( ) [virtual, inherited]

If you use the function
integrate after unfreezing the usual step size control will be
switched on.

Returns:
SUCCESSFUL_RETURN
RET_MESH_ALREADY_UNFROZED

Implements Integrator.

References Integrator::h, IntegratorRK::maxAlloc, Integrator::soa, SOA_UNFROZEN, and SUCCESSFUL_RETURN.


Member Data Documentation

double** IntegratorRK::A [protected, inherited]
int* Integrator::alg_index [protected, inherited]
double* IntegratorRK::b4 [protected, inherited]
double* IntegratorRK::b5 [protected, inherited]
Vector IntegratorRK::bseed [protected, inherited]
Vector IntegratorRK::bseed2 [protected, inherited]
double* IntegratorRK::c [protected, inherited]
int* Integrator::control_index [protected, inherited]
int Integrator::count [protected, inherited]
int Integrator::count2 [protected, inherited]
int Integrator::count3 [protected, inherited]
int* Integrator::ddiff_index [protected, inherited]
VariablesGrid Integrator::ddxStore [protected, inherited]
int* Integrator::diff_index [protected, inherited]

Referenced by IntegratorLYAPUNOV::allocateMemory(), IntegratorRK::allocateMemory(), IntegratorBDF::allocateMemory(), IntegratorBDF::applyMTranspose(), IntegratorRK::constructAll(), IntegratorLYAPUNOV::constructAll(), IntegratorBDF::constructAll(), IntegratorBDF::copyBackward(), IntegratorBDF::determineBDFEtaGForward(), IntegratorBDF::determineBDFEtaGForward2(), IntegratorBDF::determineBDFEtaHBackward(), IntegratorBDF::determineBDFEtaHBackward2(), IntegratorBDF::determineCorrector(), IntegratorLYAPUNOV::determineEta45(), IntegratorRK::determineEta45(), IntegratorLYAPUNOV::determineEtaGForward(), IntegratorRK::determineEtaGForward(), IntegratorLYAPUNOV::determineEtaGForward2(), IntegratorRK::determineEtaGForward2(), IntegratorLYAPUNOV::determineEtaHBackward(), IntegratorRK::determineEtaHBackward(), IntegratorLYAPUNOV::determineEtaHBackward2(), IntegratorRK::determineEtaHBackward2(), IntegratorBDF::determineRKEtaGForward(), IntegratorBDF::determineRKEtaGForward2(), IntegratorBDF::determineRKEtaHBackward(), IntegratorBDF::determineRKEtaHBackward2(), IntegratorBDF::evaluate(), IntegratorRK::evaluate(), IntegratorLYAPUNOV::evaluate(), IntegratorLYAPUNOV::evaluateSensitivities(), IntegratorBDF::evaluateSensitivities(), IntegratorRK::evaluateSensitivities(), IntegratorLYAPUNOV::getProtectedBackwardSensitivities(), IntegratorRK::getProtectedBackwardSensitivities(), Integrator::Integrator(), IntegratorDiscretizedODE::performADbackwardStep(), IntegratorDiscretizedODE::performADbackwardStep2(), IntegratorDiscretizedODE::performADforwardStep(), IntegratorDiscretizedODE::performADforwardStep2(), IntegratorDiscretizedODE::performDiscreteStep(), IntegratorBDF::printBDFfinalResults2(), IntegratorLYAPUNOV::printIntermediateResults(), IntegratorRK::printIntermediateResults(), IntegratorBDF::rk_start_solve(), IntegratorBDF::setForwardSeed2(), IntegratorLYAPUNOV::setForwardSeed2(), IntegratorRK::setForwardSeed2(), IntegratorBDF::setProtectedForwardSeed(), IntegratorLYAPUNOV::setProtectedForwardSeed(), IntegratorRK::setProtectedForwardSeed(), IntegratorDiscretizedODE::step(), IntegratorBDF::step(), IntegratorLYAPUNOV::step(), IntegratorRK::step(), and Integrator::~Integrator().

Vector Integrator::diff_scale [protected, inherited]
int IntegratorRK::dim [protected, inherited]
int* Integrator::disturbance_index [protected, inherited]
Vector Integrator::dP [protected, inherited]
Vector Integrator::dPb [protected, inherited]
Vector Integrator::dU [protected, inherited]
Vector Integrator::dUb [protected, inherited]
Vector Integrator::dW [protected, inherited]
Vector Integrator::dWb [protected, inherited]
Vector Integrator::dX [protected, inherited]
Vector Integrator::dXb [protected, inherited]
VariablesGrid Integrator::dxStore [protected, inherited]
double IntegratorRK::err_power [protected, inherited]
double* IntegratorRK::eta4 [protected, inherited]
double* IntegratorRK::eta4_ [protected, inherited]
double* IntegratorRK::eta5 [protected, inherited]
double* IntegratorRK::eta5_ [protected, inherited]
double* IntegratorRK::etaG [protected, inherited]
double* IntegratorRK::etaG2 [protected, inherited]
double* IntegratorRK::etaG3 [protected, inherited]
double* IntegratorRK::etaH [protected, inherited]
double* IntegratorRK::etaH2 [protected, inherited]
double* IntegratorRK::etaH3 [protected, inherited]
Vector IntegratorRK::fseed [protected, inherited]
Vector IntegratorRK::fseed2 [protected, inherited]
RealClock Integrator::functionEvaluation [protected, inherited]
double* IntegratorRK::G [protected, inherited]
double* IntegratorRK::G2 [protected, inherited]
double* IntegratorRK::G3 [protected, inherited]
double* IntegratorRK::H [protected, inherited]
double* Integrator::h [protected, inherited]

Referenced by IntegratorLYAPUNOV::constructAll(), IntegratorRK::constructAll(), IntegratorBDF::constructAll(), IntegratorBDF::determineCorrector(), IntegratorRK::determineEta45(), IntegratorLYAPUNOV::determineEta45(), IntegratorRK::determineEtaGForward(), IntegratorLYAPUNOV::determineEtaGForward(), IntegratorRK::determineEtaGForward2(), IntegratorLYAPUNOV::determineEtaGForward2(), IntegratorRK::determineEtaHBackward(), IntegratorLYAPUNOV::determineEtaHBackward(), IntegratorRK::determineEtaHBackward2(), IntegratorLYAPUNOV::determineEtaHBackward2(), IntegratorBDF::determinePredictor(), IntegratorBDF::determineRKEtaGForward(), IntegratorBDF::determineRKEtaGForward2(), IntegratorBDF::determineRKEtaHBackward(), IntegratorBDF::determineRKEtaHBackward2(), IntegratorBDF::evaluate(), IntegratorRK::evaluate(), IntegratorLYAPUNOV::evaluate(), IntegratorBDF::evaluateSensitivities(), IntegratorLYAPUNOV::getStepSize(), IntegratorRK::getStepSize(), IntegratorBDF::getStepSize(), Integrator::Integrator(), IntegratorLYAPUNOV::interpolate(), IntegratorRK::interpolate(), IntegratorBDF::interpolate(), IntegratorBDF::printBDFfinalResults(), IntegratorBDF::printBDFIntermediateResults(), IntegratorBDF::printRKIntermediateResults(), IntegratorBDF::rk_start(), IntegratorBDF::rk_start_solve(), IntegratorDiscretizedODE::step(), IntegratorBDF::step(), IntegratorLYAPUNOV::step(), IntegratorRK::step(), IntegratorBDF::unfreeze(), IntegratorLYAPUNOV::unfreeze(), IntegratorRK::unfreeze(), and Integrator::~Integrator().

double* IntegratorRK::H2 [protected, inherited]
double* IntegratorRK::H3 [protected, inherited]
double Integrator::hini [protected, inherited]
double Integrator::hmax [protected, inherited]
double Integrator::hmin [protected, inherited]
int* Integrator::int_control_index [protected, inherited]
int* Integrator::int_parameter_index [protected, inherited]
VariablesGrid Integrator::iStore [protected, inherited]
double** IntegratorRK::k [protected, inherited]
double** IntegratorRK::k2 [protected, inherited]
double** IntegratorRK::l [protected, inherited]
double** IntegratorRK::l2 [protected, inherited]
int Integrator::las [protected, inherited]
short int Integrator::m [protected, inherited]

Referenced by IntegratorLYAPUNOV::allocateMemory(), IntegratorRK::allocateMemory(), IntegratorBDF::allocateMemory(), IntegratorBDF::applyMTranspose(), IntegratorBDF::applyNewtonStep(), IntegratorLYAPUNOV::constructAll(), IntegratorRK::constructAll(), IntegratorBDF::constructAll(), IntegratorBDF::copyBackward(), IntegratorBDF::determineBDFEtaGForward(), IntegratorBDF::determineBDFEtaGForward2(), IntegratorBDF::determineCorrector(), IntegratorRK::determineEta45(), IntegratorLYAPUNOV::determineEta45(), IntegratorRK::determineEtaGForward(), IntegratorLYAPUNOV::determineEtaGForward(), IntegratorRK::determineEtaGForward2(), IntegratorLYAPUNOV::determineEtaGForward2(), IntegratorRK::determineEtaHBackward(), IntegratorLYAPUNOV::determineEtaHBackward(), IntegratorLYAPUNOV::determineEtaHBackward2(), IntegratorRK::determineEtaHBackward2(), IntegratorBDF::determinePredictor(), IntegratorBDF::determineRKEtaGForward(), IntegratorBDF::determineRKEtaGForward2(), IntegratorBDF::evaluate(), IntegratorRK::evaluate(), IntegratorLYAPUNOV::evaluate(), IntegratorLYAPUNOV::evaluateSensitivities(), IntegratorBDF::evaluateSensitivities(), IntegratorRK::evaluateSensitivities(), IntegratorRK::getDim(), IntegratorLYAPUNOV::getDim(), IntegratorRK::getProtectedBackwardSensitivities(), IntegratorLYAPUNOV::getProtectedBackwardSensitivities(), IntegratorBDF::getProtectedForwardSensitivities(), IntegratorLYAPUNOV::getProtectedForwardSensitivities(), IntegratorRK::getProtectedForwardSensitivities(), IntegratorBDF::getProtectedX(), IntegratorRK::getProtectedX(), IntegratorLYAPUNOV::getProtectedX(), Integrator::getX(), IntegratorBDF::init(), IntegratorLYAPUNOV::init(), IntegratorRK::init(), Integrator::Integrator(), IntegratorRK::interpolate(), IntegratorLYAPUNOV::interpolate(), IntegratorBDF::interpolate(), IntegratorDiscretizedODE::performADbackwardStep(), IntegratorDiscretizedODE::performADbackwardStep2(), IntegratorDiscretizedODE::performADforwardStep(), IntegratorDiscretizedODE::performADforwardStep2(), IntegratorDiscretizedODE::performDiscreteStep(), IntegratorBDF::prepareDividedDifferences(), IntegratorBDF::printBDFfinalResults(), IntegratorBDF::printBDFIntermediateResults(), IntegratorRK::printIntermediateResults(), IntegratorLYAPUNOV::printIntermediateResults(), IntegratorBDF::printRKIntermediateResults(), IntegratorBDF::rk_start(), IntegratorBDF::rk_start_solve(), IntegratorBDF::setBackwardSeed2(), IntegratorLYAPUNOV::setBackwardSeed2(), IntegratorRK::setBackwardSeed2(), IntegratorBDF::setForwardSeed2(), IntegratorLYAPUNOV::setForwardSeed2(), IntegratorRK::setForwardSeed2(), IntegratorBDF::setProtectedBackwardSeed(), IntegratorRK::setProtectedBackwardSeed(), IntegratorLYAPUNOV::setProtectedBackwardSeed(), IntegratorBDF::setProtectedForwardSeed(), IntegratorLYAPUNOV::setProtectedForwardSeed(), IntegratorRK::setProtectedForwardSeed(), IntegratorDiscretizedODE::step(), IntegratorBDF::step(), IntegratorLYAPUNOV::step(), and IntegratorRK::step().

short int Integrator::ma [protected, inherited]
int IntegratorRK::maxAlloc [protected, inherited]
int Integrator::maxNumberOfSteps [protected, inherited]
short int Integrator::md [protected, inherited]
short int Integrator::mdx [protected, inherited]
short int Integrator::mn [protected, inherited]
short int Integrator::mp [protected, inherited]
short int Integrator::mpi [protected, inherited]
short int Integrator::mu [protected, inherited]
short int Integrator::mui [protected, inherited]
short int Integrator::mw [protected, inherited]
int Integrator::nBDirs [protected, inherited]
int Integrator::nBDirs2 [protected, inherited]
int Integrator::nFcnEvaluations [protected, inherited]
int Integrator::nFDirs [protected, inherited]
int Integrator::nFDirs2 [protected, inherited]
int AlgorithmicBase::outputLoggingIdx [protected, inherited]
int* Integrator::parameter_index [protected, inherited]
int Integrator::PrintLevel [protected, inherited]
DifferentialEquation* Integrator::rhs [protected, inherited]

Referenced by IntegratorLYAPUNOV::allocateMemory(), IntegratorRK::allocateMemory(), IntegratorBDF::allocateMemory(), IntegratorLYAPUNOV::constructAll(), IntegratorRK::constructAll(), IntegratorBDF::constructAll(), IntegratorBDF::determineBDFEtaGForward(), IntegratorBDF::determineBDFEtaGForward2(), IntegratorBDF::determineBDFEtaHBackward(), IntegratorBDF::determineBDFEtaHBackward2(), IntegratorBDF::determineCorrector(), IntegratorLYAPUNOV::determineEta45(), IntegratorRK::determineEta45(), IntegratorLYAPUNOV::determineEtaGForward(), IntegratorRK::determineEtaGForward(), IntegratorRK::determineEtaGForward2(), IntegratorLYAPUNOV::determineEtaGForward2(), IntegratorRK::determineEtaHBackward(), IntegratorLYAPUNOV::determineEtaHBackward(), IntegratorRK::determineEtaHBackward2(), IntegratorLYAPUNOV::determineEtaHBackward2(), IntegratorBDF::determineRKEtaGForward(), IntegratorBDF::determineRKEtaGForward2(), IntegratorBDF::determineRKEtaHBackward(), IntegratorBDF::determineRKEtaHBackward2(), IntegratorBDF::evaluate(), IntegratorRK::evaluate(), IntegratorLYAPUNOV::evaluate(), IntegratorLYAPUNOV::evaluateSensitivities(), IntegratorBDF::evaluateSensitivities(), IntegratorRK::evaluateSensitivities(), Integrator::getBackwardSensitivities(), Integrator::getDifferentialEquationSampleTime(), Integrator::getX(), Integrator::getXA(), IntegratorBDF::init(), IntegratorRK::init(), IntegratorLYAPUNOV::init(), Integrator::integrate(), Integrator::integrateSensitivities(), Integrator::Integrator(), Integrator::isDifferentialEquationAffine(), Integrator::isDifferentialEquationDefined(), IntegratorDiscretizedODE::performADbackwardStep(), IntegratorDiscretizedODE::performADbackwardStep2(), IntegratorDiscretizedODE::performADforwardStep(), IntegratorDiscretizedODE::performADforwardStep2(), IntegratorDiscretizedODE::performDiscreteStep(), IntegratorBDF::rk_start(), IntegratorBDF::rk_start_solve(), Integrator::setBackwardSeed(), IntegratorLYAPUNOV::setBackwardSeed2(), IntegratorRK::setBackwardSeed2(), Integrator::setForwardSeed(), IntegratorRK::setForwardSeed2(), IntegratorLYAPUNOV::setForwardSeed2(), IntegratorRK::setProtectedBackwardSeed(), IntegratorLYAPUNOV::setProtectedBackwardSeed(), IntegratorRK::setProtectedForwardSeed(), IntegratorLYAPUNOV::setProtectedForwardSeed(), IntegratorDiscretizedODE::step(), IntegratorBDF::step(), IntegratorLYAPUNOV::step(), IntegratorRK::step(), and Integrator::~Integrator().

StateOfAggregation Integrator::soa [protected, inherited]
double IntegratorRK::t [protected, inherited]
int Integrator::time_index [protected, inherited]
Grid Integrator::timeInterval [protected, inherited]
double Integrator::TOL [protected, inherited]
RealClock Integrator::totalTime [protected, inherited]
Transition* Integrator::transition [protected, inherited]
double Integrator::tune [protected, inherited]
double* IntegratorRK::x [protected, inherited]
Vector Integrator::xE [protected, inherited]
VariablesGrid Integrator::xStore [protected, inherited]

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