Digital twin of the Fischertechnik Training Factory 9V with real-time dashboard and DEVS-based simulator

Anthony 5eb717ebbd Update ci.yml 3 ヶ月 前
.github 5eb717ebbd Update ci.yml 3 ヶ月 前
dashboard ac4ec4a4f8 Update readmes with setup information 3 ヶ月 前
simulator 03ca7f32b2 Update workflow to hopefully run this time 3 ヶ月 前
.gitignore ad5395c31c Initial commit with license and attribution 3 ヶ月 前
LICENSE ad5395c31c Initial commit with license and attribution 3 ヶ月 前
NOTICE.txt ad5395c31c Initial commit with license and attribution 3 ヶ月 前
README.md dcbd3aa063 Update README.md 3 ヶ月 前
run_dashboard.sh 892d271027 Initial commit with previous projects 3 ヶ月 前
run_sim.sh 892d271027 Initial commit with previous projects 3 ヶ月 前

README.md

fischertechnik-factory-twin

This project provides a digital twin of the Fischertechnik Training Factory 9V, consisting of two interconnected components:

  1. Simulator (simulator/)
    A DEVS-based simulation engine that models the behavior of the factory and publishes MQTT messages. It can operate standalone or in hybrid mode alongside real factory data.

  2. Dashboard (dashboard/)
    A Flask-based web application that serves as a real-time control center. It visualizes data from the real factory, the simulator, or both. It includes WebSocket integration, an MQTT bridge, and dynamic dashboard modes (monitor, simulation, hybrid).

Each sub-project has its own Python virtual environment and set of dependencies.

Getting Started

1. Clone the Repository

TODO

2. Start the MQTT Broker (Mosquitto)

Make sure a Mosquitto MQTT broker is running on your machine. The simulator expects it to be available at localhost (127.0.0.1) on the default port (1883).

If you have Mosquitto installed locally, you can start it using:

# On most Linux systems:
sudo systemctl start mosquitto

# Or manually:
mosquitto

You can verify it's running by checking localhost:1883 or using an MQTT client like MQTT Explorer.

3: Run the dashboard

./run_dashboard.sh
  • Create a virtual environment in dashboard/venv/ if it doesn't exist

  • Install Flask and other required packages

  • Start the dashboard web server (accessible locally in your browser on https://localhost:5000)

4. Run the simulator

./run_sim.sh

This will:

  • Create a virtual environment in simulator/venv/ if it doesn't exist

  • Install dependencies from requirements.txt

  • Launch the DEVS simulator in realtime-mode

Project Structure

fischertechnik-factory-twin/
├── simulator/        # DEVS simulation engine
├── dashboard/        # Flask web dashboard
├── run_sim.sh        # Root-level launcher for the simulator
├── run_dashboard.sh  # Root-level launcher for the dashboard
├── LICENSE
├── NOTICE.txt
└── README.md

License

This project is licensed under the Apache License 2.0.

It includes third-party resources licensed under:

See NOTICE.txt for attribution.