60 const char**
const _names,
61 const char**
const _units,
71 init( _dim,_type,_names,_units,_scaling,_lb,_ub,_autoInit );
84 names = (
char**) calloc(
dim,
sizeof(
char*) );
85 for( i=0; i<
dim; ++i )
98 units = (
char**) calloc(
dim,
sizeof(
char*) );
99 for( i=0; i<
dim; ++i )
162 if ( rhs.
names != 0 )
164 names = (
char**) calloc(
dim,
sizeof(
char*) );
165 for( i=0; i<
dim; ++i )
176 if ( rhs.
units != 0 )
178 units = (
char**) calloc(
dim,
sizeof(
char*) );
179 for( i=0; i<
dim; ++i )
246 const char**
const _names,
247 const char**
const _units,
272 const char**
const _names,
273 const char**
const _units,
285 names = (
char**) realloc(
names,newDim*
sizeof(
char*) );
289 for( i=0; i<_dim; ++i )
297 for( i=0; i<_dim; ++i )
308 names = (
char**) realloc(
names,newDim*
sizeof(
char*) );
310 for( i=0; i<
dim; ++i )
316 for( i=0; i<_dim; ++i )
326 units = (
char**) realloc(
units,newDim*
sizeof(
char*) );
330 for( i=0; i<_dim; ++i )
338 for( i=0; i<_dim; ++i )
349 units = (
char**) realloc(
units,newDim*
sizeof(
char*) );
351 for( i=0; i<
dim; ++i )
357 for( i=0; i<_dim; ++i )
459 const char*
const _name
506 const char*
const _unit
545 for( i=0; i<
dim; ++i )
557 for( i=0; i<
dim; ++i )
returnValue appendSettings(const VariableSettings &rhs)
returnValue setUnit(uint idx, const char *const _unit)
const double defaultLowerBound
returnValue getUnit(uint idx, char *_unit) const
void init(unsigned _dim=0)
returnValue setName(uint idx, const char *const _name)
Allows to pass back messages to the calling function.
returnValue getName(uint idx, char *_name) const
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
returnValue setScaling(const DVector &_scaling)
#define CLOSE_NAMESPACE_ACADO
VariableSettings & operator=(const VariableSettings &rhs)
BEGIN_NAMESPACE_ACADO const char defaultName[]
const unsigned int MAX_LENGTH_NAME
const BooleanType defaultAutoInit
returnValue setLowerBounds(const DVector &_lb)
BooleanType hasNames() const
Provides variable-specific settings for vector- or matrix-valued optimization variables (for internal...
void rhs(const real_t *x, real_t *f)
GenericVector & append(const GenericVector &_arg)
void setAll(const T &_value)
#define BEGIN_NAMESPACE_ACADO
const double defaultScaling
returnValue setUpperBounds(const DVector &_ub)
#define ACADOERROR(retval)
const double defaultUpperBound
BooleanType hasUnits() const