This repository contains the materials and instructions for the tutorial FMI in the Cloud at the 14th International Modelica Conference 2021.
- a Google account to run the Python Notebook on Google Colab
- a clone or local copy of this repository
- a GitHub account to fork this repository
- a Conda environment with FMPy to run the Jupyter Notebook locally and to run the Web App
- a Python IDE or text editor to write the Web App
To create the Conda environment
-
install Miniconda (if you don't already have Conda installed)
-
create a new Conda environment
conda create -n fmi-tutorial -c conda-forge python=3.9 fmpy notebook ipywidgets
- activate the environment
conda activate fmi-tutorial
Option 1:
run the Jupyter Notebook on the cloud
- open Heater.ipynb on Google Colab
Option 2:
run the Jupyter Notebook locally
- change into the directory where you downloaded or cloned this repository and run
jupyter notebook Heater.ipynb
Resources and inspirations:
- Dash Bootstrap Components
- Plotly Python Examples
- Bootstrap CSS Framework
- generic FMPy Web App
- FMU Check (source code)
- FMI-based simulation workflows based on open source and commercial tools (Thu, 13:50 h)
Exercises:
- change the default simulation time to 50 s
- change the result variables
- add an additional parameter
- add the description from the modelDescription.xml below the image
- create a custom input signal
- deploy the web app
Build your own Jupyter Notebooks and Web Apps and ask any questions about FMPy.
- explore the test FMUs in the FMI Cross-Check
- fork this repository and share your results!