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++ ){
uint getNumPoints() const
returnValue add(const double lb_, const Expression &arg, const double ub_)
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.
const DVector & getUB() const
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_)
virtual returnValue setUnitForwardSeed()
virtual returnValue setBackwardSeed(BlockMatrix *seed, int order)
returnValue evaluate(const OCPiterate &iter)
const VariablesGrid & getUBgrid() const
returnValue evaluate(const OCPiterate &iter)
BEGIN_NAMESPACE_ACADO const double EPS
returnValue setDense(uint rowIdx, uint colIdx, const DMatrix &value)
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...
const VariablesGrid & getLBgrid() 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
BooleanType hasUBgrid() const
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.
#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)
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)
const DVector & getLB() const
virtual returnValue setBackwardSeed(BlockMatrix *seed, int order)
virtual returnValue setUnitForwardSeed()
PathConstraint * path_constraint
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)
returnValue init(uint _nRows, uint _nCols)
virtual returnValue getBackwardSensitivities(BlockMatrix *D, int order)
returnValue get(Function &function_, DMatrix &lb_, DMatrix &ub_)
BooleanType hasLBgrid() const
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)
returnValue getSubBlock(uint rowIdx, uint colIdx, DMatrix &value) const
void rhs(const real_t *x, real_t *f)
virtual returnValue getBounds(const OCPiterate &iter)
returnValue evaluate(const OCPiterate &iter)
double getTime(uint pointIdx) const
int getDim(const int &idx_)
returnValue evaluateBounds(const OCPiterate &iter)
BooleanType isVariable() const
BoxConstraint & operator=(const BoxConstraint &rhs)
returnValue evaluateSensitivities()
returnValue getPathConstraints(Function &function_, DMatrix &lb_, DMatrix &ub_) const
GenericVector< double > DVector
void setAll(const T &_value)
returnValue getPointConstraint(const unsigned index, Function &function_, DMatrix &lb_, DMatrix &ub_) const
returnValue evaluateSensitivities()
returnValue evaluateSensitivities()
returnValue add(const double lb_, const Expression &arg1, const Expression &arg2, const double ub_)
BooleanType isEmpty() const
#define ACADOWARNING(retval)
#define BEGIN_NAMESPACE_ACADO
Expression getExpression() const
int getDim(const int &idx_)
DVector linearInterpolation(double time) const
PointConstraint ** point_constraints
VariableType getVariableType() const
virtual returnValue getForwardSensitivities(BlockMatrix *D, int order)
CoupledPathConstraint * coupled_path_constraint
int getNumberOfBlocks() const
returnValue getBounds(const OCPiterate &iter)
uint getComponent(const unsigned int idx) const
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)