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

Deals with algebraic consistency constraints within optimal control problems. More...

#include <algebraic_consistency_constraint.hpp>

Inheritance diagram for AlgebraicConsistencyConstraint:
Inheritance graph
[legend]

Public Member Functions

returnValue add (const uint &endOfStage_, const DifferentialEquation &dae)
 
 AlgebraicConsistencyConstraint ()
 
 AlgebraicConsistencyConstraint (const Grid &grid_, const uint &numberOfStages)
 
 AlgebraicConsistencyConstraint (const AlgebraicConsistencyConstraint &rhs)
 
returnValue evaluate (const OCPiterate &iter)
 
returnValue evaluateSensitivities ()
 
returnValue evaluateSensitivities (int &count, const BlockMatrix &seed, BlockMatrix &hessian)
 
int getDim (const int &idx_)
 
int getNC () const
 
AlgebraicConsistencyConstraintoperator= (const AlgebraicConsistencyConstraint &rhs)
 
virtual ~AlgebraicConsistencyConstraint ()
 
- Public Member Functions inherited from ConstraintElement
 ConstraintElement ()
 
 ConstraintElement (const Grid &grid_, int nFcn_, int nB_)
 
 ConstraintElement (const ConstraintElement &rhs)
 
returnValue get (Function &function_, DMatrix &lb_, DMatrix &ub_)
 
virtual returnValue getBackwardSensitivities (BlockMatrix *D, int order)
 
virtual returnValue getForwardSensitivities (BlockMatrix *D, int order)
 
GridgetGrid ()
 
int getNP () const
 
int getNU () const
 
int getNW () const
 
int getNX () const
 
int getNXA () const
 
virtual returnValue getResiduum (BlockMatrix &lower_residuum, BlockMatrix &upper_residuum)
 
returnValue init (const OCPiterate &iter)
 
BooleanType isAffine () const
 
ConstraintElementoperator= (const ConstraintElement &rhs)
 
virtual returnValue setBackwardSeed (BlockMatrix *seed, int order)
 
virtual returnValue setForwardSeed (BlockMatrix *xSeed_, BlockMatrix *xaSeed_, BlockMatrix *pSeed_, BlockMatrix *uSeed_, BlockMatrix *wSeed_, int order)
 
virtual returnValue setUnitForwardSeed ()
 
virtual ~ConstraintElement ()
 

Protected Member Functions

returnValue computeForwardSensitivityBlock (int offset1, int offset2, int offset3, int stageIdx, DMatrix *seed)
 
virtual returnValue initializeEvaluationPoints (const OCPiterate &iter)
 

Protected Attributes

int * breakPoints
 
int counter
 
int * numberOfAlgebraicStates
 
int * numberOfDifferentialStates
 
int numberOfStages
 
- Protected Attributes inherited from ConstraintElement
BlockMatrixbSeed
 
BlockMatrixbSeed2
 
CondensingType condType
 
BlockMatrix dBackward
 
BlockMatrix dForward
 
Functionfcn
 
Grid grid
 
EvaluationPointJJ
 
double ** lb
 
int na
 
int nB
 
int nFcn
 
int np
 
int nu
 
int nw
 
int nx
 
int ny
 
BlockMatrixpSeed
 
BlockMatrixpSeed2
 
BlockMatrix residuumL
 
BlockMatrix residuumU
 
int * t_index
 
double ** ub
 
BlockMatrixuSeed
 
BlockMatrixuSeed2
 
BlockMatrixwSeed
 
BlockMatrixwSeed2
 
BlockMatrixxaSeed
 
BlockMatrixxaSeed2
 
BlockMatrixxSeed
 
BlockMatrixxSeed2
 
int ** y_index
 
EvaluationPointz
 

Detailed Description

Deals with algebraic consistency constraints within optimal control problems.

The class AlgebraicConsistencyConstraint has been introduced in order to deal with algebraic consistency constraints. Usually, the user does not get in touch with this class, as algebraic consistency constraints should automatically be introduced by the optimization routine. It is possible to add several DAE right-hand sides which will be evaluated on a grid (usually, the multiple shooting ot collocation grid) depending on the model stage number. In the easiest case, i.e. for one stage, the evaluation routine will return the algebraic residuum of the DAE at a given point. The differentiation of the AlgebraicConsistencyConstraint will return the derivatives in form of a structured block matrix, which is typically sparse.

\author Boris Houska, Hans Joachim Ferreau

Definition at line 65 of file algebraic_consistency_constraint.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO AlgebraicConsistencyConstraint::AlgebraicConsistencyConstraint ( )

Default constructor.

Definition at line 46 of file algebraic_consistency_constraint.cpp.

AlgebraicConsistencyConstraint::AlgebraicConsistencyConstraint ( const Grid grid_,
const uint numberOfStages 
)

Default constructor.

Parameters
grid_union grid of the constraint
numberOfStagesnumber of model stages

Definition at line 57 of file algebraic_consistency_constraint.cpp.

AlgebraicConsistencyConstraint::AlgebraicConsistencyConstraint ( const AlgebraicConsistencyConstraint rhs)

Copy constructor (deep copy).

Definition at line 68 of file algebraic_consistency_constraint.cpp.

AlgebraicConsistencyConstraint::~AlgebraicConsistencyConstraint ( )
virtual

Destructor.

Definition at line 95 of file algebraic_consistency_constraint.cpp.

Member Function Documentation

returnValue AlgebraicConsistencyConstraint::add ( const uint endOfStage_,
const DifferentialEquation dae 
)
inline

Adds a consistency constraint for a specified stage.

Returns
SUCCESSFUL_RETURN RET_INDEX_OUT_OF_BOUNDS (if the start/end of the stage are not well defined)
Parameters
endOfStage_end of the stage
daethe DAE itself
returnValue AlgebraicConsistencyConstraint::computeForwardSensitivityBlock ( int  offset1,
int  offset2,
int  offset3,
int  stageIdx,
DMatrix seed 
)
inlineprotected

only for internal use (routine which computes a part of the block matrix needed for forward differentiation.)

returnValue AlgebraicConsistencyConstraint::evaluate ( const OCPiterate iter)

Evaluates all components in this constraint and stores the
residuum.

Returns
SUCESSFUL_RETURN

Definition at line 150 of file algebraic_consistency_constraint.cpp.

returnValue AlgebraicConsistencyConstraint::evaluateSensitivities ( )

Evaluates the sensitivities of all components in this
constraint. Note that the seed can be defined via the base
class ConstraintElement.

Returns
SUCESSFUL_RETURN

Definition at line 189 of file algebraic_consistency_constraint.cpp.

returnValue AlgebraicConsistencyConstraint::evaluateSensitivities ( int &  count,
const BlockMatrix seed,
BlockMatrix hessian 
)

Evaluates the sensitivities and Hessian.

Returns
SUCESSFUL_RETURN

Definition at line 327 of file algebraic_consistency_constraint.cpp.

int AlgebraicConsistencyConstraint::getDim ( const int &  idx_)
inline

returns the dimensions of the idx-th block

int AlgebraicConsistencyConstraint::getNC ( ) const
inline

returns the number of constraints

returnValue AlgebraicConsistencyConstraint::initializeEvaluationPoints ( const OCPiterate iter)
protectedvirtual

Reimplemented from ConstraintElement.

Definition at line 614 of file algebraic_consistency_constraint.cpp.

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

Assignment operator (deep copy).

Definition at line 108 of file algebraic_consistency_constraint.cpp.

Member Data Documentation

int* AlgebraicConsistencyConstraint::breakPoints
protected

Definition at line 164 of file algebraic_consistency_constraint.hpp.

int AlgebraicConsistencyConstraint::counter
protected

Definition at line 161 of file algebraic_consistency_constraint.hpp.

int* AlgebraicConsistencyConstraint::numberOfAlgebraicStates
protected

Definition at line 163 of file algebraic_consistency_constraint.hpp.

int* AlgebraicConsistencyConstraint::numberOfDifferentialStates
protected

Definition at line 162 of file algebraic_consistency_constraint.hpp.

int AlgebraicConsistencyConstraint::numberOfStages
protected

Definition at line 160 of file algebraic_consistency_constraint.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:22