This repository contains the code for the example to the Modelica Conference 2025 Paper "Towards Integration of PeN-ODEs in a Modelica-based workflow"
(Link to paper to be added on acceptance.)
- Download Julia in Version 1.11.1 from https://julialang.org/
- Start Julia from console in repository directory and define project via:
julia --project=. - Instantiate project by opening the package manager and instantiating the project
] instantiate
- Close Julia and start a new session to execute training via
julia --project=. .\trainScaraModel.jl
- Install Julia in Version 1.11.1 (see link above) and install the VS Code extension afterwards
- VS Code should automatically detect the ScaraRobotExample environment opening the directory (see bottom of VS Code window)
- Start Julia REPL by pressing Alt+J Alt+O
- Instantiate project from package manager
] instantiate
- Execute training from trainScaraModel.jl by executing the file in VS Code or alternatively be executing line for line via Shift+Enter or Selection via Ctrl+Shift+Enter
Directory checkpoints contains the pre-trained network parameters used for the plots of the paper. In Scara_Data reference data for training and set-point trajectories for the robot can be found. ScaraModel contains the component and system models used to generate the system model using ModelingToolkit.jl
The example is build on the FMIFlux example SciMLUsingFMUs and the corresponding youtube video Scientific Machine Learning using Functional Mock-Up Units | Thummerer, Mikelsons | JuliaCon 2024 but uses pure Julia and an object-oriented approach.
The scara model in this repository uses reimplementation of components/models from:
- Modelica Standard Library (MSL): https://github.com/modelica/ModelicaStandardLibrary
- Planar Mechanics Library: https://github.com/dzimmer/PlanarMechanics
- Servomechanism Library: https://github.com/afrhu/Servomechanisms
- FMIFlux.jl https://github.com/ThummeTo/FMIFlux.jl