Installation¶
Requirements¶
- OpenModelica with OMEdit. The library is developed with version
1.27.1-64bit. - The Modelica Standard Library (
Modelica 4.1.0), installed with OpenModelica.
Nothing else: StateCharts is pure Modelica, without C or Python code. It is therefore not tied to Windows.
Getting the library¶
- A released version: each version is a tag
vX.Y.Zof the repository. On the tag page, Code → Download source code (zip), then unzip the archive. - The current version: clone the repository
https://gitlab.com/bdelaup/modelica_statecharts.git, or download themainbranch as a zip.
Opening it in OMEdit¶
- File → Open Model/Library File(s)…
- Select
StateCharts/package.mo. - The library shows up in the library browser, on the left.
To have OMEdit load it at every start: Tools → Options → Libraries → User Libraries → Add, then select the same package.mo file.
Checking the installation¶
Open StateCharts.Examples.TrafficLight (double-click) and simulate it (Simulation → Simulate). In the results window, tick color.y: the curve goes from 1 (red) to 3 (green) at 4 s, then to 2 (yellow) at 7 s, and so on. Continue with Getting started.