Questions tagged [pyfmi]

52 questions
1
vote
2 answers

Error loading FMU with Python Library pyfmi

I am using Mac M1 Chip. I want to load FMU file generated with Dymola using the python library pyfmi. I have got the following error: The FMU could not be loaded. Error loading the binary. What is causing this, and how can I fix it?
awadih
  • 11
  • 3
1
vote
1 answer

PyFMI multiple inputs in Master simulation

I am trying to simulate two FMUs with the one having inputs as CSV files by using the Master. What I have tried is the following: from pyfmi import load_fmu from pyfmi import Master import pandas as pd electricity_network =…
Kosmylo
  • 436
  • 1
  • 6
  • 20
1
vote
0 answers

Different step size for different FMUs

I have 3 FMUs that I want to simulate with the pyFMI Master. The two of them work with a resolution of seconds, but the third with a resolution of hours. Specifically, if I want to simulate for one day, namely 86400 seconds with a step size of 15…
Kosmylo
  • 436
  • 1
  • 6
  • 20
1
vote
0 answers

Error when trying to simulate one FMU with 4 inputs from csv files

I have a single FMU and with 4 inputs, which I want to feed them with csv files. I did the following: from pyfmi import load_fmu import pandas as pd electricity_network = load_fmu(r"C:\Users\kosmy\Pandapower.fmu") load_file =…
Kosmylo
  • 436
  • 1
  • 6
  • 20
1
vote
0 answers

FMU 2.0 interaction - requires parallel "container" for parameter values etc?

I work with pyfmi in Jupyter notebooks to run simulations and I like to work interactively and evaluate incremental changes in parameters etc. Long time ago I found it necessary to introduce a dictionary that work as a "container" for parameter and…
janpeter
  • 681
  • 8
  • 22
1
vote
1 answer

Purpose of cswrapper code, sundials solver in FMPy

About FMPy which is a python package for FMU simulation. I need one clarification : What is the purpose of cswrapper code, sundials solver or functions? Is it only required for ModelExchange type FMU simulation and not for Co-simulation type FMU…
Geeko
  • 29
  • 7
1
vote
0 answers

Inverted z-axis when running FMU in pyfmi

I am trying to simulate a robot arm in pyfmi using a FMU created in maplesim. The simulation is in real time with inputs and outputs that are changed each cycle. I therefor have taken a lott of inspiration from the fmi example bouncing_ball_native…
1
vote
1 answer

FMU - Problem reassigning a new value to a variable

Main Goal Start the FMU with defined start_values ​​and change it in the middle of the process at "ModelExachange". Approach Take the FMU already created from the FMI standard web. Launch it with FMPY. Change value every step with step_finished…
aisak
  • 49
  • 5
1
vote
1 answer

PyFMI: Initialize parameters depending of others

I created a model in OpenModelica and would like to create a FMU from it. Inside OpenModelica, I can initialize the parameters the following: model r_ctrl parameter Real startTime(start = 0.1); parameter SI.Resistance u_ref(start = 230); …
H Bode
  • 165
  • 7
1
vote
1 answer

pyfmi ModuleNotFoundError when packaging using pyinstaller

I have a series of scripts, which include some computations with the pyfmi module. When I run the main function in my python environment (Spyder), I do not have any errors - the pyfmi computations run perfectly. But, when I package the whole thing…
joseph praful
  • 171
  • 1
  • 16
1
vote
0 answers

PyFMI: Setting parameters sometimes not possible (model depending)

I created a minimal example (DC-Voltage, Load) in OpenModelica. Afterwards, I created an FMU and used it via Python. Problem summary: By using just a Resistor as a load, i can´t change the parameters via python. After adding an Inductor to the…
H Bode
  • 165
  • 7
1
vote
0 answers

Modest-py python library for FMU parameter estimation using FMPy library instead of PyFMI library

I am using modest-py python library for FMU functional mockup units parameter estimation. By default modest-py is using PyFMI for handling the FMU files. I need to use FMPy library inside of modest-py to do the same, in other words swap the…
1
vote
1 answer

PyFMI parameter estimation and handling of fixed model parameters different from default

I have started to in PyFMI use parameter estimation with the procedure model.estimate() and works well. From the documentation (Andersson et al 2016) as well as practical use I understand that model parameters are taken from the compiled FMU-model…
janpeter
  • 681
  • 8
  • 22
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
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