37 #include <qpOASES.hpp> 47 real_t H[2*2] = { 0.055944055944055944,0, 0, 0 };
48 real_t A[1*2] = { 0.70514808036997589, -1 };
51 real_t lb[2] = { 137.00242299940646, 154.0 };
52 real_t ub[2] = { 282.19008595111382, 198.98579740786641};
71 real_t granularity=0.00001;
73 for( i=0; i< 70000; i++)
79 ret= example.
init( H,g,A,lb,ub,lbA,ubA, nWSR,0 );
88 fprintf(
stdFile,
"#Number of optimizer runs: %d\n",(
int)i );
89 fprintf(
stdFile,
"#g[0] test interval: %f < g[0] < %f\n",gStart,g[0] );
90 fprintf(
stdFile,
"#Granularity: %f\n",granularity);
92 fprintf(
stdFile,
"#Number of errors (error): %d (%f)\n",(
int)errorCount,errorPercent );
95 fprintf(
stdFile,
"#Optimization primary result : LD=%f BD=%f\n",Xopt[0], Xopt[1]);
97 real_t Yopt[3]={0.0,0.0,0.0};
99 fprintf(
stdFile,
"#Optimization dual result : %f %f %f8\n",Yopt[0], Yopt[1], Yopt[2]);
103 fprintf(
stdFile,
"#Number of constraints : %d\n",(
int)Nc );
107 fprintf(
stdFile,
"#Number of equality constraints : %d\n",(
int)Nec );
111 fprintf(
stdFile,
"#Number of active constraints : %d\n",(
int)Nac );
115 fprintf(
stdFile,
"#Number of inactive constraints : %d\n",(
int)Niac );
returnValue getPrimalSolution(real_t *const xOpt) const
#define USING_NAMESPACE_QPOASES
returnValue init(const real_t *const _H, const real_t *const _g, const real_t *const _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 yOpt=0, real_t *const cputime=0)
Allows to pass back messages to the calling function.
returnValue setOptions(const Options &_options)
Provides a generic way to set and pass user-specified options.
virtual returnValue printProperties()
Implements the online active set strategy for QPs with general constraints.
#define QPOASES_TEST_FOR_TRUE(x)
#define REFER_NAMESPACE_QPOASES
returnValue getDualSolution(real_t *const yOpt) const