FMU created in Optimus

1 post / 0 new
harrisbk
Offline
Joined: 2017-04-17
FMU created in Optimus

I've created some cosimulation FMUs using Noesis's Optimus. I can load the FMU without any problems. I can get and set parameters. But, I run into problems when I go to simulate. Here's the log file:


FMIL: module = FMILIB, log level = 5: Allocating FMIL context
FMIL: module = FMILIB, log level = 5: Detecting FMI standard version
FMIL: module = FMIZIP, log level = 5: Unpacking FMU into /tmp/brennanharris/JModelica.org/jm_tmpFdM3HD
FMIL: module = FMIXML, log level = 5: Parsing XML to detect FMI standard version
FMIL: module = FMIXML, log level = 5: XML specifies FMI 2.0
FMIL: module = FMILIB, log level = 4: XML specifies FMI standard version 2.0
FMIL: module = FMILIB, log level = 5: Parsing model description XML
FMIL: module = FMI2XML, log level = 5: Parsing XML element fmiModelDescription
FMIL: module = FMI2XML, log level = 5: Parsing XML element CoSimulation
FMIL: module = FMI2XML, log level = 5: Parsing XML element ModelVariables
FMIL: module = FMI2XML, log level = 5: Building alias index
FMIL: module = FMI2XML, log level = 5: Parsing XML element ModelStructure
FMIL: module = FMILIB, log level = 5: Parsing finished successfully
FMIL: module = FMILIB, log level = 4: Loading 'linux64' binary with 'default' platform types
FMIL: module = FMICAPI, log level = 5: Loaded FMU binary from /tmp/brennanharris/JModelica.org/jm_tmpFdM3HD/binaries/linux64/Optimus_10_17_Rsm2.so
FMIL: module = FMICAPI, log level = 5: Loading functions for the co-simulation interface
FMIL: module = FMILIB, log level = 5: Successfully loaded all the interface functions
FMIL: module = Model, log level = 4: [INFO][FMU status:OK] OPTIMUS: Model created
FMIL: module = FMICAPI, log level = 5: Calling fmi2SetupExperiment
FMIL: module = FMICAPI, log level = 5: Calling fmi2EnterInitializationMode
FMIL: module = FMICAPI, log level = 5: Calling fmi2ExitInitializationMode
FMIL: module = fmi2GetInteger, log level = 3: [WARNING][FMU status:Warning] OPTIMUS: Function fmi2GetInteger is not supported
FMIL: module = Model, log level = 4: [INFO][FMU status:OK] OPTIMUS: Model destroyed
FMIL: module = FMILIB, log level = 5: Releasing FMU CAPI interface
FMIL: module = FMICAPI, log level = 5: Successfully unloaded FMU binary
FMIL: module = FMILIB, log level = 5: Releasing allocated library resources
FMIL: module = JMPRT, log level = 5: Removing /tmp/brennanharris/JModelica.org/jm_tmpFdM3HD<

... and the error message in Python:

File "/home/brennanharris/Desktop/fmuPlayground/fmuManip.py", line 11, in <module>
    gbx.simulate(final_time=10)
  File "src\pyfmi\fmi.pyx", line 6160, in pyfmi.fmi.FMUModelCS2.simulate (src/pyfmi/fmi.c:67491)
  File "src\pyfmi\fmi.pyx", line 311, in pyfmi.fmi.ModelBase._exec_simulate_algorithm (src/pyfmi/fmi.c:6030)
  File "src\pyfmi\fmi.pyx", line 307, in pyfmi.fmi.ModelBase._exec_simulate_algorithm (src/pyfmi/fmi.c:5948)
  File "/home/brennanharris/anaconda2/lib/python2.7/site-packages/pyfmi/fmi_algorithm_drivers.py", line 1019, in solve
    result_handler.integration_point()
  File "/home/brennanharris/anaconda2/lib/python2.7/site-packages/pyfmi/common/io.py", line 1901, in integration_point
    i = model.get_integer(self.int_var_ref)
  File "src\pyfmi\fmi.pyx", line 3542, in pyfmi.fmi.FMUModelBase2.get_integer (src/pyfmi/fmi.c:39235)
pyfmi.fmi.FMUException: Failed to get the Integer values.

Is there a way to work around this? Or am I out of luck building FMUs with Optimus?