202 return add( tmp_lb, arg, tmp_ub );
212 return add( lb_, arg, tmp_ub );
221 return add( tmp_lb, arg, ub_ );
248 var [
nb-1] = varType ;
292 if( (component.
getLB()).getDim() == 1 )
293 tmp_lb(run1) = (component.
getLB()).
operator()(0);
295 if( (component.
getLB()).getDim() <= run1 )
297 tmp_lb(run1) = (component.
getLB()).
operator()(run1);
307 tmp_lb(run1) = tmp(0);
314 if( (component.
getUB()).getDim() == 1 )
315 tmp_ub(run1) = (component.
getUB()).
operator()(0);
317 if( (component.
getUB()).getDim() <= run1 )
319 tmp_ub(run1) = (component.
getUB()).
operator()(run1);
329 tmp_ub(run1) = tmp(0);
344 "The constraint component can not be set as the associated " 345 "discretization point is not in the time horizon.");
352 if( (component.
getLB()).getDim() == 1 )
353 tmp_lb(run1) = (component.
getLB()).
operator()(0);
355 if( (component.
getLB()).getDim() <= run1 )
357 tmp_lb(run1) = (component.
getLB()).
operator()(run1);
367 tmp_lb(run1) = tmp(0);
374 if( (component.
getUB()).getDim() == 1 )
375 tmp_ub(run1) = (component.
getUB()).
operator()(0);
377 if( (component.
getUB()).getDim() <= run1 )
379 tmp_ub(run1) = (component.
getUB()).
operator()(run1);
389 tmp_ub(run1) = tmp(0);
760 for( run1 = 0; run1 <
N; run1++ )
771 for( run1 = 0; run1 <
N; run1++ )
856 for( run1 = 0; run1 <
N; run1++ ){
874 for( run1 = 0; run1 <
N; run1++ ){
903 lowerRes = residuumL;
904 upperRes = residuumU;
917 lowerRes.
init( 4*N+1, 1 );
918 upperRes.
init( 4*N+1, 1 );
920 for( run1 = 0; run1 <
N; run1++ ){
961 for( run2 = 0; run2 < 5*
N; run2++ ){
977 for( run2 = 0; run2 < 5*
N; run2++ ){
994 for( run1 = 0; run1 <
N; run1++ ){
995 for( run2 = 0; run2 < 5*
N; run2++ ){
1013 for( run1 = 0; run1 <
N; run1++ ){
1014 for( run2 = 0; run2 < 5*
N; run2++ ){
1017 result.
setDense( nc , run2, res_ );
1035 for( run2 = 0; run2 < 5*
N; run2++ ){
1072 for( run2 = 0; run2 < 5*
N; run2++ ){
1089 for( run2 = 0; run2 < 5*
N; run2++ ){
1106 for( run1 = 0; run1 <
N; run1++ ){
1107 for( run2 = 0; run2 < 5*
N; run2++ ){
1110 result.
setDense( nc , run2, res_ );
1125 for( run1 = 0; run1 <
N; run1++ ){
1126 for( run2 = 0; run2 < 5*
N; run2++ ){
1129 result.
setDense( nc , run2, res_ );
1147 for( run2 = 0; run2 < 5*
N; run2++ ){
BooleanType isVariable() const
returnValue add(const double lb_, const Expression &arg, const double ub_)
const DVector & getLB() const
Data class for storing generic optimization variables.
Implements a very rudimentary block sparse matrix class.
returnValue evaluateSensitivities()
Allows to setup and evaluate a general function based on SymbolicExpressions.
returnValue init(const OCPiterate &iter)
returnValue add(const DVector lb_, const Expression &arg, const DVector ub_)
void init(unsigned _nRows=0, unsigned _nCols=0)
returnValue init(const Grid &grid_)
Expression getExpression() const
returnValue getPathConstraints(Function &function_, DMatrix &lb_, DMatrix &ub_) const
double getTime(uint pointIdx) const
virtual returnValue setUnitForwardSeed()
virtual returnValue setBackwardSeed(BlockMatrix *seed, int order)
returnValue evaluate(const OCPiterate &iter)
const VariablesGrid & getLBgrid() const
returnValue evaluate(const OCPiterate &iter)
BEGIN_NAMESPACE_ACADO const double EPS
returnValue setDense(uint rowIdx, uint colIdx, const DMatrix &value)
returnValue getPointConstraint(const unsigned index, Function &function_, DMatrix &lb_, DMatrix &ub_) const
Stores and evaluates the constraints of optimal control problems.
BoundaryConstraint * boundary_constraint
Provides a time grid consisting of vector-valued optimization variables at each grid point...
int getNumberOfBlocks() const
Allows to pass back messages to the calling function.
virtual returnValue setUnitBackwardSeed()
Stores and evaluates box constraints within optimal control problems.
returnValue evaluateSensitivities()
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Allows to conveniently handle (one-dimensional) grids consisting of time points.
Stores and evaluates boundary constraints within optimal control problems.
Stores and evaluates pointwise constraints within optimal control problems.
BooleanType hasLBgrid() const
#define CLOSE_NAMESPACE_ACADO
Stores and evaluates path constraints within optimal control problems.
virtual returnValue setForwardSeed(BlockMatrix *xSeed_, BlockMatrix *xaSeed_, BlockMatrix *pSeed_, BlockMatrix *uSeed_, BlockMatrix *wSeed_, int order)
Data class for symbolically formulating constraints within optimal control problems.
virtual returnValue getBoundResiduum(BlockMatrix &lowerRes, BlockMatrix &upperRes)
const DVector & getUB() const
virtual returnValue getBounds(const OCPiterate &iter)
returnValue add(const double lb_, const Expression &arg, const double ub_)
Base class for all variables within the symbolic expressions family.
Deals with algebraic consistency constraints within optimal control problems.
returnValue evaluate(const OCPiterate &iter)
returnValue getSubBlock(uint rowIdx, uint colIdx, DMatrix &value) const
virtual returnValue setBackwardSeed(BlockMatrix *seed, int order)
virtual returnValue setUnitForwardSeed()
PathConstraint * path_constraint
DVector linearInterpolation(double time) const
virtual returnValue getResiduum(BlockMatrix &lower_residuum, BlockMatrix &upper_residuum)
returnValue evaluate(const OCPiterate &iter)
virtual returnValue setForwardSeed(BlockMatrix *xSeed_, BlockMatrix *xaSeed_, BlockMatrix *pSeed_, BlockMatrix *uSeed_, BlockMatrix *wSeed_, int order)
BooleanType hasUBgrid() const
returnValue init(uint _nRows, uint _nCols)
virtual returnValue getBackwardSensitivities(BlockMatrix *D, int order)
returnValue get(Function &function_, DMatrix &lb_, DMatrix &ub_)
virtual returnValue getForwardSensitivities(BlockMatrix &D, int order)
AlgebraicConsistencyConstraint * algebraic_consistency_constraint
Constraint & operator=(const Constraint &rhs)
Stores and evaluates coupled path constraints within optimal control problems.
returnValue evaluate(const OCPiterate &iter)
BooleanType isEmpty() const
void rhs(const real_t *x, real_t *f)
virtual returnValue getBounds(const OCPiterate &iter)
returnValue evaluate(const OCPiterate &iter)
int getDim(const int &idx_)
returnValue evaluateBounds(const OCPiterate &iter)
BoxConstraint & operator=(const BoxConstraint &rhs)
returnValue evaluateSensitivities()
VariableType getVariableType() const
GenericVector< double > DVector
uint getNumPoints() const
void setAll(const T &_value)
returnValue evaluateSensitivities()
returnValue evaluateSensitivities()
const VariablesGrid & getUBgrid() const
uint getComponent(const unsigned int idx) const
returnValue add(const double lb_, const Expression &arg1, const Expression &arg2, const double ub_)
#define ACADOWARNING(retval)
#define BEGIN_NAMESPACE_ACADO
int getDim(const int &idx_)
PointConstraint ** point_constraints
virtual returnValue getForwardSensitivities(BlockMatrix *D, int order)
CoupledPathConstraint * coupled_path_constraint
returnValue getBounds(const OCPiterate &iter)
returnValue setIdentity(uint rowIdx, uint colIdx, uint dim)
returnValue add(const double lb_, const Expression *arg, const double ub_)
virtual returnValue getConstraintResiduum(BlockMatrix &lowerRes, BlockMatrix &upperRes)
returnValue evaluateSensitivities()
#define ACADOERROR(retval)
#define ACADOERRORTEXT(retval, text)
returnValue init(const Grid &grid_, const int &numberOfStages_=1)
returnValue add(const uint &endOfStage_, const DifferentialEquation &dae)
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.
virtual returnValue getBackwardSensitivities(BlockMatrix &D, int order)