A Tool for the Implementation of Open Neural Network Exchange Models in Functional Mockup Units

Authors

  • Michele Urbani Sustainable Energy Centre - Fondazione Bruno Kessler
  • Michele Bolognese Sustainable Energy Centre - Fondazione Bruno Kessler
  • Luca Pratticò Sustainable Energy Centre - Fondazione Bruno Kessler
  • Matteo Testi Sustainable Energy Centre - Fondazione Bruno Kessler

DOI:

https://doi.org/10.3384/ecp218645

Keywords:

ONNX, FMI, FMU, AI, ML

Abstract

The Functional Mock-up Interface (FMI) standard is aflagship in the co-simulation and model exchange domain.However, the integration of graph-based computationalmodels—particularly neural networks—into Functional Mock-upUnits (FMUs) has remained a technical challenge due tointeroperability and platform-specific limitations.To address this, we propose ONNX2FMU, a command-line Pythontool that facilitates the deployment of Open Neural NetworkExchange (ONNX) models into FMUs. According to FMI's goodpractices, ONNX2FMU generates C source code to wrap ONNXmodels in Functional Mockup Units, supports FMI versions2.0 and 3.0, and provides multi-platform compilationcapabilities. The tool simplifies the mapping processbetween model description and ONNX model inputs and outputsvia JSON files, ensuring accessibility and flexibility.This paper presents the tool architecture and methodologyand showcases its applicability through illustrativeexamples, including a reduced-order model powered by arecurrent neural network.

Downloads

Published

2025-10-24