38 #include <qpOASES.hpp> 56 real_t maxNWSR, avgNWSR, maxCPUtime, avgCPUtime;
57 real_t maxStationarity, maxFeasibility, maxComplementarity;
59 const int_t numBenchmarks = 4;
60 const char *benchmarkPath[numBenchmarks];
61 benchmarkPath[0] =
"../testing/cpp/data/oqp/chain80/";
62 benchmarkPath[1] =
"../testing/cpp/data/oqp/chain80w/";
63 benchmarkPath[2] =
"../testing/cpp/data/oqp/diesel/";
64 benchmarkPath[3] =
"../testing/cpp/data/oqp/crane/";
69 for (
int_t ii=0; ii<2*numBenchmarks; ++ii )
76 maxAllowedNWSR = 1000;
81 maxStationarity = 0.0;
83 maxComplementarity = 0.0;
86 isSparse,useHotstarts,
87 options,maxAllowedNWSR,
88 maxNWSR,avgNWSR,maxCPUtime,avgCPUtime,
89 maxStationarity,maxFeasibility,maxComplementarity
92 myPrintf(
"Something went wrong when running benchmark!\n" );
99 printf(
"OQP Benchmark Results for %s (cold-starts):\n", benchmarkPath[ii/2] );
101 printf(
"OQP Benchmark Results for %s (hot-starts):\n", benchmarkPath[ii/2] );
103 printf(
"===========================================================================\n\n" );
104 printf(
"maximum CPU time: %.2f milliseconds\n",1000.0*maxCPUtime );
105 printf(
"average CPU time: %.2f milliseconds\n",1000.0*avgCPUtime );
107 printf(
"maximum iterations: %.1f\n",maxNWSR );
108 printf(
"average iterations: %.1f\n",avgNWSR );
110 printf(
"maximum violation stationarity: %.3e\n",maxStationarity );
111 printf(
"maximum violation feasibility: %.3e\n",maxFeasibility );
112 printf(
"maximum violation complementarity: %.3e\n",maxComplementarity );
#define USING_NAMESPACE_QPOASES
#define TEST_DATA_NOT_FOUND
returnValue myPrintf(const char *s)
Provides a generic way to set and pass user-specified options.
#define QPOASES_TEST_FOR_TOL(x, tol)
#define QPOASES_TEST_FOR_TRUE(x)