Base class for discretizing a DifferentialEquation for use in optimal control algorithms. More...
#include <dynamic_discretization.hpp>
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.
Definition at line 62 of file dynamic_discretization.hpp.
Default constructor.
Definition at line 48 of file dynamic_discretization.cpp.
DynamicDiscretization::DynamicDiscretization | ( | UserInteraction * | _userInteraction | ) |
Definition at line 59 of file dynamic_discretization.cpp.
Copy constructor (deep copy).
Definition at line 72 of file dynamic_discretization.cpp.
DynamicDiscretization::~DynamicDiscretization | ( | ) | [virtual] |
Destructor.
Definition at line 79 of file dynamic_discretization.cpp.
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.
returnValue DynamicDiscretization::deleteAllSeeds | ( | ) | [virtual] |
Deletes all seeds that have been set with the methods above.
This function will also give the corresponding memory free.
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.
Implemented in CollocationMethod, and ShootingMethod.
virtual returnValue DynamicDiscretization::evaluateSensitivities | ( | ) | [pure virtual] |
Evaluates the sensitivities.
Implemented in ShootingMethod, and CollocationMethod.
virtual returnValue DynamicDiscretization::evaluateSensitivities | ( | const BlockMatrix & | seed, |
BlockMatrix & | hessian | ||
) | [pure virtual] |
Evaluates the sensitivities and the hessian.
Implemented in ShootingMethod, and CollocationMethod.
virtual returnValue DynamicDiscretization::evaluateSensitivitiesLifted | ( | ) | [pure virtual] |
Evaluates the sensitivities.
Implemented in ShootingMethod, and CollocationMethod.
returnValue DynamicDiscretization::getBackwardSensitivities | ( | BlockMatrix & | D | ) | const [virtual] |
Returns the result for the backward sensitivities in BlockMatrix form.
D | the result for the forward sensitivi- ties |
Definition at line 169 of file dynamic_discretization.cpp.
returnValue DynamicDiscretization::getForwardSensitivities | ( | BlockMatrix & | D | ) | const [virtual] |
Returns the result for the forward sensitivities in BlockMatrix form.
D | the result for the forward sensitivi- ties |
Definition at line 162 of file dynamic_discretization.cpp.
int DynamicDiscretization::getNumberOfIntervals | ( | ) | const [inline] |
uint DynamicDiscretization::getNumEvaluationPoints | ( | ) | const [protected] |
Definition at line 271 of file dynamic_discretization.cpp.
returnValue DynamicDiscretization::getResiduum | ( | BlockMatrix & | residuum_ | ) | const [virtual] |
Returns the result for the residuum.
residuum_ | the residuum |
Definition at line 144 of file dynamic_discretization.cpp.
void DynamicDiscretization::initializeVariables | ( | ) | [protected] |
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.
returnValue DynamicDiscretization::setBackwardSeed | ( | const BlockMatrix & | seed | ) | [virtual] |
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.
seed | the 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.
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.
returnValue DynamicDiscretization::setUnitBackwardSeed | ( | ) | [virtual] |
Defines the first order backward seed to be
a unit matrix.
Definition at line 132 of file dynamic_discretization.cpp.
returnValue DynamicDiscretization::setUnitForwardSeed | ( | ) | [virtual] |
Defines the first order forward seed to be
the unit-directions matrix.
Definition at line 106 of file dynamic_discretization.cpp.
returnValue DynamicDiscretization::setupLogging | ( | ) | [protected, virtual] |
Definition at line 215 of file dynamic_discretization.cpp.
returnValue DynamicDiscretization::setupOptions | ( | ) | [protected, virtual] |
Definition at line 190 of file dynamic_discretization.cpp.
virtual returnValue DynamicDiscretization::unfreeze | ( | ) | [pure virtual] |
Implemented in ShootingMethod, and CollocationMethod.
BlockMatrix DynamicDiscretization::bSeed [protected] |
the 1st order backward seed
Definition at line 291 of file dynamic_discretization.hpp.
BlockMatrix DynamicDiscretization::dBackward [protected] |
the first order backward derivatives
Definition at line 298 of file dynamic_discretization.hpp.
BlockMatrix DynamicDiscretization::dForward [protected] |
the first order forward derivatives
Definition at line 297 of file dynamic_discretization.hpp.
BooleanType DynamicDiscretization::freezeTraj [protected] |
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.
PrintLevel DynamicDiscretization::printLevel [protected] |
the print level
Definition at line 271 of file dynamic_discretization.hpp.
BlockMatrix DynamicDiscretization::pSeed [protected] |
the 1st order forward seed in p-direction
Definition at line 287 of file dynamic_discretization.hpp.
VariablesGrid DynamicDiscretization::residuum [protected] |
the residuum vectors
Definition at line 296 of file dynamic_discretization.hpp.
Grid DynamicDiscretization::unionGrid [protected] |
the union grids on the stages
Definition at line 269 of file dynamic_discretization.hpp.
BlockMatrix DynamicDiscretization::uSeed [protected] |
the 1st order forward seed in u-direction
Definition at line 288 of file dynamic_discretization.hpp.
BlockMatrix DynamicDiscretization::wSeed [protected] |
the 1st order forward seed in w-direction
Definition at line 289 of file dynamic_discretization.hpp.
BlockMatrix DynamicDiscretization::xSeed [protected] |
the 1st order forward seed in x-direction
Definition at line 286 of file dynamic_discretization.hpp.