65 init(f,nx_,na_,nu_,np_,nw_,nd_,N_);
110 if( N != 0 ) z =
new double[
N];
117 idx[0] =
new int [1 ];
118 idx[1] =
new int [nx];
119 idx[2] =
new int [na];
120 idx[3] =
new int [np];
121 idx[4] =
new int [
nu];
122 idx[5] =
new int [nw];
123 idx[6] =
new int [nd];
127 for( run1 = 0; run1 < nx; run1++ )
130 for( run1 = 0; run1 < na; run1++ )
133 for( run1 = 0; run1 < np; run1++ )
136 for( run1 = 0; run1 <
nu; run1++ )
139 for( run1 = 0; run1 < nw; run1++ )
142 for( run1 = 0; run1 < nd; run1++ )
153 cout <<
"Time = " << scientific << z[idx[0][0]] << endl;
155 for (run1 = 0; run1 < nx; run1++)
156 cout <<
"x[" << run1 <<
"] = " << scientific << z[idx[1][run1]] << endl;
158 for (run1 = 0; run1 < na; run1++)
159 cout <<
"x[" << run1 <<
"] = " << scientific << z[idx[2][run1]] << endl;
161 for (run1 = 0; run1 < np; run1++)
162 cout <<
"x[" << run1 <<
"] = " << scientific << z[idx[3][run1]] << endl;
164 for (run1 = 0; run1 <
nu; run1++)
165 cout <<
"x[" << run1 <<
"] = " << scientific << z[idx[4][run1]] << endl;
167 for (run1 = 0; run1 < nw; run1++)
168 cout <<
"x[" << run1 <<
"] = " << scientific << z[idx[5][run1]] << endl;
183 *idx2 =
new int[dim];
184 for( i = 0; i <
N; i++ )
203 for( i = 0; i <
N; i++ )
211 copyIdx( 1, rhs.
idx[0], &idx[0] );
212 copyIdx( nx, rhs.
idx[1], &idx[1] );
213 copyIdx( na, rhs.
idx[2], &idx[2] );
214 copyIdx( np, rhs.
idx[3], &idx[3] );
215 copyIdx(
nu, rhs.
idx[4], &idx[4] );
216 copyIdx( nw, rhs.
idx[5], &idx[5] );
217 copyIdx( nd, rhs.
idx[6], &idx[6] );
225 if( z != 0 )
delete[] z;
229 for( i = 0; i < 7; i++ )
Data class for storing generic optimization variables.
Allows to setup and evaluate a general function based on SymbolicExpressions.
void copyIdx(const uint &dim, const int *idx1, int **idx2)
int acadoMax(const int x, const int y)
virtual ~EvaluationPoint()
Allows to pass back messages to the calling function.
returnValue print() const
Allows to setup function evaluation points.
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
#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)
EvaluationPoint & operator=(const EvaluationPoint &rhs)
returnValue copy(const int *order, const DVector &rhs)
int index(VariableType variableType_, int index_) const
void rhs(const real_t *x, real_t *f)
#define BEGIN_NAMESPACE_ACADO
void init(int nV, int nC, SymmetricMatrix *H, real_t *g, Matrix *A, const real_t *const lb, const real_t *const ub, const real_t *const lbA, const real_t *const ubA, int nWSR, const real_t *const x0, Options *options, int nOutputs, mxArray *plhs[])
int getNumberOfVariables() const