46 const std::string& _commonHeaderName
116 if( f_ODE.
getNDX() > 0 ) {
145 if( liftMode == 1 ) {
152 if( liftMode == 1 ) {
189 LOG(
LVL_DEBUG ) <<
"Preparing to export ExplicitRungeKuttaExport... " << endl;
261 rk_eta.
setDoc(
"Working array to pass the input values and return the results." );
262 reset_int.
setDoc(
"The internal memory of the integrator can be reset." );
265 integrate.
doc(
"Performs the integration and sensitivity propagation for one shooting interval." );
296 if( inputDim > (rhsDim+zDim) ) {
319 for(
uint run1 = 0; run1 < rkOrder; run1++ )
333 if( liftMode == 2 ) {
334 for(
uint i = 0; i <
NXA; i++ ) {
335 for(
uint j = 0; j <
NX; j++ ) {
338 for(
uint j = 0; j <
NU; j++ ) {
346 if( liftMode == 1 ) {
347 for(
uint i = 0; i <
NXA; i++ ) {
348 for(
uint j = 0; j <
NXA; j++ ) {
357 for(
uint i = 0; i <
NXA; i++ ) {
358 for(
uint j = 0; j <
NXA; j++ ) {
366 for(
uint i = 0; i <
NXA; i++ ) {
368 for(
uint j = 0; j <
NX; j++ ) {
371 for(
uint j = 0; j <
NU; j++ ) {
380 for(
uint i = 0; i <
NXA; i++ ) {
381 for(
uint j = 0; j <
NX; j++ ) {
386 for(
uint j = 0; j <
NU; j++ ) {
453 code <<
"#pragma omp threadprivate( "
#define LOG(level)
Just define a handy macro for getting the logger.
Lowest level, the debug level.
ExportVariable getAuxVariable() const
ExportVariable getRow(const ExportIndex &idx) const
Allows to export a tailored explicit Runge-Kutta integrator for fast model predictive control...
ExportVariable getGlobalExportVariable() const
double getFirstTime() const
Allows to export a tailored explicit Runge-Kutta integrator with a lifted Newton method to efficientl...
ExportVariable getTranspose() const
LiftedERKExport(UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
ExportVariable & setup(const std::string &_name, uint _nRows=1, uint _nCols=1, ExportType _type=REAL, ExportStruct _dataStruct=ACADO_LOCAL, bool _callItByValue=false, const std::string &_prefix=std::string())
UserInteraction * userInteraction
ExportAcadoFunction diffs_rhs
returnValue get(OptionsName name, int &value) const
virtual ExportVariable getGlobalExportVariable(const uint factor) const
Allows to pass back messages to the calling function.
GenericMatrix & makeVector()
Expression forwardDerivative(const Expression &arg1, const Expression &arg2)
returnValue addComment(const std::string &_comment)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Allows to export code of a for-loop.
string toString(T const &value)
returnValue setName(const std::string &_name)
ExportVariable getElement(const ExportIndex &rowIdx, const ExportIndex &colIdx) const
ExportVariable rk_auxSolver
#define CLOSE_NAMESPACE_ACADO
ExportLinearSolver * solver
ExportVariable getSubMatrix(const ExportIndex &rowIdx1, const ExportIndex &rowIdx2, const ExportIndex &colIdx1, const ExportIndex &colIdx2) const
GenericMatrix< double > DMatrix
const std::string getNameDiffsRHS() const
Defines a scalar-valued index variable to be used for exporting code.
Base class for all variables within the symbolic expressions family.
virtual returnValue setDoc(const std::string &_doc)
std::string commonHeaderName
virtual ExportFunction & doc(const std::string &_doc)
static std::string fcnPrefix
ExportVariable getCols(const ExportIndex &idx1, const ExportIndex &idx2) const
Expression multipleForwardDerivative(const Expression &arg1, const Expression &arg2, const Expression &seed)
Allows to export Gaussian elimination for solving linear systems of specific dimensions.
const std::string getNameSolveReuseFunction()
Encapsulates all user interaction for setting options, logging data and plotting results.
Allows to export code of an arbitrary function.
ExportAcadoFunction alg_rhs
virtual uint getDim() const
returnValue setDataStruct(ExportStruct _dataStruct)
returnValue addStatement(const ExportStatement &_statement)
returnValue setReuse(const bool &reuse)
std::string getFullName() const
virtual returnValue getDataDeclarations(ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
returnValue addLinebreak(uint num=1)
ExportFunction & setReturnValue(const ExportVariable &_functionReturnValue, bool _returnAsPointer=false)
virtual returnValue setDifferentialEquation(const Expression &rhs)
uint getNumIntervals() const
virtual returnValue setup()=0
returnValue setGlobalExportVariable(const ExportVariable &var)
DifferentialStateDerivative dx
std::string getName() const
ExportVariable getRows(const ExportIndex &idx1, const ExportIndex &idx2) const
returnValue addDeclaration(const ExportVariable &_data, ExportStruct _dataStruct=ACADO_ANY)
double getLastTime() const
const std::string getNameSolveFunction()
#define BEGIN_NAMESPACE_ACADO
ExportVariable error_code
returnValue clearStaticCounters()
returnValue addFunction(const ExportFunction &_function)
virtual returnValue getDataDeclarations(ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const =0
virtual returnValue clear()
virtual returnValue getCode(ExportStatementBlock &code)=0
Allows to export code for a block of statements.
virtual ~LiftedERKExport()
Expression getRows(const uint &rowIdx1, const uint &rowIdx2) const
ExportArgument getAddress(const ExportIndex &_rowIdx, const ExportIndex &_colIdx=emptyConstExportIndex) const
virtual returnValue getCode(ExportStatementBlock &code)
returnValue init(const uint newDim, const bool &reuse=true, const bool &unrolling=false)
ExportVariable getCol(const ExportIndex &idx) const
virtual returnValue getDataDeclarations(ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
returnValue init(const Function &_f, const std::string &_name="acadoFcn", const uint _numX=0, const uint _numXA=0, const uint _numU=0, const uint _numP=0, const uint _numDX=0, const uint _numOD=0)
ExportFunction & addIndex(const ExportIndex &_index)
#define ACADOERROR(retval)
virtual bool equidistantControlGrid() const
Defines a matrix-valued variable to be used for exporting code.
virtual returnValue setup()
#define ACADOERRORTEXT(retval, text)
returnValue addFunctionCall(const std::string &_fName, const ExportArgument &_argument1=emptyConstExportArgument, const ExportArgument &_argument2=emptyConstExportArgument, const ExportArgument &_argument3=emptyConstExportArgument, const ExportArgument &_argument4=emptyConstExportArgument, const ExportArgument &_argument5=emptyConstExportArgument, const ExportArgument &_argument6=emptyConstExportArgument, const ExportArgument &_argument7=emptyConstExportArgument, const ExportArgument &_argument8=emptyConstExportArgument, const ExportArgument &_argument9=emptyConstExportArgument)
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.
std::string getName() const