This example for NonLinearSystemNeuralNetworkFMU.jl is using DrWatson to make a reproducible example named ScalableTranslatonStatistics.
Authors: Andreas Heuermann.
These scripts can be used to generate benchmarks for simulation times of the ONNX surrogate FMUs.
-
Download ScalableTranslationStatistics and create environment variable
SCALABLETRANSLATIONSTATISTICS_ROOT
that points to it root directory. This example uses commit 8a96bcb036fb9a6e56a3d1e369af8f36fcbc3c1e. -
Make sure you have local Julia package NaiveONNX in ../NaiveONNX.jl. If not update your git submodule with
$ git submodule update --force --init --recursive
-
To create plots with CairoMakie an X-server has to be available. So the environmental variable
DISPLAY
has to be set.If you are using ssh to connect to a remote machine use
ssh -X [email protected]
. Check your Julia session has the variable available or set it:julia> ENV["DISPLAY"] julia> ENV["DISPLAY"] = "localhost:10.0"
-
Open a Julia console and run:
julia> using Pkg julia> Pkg.add("DrWatson") # install globally, for using `quickactivate` julia> Pkg.activate("examples/SimpleLoop/") julia> Pkg.instantiate()
-
OpenModelica: Tested omc version v1.21.0-dev-288-g01b6764df5-cmake with OMSimulator version OMSimulator v2.1.1.post194-g75de4c6-linux-debug.
This will install all necessary packages for you to be able to run the scripts and everything should work out of the box, including correctly finding local paths.
You may notice that most scripts start with the commands:
using DrWatson
@quickactivate "SimpleLoop"
which auto-activate the project and enable local path handling from DrWatson.
You can change the size of the Modelica model by changing
sizes = [5, 10, 20, 40, 80, 160]
in the script runAll.jl.
Run
include("scripts/runAll.jl")
for all tests.