Documentation / Developer's manual
Available modules
Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,  
Uranie / Launcher v4.9.0
|
A virtual class for the FMI/FMU encapsulation. More...
#include <TCodeFMU.h>
Public Types | |
enum | ELogLevel_t { log_level_nothing = 0 , log_level_fatal , log_level_error , log_level_warning , log_level_info , log_level_verbose , log_level_debug , log_level_all } |
The list of log level. More... | |
Public Member Functions | |
TCodeFMU () | |
Default constructor. | |
TCodeFMU (const TString &name, const TString &title) | |
constructor with a name and a title | |
TCodeFMU (URANIE::DataServer::TDataServer *tds, TString sFMUfile, Option_t *option="") | |
Constructor from TDataServer and Command as string. | |
TCodeFMU (URANIE::Launcher::TCode &mycode) | |
Copy constructor. | |
virtual | ~TCodeFMU () |
Encapsulates a code | |
virtual void | init (Option_t *option="") |
Init phase of the code. | |
virtual void | run (Option_t *option="") |
Run the code. | |
virtual void | terminate (Option_t *option="") |
Terminate phase of the code. | |
void | initIFirst (Option_t *option="") |
Setting and Getting attributs | |
void | setFMUFile (TString new_var, Option_t *option="") |
Set the value of _sFMUFile. | |
TString | getFMUFile () |
Get the value of the _sFMUFile attribute. | |
Double_t | getStartSimulation () |
void | setStartSimulation (Double_t dval) |
Double_t | getStoptSimulation () |
void | setStopSimulation (Double_t dval) |
Double_t | getStepSimulation () |
void | setStepSimulation (Double_t dval) |
Double_t | getToleranceSimulation () |
void | setToleranceSimulation (Double_t dval) |
void | setStartStopSimulation (Double_t dstart, Double_t dstop) |
methods associated to the FMI Library | |
void | do_exit (int code) |
do_exit | |
Printing Log | |
void | setLog () |
Force the log. | |
void | unsetLog () |
Force to desable the log. | |
void | changeLog () |
Swith the status of the log. | |
Bool_t | getLog () |
Get the status of the log. | |
void | setLogLevel (ELogLevel_t theLogLevel=log_level_info) |
Set the Log Level for the FMI Library. | |
ELogLevel_t | getLogLevel () |
Get the Log Level in the FMI Library. | |
virtual void | printLog (Option_t *option="") |
Print the log of the object/class. | |
Public Member Functions inherited from URANIE::Launcher::TCode | |
TCode () | |
Default constructor. | |
TCode (const TString &name, const TString &title) | |
constructor with a name and a title | |
TCode (URANIE::DataServer::TDataServer *tds, TString scmd) | |
Constructor from TDataServer and Command as string. | |
TCode (URANIE::Launcher::TCode &mycode) | |
Copy constructor. | |
virtual | ~TCode () |
Default destructor. | |
TInputFile * | getInputFile (TString sfile) |
Get the input file file from his name. | |
TInputFile * | getInputFile (Int_t nfile) |
Get the input file from his index. | |
TInputFile * | getLastInputFile () |
Get the last input file. | |
TOutputFile * | getOutputFile (Int_t nfile) |
Get the output file from his index. | |
TOutputFile * | getOutputFile (TString sfile) |
getOutputFile | |
void | setWorkingDirectory (TString sPathName="") |
Set the working directory. | |
TString | getWorkingDirectory () |
Get the working directory. | |
void | setReferenceDirectory (TString str) |
Set the reference directory where inputs no change are located. | |
TString | getReferenceDirectory () |
Get the reference directory where inputs no change are located. | |
void | setCommand (TString str) |
Set the code command. | |
TString | getCommand () |
Get the code command. | |
Int_t | getNOutputFiles () |
Get the number of output files. | |
Int_t | getNOutputAttributes () |
Get the number of output attributes. | |
Int_t | getNOutputAttributes (Int_t nfile) |
Get the number of output attributes in the output file given by his index. | |
Int_t | getNInputFiles () |
Get the number of input files. | |
Int_t | getNInputAttributes () |
Get the number of input attributes. | |
Int_t | getNInputAttributes (Int_t nfile) |
Get the number of input attributes in the input file given by his index. | |
URANIE::DataServer::TAttribute * | getInputAttribute (Int_t nfile, Int_t natt) |
Get an attribute of an input file. | |
URANIE::DataServer::TAttribute * | getAttribute (Int_t nfile, Int_t natt) |
Get an attribute of an output file. | |
TString | getInputVarNames () |
Get the names of the input variables separated by ":". | |
TString | getOutputVarNames () |
Get the names of the output variables separated by ":". | |
URANIE::DataServer::TDataServer * | getTDataServer () |
Get the pointer to the TDS. | |
void | setTDataServer (URANIE::DataServer::TDataServer *atds) |
Set the pointer to the TDS. | |
virtual void | runTest (Option_t *option="") |
Run a test for the code. | |
virtual void | initFileType (Option_t *option="") |
Init file typing. | |
virtual void | preTraitment (Int_t n, Double_t *val, Int_t *index=NULL, Option_t *option="") |
Pre-traitment phase of the code. | |
virtual void | preTraitment (Int_t n, vector< URANIE::DataServer::UEntry * > *input, Option_t *option="") |
Pre-traitment phase of the code that deals with vectors/strings. | |
virtual Bool_t | postTraitment (Int_t &nout, Double_t *dvalout, Option_t *option="", TList *lstOut=NULL) |
Post-traitment phase of the code. | |
virtual Bool_t | postTraitment (vector< URANIE::DataServer::UEntry * > *out, Option_t *option) |
Post-traitment phase of the code that deals with vectors/strings. | |
void | createDirectory (TString sPathName, TString sDirectoryName="") |
create the directory sPathName+"/"+sDirectoryName | |
virtual void | copyFiles (Option_t *option="") |
copyFiles | |
void | resetCurrentSimulation () |
resetCurrentSimulation | |
virtual void | cleanOutputFiles (Option_t *option="") |
Cleans the output files. | |
void | addInputFile (TInputFile *ifile) |
Add a TInputFile file. | |
void | addInputFile (TString str) |
Add an input file as a TString This input file does not contain input attributes. It is a mandatory input file for the code evaluation. | |
void | addOutputFile (TOutputFile *ifile) |
Add a TOutputFile file The TOutputFile file contains the output attributes of teh study. | |
void | setLog () |
Force the log. | |
void | unsetLog () |
Force to desable the log. | |
void | changeLog () |
Swith the status of the log. | |
Bool_t | getLog () |
Get the status of the log. | |
protected attributes | |
TString | _sFMUFile |
The FMU filename. | |
TString | _sFMUWorkingDirectory |
the FMU import directory | |
ELogLevel_t | _logLevel |
The log Level for FMI Library. | |
Double_t | _dStart |
The start time for the simulation. | |
Double_t | _dStop |
The stop time for the simulation. | |
Double_t | _dStep |
The step time for the simulation. | |
Double_t | _dTolerance |
The tolerance for the simulation. | |
Bool_t | _bStart |
boolean to known if _dstart is defined by user | |
Bool_t | _bStop |
boolean to known if _dstop is defined by user | |
Bool_t | _bStep |
boolean to known if _dstep is defined by user | |
Bool_t | _bTolerance |
boolean to known if _dTolerance is defined by user | |
Bool_t | _binitIFirst |
boolean to known if passed into the initIFirst step | |
fmi_version_enu_t | _sVersion |
The FMU version. | |
fmi_import_context_t * | _context_FMI |
The FMU context. | |
fmi1_import_t * | _fmi1Import |
The FMU 1.0 Object. | |
fmi2_import_t * | _fmi2Import |
The FMU 2.0 Object. | |
TString | _sGenerationTool |
The FMU generation tool. | |
TString | _sGenerationDateTime |
The FMU generation date and time. | |
Double_t | _dFMUStart |
The start time for default experiment as specified in the XML file. | |
Double_t | _dFMUStop |
The stop time for default experiment as specified in the XML file. | |
Double_t | _dFMUStep |
The step time for default experiment as specified in the XML file. | |
Double_t | _dFMUTolerance |
The tolerance for default experiment as specified in the XML file. | |
void | treatOption (TString soption) |
treat the soption for the class | |
Additional Inherited Members | |
Public Attributes inherited from URANIE::Launcher::TCode | |
protected TList * | _listOfInputFiles |
< vector of output files | |
TString | _sWorkingDirectory |
The Working directory. | |
TString | _sReferenceDirectory |
The Working directory. | |
TString | _sCommand |
The Command of the code. | |
Int_t | _nCurrentSimulation |
The Current number of simulation. | |
Int_t | _nOfInput |
The size of the vector listOfInput scanning input files. | |
Int_t | _nOfInputToSubstitute |
The size of the vector _nIndexOfInputToSubstitute. | |
Int_t * | _nIndexOfInputToSubstitute |
The vector of Index to Substitute. | |
Bool_t | _blog |
Boolean for edit the log. | |
URANIE::DataServer::TDataServer * | _tds |
Detailed Description
A virtual class for the FMI/FMU encapsulation.
- step init (
- See also
- test_simulate_fmi2_cs ) :
- Create the callback
- Create the FMU pointer
- Search the ReferenceValue in the FMU object for each input
- Case of Log :
- Print all the input start values
- step preTraitment :
- Set the input current values into the FMU object via setFMUReal() ..
- step run :
- Simulate the FMU Object via the loop (time_begin, time_step, _time_end) AND fmi2_import_do_step function
- step postTraitment :
- Catch the output values via the fmi2_import_get_real() function
- step terminate :
- Delete all the pointer (callbacks, FMU, ...)
- See also
- https://fmi-standard.org/
Member Enumeration Documentation
◆ ELogLevel_t
The list of log level.
Constructor & Destructor Documentation
◆ TCodeFMU() [1/4]
URANIE::Launcher::TCodeFMU::TCodeFMU | ( | ) |
Default constructor.
Referenced by ClassImp().
◆ TCodeFMU() [2/4]
URANIE::Launcher::TCodeFMU::TCodeFMU | ( | const TString & | name, |
const TString & | title | ||
) |
constructor with a name and a title
- Parameters
-
name title
◆ TCodeFMU() [3/4]
URANIE::Launcher::TCodeFMU::TCodeFMU | ( | URANIE::DataServer::TDataServer * | tds, |
TString | sFMUfile, | ||
Option_t * | option = "" |
||
) |
Constructor from TDataServer and Command as string.
- Parameters
-
tds sFMUfile
◆ TCodeFMU() [4/4]
URANIE::Launcher::TCodeFMU::TCodeFMU | ( | URANIE::Launcher::TCode & | mycode | ) |
Copy constructor.
- Parameters
-
mycode
◆ ~TCodeFMU()
|
virtual |
Empty Destructor
Referenced by ClassImp().
Member Function Documentation
◆ changeLog()
|
inline |
Swith the status of the log.
References URANIE::Launcher::TCode::_blog.
◆ do_exit()
|
inline |
do_exit
- Parameters
-
code
◆ getFMUFile()
|
inline |
Get the value of the _sFMUFile attribute.
The FMU filename which contains the XML File and the library.
- Returns
- the value of _sFMUFile
References _sFMUFile.
◆ getLog()
|
inline |
◆ getLogLevel()
|
inline |
◆ getStartSimulation()
|
inline |
References _dStart.
◆ getStepSimulation()
|
inline |
References _dStep.
◆ getStoptSimulation()
|
inline |
References _dStop.
◆ getToleranceSimulation()
|
inline |
References _dTolerance.
◆ init()
|
virtual |
Init phase of the code.
- Parameters
-
option
Reimplemented from URANIE::Launcher::TCode.
Referenced by ClassImp().
◆ initIFirst()
void URANIE::Launcher::TCodeFMU::initIFirst | ( | Option_t * | option = "" | ) |
Referenced by ClassImp().
◆ printLog()
|
virtual |
Print the log of the object/class.
- Parameters
-
option
Reimplemented from URANIE::Launcher::TCode.
Referenced by ClassImp().
◆ run()
|
virtual |
Run the code.
- Parameters
-
option
Reimplemented from URANIE::Launcher::TCode.
Referenced by ClassImp().
◆ setFMUFile()
void URANIE::Launcher::TCodeFMU::setFMUFile | ( | TString | new_var, |
Option_t * | option = "" |
||
) |
Set the value of _sFMUFile.
The FMU filename which contains the XML File and the library.
- Parameters
-
new_var the new value of _sFMUFile
Referenced by ClassImp().
◆ setLog()
|
inline |
Force the log.
References URANIE::Launcher::TCode::_blog.
◆ setLogLevel()
|
inline |
Set the Log Level for the FMI Library.
- See also
- ELogLevel_t
- Parameters
-
theLogLevel
References _logLevel.
◆ setStartSimulation()
|
inline |
References _bStart, and _dStart.
Referenced by setStartStopSimulation().
◆ setStartStopSimulation()
|
inline |
References setStartSimulation(), and setStopSimulation().
◆ setStepSimulation()
|
inline |
◆ setStopSimulation()
|
inline |
References _bStop, and _dStop.
Referenced by setStartStopSimulation().
◆ setToleranceSimulation()
|
inline |
References _bTolerance, and _dTolerance.
◆ terminate()
|
virtual |
Terminate phase of the code.
- Parameters
-
option
Reimplemented from URANIE::Launcher::TCode.
Referenced by ClassImp().
◆ treatOption()
|
private |
◆ unsetLog()
|
inline |
Force to desable the log.
References URANIE::Launcher::TCode::_blog.
Member Data Documentation
◆ _binitIFirst
|
protected |
boolean to known if passed into the initIFirst step
Referenced by ClassImp().
◆ _bStart
|
protected |
boolean to known if _dstart is defined by user
Referenced by ClassImp(), and setStartSimulation().
◆ _bStep
|
protected |
boolean to known if _dstep is defined by user
Referenced by ClassImp(), and setStepSimulation().
◆ _bStop
|
protected |
boolean to known if _dstop is defined by user
Referenced by ClassImp(), and setStopSimulation().
◆ _bTolerance
|
protected |
boolean to known if _dTolerance is defined by user
Referenced by ClassImp(), and setToleranceSimulation().
◆ _context_FMI
|
protected |
The FMU context.
◆ _dFMUStart
|
protected |
The start time for default experiment as specified in the XML file.
Referenced by ClassImp().
◆ _dFMUStep
|
protected |
The step time for default experiment as specified in the XML file.
Referenced by ClassImp().
◆ _dFMUStop
|
protected |
The stop time for default experiment as specified in the XML file.
Referenced by ClassImp().
◆ _dFMUTolerance
|
protected |
The tolerance for default experiment as specified in the XML file.
Referenced by ClassImp().
◆ _dStart
|
protected |
The start time for the simulation.
Referenced by ClassImp(), getStartSimulation(), and setStartSimulation().
◆ _dStep
|
protected |
The step time for the simulation.
Referenced by ClassImp(), getStepSimulation(), and setStepSimulation().
◆ _dStop
|
protected |
The stop time for the simulation.
Referenced by ClassImp(), getStoptSimulation(), and setStopSimulation().
◆ _dTolerance
|
protected |
The tolerance for the simulation.
Referenced by ClassImp(), getToleranceSimulation(), and setToleranceSimulation().
◆ _fmi1Import
|
protected |
The FMU 1.0 Object.
Referenced by ClassImp().
◆ _fmi2Import
|
protected |
The FMU 2.0 Object.
Referenced by ClassImp().
◆ _logLevel
|
protected |
The log Level for FMI Library.
Referenced by ClassImp(), getLogLevel(), and setLogLevel().
◆ _sFMUFile
|
protected |
The FMU filename.
Referenced by ClassImp(), and getFMUFile().
◆ _sFMUWorkingDirectory
|
protected |
the FMU import directory
Referenced by ClassImp().
◆ _sGenerationDateTime
|
protected |
The FMU generation date and time.
Referenced by ClassImp().
◆ _sGenerationTool
|
protected |
The FMU generation tool.
Referenced by ClassImp().
◆ _sVersion
|
protected |
The FMU version.
Referenced by ClassImp().