54 const char**
const _names,
55 const char**
const _units,
68 const char**
const _names,
69 const char**
const _units,
84 const char**
const _names,
85 const char**
const _units,
90 ) :
MatrixVariablesGrid( _dim,1,_firstTime,_lastTime,_nPoints,_type,_names,_units,_scaling,_lb,_ub,_autoInit )
114 operator()( i,j-1 ) = arg( i,j );
185 rowGrid( run1,0 ) =
values[run1]->operator()( rowIdx,0 );
217 const char**
const _names,
218 const char**
const _units,
232 const char**
const _names,
233 const char**
const _units,
249 const char**
const _names,
250 const char**
const _units,
257 return MatrixVariablesGrid::init( _dim,1,_firstTime,_lastTime,_nPoints,_type,_names,_units,_scaling,_lb,_ub,_autoInit );
290 operator()( pointIdx,j ) = _values( j );
349 aux.
setCol( 0, lastValue );
389 switch ( _mergeMethod )
496 switch ( _mergeMethod )
549 return newVariablesGrid;
551 if ( startIdx > endIdx )
552 return newVariablesGrid;
554 for(
uint i=startIdx; i<=endIdx; ++i )
557 return newVariablesGrid;
571 return newVariablesGrid;
574 return newVariablesGrid;
583 for(
uint i=startIdx; i<=endIdx; ++i )
589 return newVariablesGrid;
600 return newVariablesGrid;
602 if ( startIdx > endIdx )
603 return newVariablesGrid;
608 return newVariablesGrid;
VariablesGrid & shiftTimes(double timeShift)
GenericVector< T > getCol(unsigned _idx) const
returnValue setTime(double _time)
returnValue appendSettings(const VariableSettings &rhs)
VariablesGrid & shiftBackwards(DVector lastValue=emptyVector)
VariablesGrid & operator=(const VariablesGrid &rhs)
returnValue addMatrix(const DMatrix &newMatrix, double newTime=-INFTY)
double getTime(uint pointIdx) const
double getFirstTime() const
BooleanType acadoIsEqual(double x, double y, double TOL)
uint getCeilIndex(double time) const
GenericMatrix & setCol(unsigned _idx, const GenericVector< T > &_arg)
Provides a time grid consisting of vector-valued optimization variables at each grid point...
returnValue getSum(DVector &sum) const
Allows to pass back messages to the calling function.
VariablesGrid getValuesSubGrid(uint startIdx, uint endIdx) const
double getLowerBound(uint pointIdx, uint valueIdx) const
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Allows to conveniently handle (one-dimensional) grids consisting of time points.
GenericMatrix & appendRows(const GenericMatrix &_arg)
uint getLastIndex() const
BooleanType acadoIsGreater(double x, double y, double TOL)
#define CLOSE_NAMESPACE_ACADO
double getUpperBound(uint pointIdx, uint valueIdx) const
BooleanType isInInterval(double _time) const
GenericMatrix< double > DMatrix
MatrixVariablesGrid & shiftBackwards(DMatrix lastValue=emptyMatrix)
uint getFloorIndex(double time) const
BooleanType acadoIsStrictlySmaller(double x, double y, double TOL)
returnValue appendValues(const VariablesGrid &arg)
double getIntervalLength() const
VariableType getType() const
returnValue merge(const VariablesGrid &arg, MergeMethod _mergeMethod=MM_DUPLICATE, BooleanType keepOverlap=BT_TRUE)
returnValue setVector(uint pointIdx, const DVector &_values)
Provides a time grid consisting of matrix-valued optimization variables at each grid point...
returnValue addVector(const DVector &newVector, double newTime=-INFTY)
DVector getFirstVector() const
returnValue getGrid(Grid &_grid) const
returnValue setAllVectors(const DVector &_values)
DVector getLastVector() const
VariablesGrid getTimeSubGrid(uint startIdx, uint endIdx) const
Derived & setZero(Index size)
BooleanType acadoIsSmaller(double x, double y, double TOL)
returnValue appendTimes(const VariablesGrid &arg, MergeMethod _mergeMethod=MM_DUPLICATE)
void rhs(const real_t *x, real_t *f)
unsigned getNumRows() const
MatrixVariable getRows(uint startIdx, uint endIdx) const
Grid & shiftTimes(double timeShift)
unsigned getNumCols() const
uint getNumIntervals() const
VariablesGrid operator[](const uint pointIdx) const
MatrixVariablesGrid & operator=(const MatrixVariablesGrid &rhs)
uint getNumPoints() const
returnValue initializeFromBounds()
DVector getVector(uint pointIdx) const
BooleanType hasTime(double _time) const
double getLastTime() const
static DVector emptyVector
#define BEGIN_NAMESPACE_ACADO
double & operator()(uint pointIdx, uint rowIdx)
BooleanType acadoIsStrictlyGreater(double x, double y, double TOL)
uint getNumValues() const
returnValue getIntegral(InterpolationMode mode, DVector &value) const
#define ACADOERROR(retval)