91 lb =
new double* [
nB];
92 ub =
new double* [
nB];
94 for( run1 = 0; run1 <
nB; run1++ ){
102 for( run1 = 0; run1 <
nFcn; run1++ ){
144 if( rhs.
lb != 0 )
lb =
new double* [
nB ];
147 if( rhs.
ub != 0 )
ub =
new double* [
nB ];
169 for( run1 = 0; run1 <
nFcn; run1++ ){
171 fcn[run1] = rhs.
fcn[run1];
175 for( run2 = 0; run2 <
ny; run2++ )
186 for( run1 = 0; run1 <
nB; run1++ ){
192 for( run1 = 0; run1 <
nB; run1++ ){
194 if(
fcn[0].getDim() > 0 ){
195 lb[run1] = (
double*)calloc(
fcn[0].getDim(),
sizeof(double));
196 ub[run1] = (
double*)calloc(
fcn[0].getDim(),
sizeof(double));
203 for( run2 = 0; run2 <
fcn[0].
getDim(); run2++ ){
204 lb[run1][run2] = rhs.
lb[run1][run2];
205 ub[run1][run2] = rhs.
ub[run1][run2];
255 for( run1 = 0; run1 <
nB; run1++ ){
270 for( run1 = 0; run1 <
nFcn; run1++ ){
315 for( run1 = 0; run1 <
nB; run1++ ){
330 for( run1 = 0; run1 <
nFcn; run1++ ){
372 if( rhs.
lb != 0 )
lb =
new double* [
nB ];
375 if( rhs.
ub != 0 )
ub =
new double* [
nB ];
397 for( run1 = 0; run1 <
nFcn; run1++ ){
399 fcn[run1] = rhs.
fcn[run1];
403 for( run2 = 0; run2 <
ny; run2++ )
415 for( run1 = 0; run1 <
nB; run1++ ){
421 for( run1 = 0; run1 <
nB; run1++ ){
423 if(
fcn[0].getDim() > 0 ){
424 lb[run1] = (
double*)calloc(
fcn[0].getDim(),
sizeof(double));
425 ub[run1] = (
double*)calloc(
fcn[0].getDim(),
sizeof(double));
432 for( run2 = 0; run2 <
fcn[0].
getDim(); run2++ ){
433 lb[run1][run2] = rhs.
lb[run1][run2];
434 ub[run1][run2] = rhs.
ub[run1][run2];
503 for( run2 = 0; run2 <
nFcn; run2++ ){
508 for( run1 = 0; run1 <
nx; run1++ )
511 for( run1 = 0; run1 <
na; run1++ )
514 for( run1 = 0; run1 <
np; run1++ )
517 for( run1 = 0; run1 <
nu; run1++ )
520 for( run1 = 0; run1 <
nw; run1++ )
645 return setForwardSeed( &xSeed_, &xaSeed_, &pSeed_, &uSeed_, &wSeed_, 1 );
743 for(
int i=0; i<
nFcn; ++i )
759 function_ =
fcn[ 0 ];
776 for (i = 0; i <
nB; ++i)
777 for (j = 0; j < dimFcn; ++j)
779 lb_(i, j) =
lb[ i ][ j ];
780 ub_(i, j) =
ub[ i ][ j ];
virtual ~ConstraintElement()
Data class for storing generic optimization variables.
Implements a very rudimentary block sparse matrix class.
Allows to setup and evaluate a general function based on SymbolicExpressions.
returnValue init(const OCPiterate &iter)
ConstraintElement & operator=(const ConstraintElement &rhs)
void init(unsigned _nRows=0, unsigned _nCols=0)
Allows to pass back messages to the calling function.
Allows to setup function evaluation points.
Allows to conveniently handle (one-dimensional) grids consisting of time points.
#define CLOSE_NAMESPACE_ACADO
returnValue init(const Function &f, uint nx_=0, uint na_=0, uint np_=0, uint nu_=0, uint nw_=0, uint nd_=0, uint N_=0)
virtual returnValue setBackwardSeed(BlockMatrix *seed, int order)
virtual returnValue setUnitForwardSeed()
Base class for all kind of constraints (except for bounds) within optimal control problems...
virtual returnValue getResiduum(BlockMatrix &lower_residuum, BlockMatrix &upper_residuum)
virtual returnValue setForwardSeed(BlockMatrix *xSeed_, BlockMatrix *xaSeed_, BlockMatrix *pSeed_, BlockMatrix *uSeed_, BlockMatrix *wSeed_, int order)
virtual returnValue initializeEvaluationPoints(const OCPiterate &iter)
virtual returnValue getBackwardSensitivities(BlockMatrix *D, int order)
returnValue get(Function &function_, DMatrix &lb_, DMatrix &ub_)
int index(VariableType variableType_, int index_) const
void rhs(const real_t *x, real_t *f)
#define ACADOWARNING(retval)
#define BEGIN_NAMESPACE_ACADO
virtual returnValue getForwardSensitivities(BlockMatrix *D, int order)
uint getNumValues() const
returnValue setIdentity(uint rowIdx, uint colIdx, uint dim)
#define ACADOERROR(retval)