CATIA-Systems / FMPy

Simulate Functional Mockup Units (FMUs) in Python
Other
412 stars 117 forks source link

Missing shared library for FMU 3.0 #671

Closed greenwoodms06 closed 1 month ago

greenwoodms06 commented 2 months ago

Using Python 3 with the latest release of FMPy, an FMU 3.0 created using Dymola (with binary export) indicates a missing shared library is missing.

Exception: Function fmi3InstantiateModelExchange is missing in shared library.

I am not sure if this is Dymola or FMPy. I am submitting this issue to both just in case. Attached is the reproducible example with the python file being used to simulate.

bugFiles.zip

t-sommer commented 1 month ago

This problem is solved in Dymola Version 2024x Refresh 1.

greenwoodms06 commented 1 month ago

I confirmed that the issue is resolved with Dymola 2024x Refresh 1.

greenwoodms06 commented 1 month ago

There is one m ore wrinkle I uncovered related to this issue. The file naming has changed for the binary folders (only checked windows) - see the image below.

image

The code from the previous upload works using fmpy.simulate_fmu. However, using a more controlled approach throws the error. I tried just changing the folder to win64 to see if that would work but then I got the following error:

Exception: Function fmi2GetTypesPlatform is missing in shared library.

Below is the python file and the two fmus.

FMU3_test.zip

greenwoodms06 commented 1 month ago

I revise my previous comment. The issue was user error. I needed to change to FMU3Slave and import that from fmi3. Other things are different apparently as well for simulation a 3.+ FMU but that is on me to figure out I think.

Case closed.