46 const std::string& _commonHeaderName
180 LOG(
LVL_DEBUG ) <<
"Preparing to export ThreeSweepsERKExport... " << endl;
228 rk_eta.
setDoc(
"Working array to pass the input values and return the results." );
229 reset_int.
setDoc(
"The internal memory of the integrator can be reset." );
232 integrate.
doc(
"Performs the integration and sensitivity propagation for one shooting interval." );
237 if( inputDim > rhsDim ) {
253 for(
uint run1 = 0; run1 < rkOrder; run1++ )
266 if( inputDim > rhsDim ) {
272 for(
uint run1 = 0; run1 < rkOrder; run1++ )
287 if( inputDim > rhsDim ) {
293 for(
uint run1 = 0; run1 < rkOrder; run1++ )
337 code <<
"#pragma omp threadprivate( " 369 for(
uint j = 0; j <= i; j++ ) {
370 new_expr << expr(i,j);
384 for(
uint i = 0; i < dim; i++ ) {
385 for(
uint k1 = 0; k1 < dim2; k1++ ) {
386 for(
uint k2 = 0; k2 <= k1; k2++ ) {
387 inter_res(k1,i) += expr(k1,k2)*arg(k2,i);
389 for(
uint k2 = k1+1; k2 < dim2; k2++ ) {
390 inter_res(k1,i) += expr(k2,k1)*arg(k2,i);
396 for(
uint i = 0; i < dim; i++ ) {
397 for(
uint j = 0; j <= i; j++ ) {
399 for(
uint k1 = 0; k1 < dim2; k1++ ) {
400 new_tmp = new_tmp+arg(k1,i)*inter_res(k1,j);
#define LOG(level)
Just define a handy macro for getting the logger.
Lowest level, the debug level.
virtual returnValue setup()
Expression symmetricDerivative(const Expression &arg1, const Expression &arg2, const Expression &forward_seed, const Expression &backward_seed, Expression *forward_result, Expression *backward_result)
ThreeSweepsERKExport(UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
virtual returnValue getCode(ExportStatementBlock &code)
ExportVariable getRow(const ExportIndex &idx) const
Expression backwardDerivative(const Expression &arg1, const Expression &arg2)
ExportVariable getGlobalExportVariable() const
double getFirstTime() const
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())
ExportAcadoFunction diffs_rhs
Allows to pass back messages to the calling function.
GenericMatrix & makeVector()
returnValue addComment(const std::string &_comment)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Allows to export code of a for-loop.
Expression getCols(const uint &colIdx1, const uint &colIdx2) const
string toString(T const &value)
returnValue setName(const std::string &_name)
#define CLOSE_NAMESPACE_ACADO
GenericMatrix< double > DMatrix
const std::string getNameDiffsRHS() const
Defines a scalar-valued index variable to be used for exporting code.
virtual returnValue setDifferentialEquation(const Expression &rhs)
Expression returnLowerTriangular(const Expression &expr)
Base class for all variables within the symbolic expressions family.
virtual returnValue setDoc(const std::string &_doc)
virtual ExportFunction & doc(const std::string &_doc)
ExportVariable getCols(const ExportIndex &idx1, const ExportIndex &idx2) const
virtual returnValue getDataDeclarations(ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
const std::string getNameRHS() const
ExportVariable rk_forward_sweep
Expression & appendRows(const Expression &arg)
Encapsulates all user interaction for setting options, logging data and plotting results.
Allows to export code of an arbitrary function.
virtual uint getDim() const
returnValue setDataStruct(ExportStruct _dataStruct)
returnValue addStatement(const ExportStatement &_statement)
virtual returnValue getDataDeclarations(ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
std::string getFullName() const
returnValue addLinebreak(uint num=1)
ExportFunction & setReturnValue(const ExportVariable &_functionReturnValue, bool _returnAsPointer=false)
uint getNumIntervals() const
returnValue setGlobalExportVariable(const ExportVariable &var)
ExportVariable rk_backward_sweep
DifferentialStateDerivative dx
std::string getName() const
returnValue addDeclaration(const ExportVariable &_data, ExportStruct _dataStruct=ACADO_ANY)
virtual ~ThreeSweepsERKExport()
double getLastTime() const
ExportAcadoFunction diffs_sweep3
ExportVariable getAuxVariable() const
#define BEGIN_NAMESPACE_ACADO
ExportVariable error_code
returnValue clearStaticCounters()
Allows to export a tailored explicit Runge-Kutta integrator with three-sweeps second order sensitivit...
returnValue addFunction(const ExportFunction &_function)
Expression & appendCols(const Expression &arg)
virtual returnValue clear()
Allows to export code for a block of statements.
Allows to export a tailored explicit Runge-Kutta integrator with adjoint first order sensitivity prop...
ExportArgument getAddress(const ExportIndex &_rowIdx, const ExportIndex &_colIdx=emptyConstExportIndex) const
Expression symmetricDoubleProduct(const Expression &expr, const Expression &arg)
ExportVariable getCol(const ExportIndex &idx) 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.
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.