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
2
votes
0 answers

Cannot run FMU in pyFMI?

I'm trying to simulate a FMU exported from OpenModelica using pyFMI: from pyfmi import load_fmu import os baseDir = os.path.dirname(os.getcwd()) fmu = baseDir + '\\Woody\\woody.fmu' model = load_fmu(fmu) # Get the options opts =…
jvandeweg
  • 133
  • 5
2
votes
0 answers

OpenModelica cannot run FMU?

I have created a model in OpenModelica using some simple blocks and equations: block ZapuniInterpolation // ----------------------------------------------------------------------------- // Modelica.Blocks.Interfaces.RealInput…
jvandeweg
  • 133
  • 5
2
votes
0 answers

Multicore simulation of a single FMU

Is it possible to take a single FMU and simulate it via model exchange in python on multiple in parallel to speed up a simulation? The models are created with OpenModelica, imported via PyFMI and solved with scipy.integrate.solve_ivp.
H Bode
  • 165
  • 7
2
votes
1 answer

How to handle unit conversions while interacting with FMUs?

I have a python script that filters and lists the parameters, their units and default values from a fmu using the read_model_description function from FMPy library and writes in an excel sheet (related discussion). Then using the simulate_fmu…
Kaustubh
  • 391
  • 2
  • 10
2
votes
2 answers

Reinforcement Learning Agent in FMU

I want to train a reinforcement learning agent on a model which i build in OpenModelica. By using pyFMI, it is no problem to import the FMU, simulate it, and get some results. My problem is that i don´t have a possibility to "pause" a simulation…
H Bode
  • 165
  • 7
2
votes
0 answers

Achieving a tunable parameter in OpenModelica

I have the following Modelica code model RocketCar Real x; Real v; input Real u(min = -1, max = 1); parameter Real h; equation der(x) = h*v; der(v) = h*u; end RocketCar; meant to model the infamous rocket car problem, which I would like…
hfhc2
  • 4,182
  • 2
  • 27
  • 56
2
votes
2 answers

Problem: Compile FMU c-code from jmodelica with emscripten

Problem If I try to compile c-code (from a FMU exported by JModelica) with emcc, I get an error that the header file "gnu/stubs-32.h" was not found. emcc -I /usr/include/ -I /usr/include/x86_64-linux-gnu/ -I /usr/include/x86_64-linux-gnu/bits/ -I…
19leunam93
  • 21
  • 2
2
votes
2 answers

Error while loading a fmu in python with pyfmi library

I have installed PyFMI library and trying to load a fmu created by GT-Suite in python. I am following this tutorial of jmodelica : https://jmodelica.org/pyfmi/tutorial.html # Import the load function (load_fmu) from pyfmi import load_fmu this set…
chink
  • 1,505
  • 3
  • 28
  • 70
2
votes
2 answers

undefined reference to '__imp_fmi2_import_free'

I have been trying to compile and link a test file written in c and which can communicate with FMILibrary of JModelica. I was able to compile and link it and run it in linux systems. coming to the Windows, I am using mingw-64 compiler to compile and…
lorugant
  • 49
  • 7
2
votes
1 answer

OpenModelica (v1.13.0): FMU export is broken - static.log: No such file or directory

When I try to export an FMU from OpenModelica(v1.13.0), the following error is generated: [3] 17:10:36 Scripting Error Error opening file: C:\Users\User Name\AppData\Local\Temp\OpenModelica\OMEdit\test\test.fmutmp/resources/static.log: No such file…
Domination
  • 95
  • 9
2
votes
0 answers

PyFMI/JModelica - Pausing simulation and restarting from state with modified parameters

I'm using Dymola 2019 to translate my Modelica model into an FMU, which I then simulate with JModelica (I'm on JModelica version 2.2 from 2018-03-15). My goal is to be able to simulate a certain period, analyze the results, modify certain parameters…
ATLPoly
  • 141
  • 4
2
votes
1 answer

pyFMI Python simulation different number of output points

How to pricisely control the number of model outputs I get an different number of output points based on different input parameters: model = load_fmu("Trial.fmu") # 64 Bit generated FMU with Dymola+Buildsyspro tstart =…
kelamahim
  • 577
  • 1
  • 4
  • 21
2
votes
1 answer

FMU-module method get_states_list()

I found a limitation of the FMU-module method get_states_list(). This method seems to bring a list only of continuous time states and not of discrete time states. I do usually make models that contain both continuous and discrete time sub-models…
janpeter
  • 681
  • 8
  • 22
2
votes
1 answer

FMU-modules and method get_author()

I use JModelica since many years and now run the current version 2.2. I am interested to share (compiled) FMU-modules and put my name and company into the FMU-module. If your FMU-module have the name model then there is a method model.get_author()…
janpeter
  • 681
  • 8
  • 22
2
votes
1 answer

Large-scale models and FMU for model exchange

I want to export large-scale models from Openmodelica to FMU for model exchange. As first step, I'm using this model for testing purposes: model BigModel "Tank-Pipe-Tank cloned n times" // constant Real g=9.8; // parameter Integer n = 1; …
Neotake
  • 79
  • 7
1 2
3
12 13