Modification of Dijkstra’s Algorithm for Best Alternative Routes
摘要
Dijkstra’s algorithm (DA) is classified as a basic strategy for searching minimal routes from one point to another and found useful in several applications, such as in network routing protocols, setting of irrigation lines, and road transportation networks. This algorithm minimizes the time and distance covered in a mission-critical venture such as a road and fire accident rescue mission. However, the shortest-path-finding technique, as proposed by Dijkstra, may take the longest due to several constraints, such as queues formed from roadworks, bandits, kidnapping, or accidents, thereby making the shortest path inaccessible. This study aimed to develop a Modified Dijkstra Algorithm (MDA) for finding alternative routes moving from location A to another location B when the shortest route is inaccessible. The objectives of the study were to design a variant of Conventional Dijkstra's Algorithm (CDA); implement and evaluate its performance. The study used a 40-node graph with varying weights and arbitrary source nodes with designated destination nodes. Both CDA and MDA were implemented in a Python environment. The probabilities of the existence of alternative routes to the shortest path were derived using a random number generator. The comparative evaluation of both algorithms was carried out and the results were depicted using tables, graphs, histograms, and ogives. The average distance covered, number of routes, and probability cost was used as lead indicator for evaluation performance. The findings deduced that the MDA model provided alternative routes better than the CDA, especially when the minimal route is impassable, and proffered a better means of navigation whenever the shortest path is under constraints for safety and accessibility. This study recommends Modified Dijkstra’s Algorithm model to be used in Courier and logistic services, transportation systems, and as well as in engineering companies.