A Train Transportation System
In this project, a train transportation system is modelled using hybrid modelling formalism in HyViusal.
The train transportation system includes both discrete events and continuous dynamics:
Discrete Event:
- Loading and unloading passengers
- Changing between different modes (accelerating mode, baking mode, etc. )during the running of the train
Continuous dynamics:
- The accelerating and decelerating action of the train
System Overview
- At the beginning, the train is empty.
- Passengers arrive and get on the train one by one at a random time, until the train if full (in this simulation, the capacity of the train is 10).
- The train leaves the station, it start accelerating. During the whole journey, it uses "bang-bang control" to control its velocity: when it reaches the upper bound of the velocity, it stops accelerating; due to the friction, train starts slowing down; when it reaches the lowwer bound of the velocity, it starts accelerating again. When train moved a certain distance and reached a baking point, it starts baking until the train stops.
- When the train stops, passengers onboard take off the train one by one with a same time interval