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
00025
00032 #include <acado/code_generation/export_hpmpc_interface.hpp>
00033 #include <acado/code_generation/templates/templates.hpp>
00034
00035 #include <sstream>
00036
00037 using namespace std;
00038
00039 BEGIN_NAMESPACE_ACADO
00040
00041 ExportHpmpcInterface::ExportHpmpcInterface( const std::string& _fileName,
00042 const std::string& _commonHeaderName,
00043 const std::string& _realString,
00044 const std::string& _intString,
00045 int _precision,
00046 const std::string& _commentString
00047 ) : ExportTemplatedFile(HPMPC_INTERFACE, _fileName, _commonHeaderName, _realString, _intString, _precision, _commentString)
00048 {}
00049
00050 returnValue ExportHpmpcInterface::configure( const unsigned _maxIter,
00051 const unsigned _printLevel,
00052 bool _useSinglePrecision,
00053 bool _warmStart
00054 )
00055 {
00056
00057 dictionary[ "@MAX_ITER@" ] = toString( _maxIter );
00058 dictionary[ "@PRINT_LEVEL@" ] = _printLevel == 0 ? toString( 0 ) : toString( 1 );
00059 dictionary[ "@PRECISION@" ] = _useSinglePrecision == true ? "1" : "0";
00060 dictionary[ "@WARM_START@" ] = _warmStart == true ? "1" : "0";
00061
00062
00063 fillTemplate();
00064
00065 return SUCCESSFUL_RETURN;
00066 }
00067
00068 CLOSE_NAMESPACE_ACADO