Table of Contents

Table of Contents

Route Algorithms

Route Algorithms


FlexSim RailWorks has some options of routing algorithm at your disposal, you can select the algorithm you wish to be used on the RailSystem object configuration, including a route forward algorithm and an auto adjustment algorithm. Both are described in the sections below.

Route Forward

The default routing algorithm of the RailWorks library consists of an SPF algorithm (Shortest Path First), integrated with the FlexSim Event List and activated with the MoveTrain custom activity on Process Flow.

This algorithm gives the user the option of manipulating the train movement as he/she wishes, the movement will start as soon as the token enters the MoveTrain activity and stops as the pointed destination is reached.

Auto Adjustment

The auto adjustment algorithm handles the train positioning and pathing decisions for the user, selecting an order of movements decided based on the current rails and trains positioning. The deciding factor of the order of movements is to find an order where there will be no collision and then handle the Event List so the movement occurs correctly and also the Process Flow tokens are released at the correct time.

The solution consists of applying an algorithm to detect and eliminate possible locking of the moving trains. It is important to allow trains operation and flow through the network without occurring locking occurrences. The viable trains operations depend on the proper scheduling of trains along the tracks and stations of the railway without locking. Thereby it will be possible to check the occupancy level of the capacity of each track for a daily operation and whether the operating margins are adequate. In that regard will be considered:

  1. Characteristics of the trains to be considered are speed, size, and stop patterns of each train.
  2. Determination of travel time in each section for each group of trains.

This solution runs partially in Python (version 3.9.0+), so it is a prerequisite that the user has Python installed on the same computer as the FlexSim RailWorks library.