Base class for discretizing a DifferentialEquation for use in optimal control algorithms. More...
#include <dynamic_discretization.hpp>
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 |
![]() | |
int | outputLoggingIdx |
BooleanType | useModuleStandalone |
UserInteraction * | userInteraction |
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.
BEGIN_NAMESPACE_ACADO DynamicDiscretization::DynamicDiscretization | ( | ) |
Default constructor.
Definition at line 48 of file dynamic_discretization.cpp.
DynamicDiscretization::DynamicDiscretization | ( | UserInteraction * | _userInteraction | ) |
Definition at line 59 of file dynamic_discretization.cpp.
DynamicDiscretization::DynamicDiscretization | ( | const DynamicDiscretization & | rhs | ) |
Copy constructor (deep copy).
Definition at line 72 of file dynamic_discretization.cpp.
|
virtual |
Destructor.
Definition at line 79 of file dynamic_discretization.cpp.
|
pure virtual |
Set the Differential Equations stage by stage.
Implemented in CollocationMethod, and ShootingMethod.
|
pure virtual |
Set the Transition stages.
Implemented in CollocationMethod, and ShootingMethod.
|
pure virtual |
Deletes all stages and transitions and resets the DynamicDiscretization.
Implemented in CollocationMethod, and ShootingMethod.
|
pure virtual |
Clone constructor (deep copy).
Implemented in CollocationMethod, and ShootingMethod.
|
protected |
Definition at line 246 of file dynamic_discretization.cpp.
|
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.
|
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.
|
pure virtual |
Evaluates the sensitivities.
Implemented in ShootingMethod, and CollocationMethod.
|
pure virtual |
Evaluates the sensitivities and the hessian.
Implemented in ShootingMethod, and CollocationMethod.
|
pure virtual |
Evaluates the sensitivities.
Implemented in ShootingMethod, and CollocationMethod.
|
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.
|
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.
|
inline |
|
protected |
Definition at line 271 of file dynamic_discretization.cpp.
|
virtual |
Returns the result for the residuum.
residuum_ | the residuum |
Definition at line 144 of file dynamic_discretization.cpp.
|
protected |
Definition at line 234 of file dynamic_discretization.cpp.
|
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.
|
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.
|
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.
|
virtual |
Defines the first order backward seed to be
a unit matrix.
Definition at line 132 of file dynamic_discretization.cpp.
|
virtual |
Defines the first order forward seed to be
the unit-directions matrix.
Definition at line 106 of file dynamic_discretization.cpp.
|
protectedvirtual |
Definition at line 215 of file dynamic_discretization.cpp.
|
protectedvirtual |
Definition at line 190 of file dynamic_discretization.cpp.
|
pure virtual |
Implemented in ShootingMethod, and CollocationMethod.
|
protected |
the 1st order backward seed
Definition at line 291 of file dynamic_discretization.hpp.
|
protected |
the first order backward derivatives
Definition at line 298 of file dynamic_discretization.hpp.
|
protected |
the first order forward derivatives
Definition at line 297 of file dynamic_discretization.hpp.
|
protected |
whether the trajectory should be frozen
Definition at line 272 of file dynamic_discretization.hpp.
|
protected |
total number of grid points
Definition at line 270 of file dynamic_discretization.hpp.
|
protected |
Definition at line 278 of file dynamic_discretization.hpp.
|
protected |
Definition at line 279 of file dynamic_discretization.hpp.
|
protected |
Definition at line 280 of file dynamic_discretization.hpp.
|
protected |
Definition at line 281 of file dynamic_discretization.hpp.
|
protected |
Definition at line 277 of file dynamic_discretization.hpp.
|
protected |
the print level
Definition at line 271 of file dynamic_discretization.hpp.
|
protected |
the 1st order forward seed in p-direction
Definition at line 287 of file dynamic_discretization.hpp.
|
protected |
the residuum vectors
Definition at line 296 of file dynamic_discretization.hpp.
|
protected |
the union grids on the stages
Definition at line 269 of file dynamic_discretization.hpp.
|
protected |
the 1st order forward seed in u-direction
Definition at line 288 of file dynamic_discretization.hpp.
|
protected |
the 1st order forward seed in w-direction
Definition at line 289 of file dynamic_discretization.hpp.
|
protected |
the 1st order forward seed in x-direction
Definition at line 286 of file dynamic_discretization.hpp.