63 x = 0;
xa = 0;
p = 0;
u = 0;
w = 0;
65 init( _x,_xa,_p,_u,_w );
142 if(
x != 0 ){
delete x ;
x = 0; }
143 if(
xa != 0 ){
delete xa;
xa = 0; }
144 if(
p != 0 ){
delete p ;
p = 0; }
145 if(
u != 0 ){
delete u ;
u = 0; }
146 if(
w != 0 ){
delete w ;
w = 0; }
171 if(
x != 0 )
x ->
print(
"iter.x " );
173 if(
p != 0 )
p ->
print(
"iter.p " );
174 if(
u != 0 )
u ->
print(
"iter.u " );
175 if(
w != 0 )
w ->
print(
"iter.w " );
186 if(
x != 0 ){
x ->
getGrid(tmp); unionGrid = unionGrid & tmp; }
187 if(
xa != 0 ){
xa->
getGrid(tmp); unionGrid = unionGrid & tmp; }
188 if(
p != 0 ){
p ->
getGrid(tmp); unionGrid = unionGrid & tmp; }
189 if(
u != 0 ){
u ->
getGrid(tmp); unionGrid = unionGrid & tmp; }
190 if(
w != 0 ){
w ->
getGrid(tmp); unionGrid = unionGrid & tmp; }
199 double startTime = 0.0, endTime = 0.0;
338 for( run2 = 0; run2 <
getNX(); run2++ )
339 x->operator()(run1,run2) += alpha*tmp(run2,0);
346 for( run2 = 0; run2 <
getNXA(); run2++ )
347 xa->operator()(run1,run2) += alpha*tmp(run2,0);
354 for( run2 = 0; run2 <
getNP(); run2++ )
355 p->operator()(run1,run2) += alpha*tmp(run2,0);
363 for( run2 = 0; run2 <
getNU(); run2++ )
364 u->operator()(run1,run2) += alpha*tmp(run2,0);
371 for( run2 = 0; run2 <
getNW(); run2++ )
372 w->operator()(run1,run2) += alpha*tmp(run2,0);
uint getNumPoints() const
Data class for storing generic optimization variables.
Implements a very rudimentary block sparse matrix class.
returnValue disableAutoInit()
VariablesGrid & shiftBackwards(DVector lastValue=emptyVector)
BooleanType hasLowerBounds() const
double getLastTime() const
Grid getUnionGrid() const
int acadoMax(const int x, const int y)
BooleanType acadoIsEqual(double x, double y, double TOL)
DVector getVector(uint pointIdx) const
BooleanType acadoIsNegative(double x, double TOL)
DVector getLowerBounds(uint pointIdx) const
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
returnValue allocateAll()
BooleanType isEmpty() const
BooleanType hasUpperBounds() const
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
returnValue updateData(double t, DVector &x_=emptyVector, DVector &xa_=emptyVector, DVector &p_=emptyVector, DVector &u_=emptyVector, DVector &w_=emptyVector)
void update(double t, VariablesGrid &z1, DVector &z2) const
returnValue init(const VariablesGrid *const _x, const VariablesGrid *const _xa, const VariablesGrid *const _p, const VariablesGrid *const _u, const VariablesGrid *const _w)
Allows to conveniently handle (one-dimensional) grids consisting of time points.
void copy(const OCPiterate &rhs)
#define CLOSE_NAMESPACE_ACADO
DVector getUpperBounds(uint pointIdx) const
uint getNumPoints() const
double getFirstTime() const
returnValue print() const
uint getFloorIndex(double time) const
returnValue enableSimulationMode()
returnValue setVector(uint pointIdx, const DVector &_values)
returnValue getInitialData(DVector &x_=emptyVector, DVector &xa_=emptyVector, DVector &p_=emptyVector, DVector &u_=emptyVector, DVector &w_=emptyVector) const
BooleanType hasTime(double _time) const
OCPiterate & operator=(const OCPiterate &rhs)
returnValue applyStep(const BlockMatrix &bm, double alpha)
returnValue print(std::ostream &stream=std::cout, const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
returnValue getSubBlock(uint rowIdx, uint colIdx, DMatrix &value) const
void rhs(const real_t *x, real_t *f)
BooleanType getAutoInit(uint pointIdx) const
double getIntervalLength() const
BooleanType inSimulationMode
virtual returnValue shift(double timeShift=-1.0, DVector lastX=emptyVector, DVector lastXA=emptyVector, DVector lastP=emptyVector, DVector lastU=emptyVector, DVector lastW=emptyVector)
void setAll(const T &_value)
returnValue enableAutoInit()
returnValue getGrid(Grid &_grid) const
BooleanType areGridsConsistent()
static DVector emptyVector
#define BEGIN_NAMESPACE_ACADO
#define ACADOERROR(retval)