FMUs co-simulation in Python
Project description
👋 About CoFmuPy
CoFmuPy is a Python library designed for rapid prototyping of digital twins through the co-simulation of Functional Mock-up Units (FMUs). It offers advanced master coordination features, such as solving algebraic loops between FMUs and managing the interaction between various simulation components. This library provides a seamless interface to orchestrate complex physics simulations and handle the data exchange between FMUs.
The documentation is available online: https://irt-saint-exupery.github.io/CoFmuPy
🐾 Installation
CoFmuPy is available on PyPI and can be installed using pip:
pip install cofmupy
🐍 Key Keatures
CoFmuPy provides a Python interface (with a graphical user interface under development) for configuring and running co-simulations of FMI-based systems, with a focus on coordinating interacting FMUs within complex digital twin architectures.
A high-level API allows users to easily define, execute, and visualize digital twins scenarios, while still enabling more advanced control when needed.
Building on the FMPy library as an FMI-compliant execution backend, CoFmuPy focuses on system-level co-simulation capabilities and advanced coordination logic. In particular, CoFmuPy provides the following key features:
-
Advanced master coordination for coupled FMUs: Native master algorithms orchestrate the execution of multiple interacting FMUs, ensuring coherent time advancement and stable system-level simulation across heterogeneous subsystems. Cyclic dependencies between FMUs (algebraic loops) are automatically detected and resolved using fixed-point strategies, supporting both Jacobi and Gauss–Seidel co-simulation schemes, with or without rollback. This enables the simulation of tightly coupled systems without manual intervention or model restructuring.
-
Explicit data exchange and synchronization mechanisms: CoFmuPy provides fine-grained control over data routing, synchronization, and signal propagation between FMUs, as well as between FMUs and external data sources or sinks.
-
Native integration of Python and AI components: Python-based models (e.g., machine learning or control logic) can be directly integrated into the co-simulation loop without immediate FMU export while still being FMI-compliant, enabling full integration of AI frameworks.
-
Declarative and reproducible configuration: Co-simulation systems are fully defined through a structured JSON configuration file, making experiments easy to reproduce, modify, and extend.
-
Graphical interface (coming soon): A user-friendly graphical interface will enable drag-and-drop system construction, FMU interconnection, remote interfaces configuration, algorithm selection, and co-simulation control.
📚 Citation
If you use CoFmuPy in your research or publications, please cite:
@inproceedings{friedrich2025cofmupy,
title={CoFmuPy: A Python Framework for Rapid Prototyping of FMI-based Digital Twins},
author={Friedrich, Corentin and Lombana, Andr{\'e}s and Fasquel, J{\'e}r{\^o}me and Schlick, Charlie and Bennani, Nora and Mendil, Mouhcine},
booktitle={The 2nd International Conference on Engineering Digital Twins},
year={2025}
}
✒️ Contributing
Feel free to propose your ideas or come and contribute with us on the CoFmuPy library!
🙏 Acknowledgments
This project was funded by the European Union under GA no 101101961 - HECATE. Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or Clean Aviation Joint Undertaking. Neither the European Union nor the granting authority can be held responsible for them. The project is supported by the Clean Aviation Joint Undertaking and its Members.
📝 License
The package is released under the 2-Clause BSD License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cofmupy-1.0.0.tar.gz.
File metadata
- Download URL: cofmupy-1.0.0.tar.gz
- Upload date:
- Size: 104.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc13703edbc1d8f6e5d9c653890062223ace3120dc93c19e4b846b91b69b6a07
|
|
| MD5 |
ba93d5c66690ffd3c2b7377b2bc4dae8
|
|
| BLAKE2b-256 |
7a47b0773051099be00140ed25ba0c1efedf56f9bba30030aa3f2e1c2705d459
|
File details
Details for the file cofmupy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cofmupy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 177.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8acd8d71656106f9c19c6c05b1db62a3280cc38c202cfead0abb5f9d58808ba
|
|
| MD5 |
c7382b102a49d39fc5be8542a5363496
|
|
| BLAKE2b-256 |
cb3d0a0af5c826df3bd242ff3c43c1c4f3e0c162d1ddc5f26a126b48e065e176
|