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

Authors

Keywords:

Genetic Algorithm, JavaScript Optimization, Route Planning, Client-Side Computing, Healthcare Logistics

Abstract

Efficient route optimization is crucial in healthcare and logistics, where real-time decision-making can significantly influence service delivery and operational efficiency. This study proposes a lightweight genetic algorithm (GA) implemented entirely in native JavaScript and executed within the browser, offering a novel, client-side solution to the Traveling Salesman Problem (TSP). The algorithm employs tournament selection, two-point ordered crossover, and swap mutation to evolve optimal routes across 200 generations. Evaluated on a synthetic dataset of 11 cities, the GA achieved near-optimal results with an average deviation of 4.28% from the known optimum and an average execution time of 1.26 seconds. Convergence was consistently observed around generation 138. Unlike conventional implementations dependent on server-side processing or external libraries, this browser-native approach demonstrates the feasibility of real-time optimization in decentralized and resource-limited environments. The findings establish JavaScript’s capability beyond user interface scripting and highlight its potential for delivering intelligent, portable, and scalable routing tools. This work contributes to the advancement of browser-based evolutionary computing and provides a practical foundation for web-integrated applications in healthcare logistics, mobile service deployment, and last-mile delivery.

Author Biography

  • Farid Fitriyadi, Universitas Sahid Surakarta

    Department of Informatics, 

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

Downloads

Published

2026-12-30

Issue

Section

Articles

How to Cite

A JavaScript-Based Genetic Algorithm for Real-Time Route Optimization: Toward Lightweight Web Integration in Healthcare and Logistics. (2026). Machine Learning and Convergence Science, 1(3), 1-10. https://maleo-journal.org/index.php/mlcs/article/view/2