ACADO Toolkit  1.2.0beta
Toolkit for Automatic Control and Dynamic Optimization
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

User-interface to automatically generate simulation algorithms for fast optimal control. More...

#include <sim_export.hpp>

Inheritance diagram for SIMexport:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SIMexport (const uint simIntervals=1, const double totalTime=1.0)
 Default constructor.
 SIMexport (const SIMexport &arg)
 Copy constructor (deep copy).
virtual ~SIMexport ()
 Destructor.
SIMexportoperator= (const SIMexport &arg)
 Assignment operator (deep copy).
virtual returnValue exportCode (const String &dirName, const String &_realString="real_t", const String &_intString="int", int _precision=16)
 Exports all files of the auto-generated code into the given directory.
returnValue exportAcadoHeader (const String &_dirName, const String &_fileName, const String &_realString="real_t", const String &_intString="int", int _precision=16) const
 Exports main header file for using the exported algorithm.
virtual returnValue exportAndRun (const String &dirName, const String &initStates, const String &controls, const String &results=String("results.txt"), const String &ref=String("ref.txt"))
 Exports all files of the auto-generated code into the given directory and runs the test to evaluate the performance of the exported integrator.
virtual returnValue setReference (const String &reference, const std::vector< String > &outputReference=*(new std::vector< String >()))
 This function should be used if the user wants to provide the file containing the reference solution, to which the results of the integrator are compared.
virtual returnValue setTimingSteps (uint _timingSteps)
 This function sets the number of integration steps performed for the timing results.
virtual returnValue printDetails (BooleanType details)
 This function sets a boolean if the exported simulation code should print all the details about the results or not.
virtual returnValue setTimingCalls (uint _timingCalls)
 This function sets the number of calls performed for the timing results.
String getCommonHeaderName () const
 Returns the name of common header file.
virtual int operator<< (PlotWindow &_window)
 Adds a window to the plot collection.
virtual int operator<< (LogRecord &_record)
 Adds a record to the log collection.
virtual int addPlotWindow (PlotWindow &_window)
 Adds a window to the plot collection.
returnValue addOptionsList ()
 Adds an additional OptionsList to internal array.
returnValue get (OptionsName name, int &value) const
 Returns value of an existing option item of integer type.
returnValue get (OptionsName name, double &value) const
 Returns value of an existing option item of double type.
returnValue get (uint idx, OptionsName name, int &value) const
 Returns value of an existing option item of integer type within the option list of given index.
returnValue get (uint idx, OptionsName name, double &value) const
 Returns value of an existing option item of double type within the option list of given index.
returnValue set (OptionsName name, int value)
 Sets value of an existing option item of integer type to a given value.
returnValue set (OptionsName name, double value)
 Sets value of an existing option item of double type to a given value.
returnValue set (uint idx, OptionsName name, int value)
 Sets value of an existing option item of integer type within the option list of given index to a given value.
returnValue set (uint idx, OptionsName name, double value)
 Sets value of an existing option item of double type within the option list of given index to a given value.
returnValue setOptions (const Options &arg)
 Assigns a given Options object to this object.
returnValue setOptions (uint idx, const Options &arg)
 Assigns the option list with given index of a given Options object to option list with given index of this object.
Options getOptions (uint idx) const
 Returns an Options object containing exactly the option list with given index.
uint getNumOptionsLists () const
 Returns total number of option lists.
returnValue printOptionsList () const
 Prints a list of all available options of all option lists.
returnValue printOptionsList (uint idx) const
 Prints a list of all available options of option list with given index.
int addLogRecord (LogRecord &record)
 Adds a record to the log collection.
returnValue getLogRecord (uint idx, LogRecord &_record) const
 Returns the record with given index from the log collection.
returnValue getLogRecord (LogRecord &_record) const
 Returns the record with certain index from the log collection.
returnValue updateLogRecord (LogRecord &_record) const
 Updates all items with the record given as argument.
returnValue getAll (LogName _name, MatrixVariablesGrid &values) const
 Gets all numerical values at all time instants of the item with given name.
returnValue getFirst (LogName _name, Matrix &firstValue) const
 Gets numerical value at first time instant of the item with given name.
returnValue getFirst (LogName _name, VariablesGrid &firstValue) const
 Gets numerical value at first time instant of the item with given name (converts internally used Matrix into VariablesGrid).
returnValue getLast (LogName _name, Matrix &lastValue) const
 Gets numerical value at last time instant of the item with given name.
returnValue getLast (LogName _name, VariablesGrid &lastValue) const
 Gets numerical value at last time instant of the item with given name (converts internally used Matrix into VariablesGrid).
uint getNumLogRecords () const
 Returns number of records contained in the log collection.
returnValue printLoggingInfo () const
 Prints information on all records and their items on screen.
returnValue printNumDoubles () const
returnValue getPlotWindow (uint idx, PlotWindow &_window) const
 Returns the window with given index from the plot collection.
returnValue getPlotWindow (PlotWindow &_window) const
 Returns the window with certain index from the plot collection.
virtual returnValue plot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 Plots all windows of the plot collection, each one into a new figure.
virtual returnValue replot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 Plots all windows of the plot collection, each one into the corresponding existing figure, if possible.
uint getNumPlotWindows () const
 Returns number of windows contained in the plot collection.
returnValue setDimensions (uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NDX3, uint _NXA, uint _NXA3, uint _NU, uint _NP)
 Assigns the model dimensions to be used by the integrator.
returnValue setDimensions (uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NDX3, uint _NXA, uint _NXA3, uint _NU)
returnValue setDimensions (uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NXA, uint _NU, uint _NP)
 Assigns the model dimensions to be used by the integrator.
returnValue setDimensions (uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NXA, uint _NU)
returnValue setDimensions (uint _NX, uint _NDX, uint _NXA, uint _NU, uint _NP)
 Assigns the model dimensions to be used by the integrator.
returnValue setDimensions (uint _NX, uint _NDX, uint _NXA, uint _NU)
returnValue setDimensions (uint _NX, uint _NU, uint _NP)
 Assigns the model dimensions to be used by the integrator.
returnValue setDimensions (uint _NX, uint _NU)
returnValue setModel (const DifferentialEquation &_f)
 Assigns Differential Equation to be used by the integrator.
returnValue setModel (const String &fileName, const String &_rhs_ODE, const String &_diffs_rhs_ODE)
 Assigns the model to be used by the integrator.
returnValue setNARXmodel (const uint _delay, const Matrix &_parms)
 Assigns a polynomial NARX model to be used by the integrator.
returnValue setLinearInput (const Matrix &A1_, const Matrix &B1_)
 
returnValue setLinearInput (const Matrix &M1_, const Matrix &A1_, const Matrix &B1_)
 
returnValue setLinearOutput (const Matrix &A3_, const OutputFcn &rhs_)
 
returnValue setLinearOutput (const Matrix &M3_, const Matrix &A3_, const OutputFcn &rhs_)
 
returnValue setLinearOutput (const Matrix &A3_, const String &_rhs3, const String &_diffs_rhs3)
 
returnValue setLinearOutput (const Matrix &M3_, const Matrix &A3_, const String &_rhs3, const String &_diffs_rhs3)
 
uint addOutput (const OutputFcn &outputEquation_, const Vector &measurements)
 Adds an output function.
uint addOutput (const OutputFcn &outputEquation_, const uint numberMeasurements)
 Adds an output function.
uint addOutput (const String &output, const String &diffs_output, const uint dim, const Vector &measurements)
 Adds an output function.
uint addOutput (const String &output, const String &diffs_output, const uint dim, const uint numberMeasurements)
 Adds an output function.
uint addOutput (const String &output, const String &diffs_output, const uint dim, const Vector &measurements, const String &colInd, const String &rowPtr)
 Adds an output function.
uint addOutput (const String &output, const String &diffs_output, const uint dim, const uint numberMeasurements, const String &colInd, const String &rowPtr)
 Adds an output function.
returnValue setIntegrationGrid (const Grid &_ocpGrid, const uint _numSteps)
 Sets integration grid.
returnValue setupOutput (const Vector &numberMeasurements)
 Sets up the output functions.
returnValue getModel (DifferentialEquation &_f) const
 Returns the differential equations in the model.
BooleanType hasOutputs () const
BooleanType hasDifferentialEquation () const
BooleanType modelDimensionsSet () const
BooleanType hasEquidistantControlGrid () const
BooleanType exportRhs () const
uint getNX () const
 Returns number of differential states.
uint getNDX () const
 Returns number of differential state derivatives.
uint getNXA () const
 Returns number of algebraic states.
uint getNU () const
 Returns number of control inputs.
uint getNP () const
 Returns number of parameters.
uint getN () const
 Returns number of control intervals.
returnValue setN (const uint N_)
 Sets the number of shooting intervals.
Vector getDimOutputs () const
 Returns the dimensions of the different output functions.
Vector getNumMeas () const
 Returns the number of measurements for the different output functions.
ModelDatagetModelData ()
 Returns the model data object.
returnValue setModelData (const ModelData &data)
 Sets the model data object.
const String getFileNameModel () const
Get/set module name.
Todo:
Module name is used to prefix the exported files.
String getName () const
 Get module name.
returnValue setName (const String &_name)
 Set module name.
Get/set export folder name.
const StringgetExportFolderName () const
 Get export folder name.
void setExportFolderName (const String &_name)
 Set export folder name.

Protected Member Functions

returnValue copy (const SIMexport &arg)
 Copies all class members from given object.
returnValue clear ()
 Frees internal dynamic memory to yield an empty function.
returnValue setup ()
 Sets-up code export and initializes underlying export modules.
returnValue checkConsistency () const
 Checks whether OCP formulation is compatible with code export capabilities.
returnValue collectDataDeclarations (ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
 Collects all data declarations of the auto-generated sub-modules to given list of declarations.
returnValue collectFunctionDeclarations (ExportStatementBlock &declarations) const
 Collects all function (forward) declarations of the auto-generated sub-modules to given list of declarations.
returnValue exportTest (const String &_dirName, const String &_fileName, const String &_resultsFile, const std::vector< String > &_outputFiles, const BooleanType &TIMING=BT_FALSE, const uint jumpReference=1) const
 Exports test file with template main function for using the exported simulation algorithm.
returnValue exportEvaluation (const String &_dirName, const String &_fileName) const
 Exports the file evaluating the performance of the exported integrator, based on its results from the test and the corresponding reference results.
returnValue exportMakefile (const String &_dirName, const String &_fileName, const String &_realString="real_t", const String &_intString="int", int _precision=16) const
 Exports GNU Makefile for compiling the exported MPC algorithm.
returnValue executeTest (const String &_dirName)
 Compiles the exported source files and runs the corresponding test.
returnValue copy (const ExportModule &arg)
 Copies all class members from given object.
returnValue setupOptions ()
 Sets-up default options.
virtual returnValue getPlotDataFromMemberLoggings (PlotWindow &_window) const
 Copies all collected logging information required to plot a given window.
BlockStatus getStatus () const
 Gets current status of user interface.
returnValue setStatus (BlockStatus _status)
 Sets status of user interface.
returnValue clearOptionsList ()
 Clears all option lists from array.
BooleanType haveOptionsChanged () const
 Determines whether options of at least one option list have been modified.
BooleanType haveOptionsChanged (uint idx) const
 Determines whether options of option list with given index have been modified.
returnValue declareOptionsUnchanged ()
 Declares all options of all option lists to be unchanged.
returnValue declareOptionsUnchanged (uint idx)
 Declares all options of option list with given index to be unchanged.
returnValue addOption (OptionsName name, int value)
 Add an option item with a given integer default value to the all option lists.
returnValue addOption (OptionsName name, double value)
 Add an option item with a given double default value to the all option lists.
returnValue addOption (uint idx, OptionsName name, int value)
 Add an option item with a given integer default value to option list with given index.
returnValue addOption (uint idx, OptionsName name, double value)
 Add an option item with a given double default value to option list with given index.
virtual returnValue setupLogging ()
 Prototype member function for setting-up the logging information at initialization of derived classes.

Protected Attributes

double T
 The total simulation time.
IntegratorExportintegrator
 Module for exporting a tailored integrator.
BooleanType referenceProvided
 True if the user provided a file with the reference solution.
BooleanType PRINT_DETAILS
 True if the user wants all the details about the results being printed.
uint timingSteps
 The number of integration steps performed for the timing results.
String _initStates
 Name of the file containing the initial values of all the states.
String _controls
 Name of the file containing the control values over the OCP grid.
String _results
 Name of the file in which the integration results will be written.
String _ref
 Name of the file in which the reference will be written, to which the results of the integrator will be compared.
std::vector< String_refOutputFiles
 Names of the files in which the outputs will be written for the reference.
std::vector< String_outputFiles
 Names of the files in which the outputs will be written for the integrator.
String commonHeaderName
 Name of common header file.
uint timingCalls
 The number of calls to the exported function for the timing results.
BlockStatus status
 Current status of the user interface, see documentation of BlockStatus for details.
OptionsList ** optionsList
 Array consisting of OptionsLists.
uint nOptionsList
 Total number of OptionsLists.
LogCollection logCollection
 Log collection containing a singly-linked list of log records.
int logIdx
 Index of a certain log record to be optionally used within derived classes.
PlotCollection plotCollection
 Plot collection containing a singly-linked list of plot windows.
ModelData modelData
 The model data.

Static Protected Attributes

static const uint factorRef = 10
 The used factor in the number of integration steps to get the reference.

Detailed Description

The class SIMexport is a user-interface to automatically generate tailored simulation algorithms for fast optimal control. It takes an optimal control problem (OCP) formulation and generates code based on given user options, e.g specifying the integrator and the number of integration steps. In addition to the export of such a simulation algorithm, the performance of this integrator will be evaluated on accuracy of the results and the time complexity.

Author:
Rien Quirynen

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO SIMexport::SIMexport ( const uint  simIntervals = 1,
const double  totalTime = 1.0 
)
Parameters:
[in]simIntervalsThe number of simulation intervals.
[in]totalTimeThe total simulation time.

References _controls, _initStates, _ref, _results, BS_NOT_INITIALIZED, BT_FALSE, BT_TRUE, integrator, PRINT_DETAILS, referenceProvided, ModelContainer::setN(), UserInteraction::setStatus(), T, and timingSteps.

SIMexport::SIMexport ( const SIMexport arg)
Parameters:
[in]argRight-hand side object.

References copy().

SIMexport::~SIMexport ( ) [virtual]

References clear().


Member Function Documentation

int Logging::addLogRecord ( LogRecord record) [inherited]
Parameters:
[in]recordRecord to be added.
Returns:
>= 0: index of added record,
-RET_LOG_COLLECTION_CORRUPTED

References LogCollection::addLogRecord(), and Logging::logCollection.

Referenced by AlgorithmicBase::addLogRecord(), UserInteraction::addPlotWindow(), Logging::operator<<(), IntegrationAlgorithm::setupLogging(), Controller::setupLogging(), and Process::setupLogging().

returnValue Options::addOption ( OptionsName  name,
int  value 
) [protected, inherited]
returnValue Options::addOption ( OptionsName  name,
double  value 
) [protected, inherited]
Parameters:
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

References OptionsList::add(), Options::getNumOptionsLists(), Options::optionsList, SUCCESSFUL_RETURN, and uint.

returnValue Options::addOption ( uint  idx,
OptionsName  name,
int  value 
) [protected, inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

References ACADOERROR, OptionsList::add(), Options::getNumOptionsLists(), Options::optionsList, and RET_INDEX_OUT_OF_BOUNDS.

returnValue Options::addOption ( uint  idx,
OptionsName  name,
double  value 
) [protected, inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

References ACADOERROR, OptionsList::add(), Options::getNumOptionsLists(), Options::optionsList, and RET_INDEX_OUT_OF_BOUNDS.

Returns:
SUCCESSFUL_RETURN

References Options::nOptionsList, Options::optionsList, and SUCCESSFUL_RETURN.

Referenced by AlgorithmicBase::addOptionsList().

uint ModelContainer::addOutput ( const OutputFcn outputEquation_,
const Vector measurements 
) [inherited]
Parameters:
outputEquation_an output function to be added
measurementsthe measurement points per interval
Returns:
SUCCESSFUL_RETURN

References ModelData::addOutput(), Vector::append(), and ModelContainer::modelData.

uint ModelContainer::addOutput ( const OutputFcn outputEquation_,
const uint  numberMeasurements 
) [inherited]
Parameters:
outputEquation_an output function to be added
numberMeasurementsthe number of measurements per interval
Returns:
SUCCESSFUL_RETURN

References ModelData::addOutput(), and ModelContainer::modelData.

uint ModelContainer::addOutput ( const String output,
const String diffs_output,
const uint  dim,
const Vector measurements 
) [inherited]
Parameters:
outputThe output function to be added.
diffs_outputThe derivatives of the output function to be added.
dimThe dimension of the output function.
measurementsThe measurement points per interval
Returns:
SUCCESSFUL_RETURN

References ModelData::addOutput(), Vector::append(), and ModelContainer::modelData.

uint ModelContainer::addOutput ( const String output,
const String diffs_output,
const uint  dim,
const uint  numberMeasurements 
) [inherited]
Parameters:
outputThe output function to be added.
diffs_outputThe derivatives of the output function to be added.
dimThe dimension of the output function.
numberMeasurementsThe number of measurements per interval
Returns:
SUCCESSFUL_RETURN

References ModelData::addOutput(), and ModelContainer::modelData.

uint ModelContainer::addOutput ( const String output,
const String diffs_output,
const uint  dim,
const Vector measurements,
const String colInd,
const String rowPtr 
) [inherited]
Parameters:
outputThe output function to be added.
diffs_outputThe derivatives of the output function to be added.
dimThe dimension of the output function.
measurementsThe measurement points per interval
colIndVector stores the column indices of the elements for Compressed Row Storage (CRS).
rowPtrVector stores the locations that start a row for Compressed Row Storage (CRS).
Returns:
SUCCESSFUL_RETURN

References ModelData::addOutput(), Vector::append(), and ModelContainer::modelData.

uint ModelContainer::addOutput ( const String output,
const String diffs_output,
const uint  dim,
const uint  numberMeasurements,
const String colInd,
const String rowPtr 
) [inherited]
Parameters:
outputThe output function to be added.
diffs_outputThe derivatives of the output function to be added.
dimThe dimension of the output function.
numberMeasurementsThe number of measurements per interval
colIndVector stores the column indices of the elements for Compressed Row Storage (CRS).
rowPtrVector stores the locations that start a row for Compressed Row Storage (CRS).
Returns:
SUCCESSFUL_RETURN

References ModelData::addOutput(), and ModelContainer::modelData.

int UserInteraction::addPlotWindow ( PlotWindow _window) [virtual, inherited]

This function is overloaded here in order to add the plotDataRecord required to plot the window to the log collection.

Parameters:
[in]_windowWindow to be added.
Returns:
>= 0: index of added record,
-RET_PLOT_COLLECTION_CORRUPTED

Reimplemented from Plotting.

References Logging::addLogRecord(), PlotWindow::getPlotDataRecord(), and PlotWindow::setPlotDataRecord().

Referenced by UserInteraction::operator<<().

Returns:
SUCCESSFUL_RETURN,
RET_INVALID_OBJECTIVE_FOR_CODE_EXPORT,
RET_ONLY_ODE_FOR_CODE_EXPORT,
RET_NO_DISCRETE_ODE_FOR_CODE_EXPORT,
RET_ONLY_STATES_AND_CONTROLS_FOR_CODE_EXPORT,
RET_ONLY_EQUIDISTANT_GRID_FOR_CODE_EXPORT,
RET_ONLY_BOUNDS_FOR_CODE_EXPORT

References ACADOERROR, BT_TRUE, ModelData::checkConsistency(), ModelData::getModel(), Function::getNPI(), Function::getNUI(), Function::getNW(), DifferentialEquation::isDiscretized(), ModelContainer::modelData, RET_INVALID_OPTION, RET_NO_DISCRETE_ODE_FOR_CODE_EXPORT, RET_ONLY_STATES_AND_CONTROLS_FOR_CODE_EXPORT, and SUCCESSFUL_RETURN.

Referenced by setup().

returnValue SIMexport::clear ( ) [protected]
Returns:
SUCCESSFUL_RETURN

References integrator, and SUCCESSFUL_RETURN.

Referenced by operator=(), and ~SIMexport().

returnValue Options::clearOptionsList ( ) [protected, inherited]
returnValue SIMexport::collectDataDeclarations ( ExportStatementBlock declarations,
ExportStruct  dataStruct = ACADO_ANY 
) const [protected, virtual]
Parameters:
[in]declarationsList of declarations.
Returns:
SUCCESSFUL_RETURN,
RET_UNABLE_TO_EXPORT_CODE

Implements ExportModule.

References IntegratorExport::getDataDeclarations(), integrator, RET_UNABLE_TO_EXPORT_CODE, and SUCCESSFUL_RETURN.

Referenced by exportAcadoHeader().

returnValue SIMexport::collectFunctionDeclarations ( ExportStatementBlock declarations) const [protected, virtual]
Parameters:
[in]declarationsList of declarations.
Returns:
SUCCESSFUL_RETURN,
RET_UNABLE_TO_EXPORT_CODE

Implements ExportModule.

References IntegratorExport::getFunctionDeclarations(), integrator, RET_UNABLE_TO_EXPORT_CODE, and SUCCESSFUL_RETURN.

Referenced by exportAcadoHeader().

returnValue SIMexport::copy ( const SIMexport arg) [protected]
Parameters:
[in]argRight-hand side object.
Returns:
SUCCESSFUL_RETURN

References _controls, _initStates, _ref, _refOutputFiles, _results, integrator, PRINT_DETAILS, referenceProvided, SUCCESSFUL_RETURN, and timingSteps.

Referenced by operator=(), and SIMexport().

returnValue ExportModule::copy ( const ExportModule arg) [protected, inherited]
Parameters:
[in]argRight-hand side object.
Returns:
SUCCESSFUL_RETURN

References ExportModule::commonHeaderName, SUCCESSFUL_RETURN, and ExportModule::timingCalls.

Referenced by ExportModule::ExportModule(), and ExportModule::operator=().

returnValue Options::declareOptionsUnchanged ( ) [protected, inherited]
returnValue Options::declareOptionsUnchanged ( uint  idx) [protected, inherited]
Parameters:
[in]idxIndex of option list.
Returns:
SUCCESSFUL_RETURN

References ACADOERROR, OptionsList::declareOptionsUnchanged(), Options::getNumOptionsLists(), Options::optionsList, and RET_INDEX_OUT_OF_BOUNDS.

returnValue SIMexport::executeTest ( const String _dirName) [protected]
Parameters:
[in]_dirNameName of directory in which the files are exported.
Returns:
SUCCESSFUL_RETURN

References ExportModule::getName(), and SUCCESSFUL_RETURN.

Referenced by exportAndRun().

returnValue SIMexport::exportAcadoHeader ( const String _dirName,
const String _fileName,
const String _realString = "real_t",
const String _intString = "int",
int  _precision = 16 
) const [virtual]
returnValue SIMexport::exportAndRun ( const String dirName,
const String initStates,
const String controls,
const String results = String( "results.txt" ),
const String ref = String( "ref.txt" ) 
) [virtual]
Parameters:
[in]dirNameName of directory to be used to export files.
[in]initStatesName of the file containing the initial values of all the states.
[in]controlsName of the file containing the control values over the OCP grid.
[in]resultsName of the file in which the integration results will be written.
[in]refName of the file in which the reference will be written, to which the results of the integrator will be compared.
Returns:
SUCCESSFUL_RETURN

References _controls, _initStates, _outputFiles, _ref, _refOutputFiles, _results, ACADOERROR, BT_FALSE, BT_TRUE, ModelData::clearIntegrationGrid(), EPS, executeTest(), exportCode(), exportTest(), factorRef, GENERATE_TEST_FILE, ModelData::getIntegrationGrid(), ModelData::getN(), ExportModule::getName(), ModelData::getOutputGrids(), MEASUREMENT_GRID, ModelContainer::modelData, NUM_INTEGRATOR_STEPS, ONLINE_GRID, referenceProvided, RET_INVALID_OPTION, SUCCESSFUL_RETURN, ExportModule::timingCalls, timingSteps, and uint.

returnValue SIMexport::exportCode ( const String dirName,
const String _realString = "real_t",
const String _intString = "int",
int  _precision = 16 
) [virtual]
returnValue SIMexport::exportEvaluation ( const String _dirName,
const String _fileName 
) const [protected]
returnValue SIMexport::exportMakefile ( const String _dirName,
const String _fileName,
const String _realString = "real_t",
const String _intString = "int",
int  _precision = 16 
) const [protected]
Parameters:
[in]_dirNameName of directory to be used to export file.
[in]_fileNameName of file to be exported.
[in]_realStringString to be used to declare real variables.
[in]_intStringString to be used to declare integer variables.
[in]_precisionNumber of digits to be used for exporting real values.
Returns:
SUCCESSFUL_RETURN

References ExportStatementBlock::addLinebreak(), ExportStatementBlock::addStatement(), ExportFile::exportCode(), ModelData::exportRhs(), ModelData::getFileNameModel(), and ModelContainer::modelData.

Referenced by exportCode().

BooleanType ModelContainer::exportRhs ( ) const [inherited]
returnValue SIMexport::exportTest ( const String _dirName,
const String _fileName,
const String _resultsFile,
const std::vector< String > &  _outputFiles,
const BooleanType TIMING = BT_FALSE,
const uint  jumpReference = 1 
) const [protected]
Parameters:
[in]_dirNameName of directory to be used to export file.
[in]_fileNameName of file to be exported.
[in]_resultsFileName of the file in which the integration results will be written.
[in]_outputFilesNames of the files in which the output results will be written.
[in]TIMINGA boolean that is true when timing results are desired.
[in]jumpReferenceThe reference factor if the reference output results are computed.
Returns:
SUCCESSFUL_RETURN

References _controls, _initStates, ACADOERROR, ExportStatementBlock::addComment(), ExportStatementBlock::addLinebreak(), ExportStatementBlock::addStatement(), BT_TRUE, DYNAMIC_SENSITIVITY, ExportFile::exportCode(), ModelData::getN(), ModelData::getNameOutputs(), ModelData::getNXA(), ModelData::getOutputExpressions(), ModelData::getOutputGrids(), ModelContainer::modelData, NO_SENSITIVITY, RET_INVALID_OPTION, T, ExportModule::timingCalls, and timingSteps.

Referenced by exportAndRun().

returnValue Options::get ( OptionsName  name,
int &  value 
) const [inherited]
returnValue Options::get ( OptionsName  name,
double &  value 
) const [inherited]
Parameters:
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS

References OptionsList::get(), and Options::optionsList.

returnValue Options::get ( uint  idx,
OptionsName  name,
int &  value 
) const [inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_INDEX_OUT_OF_BOUNDS

References ACADOERROR, OptionsList::get(), Options::getNumOptionsLists(), Options::optionsList, and RET_INDEX_OUT_OF_BOUNDS.

returnValue Options::get ( uint  idx,
OptionsName  name,
double &  value 
) const [inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_INDEX_OUT_OF_BOUNDS

References ACADOERROR, OptionsList::get(), Options::getNumOptionsLists(), Options::optionsList, and RET_INDEX_OUT_OF_BOUNDS.

BEGIN_NAMESPACE_ACADO returnValue Logging::getAll ( LogName  _name,
MatrixVariablesGrid values 
) const [inline, inherited]

If this item exists in more than one record, the first one is choosen as they are expected to have identical values anyhow.

Parameters:
[in]_nameInternal name of item.
[out]valuesAll numerical values at all time instants of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References ACADOERROR, BT_TRUE, LogCollection::getAll(), LogCollection::hasNonEmptyItem(), Logging::logCollection, and RET_LOG_ENTRY_DOESNT_EXIST.

Referenced by AlgorithmicBase::getAll(), SimulationEnvironment::getProcessAlgebraicStates(), SimulationEnvironment::getProcessDifferentialStates(), and SimulationEnvironment::getProcessIntermediateStates().

Returns:
Name of common header file

References ExportModule::commonHeaderName.

Referenced by OCPexport::exportCode(), and OCPexport::setup().

Vector ModelContainer::getDimOutputs ( ) const [inherited]
Returns:
dimensions of the different output functions.

References ModelData::getDimOutputs(), and ModelContainer::modelData.

Referenced by exportAcadoHeader().

const String & ExportModule::getExportFolderName ( ) const [inherited]
const String ModelContainer::getFileNameModel ( ) const [inherited]
returnValue Logging::getFirst ( LogName  _name,
Matrix firstValue 
) const [inline, inherited]

If this item exists in more than one record, the first one is choosen as they are expected to have identical values anyhow.

Parameters:
[in]_nameInternal name of item.
[out]firstValueNumerical value at first time instant of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References ACADOERROR, BT_TRUE, LogCollection::getFirst(), LogCollection::hasNonEmptyItem(), Logging::logCollection, and RET_LOG_ENTRY_DOESNT_EXIST.

Referenced by AlgorithmicBase::getFirst().

returnValue Logging::getFirst ( LogName  _name,
VariablesGrid firstValue 
) const [inline, inherited]

If this item exists in more than one record, the first one is choosen as they are expected to have identical values anyhow.

Parameters:
[in]_nameInternal name of item.
[out]firstValueNumerical value at first time instant of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References ACADOERROR, BT_TRUE, LogCollection::getFirst(), LogCollection::hasNonEmptyItem(), Logging::logCollection, and RET_LOG_ENTRY_DOESNT_EXIST.

returnValue Logging::getLast ( LogName  _name,
Matrix lastValue 
) const [inline, inherited]

If this item exists in more than one record, the first one is choosen as they are expected to have identical values anyhow.

Parameters:
[in]_nameInternal name of item.
[out]lastValueNumerical value at last time instant of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References ACADOERROR, BT_TRUE, LogCollection::getLast(), LogCollection::hasNonEmptyItem(), Logging::logCollection, and RET_LOG_ENTRY_DOESNT_EXIST.

Referenced by AlgorithmicBase::getLast().

returnValue Logging::getLast ( LogName  _name,
VariablesGrid lastValue 
) const [inline, inherited]

If this item exists in more than one record, the first one is choosen as they are expected to have identical values anyhow.

Parameters:
[in]_nameInternal name of item.
[out]lastValueNumerical value at last time instant of given item.
Returns:
SUCCESSFUL_RETURN,
RET_LOG_ENTRY_DOESNT_EXIST

References ACADOERROR, BT_TRUE, LogCollection::getLast(), LogCollection::hasNonEmptyItem(), Logging::logCollection, and RET_LOG_ENTRY_DOESNT_EXIST.

returnValue Logging::getLogRecord ( uint  idx,
LogRecord _record 
) const [inherited]
Parameters:
[in]idxIndex of desired record.
[out]_recordDesired record.
Returns:
SUCCESSFUL_RETURN,
RET_INDEX_OUT_OF_BOUNDS

References ACADOERROR, Logging::getNumLogRecords(), Logging::logCollection, RET_INDEX_OUT_OF_BOUNDS, and SUCCESSFUL_RETURN.

Referenced by Logging::getLogRecord().

returnValue Logging::getLogRecord ( LogRecord _record) const [inherited]

This index is not provided when calling the function, but rather obtained by using the alias index of the record. If the record is no alias record, the error RET_INDEX_OUT_OF_BOUNDS is thrown.

Parameters:
[out]_recordDesired record.
Returns:
SUCCESSFUL_RETURN,
RET_INDEX_OUT_OF_BOUNDS

References LogRecord::getAliasIdx(), and Logging::getLogRecord().

Returns:
the model data object.

References ModelContainer::modelData.

Referenced by OCPexport::setup().

uint ModelContainer::getN ( ) const [inherited]
String ExportModule::getName ( ) const [inherited]
uint ModelContainer::getNDX ( ) const [inherited]
Returns:
Number of differential state derivatives

References ModelData::getNDX(), and ModelContainer::modelData.

Referenced by exportAcadoHeader(), OCPexport::exportAcadoHeader(), OCPexport::exportCode(), and OCPexport::setup().

uint ModelContainer::getNP ( ) const [inherited]
uint ModelContainer::getNU ( ) const [inherited]
uint Logging::getNumLogRecords ( ) const [inherited]
Returns:
Number of records

References LogCollection::getNumLogRecords(), and Logging::logCollection.

Referenced by Logging::getLogRecord().

Vector ModelContainer::getNumMeas ( ) const [inherited]
Returns:
number of measurements for the different output functions.

References ModelData::getNumMeas(), and ModelContainer::modelData.

Referenced by exportAcadoHeader().

uint Plotting::getNumPlotWindows ( ) const [inline, inherited]
Returns:
Number of windows

References PlotCollection::getNumPlotWindows(), and Plotting::plotCollection.

Referenced by Plotting::getPlotWindow().

uint ModelContainer::getNX ( ) const [inherited]
uint ModelContainer::getNXA ( ) const [inherited]
Options Options::getOptions ( uint  idx) const [inherited]
Parameters:
[in]idxIndex of option list.
Returns:
Options object containing exactly the option list with given index

References ACADOERROR, Options::getNumOptionsLists(), Options::Options(), Options::optionsList, and RET_INDEX_OUT_OF_BOUNDS.

Referenced by AlgorithmicBase::getOptions().

returnValue UserInteraction::getPlotDataFromMemberLoggings ( PlotWindow _window) const [protected, virtual, inherited]

This function is overloaded within the UserInterface class to syncronize the logging information collected elsewhere within the algorithm with the one stored within the given window for plotting.

Parameters:
[in]_windowWindow to be plotted.
Returns:
SUCCESSFUL_RETURN

Reimplemented from Plotting.

References PlotWindow::getPlotDataRecord(), PlotWindow::setPlotDataRecord(), SUCCESSFUL_RETURN, and Logging::updateLogRecord().

returnValue Plotting::getPlotWindow ( uint  idx,
PlotWindow _window 
) const [inline, inherited]
Parameters:
[in]idxIndex of desired window.
[out]_windowDesired window.
Returns:
SUCCESSFUL_RETURN,
RET_INDEX_OUT_OF_BOUNDS

References ACADOERROR, Plotting::getNumPlotWindows(), Plotting::getPlotDataFromMemberLoggings(), Plotting::plotCollection, and RET_INDEX_OUT_OF_BOUNDS.

Referenced by Plotting::getPlotWindow(), Plotting::plot(), and Plotting::replot().

returnValue Plotting::getPlotWindow ( PlotWindow _window) const [inline, inherited]

This index is not provided when calling the function, but rather obtained by using the alias index of the window. If the window is no alias window, the error RET_INDEX_OUT_OF_BOUNDS is thrown.

Parameters:
[out]_windowDesired window.
Returns:
SUCCESSFUL_RETURN,
RET_INDEX_OUT_OF_BOUNDS

References PlotWindow::getAliasIdx(), and Plotting::getPlotWindow().

BlockStatus UserInteraction::getStatus ( ) const [protected, inherited]
BooleanType ModelContainer::hasOutputs ( ) const [inherited]
BooleanType Options::haveOptionsChanged ( ) const [protected, inherited]
BooleanType Options::haveOptionsChanged ( uint  idx) const [protected, inherited]
Parameters:
[in]idxIndex of option list.
Returns:
BT_TRUE iff options have been modified,
BT_FALSE otherwise

References ACADOERROR, BT_FALSE, Options::getNumOptionsLists(), OptionsList::haveOptionsChanged(), Options::optionsList, and RET_INDEX_OUT_OF_BOUNDS.

int UserInteraction::operator<< ( PlotWindow _window) [virtual, inherited]

This function is overloaded here in order to add the plotDataRecord required to plot the window to the log collection.

Parameters:
[in]_windowWindow to be added.
Note:
This function is doing the same as the corresponding addPlotWindow member function and is introduced for syntax reasons only.
Returns:
>= 0: index of added record,
-RET_PLOT_COLLECTION_CORRUPTED

Reimplemented from Plotting.

References UserInteraction::addPlotWindow().

Referenced by UserInteraction::operator<<().

int UserInteraction::operator<< ( LogRecord _record) [virtual, inherited]
Parameters:
[in]recordRecord to be added.
Note:
This function tunnels the corresponding function of the Logging class. It is introduced to avoid syntax ambiguity only.
Returns:
>= 0: index of added record,
-RET_LOG_COLLECTION_CORRUPTED

Reimplemented from Logging.

References UserInteraction::operator<<().

SIMexport & SIMexport::operator= ( const SIMexport arg)
Parameters:
[in]argRight-hand side object.

References clear(), and copy().

returnValue Plotting::plot ( PlotFrequency  _frequency = PLOT_IN_ANY_CASE) [virtual, inherited]
Parameters:
[in]_frequencyFrequency determining at which time instants the window is to be plotted.
Returns:
SUCCESSFUL_RETURN

References ACADOERROR, PlotCollection::first, PlotWindow::getNext(), Plotting::getPlotWindow(), PlotWindow::plot(), PLOT_NEVER, Plotting::plotCollection, RET_PLOTTING_FAILED, and SUCCESSFUL_RETURN.

Referenced by IntegrationAlgorithm::evaluate(), and AlgorithmicBase::plot().

Parameters:
[in]detailstrue if the exported simulation code should print all the details, otherwise false
Returns:
SUCCESSFUL_RETURN

References PRINT_DETAILS, and SUCCESSFUL_RETURN.

returnValue Logging::printLoggingInfo ( ) const [inherited]
returnValue Logging::printNumDoubles ( ) const [inherited]
returnValue Options::printOptionsList ( ) const [inherited]
returnValue Options::printOptionsList ( uint  idx) const [inherited]
Parameters:
[in]idxIndex of option list.
Returns:
SUCCESSFUL_RETURN

References ACADOERROR, Options::getNumOptionsLists(), Options::optionsList, OptionsList::printOptionsList(), and RET_INDEX_OUT_OF_BOUNDS.

returnValue Plotting::replot ( PlotFrequency  _frequency = PLOT_IN_ANY_CASE) [virtual, inherited]
Parameters:
[in]_frequencyFrequency determining at which time instants the window is to be plotted.
Returns:
SUCCESSFUL_RETURN

Reimplemented in Process.

References ACADOERROR, PlotCollection::first, PlotWindow::getNext(), Plotting::getPlotWindow(), PLOT_NEVER, Plotting::plotCollection, PlotWindow::replot(), RET_PLOTTING_FAILED, and SUCCESSFUL_RETURN.

Referenced by AlgorithmicBase::replot(), and RealTimeAlgorithm::solve().

returnValue Options::set ( OptionsName  name,
int  value 
) [inherited]
Parameters:
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

References Options::optionsList, and OptionsList::set().

Referenced by AlgorithmicBase::set().

returnValue Options::set ( OptionsName  name,
double  value 
) [inherited]
Parameters:
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

References Options::optionsList, and OptionsList::set().

returnValue Options::set ( uint  idx,
OptionsName  name,
int  value 
) [inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

References ACADOERROR, Options::getNumOptionsLists(), Options::optionsList, RET_INDEX_OUT_OF_BOUNDS, and OptionsList::set().

returnValue Options::set ( uint  idx,
OptionsName  name,
double  value 
) [inherited]
Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

References ACADOERROR, Options::getNumOptionsLists(), Options::optionsList, RET_INDEX_OUT_OF_BOUNDS, and OptionsList::set().

returnValue ModelContainer::setDimensions ( uint  _NX1,
uint  _NX2,
uint  _NX3,
uint  _NDX,
uint  _NDX3,
uint  _NXA,
uint  _NXA3,
uint  _NU,
uint  _NP 
) [inherited]
Parameters:
[in]_NX1Number of differential states in linear input subsystem.
[in]_NX2Number of differential states in nonlinear subsystem.
[in]_NX3Number of differential states in linear output subsystem.
[in]_NDXNumber of differential states derivatives.
[in]_NDX3Number of differential states derivatives in the linear output subsystem.
[in]_NXANumber of algebraic states.
[in]_NXA3Number of algebraic states in the linear output subsystem.
[in]_NUNumber of control inputs
[in]_NPNumber of parameters
Returns:
SUCCESSFUL_RETURN

References ModelContainer::modelData, and ModelData::setDimensions().

Referenced by ModelContainer::setDimensions().

returnValue ModelContainer::setDimensions ( uint  _NX1,
uint  _NX2,
uint  _NX3,
uint  _NDX,
uint  _NDX3,
uint  _NXA,
uint  _NXA3,
uint  _NU 
) [inherited]
returnValue ModelContainer::setDimensions ( uint  _NX1,
uint  _NX2,
uint  _NX3,
uint  _NDX,
uint  _NXA,
uint  _NU,
uint  _NP 
) [inherited]
Parameters:
[in]_NX1Number of differential states in linear input subsystem.
[in]_NX2Number of differential states in nonlinear subsystem.
[in]_NX3Number of differential states in linear output subsystem.
[in]_NDXNumber of differential states derivatives.
[in]_NXANumber of algebraic states.
[in]_NUNumber of control inputs
[in]_NPNumber of parameters
Returns:
SUCCESSFUL_RETURN

References ModelContainer::setDimensions().

returnValue ModelContainer::setDimensions ( uint  _NX1,
uint  _NX2,
uint  _NX3,
uint  _NDX,
uint  _NXA,
uint  _NU 
) [inherited]
returnValue ModelContainer::setDimensions ( uint  _NX,
uint  _NDX,
uint  _NXA,
uint  _NU,
uint  _NP 
) [inherited]
Parameters:
[in]_NXNumber of differential states.
[in]_NDXNumber of differential states derivatives.
[in]_NXANumber of algebraic states.
[in]_NUNumber of control inputs
[in]_NPNumber of parameters
Returns:
SUCCESSFUL_RETURN

References ModelContainer::setDimensions().

returnValue ModelContainer::setDimensions ( uint  _NX,
uint  _NDX,
uint  _NXA,
uint  _NU 
) [inherited]
returnValue ModelContainer::setDimensions ( uint  _NX,
uint  _NU,
uint  _NP 
) [inherited]
Parameters:
[in]_NXNumber of differential states.
[in]_NUNumber of control inputs
[in]_NPNumber of parameters
Returns:
SUCCESSFUL_RETURN

References ModelContainer::setDimensions().

returnValue ModelContainer::setDimensions ( uint  _NX,
uint  _NU 
) [inherited]
void ExportModule::setExportFolderName ( const String _name) [inherited]
returnValue ModelContainer::setIntegrationGrid ( const Grid _ocpGrid,
const uint  _numSteps 
) [inherited]
Parameters:
[in]_ocpGridEvaluation grid for optimal control.
[in]numStepsThe number of integration steps along the horizon.
Returns:
SUCCESSFUL_RETURN

References ModelContainer::modelData, and ModelData::setIntegrationGrid().

Referenced by OCP::setNumberIntegrationSteps().

returnValue ModelContainer::setLinearInput ( const Matrix A1_,
const Matrix B1_ 
) [inherited]
Parameters:
[in].
Returns:
SUCCESSFUL_RETURN

References eye(), Matrix::getNumRows(), ModelContainer::modelData, and ModelData::setLinearInput().

returnValue ModelContainer::setLinearInput ( const Matrix M1_,
const Matrix A1_,
const Matrix B1_ 
) [inherited]
Parameters:
[in].
Returns:
SUCCESSFUL_RETURN

References ModelContainer::modelData, and ModelData::setLinearInput().

returnValue ModelContainer::setLinearOutput ( const Matrix A3_,
const OutputFcn rhs_ 
) [inherited]
Parameters:
[in].
Returns:
SUCCESSFUL_RETURN

References eye(), Matrix::getNumRows(), ModelContainer::modelData, and ModelData::setLinearOutput().

returnValue ModelContainer::setLinearOutput ( const Matrix M3_,
const Matrix A3_,
const OutputFcn rhs_ 
) [inherited]
Parameters:
[in].
Returns:
SUCCESSFUL_RETURN

References ModelContainer::modelData, and ModelData::setLinearOutput().

returnValue ModelContainer::setLinearOutput ( const Matrix A3_,
const String _rhs3,
const String _diffs_rhs3 
) [inherited]
Parameters:
[in].
Returns:
SUCCESSFUL_RETURN

References eye(), Matrix::getNumRows(), ModelContainer::modelData, and ModelData::setLinearOutput().

returnValue ModelContainer::setLinearOutput ( const Matrix M3_,
const Matrix A3_,
const String _rhs3,
const String _diffs_rhs3 
) [inherited]
Parameters:
[in].
Returns:
SUCCESSFUL_RETURN

References ModelContainer::modelData, and ModelData::setLinearOutput().

Parameters:
[in]fDifferential equation.
Returns:
SUCCESSFUL_RETURN

References ModelContainer::modelData, and ModelData::setModel().

returnValue ModelContainer::setModel ( const String fileName,
const String _rhs_ODE,
const String _diffs_rhs_ODE 
) [inherited]
Parameters:
[in]_rhs_ODEName of the function, evaluating the ODE right-hand side.
[in]_diffs_rhs_ODEName of the function, evaluating the derivatives of the ODE right-hand side.
Returns:
SUCCESSFUL_RETURN

References ModelContainer::modelData, and ModelData::setModel().

returnValue ModelContainer::setModelData ( const ModelData data) [inherited]
Parameters:
[in]datathe model data object.
Returns:
SUCCESSFUL_RETURN

References ModelContainer::modelData, and SUCCESSFUL_RETURN.

returnValue ModelContainer::setN ( const uint  N_) [inherited]
Parameters:
[in]N_The number of shooting intervals.
Returns:
SUCCESSFUL_RETURN

References ModelContainer::modelData, ModelData::setN(), and SUCCESSFUL_RETURN.

Referenced by OCP::OCP(), OCP::setupGrid(), and SIMexport().

returnValue ExportModule::setName ( const String _name) [inherited]
returnValue ModelContainer::setNARXmodel ( const uint  _delay,
const Matrix _parms 
) [inherited]
Parameters:
[in]delayThe delay for the states in the NARX model.
[in]parmsThe parameters defining the polynomial NARX model.
Returns:
SUCCESSFUL_RETURN

References ModelContainer::modelData, and ModelData::setNARXmodel().

returnValue Options::setOptions ( const Options arg) [inherited]
Parameters:
[in]argNew Options object to be assigned.
Note:
This routine is introduced only for convenience and is equivalent to the assignment operator.
Returns:
SUCCESSFUL_RETURN

References Options::operator=(), and SUCCESSFUL_RETURN.

Referenced by AlgorithmicBase::setOptions().

returnValue Options::setOptions ( uint  idx,
const Options arg 
) [inherited]
Parameters:
[in]idxIndex of option list.
[in]argOptions object containing the option list to be assigned.
Returns:
SUCCESSFUL_RETURN

References ACADOERROR, Options::getNumOptionsLists(), Options::optionsList, RET_INDEX_OUT_OF_BOUNDS, and SUCCESSFUL_RETURN.

returnValue SIMexport::setReference ( const String reference,
const std::vector< String > &  outputReference = *(new std::vector<String>()) 
) [virtual]
Parameters:
[in]referenceName of the file containing the reference.
[in]outputReferenceThe names of the files containing the reference for the output results if any.
Returns:
SUCCESSFUL_RETURN

References _ref, _refOutputFiles, BT_FALSE, BT_TRUE, ModelContainer::hasOutputs(), referenceProvided, RET_UNABLE_TO_EXPORT_CODE, and SUCCESSFUL_RETURN.

returnValue UserInteraction::setStatus ( BlockStatus  _status) [protected, inherited]
Parameters:
[in]_statusNew status of user interface
Returns:
SUCCESSFUL_RETURN

References UserInteraction::status, and SUCCESSFUL_RETURN.

Referenced by Controller::Controller(), DynamicEstimator::DynamicEstimator(), Estimator::Estimator(), FeedforwardLaw::FeedforwardLaw(), KalmanFilter::init(), DynamicEstimator::init(), Estimator::init(), OptimizationAlgorithm::init(), LinearStateFeedback::init(), FeedforwardLaw::init(), RealTimeAlgorithm::init(), TransferDevice::init(), PIDcontroller::init(), SimulationEnvironment::init(), Controller::init(), Process::init(), Process::initializeStartValues(), IntegrationAlgorithm::IntegrationAlgorithm(), KalmanFilter::KalmanFilter(), LinearStateFeedback::LinearStateFeedback(), OCPexport::OCPexport(), UserInteraction::operator=(), OptimizationAlgorithm::OptimizationAlgorithm(), RealTimeAlgorithm::performFeedbackStep(), RealTimeAlgorithm::performPreparationStep(), PIDcontroller::PIDcontroller(), Process::Process(), RealTimeAlgorithm::RealTimeAlgorithm(), Process::setActuator(), Controller::setControlLaw(), SimulationEnvironment::setController(), Process::setDynamicSystem(), Controller::setEstimator(), SimulationEnvironment::setProcess(), Process::setProcessDisturbance(), Controller::setReferenceTrajectory(), Process::setSensor(), OCPexport::setup(), setup(), SIMexport(), SimulationEnvironment::SimulationEnvironment(), MultiObjectiveAlgorithm::solve(), MultiObjectiveAlgorithm::solveSingleObjective(), TransferDevice::TransferDevice(), and UserInteraction::UserInteraction().

returnValue ExportModule::setTimingCalls ( uint  _timingCalls) [virtual, inherited]
Parameters:
[in]_timingCallsThe new number of calls performed for the timing results.
Returns:
SUCCESSFUL_RETURN

References SUCCESSFUL_RETURN, and ExportModule::timingCalls.

returnValue SIMexport::setTimingSteps ( uint  _timingSteps) [virtual]
Parameters:
[in]_timingStepsThe new number of integration steps performed for the timing results.
Returns:
SUCCESSFUL_RETURN

References SUCCESSFUL_RETURN, and timingSteps.

returnValue SIMexport::setup ( ) [protected]
Returns:
SUCCESSFUL_RETURN,
RET_INVALID_OPTION,
RET_INVALID_OBJECTIVE_FOR_CODE_EXPORT,
RET_ONLY_ODE_FOR_CODE_EXPORT,
RET_NO_DISCRETE_ODE_FOR_CODE_EXPORT,
RET_ONLY_STATES_AND_CONTROLS_FOR_CODE_EXPORT,
RET_ONLY_EQUIDISTANT_GRID_FOR_CODE_EXPORT,
RET_ONLY_BOUNDS_FOR_CODE_EXPORT,
RET_UNABLE_TO_EXPORT_CODE

References _outputFiles, _refOutputFiles, ACADOERROR, BS_READY, checkConsistency(), ExportModule::commonHeaderName, ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::createAlgorithm(), IntegratorExport::equidistantControlGrid(), ModelData::getN(), ModelData::getNumOutputs(), ModelData::hasOutputs(), ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::instance(), integrator, INTEGRATOR_TYPE, ModelContainer::modelData, NUM_INTEGRATOR_STEPS, referenceProvided, RET_INVALID_OPTION, ModelData::setIntegrationGrid(), IntegratorExport::setModelData(), UserInteraction::setStatus(), SUCCESSFUL_RETURN, T, and uint.

Referenced by exportCode().

returnValue Logging::setupLogging ( ) [protected, virtual, inherited]
returnValue ExportModule::setupOptions ( ) [protected, virtual, inherited]
returnValue ModelContainer::setupOutput ( const Vector numberMeasurements) [inherited]



Parameters:
numberMeasurementsthe number of measurements per horizon for each output function

Returns:
SUCCESSFUL_RETURN
returnValue Logging::updateLogRecord ( LogRecord _record) const [inherited]

In doing so, it is checked for each item whether it is contained within one of of the records of the collection; and if so, the numerical values are copied into the argument record.

Parameters:
[in,out]_recordRecord to be updated
Returns:
SUCCESSFUL_RETURN

References Logging::logCollection, and LogCollection::updateLogRecord().

Referenced by UserInteraction::getPlotDataFromMemberLoggings(), and SimulationEnvironment::getSampledProcessOutput().


Member Data Documentation

std::vector<String> SIMexport::_outputFiles [protected]
String SIMexport::_ref [protected]
std::vector<String> SIMexport::_refOutputFiles [protected]
String ExportModule::commonHeaderName [protected, inherited]
const uint SIMexport::factorRef = 10 [static, protected]

Referenced by exportAndRun().

LogCollection Logging::logCollection [protected, inherited]
int Logging::logIdx [protected, inherited]
ModelData ModelContainer::modelData [protected, inherited]
uint Options::nOptionsList [protected, inherited]
OptionsList** Options::optionsList [protected, inherited]
PlotCollection Plotting::plotCollection [protected, inherited]
BlockStatus UserInteraction::status [protected, inherited]
double SIMexport::T [protected]
uint ExportModule::timingCalls [protected, inherited]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines