Searching feasible resources to reduce false-positive situations for resolving deadlocks with the Banker's algorithm in railway simulation

https://doi.org/10.1016/j.jrtpm.2017.05.001Get rights and content

Highlights

  • Reduce false-positive situations with the Banker’s algorithm.

  • Deadlock avoidance and prevention in railway simulation.

  • A high level of efficiency and usability can be achieved for resolving deadlocks.

  • Its usability has been proven for a large scale network with a high density of train movements.

Abstract

The deadlock problem is a well-known challenge in synchronous simulation for railway planning and operations. The Banker's algorithm is a classical solution for deadlock avoidance, and has also been applied in the field of railway simulation. Once a train passes the deadlock-free test with the Banker's algorithm, a deadlock-free situation can be guaranteed.

However, any false-positive situation in resolving deadlocks will limit the efficiency and the usability of railway simulation. In a false-positive situation, a request, which may not actually lead to a deadlock, will still be rejected due to a failed deadlock-free test. Hence, waiting time is unnecessarily increased, and the efficiency of the simulated railway operations is reduced.

In this paper, a method to determine feasible resources is developed to reduce these false-positive situations. Through applying the Banker's algorithm and feasible resources, the developed method can be conceived as a combination of deadlock prevention and deadlock avoidance. As a complement with limited computational efforts and simple logic, the method to identify feasible resources with deadlock prevention can efficiently decrease the waiting time caused by false-positive situations. Since the developed method using deadlock prevention is only applied from the current position of the tested train to the feasible resources, the inflexibility of being blocked by the entire line with deadlock prevention can be avoided.

The implemented case study shows that the applied method can avoid deadlocks and reduce false-positive situations efficiently. Within it, the rate of rejected requests is reduced from an initial value of 38.35%–3.23%, and the rate of reduction of false-positive situations is 22.22% for the total requests of infrastructure resources. Its usability has been proven for a large scale network with a high density of train movements.

Introduction

Today, various simulation approaches are widely used in railway planning and operations. Among them, synchronous simulation is a very popular type of railway simulation, by which all train runs are simulated simultaneously along the passage of time. It realistically represents the behaviour of railway systems and the interaction among trains and infrastructure. Synchronous simulation is applied in many railway simulation tools, including RailSys and OpenTrack (Watson and Medeossi, 2014).

A well-known challenge for synchronous simulation is the deadlock problem. An example of the deadlock problem is shown in Fig. 1. The path of the train is marked with a dashed line. During the simulation, if train T2 occupies the route from S4 to S6, all trains T1, T2 and T3 are blocked. A deadlock situation takes place, although all safety rules have been considered.

In Pachl (2011), the deadlock problem in railway simulation is defined as:

“A deadlock is a self-blockade in a control system in which two or more tasks are waiting for each other to release a resource in a circular chain. In rail traffic, a deadlock is a situation in which a number of trains cannot continue their path at all because every train is blocked by another one.”

Four conditions necessary to produce deadlocks are given by Coffman et al. (1971). In Pachl (2011), the conditions are analysed for railway operations:

  • 1)

    Mutual exclusion: a train will occupy an infrastructure resource exclusively.

  • 2)

    Wait for: a train holds the occupied resources when it waits for the new re-quested infrastructure resources.

  • 3)

    No preemption: it is impossible to remove occupied infrastructure resources from a train forcibly.

  • 4)

    Circular wait: a cyclic wait is formed among two or more trains. Each train waits on other trains to release the required infrastructure resources; meanwhile the train occupies the infrastructure resources requested by other trains.

Three principles can be applied to resolve deadlocks:

  • -

    Deadlock detection

  • -

    Deadlock prevention

  • -

    Deadlock avoidance

With deadlock detection, the system will be rolled back to a previous status in case of deadlocks. For some simulation tools, deadlocks are solved manually through deadlock detection. However, this method of rolling back frequently is not efficient for railway simulation.

A straightforward idea to resolve deadlocks is to eliminate one of the four necessary conditions mentioned above. This approach is called deadlock prevention. In railway operations, the conditions 1), 2) and 3) are always in effect. Therefore, the issue of circular wait is to be considered within this method of preventing deadlocks. Due to the simple nature of the logic involved in systematically preventing circular wait, deadlock prevention can be implemented with low computational efforts.

Clarified with an example, a potential circular wait situation can be prevented with the principle of deadlock prevention by forbidding bidirectional operations or by reserving all of the required infrastructure resources for a given train. However, it is inefficient to simply apply deadlock prevention for the entire process of railway simulation. For lines with bidirectional operations, it is unrealistic or even impossible to prevent circular wait by blocking the entire line for only one direction. With deadlock prevention, more resources for a train will be unnecessarily reserved in advance to prevent circular wait for bidirectional operations. It will reduce the system capacity with a poor level of resource utilisation. Therefore, to resolve deadlocks solely with deadlock prevention for railway simulation is impractical and inefficient.

The principle of deadlock avoidance is the most practical approach in the resolution of deadlocks. For any given request, the current operational situation will be investigated. The request for an infrastructure resource can only be granted in the case of a safe state, which ensures deadlock-free operation. Within the principle of deadlock avoidance, the elimination of circular waits is not directly concerned. Instead, the feasibility to accomplish all the train runs is examined. A safe state can exist even if the circular wait situation is not completely eliminated. The applicability and the limitation of deadlock prevention and deadlock avoidance were also explained in Pachl (2011).

An example to compare deadlock prevention and deadlock avoidance is shown in Fig. 2. For simplification, signals are not shown in this example. The request of train T3 to enter track G1 can be approved through the principle of deadlock avoidance, since all the train runs can be accomplished following the sequence of T3, T2, T1, and T4. After the request has been granted, train T3 only needs to reserve the infrastructure resources up to track G1. With deadlock avoidance, the elimination of circular wait doesn't have to be guaranteed. If train T3 enters track G1, train T4 may also enter G2 at the same time to produce a circular wait. The deadlock will be further avoided through applying the principle of deadlock avoidance on train T4. However, with deadlock prevention, the whole path of train T3 should be blocked, in order to completely prevent from circular wait. It will unnecessarily hold train T to cross through crossing C.

Deadlock avoidance provides a flexible way to resolve deadlocks with a high efficiency. However, the complex interaction among trains should also be taken into consideration. The computational efforts for deadlock avoidance are higher than those of deadlock prevention.

The issue of false-positive situations in resolving deadlocks should be addressed. A false-positive situation will lead to unnecessary waiting time due to the overly-strict rules for deadlock prevention and deadlock avoidance. The detailed discussion of false-positive situations is given in Section 2.2.

Since the 1980s, the issue of deadlocks in transportation systems has been paid attention by operations research experts. In Petersen and Taylor (1983), an algorithm to examine the meetability of opposing train fleets was developed, which can identify deadlocks for networks with only single tracks and loops. However, it may frequently lead to unnecessary waiting times since the trains, which are not evaluated as meetable fleets through the algorithm, will not sufficiently lead to deadlocks.

In Mills and Pudney (2003), the principle of job shop scheduling was employed through the labelling algorithm. By labelling the train sequences on a single line, a feasible schedule of train runs can be derived by the vector-based algorithm. The algorithm was further developed in Pudney and Wardrop (2008). A Kronecker algebra-based deadlock analysis was developed in Mittermayr et al. (2012). To reduce computational efforts, a lazy implementation is introduced with additional constraints.

The deadlock problem and the computational complexity of deadlock avoidance have been addressed with a simplified approach for deadlock avoidance Lu et al. (2004). With this method, an analysis was carried out of the free path from the current position of a train to its destination.

The algorithms discussed above are based on pure mathematic models without being integrated with railway signalling and control systems. These pure mathematic models don't fit the logic for requesting, allocating and releasing railway infrastructure resources exactly. Most of the models are only suitable for typical layouts with only single lines and crossing loops, and not applicable for a complex and general network structure. Additional assumptions and simplifications of infrastructure modelling will lead to biased results that are not practical for railway operations. In Fu and Dessouky (2017), the constraints for a deadlock-free situation were modelled in a mathematical model to program headway control and running dynamics. However, the approach to resolve deadlocks was not elaborated in detail.

In Pachl (1993), the movement consequence analysis (MCA) was developed to avoid circular wait through analysing the events of occupancy. The MCA can avoid deadlocks through the implementation of very strict rules. However, false-positive situations may take place, since it is difficult to decide how far in advance the train route should be evaluated. The dynamic route reservation (DRR) was further developed in Pachl (2011). The exact logic of railway operations and simulation is built within the algorithm through a route reservation model. Six rules are applied to avoid deadlocks with enforced train sequences defined by the stacked reservation model. The algorithm is under implementation in the simulation software RailSys (Pachl, 2011).

In the fields of train dispatching and rescheduling, deadlock problems should be considered in order to ensure the feasibility of the derived dispatching solution. A survey of rescheduling methods was provided in Fang et al. (2015). The approach of the Alternative Graph (AG) model was developed in D'Ariano et al. (2007a), by which either branch-and-bound D'Ariano et al. (2007b) or heuristic approaches can be used to find an optimal or locally-optimal solution. The feasibility of a solution is determined through the examination of the positive length cycle. A deadlock-free solution can be ensured by selecting one of alternative arcs from each pair that possesses no positive length cycle in its graph. Therefore, infeasible solutions that lead to deadlocks will be discarded. The AG model was also adopted by Mazzarello and Ottaviani, 2007, Corman et al., 2014a, and Dollevoet et al., 2014. In Corman et al., 2014b, the approach to examine local and global feasibility was elaborated with constraints at borders. In Martin (1995), the deadlock problem is solved with Mixed Integer Programming (MIP) with the constraint that the waiting time of a train should not exceed a given time period (e.g. 24 h). A heuristic method for Conflict Detection and Resolution (CDR) with neighbourhood search was developed in Samà et al. (2017).

A common problem in the resolution of deadlocks with the approach of Operations Research (OR) for rescheduling is the high computational complexity required, which results in NP-Hard problems. For example, a low quality of solutions for a non-deadlock-free network was reported in Samà et al. (2017). In general, the algorithm to fully avoid deadlocks without false-positive situations (see Section 2.2) is proven to be NP-Hard. However, the computational complexity of deadlock avoidance algorithms with limited efficiency can be controlled (Lu et al., 2004). For example, the Banker's algorithm has been proven with polynomial complexity in Belik (1987).

In Cui, 2010, Martin and Cui, 2011, an algorithm based on the Banker's algorithm for deadlock avoidance in railway simulation was developed. Its usability and system performance have been verified in a software tool PULRAN. However, false-positive situations are not resolved efficiently. In this paper, a method of searching for feasible resources to reduce false-positive situations is addressed, in order to reach a high level of efficiency of railway simulation in a large complex network.

In Chapter 2, the Banker's algorithm and false-positive situations are introduced. The principle and the detailed design of the method are described in Chapter 3. Several case studies are analysed in Chapter 4. Finally, the conclusions and the further development are outlined in Chapter 5.

Section snippets

Deadlock avoidance with the Banker's algorithm for railway simulation

Originally, the Banker's algorithm was developed by Dijkstra in the 1980s to resolve deadlocks for computer systems (Dijkstra, 1982). Within it, a request for resources can only be granted if all tasks can be accomplished in a safe state after the requested resources are granted. A safe state is identified through analysing the maximum required resources, the currently available resources and the currently occupied resources for all involved requesters (in railway simulation, a train represents

Reduce false-positive situations with deadlock prevention

As described in Section 2.2, a request that passes a deadlock-free test with the Banker's algorithm can ensure a deadlock free situation. If a request of infrastructure resources fails the deadlock-free test, the occupancy situation should be further examined, in order to reduce any unnecessary waiting time due to false-positive situations.

The false-positive situations can be reduced by determining whether a possible transition to a safe state along the entire train run exists or not. With the

Case studies

The algorithm has been implemented in the simulation software DoSim. The software DoSim is an internal simulation software for railway planning and operations, developed by the author in recent years. A real railway network is used for the case studies, consisting of 129 stations, including a large terminus station, and 2388 train runs scheduled on 29.10.2011 (Thursday). The same example has also been tested with other simulation software, by which the simulation is not able to be accomplished

Conclusions

In this paper, a method to reduce false-positive situations for resolving deadlocks in railway simulation is developed and implemented. Integrated with the Banker's algorithm, the method described within this work has the potential to reduce false-positive situations based on the principle of deadlock prevention. Since only a limited length of the network is investigated, from the current position of the tested train to the tested feasible resources, the described method can be implemented with

Acknowledgement

The text and the English have been proven and improved by Mr. Syed Murtaza Hasan.

References (24)

  • T. Dollevoet et al.

    An iterative optimization framework for delay management and train scheduling

    Flexible Serv. Manuf. J.

    (2014)
  • A. D'Ariano et al.

    Conflict resolution and train speed coordination for solving realtime timetable perturbations

    IEEE Trans. Intelligent Transp. Syst.

    (2007)
  • Cited by (6)

    View full text