5. Usage of Simulator as an FMUΒΆ
The following requirements must be met to import and run a Simulator FMU:
Python 3.4 must be installed. This is needed by the master algorithm PyFMI.
CYME version 7.2 must be installed. CYME can be downloaded from www.cyme.com.
The
fmu_code
functions directory must be added to thePYTHONPATH
. This directory contains functions needed at runtime by the Simulator FMU. Thefmu_code
functions folder can be found at the top level of the distribution folder of CyDER. It is inweb\docker_django\worker\simulation
.To add the
fmu_code
functions folder to thePYTHONPATH
:In Search, search for and then select: System (Control Panel).
Click the Advanced system settings link.
Click Environment Variables. In the section System Variables, find a variable named
PYTHONPATH
environment variable and select it.If the variable does not exist, create it. Click Edit.
In the Edit System Variable (or New System Variable) window, specify the value of the PYTHONPATH environment variable which should be in our case the full path to
web\docker_django\worker\simulation\fmu_code
.
The Simulator Python API directory must be added to the
PYTHONPATH
. This directory contains scripts needed at runtime by the Simulator FMU.The Simulator Python API directory is in the installation folder of CYME. It can typically be found in
path_to_CYME\CYME\cympy
, wherepath_to_CYME
is the path to the installation folder of CYME 7.2.
To add the Simulator Python API scripts folder to thePYTHONPATH
, addpath_to_CYME\CYME
to thePYTHONPATH
. Note thatcympy
is not included in the name of the variable.
The Simulator installation directory must be added to the system
PATH
. This directory contains runtime DLLS (mkl_core.dll
,mkl_def.dll
) that are needed at runtime by the Simulator FMU.The Simulator installation directory is typically found in
path_to_CYME\CYME\`, where ``path_to_CYME
is the path to the installation folder of CYME 7.2.Upon request, the simulation results are saved in a result file which is created in the current working directory. The name of the result file is
xxx_result_.pickle
, where xxx is the FMU model name as defined in the XML input file.