95 for( run1 = 0; run1 <
nLSQ; run1++ )
102 for( run1 = 0; run1 <
nEndLSQ; run1++ )
109 for( run1 = 0; run1 <
nMayer; run1++ )
129 for( run1 = 0; run1 <
nLSQ; run1++ )
135 for( run1 = 0; run1 <
nEndLSQ; run1++ )
141 for( run1 = 0; run1 <
nMayer; run1++ )
197 for( run1 = 0; run1 <
nLSQ; run1++ )
203 for( run1 = 0; run1 <
nEndLSQ; run1++ )
209 for( run1 = 0; run1 <
nMayer; run1++ )
222 for( run1 = 0; run1 <
nLSQ; run1++ )
229 for( run1 = 0; run1 <
nEndLSQ; run1++ )
236 for( run1 = 0; run1 <
nMayer; run1++ )
258 for( run1 = 0; run1 <
nLSQ; run1++ )
261 for( run1 = 0; run1 <
nEndLSQ; run1++ )
264 for( run1 = 0; run1 <
nMayer; run1++ )
276 for( run1 = 0; run1 <
nLSQ; run1++ ){
281 for( run1 = 0; run1 <
nEndLSQ; run1++ ){
286 for( run1 = 0; run1 <
nMayer; run1++ ){
300 for( run1 = 0; run1 <
nLSQ; run1++ ){
305 for( run1 = 0; run1 <
nEndLSQ; run1++ ){
310 for( run1 = 0; run1 <
nMayer; run1++ ){
328 for( run1 = 0; run1 <
nLSQ; run1++ ){
332 for( run1 = 0; run1 <
nEndLSQ; run1++ ){
351 for( run1 = 0; run1 <
nLSQ; run1++ ){
356 for( run1 = 0; run1 <
nEndLSQ; run1++ ){
361 for( run1 = 0; run1 <
nMayer; run1++ ){
375 for( run1 = 0; run1 <
nLSQ; run1++ ){
380 for( run1 = 0; run1 <
nEndLSQ; run1++ ){
385 for( run1 = 0; run1 <
nMayer; run1++ ){
409 objectiveValue = 0.0;
411 for( run1 = 0; run1 <
nLSQ; run1++ ){
414 objectiveValue += obj;
417 for( run1 = 0; run1 <
nEndLSQ; run1++ ){
420 objectiveValue += obj;
423 for( run1 = 0; run1 <
nMayer; run1++ ){
426 objectiveValue += obj;
442 for( run1 = 0; run1 <
nLSQ; run1++ ){
445 if( sum != 0 ) sum[0] += DD;
449 for( run1 = 0; run1 <
nEndLSQ; run1++ ){
452 if( sum != 0 ) sum[0] += DD;
456 for( run1 = 0; run1 <
nMayer; run1++ ){
459 if( sum != 0 ) sum[0] += DD;
481 for( run1 = 0; run1 <
nLSQ; run1++ ){
484 if( sum != 0 ) sum[0] += DD;
488 for( run1 = 0; run1 <
nEndLSQ; run1++ ){
491 if( sum != 0 ) sum[0] += DD;
495 for( run1 = 0; run1 <
nMayer; run1++ ){
498 if( sum != 0 ) sum[0] += DD;
512 const int nTransitions,
523 for( run1 = 0; run1 < nStages; run1++ )
529 for( run1 = 0; run1 < nTransitions; run1++ )
530 transitions[run1] << xAugment == xAugment;
532 for( run1 = 0; run1 < nStages; run1++ ){
534 if( fcn[run1]->isDiscretized() ==
BT_FALSE ){
548 fcn[run1][0] <<
next( xAugment ) == tmp;
555 fcn[run1][0] <<
next( xAugment ) == tmp;
560 constraint_[0].
add(0, 0.0, xAugment, 0.0);
returnValue getLSQLinearTerms(LsqLinearElements &_elements) const
virtual double getStepLength() const
uint getNumLagrangeTerms() const
virtual returnValue setUnitBackwardSeed()
Data class for storing generic optimization variables.
Implements a very rudimentary block sparse matrix class.
Allows to setup and evaluate a general function based on SymbolicExpressions.
returnValue getLSQEndTerms(LsqElements &_elements) const
bool isPositiveSemiDefinite() const
std::vector< LsqLinearData > LsqLinearElements
returnValue evaluateSensitivities(BlockMatrix *hessian)
virtual returnValue getBackwardSensitivities(BlockMatrix *D, int order)
BooleanType isEmpty() const
Stores and evaluates Mayer terms within optimal control problems.
Stores and evaluates the constraints of optimal control problems.
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
returnValue evaluateSensitivitiesGN(BlockMatrix *GNhessian)
returnValue addLSQLinearTerms(const DVector &Slx, const DVector &Slu)
returnValue addLSQ(const MatrixVariablesGrid *S_, const Function &h, const VariablesGrid *r_)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Allows to conveniently handle (one-dimensional) grids consisting of time points.
LsqExternElements cgExternLsqElements
LsqExternElements cgExternLsqEndTermElements
returnValue evaluateSensitivitiesGN(BlockMatrix &hessian)
#define CLOSE_NAMESPACE_ACADO
returnValue evaluateSensitivitiesGN(BlockMatrix *GNhessian)
virtual returnValue getObjectiveValue(double &objectiveValue)
returnValue add(const double lb_, const Expression &arg, const double ub_)
Base class for all variables within the symbolic expressions family.
LsqElements cgLsqEndTermElements
Stores and evaluates LSQ mayer terms within optimal control problems.
returnValue evaluateSensitivities(BlockMatrix *hessian)
Provides a time grid consisting of matrix-valued optimization variables at each grid point...
returnValue evaluateSensitivities(BlockMatrix *hessian)
virtual returnValue getForwardSensitivities(BlockMatrix &D, int order)
uint getNumMayerTerms() const
returnValue setGrid(const Grid &grid_)
std::vector< LsqData > LsqElements
returnValue addLSQEndTerm(const DMatrix &S, const Function &m, const DVector &r)
virtual returnValue setForwardSeed(BlockMatrix *xSeed_, BlockMatrix *xaSeed_, BlockMatrix *pSeed_, BlockMatrix *uSeed_, BlockMatrix *wSeed_, int order)
Expression ** lagrangeFcn
returnValue getMayerTerm(uint index, Function &mayerTerm) const
void rhs(const real_t *x, real_t *f)
Expression dot(const Expression &arg)
DMatrix getMatrix(uint pointIdx) const
returnValue evaluate(const OCPiterate &x)
virtual returnValue getObjectiveValue(double &objectiveValue)
returnValue init(const Grid &grid_)
Allows to setup and evaluate transition functions based on SymbolicExpressions.
LsqLinearElements cgLsqLinearElements
returnValue evaluateSensitivities()
virtual returnValue setBackwardSeed(BlockMatrix *seed, int order)
returnValue setGrid(const Grid &grid_)
Expression next(const Expression &arg)
returnValue setZero(uint rowIdx, uint colIdx)
std::vector< LsqExternData > LsqExternElements
returnValue getLagrangeTerm(uint index, Function &lagrangeTerm) const
Stores and evaluates Lagrange terms within optimal control problems.
#define BEGIN_NAMESPACE_ACADO
Stores and evaluates LSQ terms within optimal control problems.
virtual returnValue setForwardSeed(BlockMatrix *xSeed_, BlockMatrix *xaSeed_, BlockMatrix *pSeed_, BlockMatrix *uSeed_, BlockMatrix *wSeed_, int order)
Objective & operator=(const Objective &rhs)
returnValue init(const Grid &grid_)
virtual returnValue setBackwardSeed(BlockMatrix *seed, int order)
returnValue getFunction(Function &_function)
LagrangeTerm & operator=(const LagrangeTerm &rhs)
virtual returnValue getBackwardSensitivities(BlockMatrix &D, int order)
returnValue setIdentity(uint rowIdx, uint colIdx, uint dim)
LsqElements cgLsqElements
virtual returnValue getForwardSensitivities(BlockMatrix *D, int order)
Stores and evaluates the objective function of optimal control problems.
returnValue getLSQTerms(LsqElements &_elements) const
#define ACADOERROR(retval)
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.