Questions tagged [fmi]

FMI stands for Functional Mockup Interface. It is a standard for model exchange and co-simulation.

Functional Mock-up Interface (FMI) is a tool independent standard to support both model exchange and co-simulation of dynamic models using a combination of xml-files and compiled C-code (see overview in PDF or PPT format). The first version, FMI 1.0, was published in 2010. The FMI development was initiated by Daimler AG with the goal to improve the exchange of simulation models between suppliers and OEMs. As of today, development of the standard continues through the participation of 16 companies and research institutes. FMI is supported by over 50 tools and is used by automotive and non-automotive organizations throughout Europe, Asia and North America.

Additional information can be found at the FMI website.

191 questions
1
vote
1 answer

Is it possible to use/run/call a Modelica FMI model in R?

I will get a compiled model (FMU Function mockup unit) from a third-party software company coded in Modelica (Dymola). Is it possible to run / use this model within R environnement, i.e. import it, simulate it and get results from it ? The…
Stéphane V
  • 1,094
  • 2
  • 11
  • 25
1
vote
1 answer

All parameters defaulted to "tunable" by export to FMU from Dymola, but should be "fixed"

All parameters are always exported as "tunable" by FMUexport from Dymola. In many places this cannot be changed to "fixed" at all, because (sub)components from libraries are locked against it. So our next tool tries to use degrees of freedom which…
JJhome
  • 13
  • 2
1
vote
1 answer

PyFMI different results between model exchange and co-simulation?

When simulating the cartpole problem as an FMU in PyFMI I get different results giving the same input depending on if I use "model exchange" or "co-simulation". The ME results are correct, the CS results seem completely off. Model exchange…
Glenn C.
  • 119
  • 7
1
vote
1 answer

Create a list of all current variables and their respective values in FMIKit-Simulink

I am currently using FMIKit for Simulink found here https://github.com/CATIA-Systems/FMIKit-Simulink From the documentation it works very well to query values of parameters within the FMU using FMIKit.getStartValue(FMUBLOCK, 'Variablename'); but…
1
vote
2 answers

PyFMI in Python 3 environment in Ubuntu 18.04

My goal is to be able to run FMUs produced by OpenModelica in Ubuntu 18.04 and then run these with PyFMI in Python 3 environment. I follow the outline for PyFMI installation here https://jmodelica.org/pyfmi/installation.html. So far I have using…
janpeter
  • 681
  • 8
  • 22
1
vote
1 answer

Set a variable for FMI type "Model Exchange"

I'm using python fmpy to run a fmu model. Executing, running and plotting results works fine. Defining inputs as well (following the tutorials). But I'm struggling with changing the value of global parameter within the fmu model. For example, if I…
Zor Ro
  • 76
  • 6
1
vote
0 answers

Problem setting fmu parameter with JModelica - 'Failed to set the Real values'

I am trying to set the value of a parameter in JModelica using the approach given in section 4.4.1 of the user manual; however when I load an fmu and try to change the value I get the message: File "src\pyfmi\fmi.pyx", line 209, in…
alkey
  • 986
  • 4
  • 16
  • 33
1
vote
1 answer

Error while loading fmu by pyfmi.load_fmu

I want to load a 'fmu' in Linux by pyfmi.load_fmu, but I get a error. error1 in env1: Could not find GLIMDA. Traceback (most recent call last): File "/home/user/Documents/hdh/paper/ling_min_du.py", line 12, in model =…
1
vote
1 answer

How to define an input function that depends on an output of the simulated FMU using PyFMI?

I have one FMU to simulate using PyFMI. How do I create an input function that depends on an output of the simulated FMU? The documentation provides only examples for input functions that depend on external variables, e.g.: # Generate input t =…
Salah
  • 63
  • 1
  • 5
1
vote
1 answer

Redundant Connection of Arrayed Component

Warning received claims I have a "redundant connection(s) (due to other connections)." I am linking one HeatPort to several components that expand through the use of an array. See the code segment below. The use of each does not appear to work or I…
Justin Shultz
  • 199
  • 1
  • 11
1
vote
1 answer

FMUException: Failed to setup the experiment

I have a fmu which is created in GT-Suite and am trying to work with it in python. I have followed jmodelica tutorials from pyfmi import load_fmu model = load_fmu('myFMU.fmu') res = model.simulate(final_time=10) My fmu gets loaded but when I try…
chink
  • 1,505
  • 3
  • 28
  • 70
1
vote
1 answer

FMU inputs for parameters in Modelica

I have several blocks "FixedCurrent" in my electrical circuit. I want to be able to change values of current for these block via FMU. I can change a value, using "parameter", as it presented in the code below: type Current = Real(unit = "A", min =…
AleksandrP
  • 11
  • 1
1
vote
0 answers

FMU getState/setState for model exchange with PyFMI

I'm involved in a project in which I use a model exchange FMU. I'm using PyFMI to interact with it. One of the things that I need to do is get the state of the model at certain time ( get_fmu_state() is the function in PyFMI) and restore it later…
ignacio
  • 41
  • 3
1
vote
0 answers

fmi -Ignoring unknown resource URI

I exported a model fmu from openmodelica OMEditor and it was FMU version 2.0 and I specified it as co-simulation. I am getting the following error: fmistatus = OK; Test CS model Instance (logStatusWarning ): fmi2Instantiate: Ignoring unknown…
lorugant
  • 49
  • 7
1
vote
1 answer

Hide Input / Outputs in Compiled FMUs

I would like to export an FMU with a controlled selection of inputs and outputs. I have a model which compiles to an FMU successfully but several internal variables are appearing as output variables in the FMU. Is there an option to hide these…
Justin Shultz
  • 199
  • 1
  • 11