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

Base class for user-interfaces to formulate and solve optimal control problems and static NLPs. More...

#include <optimization_algorithm_base.hpp>

Inheritance diagram for OptimizationAlgorithmBase:
Inheritance graph
[legend]

Public Member Functions

returnValue getAlgebraicStates (VariablesGrid &xa_) const
 
returnValue getAlgebraicStates (const char *fileName) const
 
returnValue getControls (VariablesGrid &p_) const
 
returnValue getControls (const char *fileName) const
 
returnValue getDifferentialStates (VariablesGrid &xd_) const
 
returnValue getDifferentialStates (const char *fileName) const
 
returnValue getDisturbances (VariablesGrid &w_) const
 
returnValue getDisturbances (const char *fileName) const
 
double getEndTime () const
 
virtual uint getNP () const
 
virtual uint getNU () const
 
virtual uint getNW () const
 
virtual uint getNX () const
 
virtual uint getNXA () const
 
double getObjectiveValue (const char *fileName) const
 
double getObjectiveValue () const
 
returnValue getParameters (VariablesGrid &u_) const
 
returnValue getParameters (DVector &u_) const
 
returnValue getParameters (const char *fileName) const
 
returnValue getSensitivitiesP (BlockMatrix &_sens) const
 
returnValue getSensitivitiesU (BlockMatrix &_sens) const
 
returnValue getSensitivitiesW (BlockMatrix &_sens) const
 
returnValue getSensitivitiesX (BlockMatrix &_sens) const
 
returnValue getSensitivitiesXA (BlockMatrix &_sens) const
 
double getStartTime () const
 
returnValue initializeAlgebraicStates (const char *fileName, BooleanType autoinit=BT_FALSE)
 
returnValue initializeAlgebraicStates (const VariablesGrid &xa_init_, BooleanType autoinit=BT_FALSE)
 
returnValue initializeControls (const char *fileName)
 
returnValue initializeControls (const VariablesGrid &p_init_)
 
returnValue initializeDifferentialStates (const char *fileName, BooleanType autoinit=BT_FALSE)
 
returnValue initializeDifferentialStates (const VariablesGrid &xd_init_, BooleanType autoinit=BT_FALSE)
 
returnValue initializeDisturbances (const char *fileName)
 
returnValue initializeDisturbances (const VariablesGrid &w_init_)
 
returnValue initializeParameters (const char *fileName)
 
returnValue initializeParameters (const VariablesGrid &u_init_)
 
OptimizationAlgorithmBaseoperator= (const OptimizationAlgorithmBase &arg)
 
 OptimizationAlgorithmBase ()
 
 OptimizationAlgorithmBase (const OCP &ocp_)
 
 OptimizationAlgorithmBase (const OptimizationAlgorithmBase &arg)
 
returnValue simulateStatesForInitialization ()
 
virtual ~OptimizationAlgorithmBase ()
 

Protected Member Functions

virtual returnValue allocateNlpSolver (Objective *F, DynamicDiscretization *G, Constraint *H)=0
 
returnValue clear ()
 
virtual returnValue determineDimensions (Objective *const _objective, DifferentialEquation **const _differentialEquation, Constraint *const _constraint, uint &_nx, uint &_nxa, uint &_np, uint &_nu, uint &_nw) const
 
virtual returnValue extractOCPdata (Objective **objective, DifferentialEquation ***differentialEquation, Constraint **constraint, Grid &unionGrid)
 
returnValue init (UserInteraction *_userIteraction)
 
virtual returnValue initializeNlpSolver (const OCPiterate &_userInit)=0
 
virtual returnValue initializeObjective (Objective *F)=0
 
virtual returnValue initializeOCPiterate (Constraint *const _constraint, const Grid &_unionGrid, uint nx, uint nxa, uint np, uint nu, uint nw)
 
BooleanType isLinearQuadratic (Objective *F, DynamicDiscretization *G, Constraint *H) const
 
virtual returnValue setupDifferentialEquation (Objective *objective, DifferentialEquation **differentialEquation, Constraint *constraint, Grid unionGrid)
 
virtual returnValue setupDynamicDiscretization (UserInteraction *_userIteraction, Objective *objective, DifferentialEquation **differentialEquation, Constraint *constraint, Grid unionGrid, DynamicDiscretization **dynamicDiscretization)
 
virtual returnValue setupObjective (Objective *objective, DifferentialEquation **differentialEquation, Constraint *constraint, Grid unionGrid)
 

Protected Attributes

OCPiterate iter
 
NLPsolvernlpSolver
 
OCPocp
 
OCPiterate userInit
 

Detailed Description

Base class for user-interfaces to formulate and solve optimal control problems and static NLPs.

Notes:

The class OptimizationAlgorithmBase serves as a base class for user-interfaces 

to formulate and solve optimal control problems and static nonlinear programming (NLP) problems.

Author
Boris Houska, Hans Joachim Ferreau

Definition at line 65 of file optimization_algorithm_base.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO OptimizationAlgorithmBase::OptimizationAlgorithmBase ( )

Default constructor.

Definition at line 48 of file optimization_algorithm_base.cpp.

OptimizationAlgorithmBase::OptimizationAlgorithmBase ( const OCP ocp_)

Default constructor.

Definition at line 57 of file optimization_algorithm_base.cpp.

OptimizationAlgorithmBase::OptimizationAlgorithmBase ( const OptimizationAlgorithmBase arg)

Copy constructor (deep copy).

Definition at line 66 of file optimization_algorithm_base.cpp.

OptimizationAlgorithmBase::~OptimizationAlgorithmBase ( )
virtual

Destructor.

Definition at line 79 of file optimization_algorithm_base.cpp.

Member Function Documentation

virtual returnValue OptimizationAlgorithmBase::allocateNlpSolver ( Objective F,
DynamicDiscretization G,
Constraint H 
)
protectedpure virtual
returnValue OptimizationAlgorithmBase::clear ( )
protected

Definition at line 457 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::determineDimensions ( Objective *const  _objective,
DifferentialEquation **const  _differentialEquation,
Constraint *const  _constraint,
uint _nx,
uint _nxa,
uint _np,
uint _nu,
uint _nw 
) const
protectedvirtual

Definition at line 744 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::extractOCPdata ( Objective **  objective,
DifferentialEquation ***  differentialEquation,
Constraint **  constraint,
Grid unionGrid 
)
protectedvirtual

Definition at line 626 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getAlgebraicStates ( VariablesGrid xa_) const

Definition at line 232 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getAlgebraicStates ( const char *  fileName) const

Definition at line 291 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getControls ( VariablesGrid p_) const

Definition at line 262 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getControls ( const char *  fileName) const

Definition at line 321 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getDifferentialStates ( VariablesGrid xd_) const

Definition at line 225 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getDifferentialStates ( const char *  fileName) const

Definition at line 276 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getDisturbances ( VariablesGrid w_) const

Definition at line 269 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getDisturbances ( const char *  fileName) const

Definition at line 336 of file optimization_algorithm_base.cpp.

double OptimizationAlgorithmBase::getEndTime ( ) const

Definition at line 443 of file optimization_algorithm_base.cpp.

uint OptimizationAlgorithmBase::getNP ( ) const
virtual

Returns number of parameters.

Returns
Number of parameters

Reimplemented in RealTimeAlgorithm.

Definition at line 416 of file optimization_algorithm_base.cpp.

uint OptimizationAlgorithmBase::getNU ( ) const
virtual

Returns number of controls.

Returns
Number of controls

Reimplemented in RealTimeAlgorithm.

Definition at line 422 of file optimization_algorithm_base.cpp.

uint OptimizationAlgorithmBase::getNW ( ) const
virtual

Returns number of disturbances.

Returns
Number of disturbances

Reimplemented in RealTimeAlgorithm.

Definition at line 428 of file optimization_algorithm_base.cpp.

uint OptimizationAlgorithmBase::getNX ( ) const
virtual

Returns number of differential states.

Returns
Number of differential states

Reimplemented in RealTimeAlgorithm.

Definition at line 404 of file optimization_algorithm_base.cpp.

uint OptimizationAlgorithmBase::getNXA ( ) const
virtual

Returns number of algebraic states.

Returns
Number of algebraic states

Reimplemented in RealTimeAlgorithm.

Definition at line 410 of file optimization_algorithm_base.cpp.

double OptimizationAlgorithmBase::getObjectiveValue ( const char *  fileName) const

Definition at line 351 of file optimization_algorithm_base.cpp.

double OptimizationAlgorithmBase::getObjectiveValue ( ) const

Definition at line 361 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getParameters ( VariablesGrid u_) const

Definition at line 239 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getParameters ( DVector u_) const

Definition at line 246 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getParameters ( const char *  fileName) const

Definition at line 306 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getSensitivitiesP ( BlockMatrix _sens) const

Definition at line 382 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getSensitivitiesU ( BlockMatrix _sens) const

Definition at line 389 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getSensitivitiesW ( BlockMatrix _sens) const

Definition at line 396 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getSensitivitiesX ( BlockMatrix _sens) const

Definition at line 369 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::getSensitivitiesXA ( BlockMatrix _sens) const

Definition at line 376 of file optimization_algorithm_base.cpp.

double OptimizationAlgorithmBase::getStartTime ( ) const

Definition at line 434 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::init ( UserInteraction _userIteraction)
protected

Initializes everything.

Definition at line 480 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::initializeAlgebraicStates ( const char *  fileName,
BooleanType  autoinit = BT_FALSE 
)

Definition at line 118 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::initializeAlgebraicStates ( const VariablesGrid xa_init_,
BooleanType  autoinit = BT_FALSE 
)

Definition at line 187 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::initializeControls ( const char *  fileName)

Definition at line 142 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::initializeControls ( const VariablesGrid p_init_)

Definition at line 209 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::initializeDifferentialStates ( const char *  fileName,
BooleanType  autoinit = BT_FALSE 
)

Initialization of the optimization variables.

Definition at line 106 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::initializeDifferentialStates ( const VariablesGrid xd_init_,
BooleanType  autoinit = BT_FALSE 
)

Definition at line 167 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::initializeDisturbances ( const char *  fileName)

Definition at line 154 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::initializeDisturbances ( const VariablesGrid w_init_)

Definition at line 217 of file optimization_algorithm_base.cpp.

virtual returnValue OptimizationAlgorithmBase::initializeNlpSolver ( const OCPiterate _userInit)
protectedpure virtual
virtual returnValue OptimizationAlgorithmBase::initializeObjective ( Objective F)
protectedpure virtual
returnValue OptimizationAlgorithmBase::initializeOCPiterate ( Constraint *const  _constraint,
const Grid _unionGrid,
uint  nx,
uint  nxa,
uint  np,
uint  nu,
uint  nw 
)
protectedvirtual

Definition at line 808 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::initializeParameters ( const char *  fileName)

Definition at line 130 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::initializeParameters ( const VariablesGrid u_init_)

Definition at line 201 of file optimization_algorithm_base.cpp.

BooleanType OptimizationAlgorithmBase::isLinearQuadratic ( Objective F,
DynamicDiscretization G,
Constraint H 
) const
protected

Definition at line 605 of file optimization_algorithm_base.cpp.

OptimizationAlgorithmBase & OptimizationAlgorithmBase::operator= ( const OptimizationAlgorithmBase arg)

Assignment operator (deep copy).

Definition at line 86 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::setupDifferentialEquation ( Objective objective,
DifferentialEquation **  differentialEquation,
Constraint constraint,
Grid  unionGrid 
)
protectedvirtual

Definition at line 692 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::setupDynamicDiscretization ( UserInteraction _userIteraction,
Objective objective,
DifferentialEquation **  differentialEquation,
Constraint constraint,
Grid  unionGrid,
DynamicDiscretization **  dynamicDiscretization 
)
protectedvirtual

Definition at line 708 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::setupObjective ( Objective objective,
DifferentialEquation **  differentialEquation,
Constraint constraint,
Grid  unionGrid 
)
protectedvirtual

Definition at line 678 of file optimization_algorithm_base.cpp.

returnValue OptimizationAlgorithmBase::simulateStatesForInitialization ( )

Use this call to overwrite all states by a single shooting initialization. This function takes the initial state and controls and overwrite all states apart from the first one by simulation.

Definition at line 180 of file optimization_algorithm_base.cpp.

Member Data Documentation

OCPiterate OptimizationAlgorithmBase::iter
protected

Definition at line 247 of file optimization_algorithm_base.hpp.

NLPsolver* OptimizationAlgorithmBase::nlpSolver
protected

Definition at line 244 of file optimization_algorithm_base.hpp.

OCP* OptimizationAlgorithmBase::ocp
protected

Definition at line 245 of file optimization_algorithm_base.hpp.

OCPiterate OptimizationAlgorithmBase::userInit
protected

Definition at line 248 of file optimization_algorithm_base.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:25