Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

Discretizes a DifferentialEquation by means of single or multiple shooting. More...

#include <shooting_method.hpp>

Inheritance diagram for ShootingMethod:
Inheritance graph
[legend]

Public Member Functions

virtual returnValue addStage (const DynamicSystem &dynamicSystem_, const Grid &stageIntervals, const IntegratorType &integratorType_=INT_UNKNOWN)
 
virtual returnValue addTransition (const Transition &transition_)
 
virtual returnValue clear ()
 
virtual DynamicDiscretizationclone () const
 
virtual returnValue deleteAllSeeds ()
 
virtual returnValue evaluate (OCPiterate &iter)
 
virtual returnValue evaluateSensitivities ()
 
virtual returnValue evaluateSensitivities (const BlockMatrix &seed, BlockMatrix &hessian)
 
virtual returnValue evaluateSensitivitiesLifted ()
 
virtual BooleanType isAffine () const
 
ShootingMethodoperator= (const ShootingMethod &rhs)
 
 ShootingMethod ()
 
 ShootingMethod (UserInteraction *_userInteraction)
 
 ShootingMethod (const ShootingMethod &rhs)
 
virtual returnValue unfreeze ()
 
virtual ~ShootingMethod ()
 
- Public Member Functions inherited from DynamicDiscretization
 DynamicDiscretization ()
 
 DynamicDiscretization (UserInteraction *_userInteraction)
 
 DynamicDiscretization (const DynamicDiscretization &rhs)
 
virtual returnValue getBackwardSensitivities (BlockMatrix &D) const
 
virtual returnValue getForwardSensitivities (BlockMatrix &D) const
 
int getNumberOfIntervals () const
 
virtual returnValue getResiduum (BlockMatrix &residuum_) const
 
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 ~DynamicDiscretization ()
 
- Public Member Functions inherited from AlgorithmicBase
int addLogRecord (LogRecord &_record)
 
returnValue addOption (OptionsName name, int value)
 
returnValue addOption (OptionsName name, double value)
 
returnValue addOption (uint idx, OptionsName name, int value)
 
returnValue addOption (uint idx, OptionsName name, double value)
 
returnValue addOptionsList ()
 
 AlgorithmicBase ()
 
 AlgorithmicBase (UserInteraction *_userInteraction)
 
 AlgorithmicBase (const AlgorithmicBase &rhs)
 
returnValue get (OptionsName name, int &value) const
 
returnValue get (OptionsName name, double &value) const
 
returnValue get (OptionsName name, std::string &value) const
 
returnValue get (uint idx, OptionsName name, int &value) const
 
returnValue get (uint idx, OptionsName name, double &value) const
 
returnValue getAll (LogName _name, MatrixVariablesGrid &values) const
 
returnValue getFirst (LogName _name, DMatrix &firstValue) const
 
returnValue getFirst (LogName _name, VariablesGrid &firstValue) const
 
returnValue getLast (LogName _name, DMatrix &lastValue) const
 
returnValue getLast (LogName _name, VariablesGrid &lastValue) const
 
Options getOptions (uint idx) const
 
BooleanType haveOptionsChanged () const
 
BooleanType haveOptionsChanged (uint idx) const
 
AlgorithmicBaseoperator= (const AlgorithmicBase &rhs)
 
returnValue plot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
returnValue printLogRecord (std::ostream &_stream, int idx, LogPrintMode _mode=PRINT_ITEM_BY_ITEM) const
 
returnValue replot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
returnValue set (OptionsName name, int value)
 
returnValue set (OptionsName name, double value)
 
returnValue set (OptionsName name, const std::string &value)
 
returnValue set (uint idx, OptionsName name, int value)
 
returnValue set (uint idx, OptionsName name, double value)
 
returnValue setAll (LogName _name, const MatrixVariablesGrid &values)
 
returnValue setLast (LogName _name, int lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, double lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const DVector &lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const DMatrix &lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const VariablesGrid &lastValue, double time=-INFTY)
 
returnValue setOptions (const Options &arg)
 
returnValue setOptions (uint idx, const Options &arg)
 
virtual ~AlgorithmicBase ()
 

Protected Member Functions

returnValue allocateIntegrator (uint idx, IntegratorType type_)
 
void copy (const ShootingMethod &arg)
 
returnValue deleteAll ()
 
returnValue differentiateBackward (const int &idx, const DMatrix &seed, DMatrix &Gx, DMatrix &Gp, DMatrix &Gu, DMatrix &Gw)
 
returnValue differentiateForward (const int &idx, const DMatrix &dX, const DMatrix &dP, const DMatrix &dU, const DMatrix &dW, DMatrix &D)
 
returnValue differentiateForwardBackward (const int &idx, const DMatrix &dX, const DMatrix &dP, const DMatrix &dU, const DMatrix &dW, const DMatrix &seed, DMatrix &D, DMatrix &ddX, DMatrix &ddP, DMatrix &ddU, DMatrix &ddW)
 
returnValue logTrajectory (const OCPiterate &iter)
 
returnValue rescale (VariablesGrid *trajectory, double tEndNew, double newIntervalLength) const
 
returnValue update (DMatrix &G, const DMatrix &A, const DMatrix &B)
 
- Protected Member Functions inherited from DynamicDiscretization
void copy (const DynamicDiscretization &rhs)
 
uint getNumEvaluationPoints () const
 
void initializeVariables ()
 
virtual returnValue setupLogging ()
 
virtual returnValue setupOptions ()
 

Protected Attributes

DMatrix breakPoints
 
Integrator ** integrator
 
- Protected Attributes inherited from DynamicDiscretization
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
 
- Protected Attributes inherited from AlgorithmicBase
int outputLoggingIdx
 
BooleanType useModuleStandalone
 
UserInteractionuserInteraction
 

Detailed Description

Discretizes a DifferentialEquation by means of single or multiple shooting.

The class ShootingMethod allows to discretize a DifferentialEquation for use in optimal control algorithms by means of an (online) integrator using either single or multiple shooting.

Author
Boris Houska, Hans Joachim Ferreau

Definition at line 55 of file shooting_method.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO ShootingMethod::ShootingMethod ( )

Default constructor.

Definition at line 48 of file shooting_method.cpp.

ShootingMethod::ShootingMethod ( UserInteraction _userInteraction)

Definition at line 54 of file shooting_method.cpp.

ShootingMethod::ShootingMethod ( const ShootingMethod rhs)

Copy constructor (deep copy).

Definition at line 60 of file shooting_method.cpp.

ShootingMethod::~ShootingMethod ( )
virtual

Destructor.

Definition at line 66 of file shooting_method.cpp.

Member Function Documentation

returnValue ShootingMethod::addStage ( const DynamicSystem dynamicSystem_,
const Grid stageIntervals,
const IntegratorType integratorType_ = INT_UNKNOWN 
)
virtual

Set the Differential Equations stage by stage.

Implements DynamicDiscretization.

Definition at line 105 of file shooting_method.cpp.

returnValue ShootingMethod::addTransition ( const Transition transition_)
virtual

Set the Transition stages.

Implements DynamicDiscretization.

Definition at line 184 of file shooting_method.cpp.

returnValue ShootingMethod::allocateIntegrator ( uint  idx,
IntegratorType  type_ 
)
protected

Definition at line 164 of file shooting_method.cpp.

returnValue ShootingMethod::clear ( )
virtual

Deletes all stages and transitions and resets the DynamicDiscretization.

Implements DynamicDiscretization.

Definition at line 193 of file shooting_method.cpp.

DynamicDiscretization * ShootingMethod::clone ( ) const
virtual

Clone constructor (deep copy).

Implements DynamicDiscretization.

Definition at line 99 of file shooting_method.cpp.

void ShootingMethod::copy ( const ShootingMethod arg)
protected

Definition at line 84 of file shooting_method.cpp.

returnValue ShootingMethod::deleteAll ( )
protected

Definition at line 686 of file shooting_method.cpp.

returnValue ShootingMethod::deleteAllSeeds ( )
virtual

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 from DynamicDiscretization.

Definition at line 664 of file shooting_method.cpp.

returnValue ShootingMethod::differentiateBackward ( const int &  idx,
const DMatrix seed,
DMatrix Gx,
DMatrix Gp,
DMatrix Gu,
DMatrix Gw 
)
protected

Definition at line 327 of file shooting_method.cpp.

returnValue ShootingMethod::differentiateForward ( const int &  idx,
const DMatrix dX,
const DMatrix dP,
const DMatrix dU,
const DMatrix dW,
DMatrix D 
)
protected

Definition at line 364 of file shooting_method.cpp.

returnValue ShootingMethod::differentiateForwardBackward ( const int &  idx,
const DMatrix dX,
const DMatrix dP,
const DMatrix dU,
const DMatrix dW,
const DMatrix seed,
DMatrix D,
DMatrix ddX,
DMatrix ddP,
DMatrix ddU,
DMatrix ddW 
)
protected

Definition at line 401 of file shooting_method.cpp.

returnValue ShootingMethod::evaluate ( OCPiterate iter)
virtual

Evaluates the discretized 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.

Implements DynamicDiscretization.

Definition at line 205 of file shooting_method.cpp.

returnValue ShootingMethod::evaluateSensitivities ( )
virtual

Evaluates the sensitivities.

Returns
SUCCESSFUL_RETURN
RET_NOT_FROZEN

Implements DynamicDiscretization.

Definition at line 467 of file shooting_method.cpp.

returnValue ShootingMethod::evaluateSensitivities ( const BlockMatrix seed,
BlockMatrix hessian 
)
virtual

Evaluates the sensitivities and the hessian.

Returns
SUCCESSFUL_RETURN
RET_NOT_FROZEN

Implements DynamicDiscretization.

Definition at line 589 of file shooting_method.cpp.

returnValue ShootingMethod::evaluateSensitivitiesLifted ( )
virtual

Evaluates the sensitivities.

Returns
SUCCESSFUL_RETURN
RET_NOT_FROZEN

Implements DynamicDiscretization.

Definition at line 533 of file shooting_method.cpp.

BooleanType ShootingMethod::isAffine ( ) const
virtual

Implements DynamicDiscretization.

Definition at line 676 of file shooting_method.cpp.

returnValue ShootingMethod::logTrajectory ( const OCPiterate iter)
protected

Definition at line 704 of file shooting_method.cpp.

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

Assignment operator (deep copy).

Definition at line 72 of file shooting_method.cpp.

returnValue ShootingMethod::rescale ( VariablesGrid trajectory,
double  tEndNew,
double  newIntervalLength 
) const
protected

Definition at line 798 of file shooting_method.cpp.

returnValue ShootingMethod::unfreeze ( )
virtual

Implements DynamicDiscretization.

Definition at line 654 of file shooting_method.cpp.

returnValue ShootingMethod::update ( DMatrix G,
const DMatrix A,
const DMatrix B 
)
protected

Writes the continous integrator output to the logging object, if this
is requested. Please note, that this routine converts the VariablesGrids
from the integration routine into a large matrix. Consequently, the break
points need to be logged, too.

Returns
SUCCESSFUL_RETURN

Definition at line 519 of file shooting_method.cpp.

Member Data Documentation

DMatrix ShootingMethod::breakPoints
protected

Definition at line 215 of file shooting_method.hpp.

Integrator** ShootingMethod::integrator
protected

Definition at line 214 of file shooting_method.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:26