genetic algo
genetic algo
https://doi.org/10.22214/ijraset.2023.57631
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue XII Dec 2023- Available at www.ijraset.com
Abstract: This study explores the use of Genetic Algorithms (GAs) to solve the Vehicle Routing Problem (VRP) in logistics. GAs,
inspired by evolutionary principles, prove effective in finding efficient routes for a fleet of vehicles serving customers where the
goal is to find the most efficient routes for a fleet of vehicles serving customers. Inspired by evolution, GAs prove effective in this
task by selecting promising routes, creating new options through crossover and mutation, and evaluating fitness based on
objectives and constraints. The study incorporates techniques like reparation, penalties, and adaptive tuning to boost GA
performance. Real-world applications in transportation and logistics demonstrate substantial cost savings. The key takeaway is
the crucial role of parameter selection, representation design, and fitness function formulation in the success of GAs in solving
VRP. The combination of GAs and VRP resolution shows promise in optimizing logistics, improving efficiency, and enhancing
service quality. In simpler terms, the study explores a smart way, inspired by nature, to figure out the best routes for delivery
trucks, leading to significant cost savings and better service.
Keywords: Genetic Algorithms, Logistics, Vehicle Routing System, Fleet Management, Cost Saving, Optimization, Fitness
Function.
I. INTRODUCTION
In today’s world, goods and services are travelled through long distances and figuring out the best routes for transportation is a
difficult task. The main challenge for the transporters or delivery services is time management and cost efficiency as it directly
affect the overall performance.
In general, the criteria that are needed to be considered to send the product or an item for the delivery services consist of the
number of delivery points, recollection of goods, warehouses, cost, logistics, etc., and the location mainly depends on the latitude
and the longitude of different places.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1405
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue XII Dec 2023- Available at www.ijraset.com
5) Convergence Check: Convergence criteria are checked if the algorithm has reached the termination condition such as the
specified number of generations or achieving a satisfactory solution.
Utilizing Genetic Algorithms (GAs) in Vehicle Routing Problems (VRP) emerges as an effective strategy to address the challenges
of optimizing vehicle routes. GAs offers an optimal solution for planning delivery routes, providing a dynamic and adaptable
approach to route optimization.
Genetic Algorithms operate by identifying and selecting optimal routes from a pool of potential solutions. Through processes such
as crossover and mutation, these algorithms generate new options, exploring different combinations of routes. The fitness of each
route is then evaluated based on predefined objectives and constraints, ensuring that the generated solutions align with the specific
goals and limits set for the VRP.
The varied processes inherent in Genetic Algorithms lead to diverse scenarios, empowering the algorithm to adeptly manage the
intricate logistics associated with the Vehicle Routing Problem (VRP). This flexibility is crucial for tackling the inherent variability
and challenges in practical vehicle routing situations.
By leveraging the capabilities inspired by genetic evolution, Genetic Algorithms emerge as resilient and effective tools for
discovering optimal routes. This, in turn, contributes to improved logistics solutions and heightened operational efficiency.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1406
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue XII Dec 2023- Available at www.ijraset.com
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1407
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue XII Dec 2023- Available at www.ijraset.com
3) Node.js: Node.js is a server-side JavaScript runtime environment that enables developers to build scalable and efficient network
applications. It leverages an event-driven, non-blocking I/O model, allowing for lightweight and high-performance applications.
Node.js is commonly used for real-time web applications, APIs, and server-side scripting.
4) MongoDB: MongoDB is a NoSQL database system designed for managing and storing unstructured or semi-structured data. It
utilizes a document-oriented data model, allowing for flexibility in data storage and retrieval. MongoDB's scalability and ability
to handle diverse data types make it suitable for applications requiring agile and scalable databases.
5) EJS (Embedded JavaScript): EJS is a templating language that facilitates the creation of dynamic web content by embedding
JavaScript code within HTML templates. It simplifies the process of generating HTML pages dynamically by enabling the
inclusion of data from the server side, aiding in creating dynamic and data-driven web applications.
A. Resource Kit:
1) Visual Studio Code
2) Figma (Free version)
V. METHODOLOGY
This study aims to solve the Vehicle Routing Problem (VRP) using a genetic algorithm implemented in JavaScript. The primary
goal is to optimize delivery routes for vehicles, minimizing travel distance while efficiently servicing multiple locations.
Showcases the distribution of programming languages used in Development, where JavaScript accounts for 54.4%, EJS comprises
23.0%, and CSS makes up 22.6% of the total.
The initial phase involves defining the problem scope of optimizing vehicle routes in the Vehicle Routing System. It includes
understanding the requirements, selecting appropriate algorithms, and setting up the groundwork for implementation in JavaScript.
Moreover, the project highlights user interaction and visualization. It allows users to engage with the system, modify locations, and
visually observe optimized routes on a canvas.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1408
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue XII Dec 2023- Available at www.ijraset.com
A. Implementation Overview
The methodology involves distinct components for different functionalities:
1) Route Representation: Random generation of routes incorporating starting depots and fitness calculation based on the covered
distance.
2) Genetic Algorithm (GA) Operations: Management of route populations, selection of superior routes, and application of
crossover and mutation for evolving solutions.
3) Location Representation: Handling individual delivery locations and their visualization on the canvas and Document Object
Model (DOM).
4) User Interface: Providing an interactive interface for user actions related to locations, depot settings, and VRP-solving
initiation.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1409
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue XII Dec 2023- Available at www.ijraset.com
VI. IMPLEMENTATION
The optimization process progresses through the following organized steps:
1) Initialize GeneticAlgorithm class with parameters: pool, depot, crossoverRate, mutationRate, populationSize, generationSize,
elitism.
2) Set mutationRate, crossoverRate, populationSize, generationSize, pool, depot, elitism, currentGeneration, nextGeneration as
class attributes.
3) Define a method go():
a) Invoke createPopulation() method.
b) Invoke rankPopulation() method.
c) Iterate through generationSize:
Output progress percentage.
Invoke createNextGeneration() method.
Invoke rankPopulation() method.
d) Return the currentGeneration.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1410
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue XII Dec 2023- Available at www.ijraset.com
In the illustrated figure 4, each set of coordinates serves as a geographical marker, representing delivery destinations where vehicles
are assigned to transport products or shipments. The adaptability of the solution is evident in its ability to dynamically accommodate
additional locations. Users can effortlessly input the latitude and longitude values of new destinations into the system through a
user-friendly interface. This streamlined process allows for the seamless addition of fresh delivery destinations to the existing list.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1411
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue XII Dec 2023- Available at www.ijraset.com
In this figure 5, a depot serves as the starting point, and there are multiple locations designated for shipments to be delivered. The
objective is to streamline the delivery process by determining the most efficient routes for each vehicle to transport these shipments.
By entering the number of available vehicles into the system, the goal is to forecast the optimal path for transporting these
shipments. This optimization ensures that each vehicle follows the shortest route possible, guaranteeing efficient and timely
delivery of goods.
Figure 6, visually presents routes for multiple vehicles, with each route identified by the starting depot point and corresponding
coordinates or locations the trucks are directed to visit. This graphical representation enables users to intuitively generate optimized
routes for up to 20 vehicles, elevating the user experience and facilitating efficient route planning in logistics operations.
VIII. APPLICATION
Vehicle Routing Problem (VRP) using Genetic Algorithms (GAs) extend across various industries, offering innovative solutions to
complex logistics challenges. In the realm of transportation and delivery services, GAs applied to VRP can optimize routes for fleets
of vehicles, leading to substantial cost savings, reduced fuel consumption, and improved delivery efficiency. In the context of e-
commerce and online retail, GA-driven VRP applications can enhance last-mile delivery, ensuring timely and cost-effective
shipment of goods.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1412
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue XII Dec 2023- Available at www.ijraset.com
Additionally, in the field of waste collection and management, GAs can streamline garbage collection routes, minimizing
environmental impact and operational costs. The adaptability of GAs makes them invaluable in scenarios involving dynamic
scheduling, such as in healthcare for patient transportation or emergency services for efficient response routes. Overall, the
applications of VRP using GAs have the potential to transform various sectors by providing intelligent and optimized solutions to
intricate routing problems.
IX. CONCLUSION
In summary, the fundamental aim is to revolutionize the logistics landscape by utilizing Genetic algorithms (GAs) to address the
complexities of Vehicle routing problems (VRP). The primary focus is to provide a sophisticated yet accessible solution for
optimizing the delivery routes, that aims to reshape the complexities of serving customers efficiently.
The initiative in research directly benefits logistics stakeholders by introducing a powerful tool that aims to minimize transportation
costs, reduce environmental impact, and enhance overall operational efficiency. By deploying the principles of genetic algorithm, it
streamlines the route planning process and offers a comprehensive and dynamic approach to find the most optimal path for delivery
of vehicles.
Genetic Algorithms (GAs) emerge as a fitting meta-heuristic algorithm for addressing the challenges in vehicle routing problems.
Alongside Tabu Search and Ant Colony Optimization, GAs are considered suitable for solving logistics operations. The application
of these meta-heuristic algorithms is showcased to derive approximate and near-optimal solutions, leveraging the existing routing
plan. Within constrained time frames, these algorithms excel in generating revised routing plans, contributing to the efficient
resolution of vehicle routing problems.
Furthermore, beyond the immediate benefit to individual businesses, it aims to contribute to the broader effectiveness of logistics on
a macro scale. By facilitating smarter and more efficient routes, it seeks to drive increased cost-effectiveness, reduced fuel
consumption and improved quality of end customers.
X. FUTURE SCOPE
The scope for the application of Genetic Algorithms (GAs) in solving the Vehicle Routing Problem (VRP) is promising, with
numerous avenues for advancement and refinement. As technology continues to evolve, integrating machine learning techniques
and artificial intelligence with GAs could enhance the adaptability and decision-making capabilities of routing algorithms. Real-
time data integration, including traffic updates, weather conditions, and dynamic customer demands, could further optimize route
planning, making it more responsive to changing scenarios. Additionally, the scalability of GA-driven VRP solutions could be
explored to handle larger fleets and more extensive logistical networks. Collaborative efforts with smart city initiatives and
advancements in Internet of Things (IoT) technologies may open new frontiers for intelligent and interconnected routing systems.
Moreover, there is potential for synergies with autonomous vehicle technologies, paving the way for self-optimizing and self-
adaptive routing solutions. The future holds exciting prospects for the continued evolution and refinement of GA applications in
VRP, contributing to more efficient, sustainable, and technologically advanced logistics solutions.
XI. ACKNOWLEDGEMENT
We thank Prof. Jyoti Parashar* our project's mentor, Dr. Akhilesh Das Gupta Institute of Professional Studies. Whose leadership
and support have served as the compass guiding us through the challenging terrain of this research. Her valuable feedback and
contribution remarkably enhanced our manuscript.
REFERENCES
[1] Laporte, G., Louveaux, F., & Van Hamme, L. (2002). An Integer L-Shaped Algorithm for the Capacitated Vehicle Routing Problem with Stochastic Demands.
Operations Research, 50(3), 415–423. https://doi.org/10.1287/opre.50.3.415.7751
[2] Saxena, Rahul & Jain, Monika & Malhotra, Karan & Vasa, Karan. (2020). An Optimized OpenMP-Based Genetic Algorithm Solution to Vehicle Routing
Problem. 10.1007/978-981-13-9680-9_20.
[3] Abbasi, M., Rafiee, M., Khosravi, M.R. et al. An efficient parallel genetic algorithm solution for vehicle routing problem in cloud implementation of the
intelligent transportation systems. J Cloud Comp 9, 6 (2020). https://doi.org/10.1186/s13677-020-0157-4
[4] Gomes, D.E.; Iglésias, M.I.D.; Proença, A.P.; Lima, T.M.; Gaspar, P.D. Applying a Genetic Algorithm to a m-TSP: Case Study of a Decision Support System
for Optimizing a Beverage Logistics Vehicles Routing Problem. Electronics 2021, 10, 2298. https://doi.org/10.3390/electronics10182298
[5] Dutta, Joydeep & Barma, Partha & Mukherjee, Anupam & Kar, Samarjit & De, Tanmay. (2022). A hybrid multi-objective evolutionary algorithm for open
vehicle routing problem through cluster primary-route secondary approach. International Journal of Management Science and Engineering Management. 17. 1-
15. 10.1080/17509653.2021.2000901.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1413
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue XII Dec 2023- Available at www.ijraset.com
[6] Bavar, Farhad & Sabzehparavr, Majid & Ahmadi Rad, Mona. (2021). Routing cross-docking depots, considering the time windows and pricing routes (case
study: container transportation of Chabahar port). Nexo Revista Científica. 33. 409-422. 10.5377/nexo.v33i02.10780.
[7] Kadar, Abdul & Masum, A.K.M. & Faruque, Md & Shahjalal, Mohammad & Iqbal, Md & Sarker, Iqbal. (2011). Solving the Vehicle Routing Problem using
Genetic Algorithm. International Journal of Advanced Computer Science and Applications. 2. 10.14569/IJACSA.2011.020719.
[8] V. Praveen, Dr.P. Keerthika, G. Sivapriya, A. Sarankumar, Boddu Bhasker, Vehicle Routing Optimization Problem: A Study on Capacitated Vehicle Routing
Problem, Materials Today: Proceedings, Volume 64, Part 1, 2022, Pages 670-674, ISSN 2214-7853, https://doi.org/10.1016/j.matpr.2022.05.185.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1414