Public Member Functions | Protected Member Functions | Protected Attributes

Base class for discretizing a DifferentialEquation for use in optimal control algorithms. More...

#include <dynamic_discretization.hpp>

Inheritance diagram for DynamicDiscretization:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual returnValue addStage (const DynamicSystem &dynamicSystem_, const Grid &stageIntervals, const IntegratorType &integratorType_=INT_UNKNOWN)=0
virtual returnValue addTransition (const Transition &transition_)=0
virtual returnValue clear ()=0
virtual DynamicDiscretizationclone () const =0
virtual returnValue deleteAllSeeds ()
 DynamicDiscretization ()
 DynamicDiscretization (UserInteraction *_userInteraction)
 DynamicDiscretization (const DynamicDiscretization &rhs)
virtual returnValue evaluate (OCPiterate &iter)=0
virtual returnValue evaluateSensitivities ()=0
virtual returnValue evaluateSensitivities (const BlockMatrix &seed, BlockMatrix &hessian)=0
virtual returnValue evaluateSensitivitiesLifted ()=0
virtual returnValue getBackwardSensitivities (BlockMatrix &D) const
virtual returnValue getForwardSensitivities (BlockMatrix &D) const
int getNumberOfIntervals () const
virtual returnValue getResiduum (BlockMatrix &residuum_) const
virtual BooleanType isAffine () const =0
DynamicDiscretizationoperator= (const DynamicDiscretization &rhs)
virtual returnValue setBackwardSeed (const BlockMatrix &seed)
virtual returnValue setForwardSeed (const BlockMatrix &xSeed_, const BlockMatrix &pSeed_, const BlockMatrix &uSeed_, const BlockMatrix &wSeed_)
virtual returnValue setUnitBackwardSeed ()
virtual returnValue setUnitForwardSeed ()
virtual returnValue unfreeze ()=0
virtual ~DynamicDiscretization ()

Protected Member Functions

void copy (const DynamicDiscretization &rhs)
uint getNumEvaluationPoints () const
void initializeVariables ()
virtual returnValue setupLogging ()
virtual returnValue setupOptions ()

Protected Attributes

BlockMatrix bSeed
BlockMatrix dBackward
BlockMatrix dForward
BooleanType freezeTraj
int N
int na
int np
int nu
int nw
int nx
PrintLevel printLevel
BlockMatrix pSeed
VariablesGrid residuum
Grid unionGrid
BlockMatrix uSeed
BlockMatrix wSeed
BlockMatrix xSeed

Detailed Description

Base class for discretizing a DifferentialEquation for use in optimal control algorithms.

The class DynamicDiscretization serves as a base class for discretizing a DifferentialEquation for use in optimal control algorithms.

Author:
Boris Houska, Hans Joachim Ferreau

Definition at line 62 of file dynamic_discretization.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 48 of file dynamic_discretization.cpp.

Definition at line 59 of file dynamic_discretization.cpp.

Copy constructor (deep copy).

Definition at line 72 of file dynamic_discretization.cpp.

Destructor.

Definition at line 79 of file dynamic_discretization.cpp.


Member Function Documentation

virtual returnValue DynamicDiscretization::addStage ( const DynamicSystem dynamicSystem_,
const Grid stageIntervals,
const IntegratorType integratorType_ = INT_UNKNOWN 
) [pure virtual]

Set the Differential Equations stage by stage.

Implemented in CollocationMethod, and ShootingMethod.

virtual returnValue DynamicDiscretization::addTransition ( const Transition transition_) [pure virtual]

Set the Transition stages.

Implemented in CollocationMethod, and ShootingMethod.

virtual returnValue DynamicDiscretization::clear ( ) [pure virtual]

Deletes all stages and transitions and resets the DynamicDiscretization.

Implemented in CollocationMethod, and ShootingMethod.

virtual DynamicDiscretization* DynamicDiscretization::clone ( ) const [pure virtual]

Clone constructor (deep copy).

Implemented in CollocationMethod, and ShootingMethod.

void DynamicDiscretization::copy ( const DynamicDiscretization rhs) [protected]

Definition at line 246 of file dynamic_discretization.cpp.

Deletes all seeds that have been set with the methods above.
This function will also give the corresponding memory free.

Returns:
SUCCESSFUL_RETURN
RET_NO_SEED_ALLOCATED

Reimplemented in CollocationMethod, and ShootingMethod.

Definition at line 176 of file dynamic_discretization.cpp.

virtual returnValue DynamicDiscretization::evaluate ( OCPiterate iter) [pure virtual]

Evaluates the descretized DifferentialEquation at a specified
VariablesGrid. The results are written into the residuum of the
type VariablesGrid. This routine is for a simple evaluation only.
If sensitivities are needed use one of the routines below
instead.

Returns:
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
or a specific error message form an underlying
discretization instance.

Implemented in CollocationMethod, and ShootingMethod.

Evaluates the sensitivities.

Returns:
SUCCESSFUL_RETURN
RET_NOT_FROZEN

Implemented in ShootingMethod, and CollocationMethod.

virtual returnValue DynamicDiscretization::evaluateSensitivities ( const BlockMatrix seed,
BlockMatrix hessian 
) [pure virtual]

Evaluates the sensitivities and the hessian.

Returns:
SUCCESSFUL_RETURN
RET_NOT_FROZEN

Implemented in ShootingMethod, and CollocationMethod.

Evaluates the sensitivities.

Returns:
SUCCESSFUL_RETURN
RET_NOT_FROZEN

Implemented in ShootingMethod, and CollocationMethod.

Returns the result for the backward sensitivities in BlockMatrix form.

Returns:
SUCCESSFUL_RETURN
RET_INPUT_OUT_OF_RANGE
Returns the total number of intervals.
Parameters:
Dthe result for the forward sensitivi- ties

Definition at line 169 of file dynamic_discretization.cpp.

Returns the result for the forward sensitivities in BlockMatrix form.

Returns:
SUCCESSFUL_RETURN
RET_INPUT_OUT_OF_RANGE
Parameters:
Dthe result for the forward sensitivi- ties

Definition at line 162 of file dynamic_discretization.cpp.

Definition at line 271 of file dynamic_discretization.cpp.

Returns the result for the residuum.

Returns:
SUCCESSFUL_RETURN
Parameters:
residuum_the residuum

Definition at line 144 of file dynamic_discretization.cpp.

Definition at line 234 of file dynamic_discretization.cpp.

virtual BooleanType DynamicDiscretization::isAffine ( ) const [pure virtual]

Implemented in ShootingMethod, and CollocationMethod.

DynamicDiscretization & DynamicDiscretization::operator= ( const DynamicDiscretization rhs)

Assignment operator (deep copy).

Definition at line 82 of file dynamic_discretization.cpp.

Define a backward seed in form of a block matrix.
Here, the block matrix should have N block columns,
where N is the number of points of the union grid.
The i-th column is associated with the i-th grid
point in the union grid. Note that the directions
can itself be organized in sub-blocks as long as
all dimensions fit together.

Returns:
SUCCESFUL_RETURN
RET_INPUT_OUT_OF_RANGE
Parameters:
seedthe seed matrix

Definition at line 125 of file dynamic_discretization.cpp.

returnValue DynamicDiscretization::setForwardSeed ( const BlockMatrix xSeed_,
const BlockMatrix pSeed_,
const BlockMatrix uSeed_,
const BlockMatrix wSeed_ 
) [virtual]

Define a forward seed in form of a block matrix.
Here, the block matrix should have N block rows,
where N is the number of points of the union grid.
The i-th row is associated with the i-th grid
point in the union grid. Note that the direction
can itself be organized in sub-blocks as long as
all dimensions fit together.

Returns:
SUCCESFUL RETURN
RET_INPUT_OUT_OF_RANGE
Parameters:
xSeed_the seed in x-direction
pSeed_the seed in p-direction
uSeed_the seed in u-direction
wSeed_the seed in w-direction

Definition at line 92 of file dynamic_discretization.cpp.

Defines the first order backward seed to be
a unit matrix.

Returns:
SUCCESFUL_RETURN
RET_INPUT_OUT_OF_RANGE

Definition at line 132 of file dynamic_discretization.cpp.

Defines the first order forward seed to be
the unit-directions matrix.

Returns:
SUCCESFUL_RETURN
RET_INPUT_OUT_OF_RANGE

Definition at line 106 of file dynamic_discretization.cpp.

Definition at line 215 of file dynamic_discretization.cpp.

Definition at line 190 of file dynamic_discretization.cpp.

virtual returnValue DynamicDiscretization::unfreeze ( ) [pure virtual]

Implemented in ShootingMethod, and CollocationMethod.


Member Data Documentation

the 1st order backward seed

Definition at line 291 of file dynamic_discretization.hpp.

the first order backward derivatives

Definition at line 298 of file dynamic_discretization.hpp.

the first order forward derivatives

Definition at line 297 of file dynamic_discretization.hpp.

whether the trajectory should be frozen

Definition at line 272 of file dynamic_discretization.hpp.

int DynamicDiscretization::N [protected]

total number of grid points

Definition at line 270 of file dynamic_discretization.hpp.

int DynamicDiscretization::na [protected]

Definition at line 278 of file dynamic_discretization.hpp.

int DynamicDiscretization::np [protected]

Definition at line 279 of file dynamic_discretization.hpp.

int DynamicDiscretization::nu [protected]

Definition at line 280 of file dynamic_discretization.hpp.

int DynamicDiscretization::nw [protected]

Definition at line 281 of file dynamic_discretization.hpp.

int DynamicDiscretization::nx [protected]

Definition at line 277 of file dynamic_discretization.hpp.

the print level

Definition at line 271 of file dynamic_discretization.hpp.

the 1st order forward seed in p-direction

Definition at line 287 of file dynamic_discretization.hpp.

the residuum vectors

Definition at line 296 of file dynamic_discretization.hpp.

the union grids on the stages

Definition at line 269 of file dynamic_discretization.hpp.

the 1st order forward seed in u-direction

Definition at line 288 of file dynamic_discretization.hpp.

the 1st order forward seed in w-direction

Definition at line 289 of file dynamic_discretization.hpp.

the 1st order forward seed in x-direction

Definition at line 286 of file dynamic_discretization.hpp.


The documentation for this class was generated from the following files:


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:23