A JavaScript-Based Genetic Algorithm for Real-Time Route Optimization: Toward Lightweight Web Integration in Healthcare and Logistics

Farid Fitriyadi(1*), Muhammad Daffa Arzeta N(2), Farkhod Meliev(3)


(1) Informatics, Faculty of Science, Technology & Health, Universitas Sahid Surakarta, Indonesia
(2) Informatics, Faculty of Science, Technology & Health, Universitas Sahid Surakarta, Indonesia
(3) Research Institute for the Development of Digital Technologies and Artificial Intelligence, Tashkent, Uzbekistan
(*) Corresponding Author

Abstract


Efficient route optimization is essential in healthcare and logistics systems, where real-time decision-making significantly affects operational effectiveness. This paper introduces a lightweight implementation of a genetic algorithm (GA) in JavaScript, designed to solve the shortest route problem as a variant of the Traveling Salesman Problem (TSP). The algorithm operates entirely in the browser console, demonstrating the potential of client-side computation for fast, portable optimization. The GA framework integrates tournament selection, two-point ordered crossover, and swap mutation to evolve route solutions over 200 generations. Tested on a synthetic 11-city dataset, the algorithm achieved near-optimal performance with an average deviation of 4.28% from the known optimum and an average runtime of 1.26 seconds. Convergence occurred around generation 138 across five independent runs, indicating stable and consistent behavior despite stochastic initialization. While no graphical user interface was developed in this study, the use of native JavaScript allows future integration with interactive web applications and mobile dashboards. Comparative references suggest the algorithm performs competitively with existing metaheuristics under similar problem sizes. These findings highlight the feasibility of browser-based optimization as a foundation for accessible, real-time routing tools in decentralized healthcare and transport settings.


Keywords


Genetic Algorithm; JavaScript-Based Optimization; Route Planning in Smart Logistics; Lightweight Client-Side Computing

Full Text:

PDF

References


Akram, M., & Habib, A. (2023). Hybridizing simulated annealing and genetic algorithms with Pythagorean fuzzy uncertainty for traveling salesman problem optimization. Journal of Applied Mathematics and Computing, 69(6), 4451–4497. https://doi.org/10.1007/s12190-023-01935-y

Ferreira, F., Borges, H. S., & Valente, M. T. (2022). On the (un‐)adoption of JavaScript front‐end frameworks. Software: Practice and Experience, 52(4), 947–966. https://doi.org/10.1002/spe.3044

Odeniran, Q., Wimmer, H., & Du, J. (2024). Javascript frameworks—a comparative study between react. js and angular. js. In Interdisciplinary Research in Technology and Management (pp. 319–327). CRC Press.

Patni, S., & Sharma, B. (2024). Genetic Algorithms for Decision Optimization (pp. 29–39). https://doi.org/10.4018/979-8-3693-2073-0.ch003

Prabhath, C. N., Kavitha, M., & Kalita, K. (2023). Efficiency analysis of path-finding algorithms in a 2D grid environment. Journal of Autonomous Intelligence, 7(2). https://doi.org/10.32629/jai.v7i2.1284

Sulemana, A., Donkor, E. A., Forkuo, E. K., & Oduro-Kwarteng, S. (2019). Effect of optimal routing on travel distance, travel time and fuel consumption of waste collection trucks. Management of Environmental Quality: An International Journal, 30(4), 803–832. https://doi.org/10.1108/MEQ-07-2018-0134


Article Metrics

Abstract view : 79 times
PDF - 0 times

DOI: https://doi.org/10.26714/jichi.v6i1.15777

Refbacks

  • There are currently no refbacks.


____________________________________________________________________________
Journal of Intelligent Computing and Health Informatics (JICHI)
ISSN 2715-6923 (print) | 2721-9186 (online)
Organized by
Department of Informatics
Faculty of Engineering
Universitas Muhammadiyah Semarang

W : https://jurnal.unimus.ac.id/index.php/ICHI
E : jichi.informatika@unimus.ac.id, ahmadilham@unimus.ac.id

View My Stats

Creative Commons License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.