103 index = (
int*)calloc(
nb,
sizeof(
int));
107 for( run1 = 0; run1 <
nb; run1++ ){
109 var [run1] = rhs.
var [run1];
144 if(
var != 0 ) free(
var);
147 for( run1 = 0; run1 <
nb; run1++ )
delete blb[run1];
151 for( run1 = 0; run1 <
nb; run1++ )
delete bub[run1];
181 index = (
int*)calloc(
nb,
sizeof(
int));
185 for( run1 = 0; run1 <
nb; run1++ ){
187 var [run1] = rhs.
var [run1];
228 for( run1 = 0; run1 <
N; run1++ ){
230 if( iter.
x != NULL ){
244 if( iter.
xa != NULL ){
258 if( iter.
u != NULL ){
272 if( iter.
w != NULL ){
288 if( iter.
p != NULL ){
303 for( run1 = 0; (int) run1 <
nb; run1++ ){
308 if( iter.
x != NULL ){
309 for( run2 = 0; run2 <
N; run2++ ){
310 residuumXL[run2](
index[run1],0) =
blb[run1][0](run2) - iter.
x->operator()(run2,index[run1]);
311 residuumXU[run2](index[run1],0) =
bub[run1][0](run2) - iter.
x->operator()(run2,index[run1]);
319 if( iter.
xa != NULL ){
320 for( run2 = 0; run2 <
N; run2++ ){
322 residuumXAU[run2](index[run1],0) =
bub[run1][0](run2) - iter.
xa->operator()(run2,index[run1]);
330 if( iter.
p != NULL ){
332 residuumPU[0](index[run1],0) =
bub[run1][0](0) - iter.
p->operator()(0,index[run1]);
338 if( iter.
u != NULL ){
339 for( run2 = 0; run2 <
N; run2++ ){
340 residuumUL[run2](
index[run1],0) =
blb[run1][0](run2) - iter.
u->operator()(run2,index[run1]);
341 residuumUU[run2](index[run1],0) =
bub[run1][0](run2) - iter.
u->operator()(run2,index[run1]);
348 if( iter.
w != NULL ){
349 for( run2 = 0; run2 <
N; run2++ ){
350 residuumWL[run2](
index[run1],0) =
blb[run1][0](run2) - iter.
w->operator()(run2,index[run1]);
351 residuumWU[run2](index[run1],0) =
bub[run1][0](run2) - iter.
w->operator()(run2,index[run1]);
376 for( run1 = 0; (int) run1 <
nb; run1++ ){
381 if( iter.
x != NULL ){
382 for( run2 = 0; run2 <
N; run2++ ){
396 if( iter.
xa != NULL ){
397 for( run2 = 0; run2 <
N; run2++ ){
411 if( iter.
p != NULL ){
412 for( run2 = 0; run2 <
N; run2++ ){
424 if( iter.
u != NULL ){
425 for( run2 = 0; run2 <
N; run2++ ){
438 if( iter.
w != NULL ){
439 for( run2 = 0; run2 <
N; run2++ ){
Data class for storing generic optimization variables.
void init(unsigned _nRows=0, unsigned _nCols=0)
returnValue init(const Grid &grid_)
Allows to pass back messages to the calling function.
Stores and evaluates box constraints within optimal control problems.
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Allows to conveniently handle (one-dimensional) grids consisting of time points.
returnValue setLowerBound(uint pointIdx, uint valueIdx, double _lb)
#define CLOSE_NAMESPACE_ACADO
returnValue setUpperBound(uint pointIdx, uint valueIdx, double _ub)
void rhs(const real_t *x, real_t *f)
virtual returnValue getBounds(const OCPiterate &iter)
returnValue evaluateBounds(const OCPiterate &iter)
BoxConstraint & operator=(const BoxConstraint &rhs)
GenericVector< double > DVector
uint getNumPoints() const
#define BEGIN_NAMESPACE_ACADO
uint getNumValues() const
#define ACADOERROR(retval)
#define ACADOERRORTEXT(retval, text)