Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00039 #include <qpOASES.hpp>
00040 
00041 
00043 int main( )
00044 {
00045         USING_NAMESPACE_QPOASES
00046 
00047         
00048         BooleanType isSparse = BT_FALSE;
00049         Options options;
00050 
00051 
00052         options.setToReliable();
00053 
00054         
00055         int nWSR = 300;
00056         real_t maxCPUtime = 10.0; 
00057         real_t maxPrimalDeviation=0.0, maxDualDeviation=0.0, maxObjDeviation=0.0;
00058 
00059         
00060         if ( runOQPbenchmark(   "./chain80/",
00061                                                         isSparse,
00062                                                         options,
00063                                                         nWSR,
00064                                                         maxCPUtime,
00065                                                         maxPrimalDeviation,
00066                                                         maxDualDeviation,
00067                                                         maxObjDeviation
00068                                                         ) != SUCCESSFUL_RETURN )
00069         {
00070                 myPrintf( "In order to run this example, you need to download example no. 02\nfrom the Online QP Benchmark Collection website first!\n" );
00071                 return -1;
00072         }
00073 
00074         
00075         printf( "\n\n" );
00076         printf( "OQP Benchmark Results:\n" );
00077         printf( "======================\n\n" );
00078         printf( "maximum primal deviation:     %.2e\n",maxPrimalDeviation );
00079         printf( "maximum dual deviation:       %.2e\n",maxDualDeviation );
00080         printf( "maximum objective deviation:  %.2e\n",maxObjDeviation );
00081         printf( "\n" );
00082         printf( "maximum CPU time:             %.2f milliseconds\n\n",1000.0*maxCPUtime );
00083 
00084         return 0;
00085 }
00086 
00087 
00088 
00089 
00090