FMI.jl Logo

FMI.jl

What is FMI.jl?

FMI.jl is a free-to-use software library for the Julia programming language which integrates FMI (fmi-standard.org): load, instantiate, parameterize and simulate FMUs seamlessly inside the Julia programming language!

How can I use FMI.jl?

  1. open a Julia-Command-Window, activate your prefered environment
  2. goto package manager using ]
  3. type add FMI or add "https://github.com/ThummeTo/FMI.jl"
  4. have a look inside the example folder

How can I simulate a FMU and plot values?

# load and instantiate a FMU
myFMU = fmiLoad(pathToFMU)
fmiInstantiate!(myFMU)

# simulate from t=0.0s until t=10.0s and record the FMU variable named "mass.s"
simData = fmiSimulate(myFMU, 0.0, 10.0; recordValues=["mass.s"])

# plot it!
fmiPlot(simData)

# free memory
fmiUnload(myFMU)

What is currently supported in FMI.jl?

  • the full FMI 2.0.1 command set, including optional specials like getState, setState and getDirectionalDerivative
  • parameterization, simulation & plotting of CS- and ME-FMUs
  • event-handling for discontinuous ME-FMUs
  • ...

What is under development in FMI.jl?

  • FMI 3.0 and SSP 1.0 support
  • FMI Cross Checks
  • more examples
  • ...

What Platforms are supported?

FMI.jl is tested (and testing) under Julia Versions 1.6 and nightly on Windows (latest) and Ubuntu (latest). Mac should work, but untested.

Tobias Thummerer, Lars Mikelsons and Josef Kircher. 2021. NeuralFMU: towards structural integration of FMUs into neural networks. In Martin Sjölund, Lena Buffoni, Adrian Pop and Lennart Ochel (Ed.). Proceedings of 14th Modelica Conference 2021, Linköping, Sweden, September 20-24, 2021. Linköping University Electronic Press, Linköping (Linköping Electronic Conference Proceedings ; 181), 297-306. DOI: 10.3384/ecp21181297

Tobias Thummerer, Johannes Tintenherr, Lars Mikelsons 2021 Hybrid modeling of the human cardiovascular system using NeuralFMUs (10th International Conference on Mathematical Modeling in Physical Sciences, Preprint, Accepted) arXiv:2109.04880

Interested in Hybrid Modelling in Julia using FMUs?

See FMIFlux.jl.