Genetic Algorithm Optimization of Sales Routes with Time and Workload Objectives
Abstract
1. Introduction
2. Clustering
2.1. Fuzzy C-Means
2.2. Clustering Geographic Coordinates
3. Periodic Vehicle Routing Problem with Time Windows
3.1. Definition of the Problem
3.2. Optimization Methods to Solve the PVRPTWs
3.2.1. State of the Art
3.2.2. Genetic Algorithms
4. Routing Optimization Model
4.1. Hybrid Multi-Objective Genetic Algorithm for Diverse Salesperson and Client Profiles
4.2. Mathematical Modeling of the Problem
- —Set of customers;
- —Set of depots (start and end);
- —Full set of nodes (customers and depot);
- —Set of customers visited monthly, with six in-person visits;
- —Set of customers visited four times a year, with two being in person;
- —Set of customers visited two times a year, with one being in person;
- —Set of planning days.
- —Travel time between nodes i and j;
- —Time window within which service at node i is permitted;
- H—Salesperson’s working hours per day;
- —Earliest allowable start time for a visit;
- —Visit duration at customer i;
- —A sufficiently large constant used for constraint linearization via the big-M method [34].
- —Binary variable: A value of 1 if, on day k, the salesperson visits customer j immediately after visiting customer i; otherwise, the value is 0.
- —binary variable: A value of 1 if the salesperson visits customer i on day k; otherwise, the value is 0.
- —Specifies the start of service at customer i on day
4.3. Model Implementation for Short- and Mid-Distance Salespeople
4.3.1. Solution Representation
4.3.2. Genetic Algorithm Design
Initialization
Selection of Parents
Crossover and Mutation
Constraint Handling
Island Model Implementation
Selection of the Best Solution (Individual)
Handling Model Reruns
4.4. Model Implementation for Long-Distance Salespeople
4.4.1. Geographical Clustering of Clients
4.4.2. Solution (or Individual) Representation
4.4.3. Genetic Algorithm Design
Initialization
Mutation
Constraint Handling–Repair Function
4.5. Hyperparameter Tuning
5. Results
5.1. Analyses of the Time Matrices
5.2. Results for the Short-Distance Salesperson
5.3. Results for the Mid-Distance Salesperson
5.4. Results for the Long-Distance Salesperson
6. Discussion
6.1. Solution Evaluation and Performance
6.2. Model Advantages and Limitations
7. Conclusions
- A MOGA was developed to balance total travel time with weekly workload distribution, offering flexibility for various business priorities;
- Scalability was demonstrated by applying the model to three representative salesperson profiles: short-, medium-, and long-distance;
- For long-distance scenarios, the combination of MDS clustering and fuzzy logic effectively grouped clients, leading to improved route quality;
- The model consistently produced geographically efficient routes and outperformed the NN heuristic baseline, reducing total travel time by up to 69%, by globally optimizing visit sequences rather than relying on step-by-step proximity, which often leads to suboptimal detours;
- The approach is practical for long-term use and easily adapts to updated client data or operational constraints;
- Although the model assumes static conditions and lacks benchmarking against other metaheuristics, performance proxies validate its effectiveness.
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
GA | Genetic Algorithm |
MDS | Multidimensional Scaling |
MOGA | Multi-Objective Genetic Algorithm |
NN | Nearest Neighbor |
NSGA-II | Non-dominated Sorting Genetic Algorithm II |
PVRPTWs | Periodic Vehicle Routing Problem with Time Windows |
VRP | Vehicle Routing Problem |
SCAMOF | Scaling by MAjorizing a COmplicated Function |
Appendix A
References
- Santos, M.J.; Jorge, D.; Bonomi, V.; Ramos, T.; Póvoa, A. Enhancing logistics through a vehicle routing problem with deliveries, pickups, and backhauls. Int. Trans. Oper. Res. 2025, 33, 13577. [Google Scholar] [CrossRef]
- Konstantakopoulos, G.D.; Gayialis, S.P.; Kechagias, E.P. Vehicle routing problem and related algorithms for logistics distribution: A literature review and classification. Oper. Res. 2022, 22, 2033–2062. [Google Scholar] [CrossRef]
- Yu, B.; Yang, Z.Z. An ant colony optimization model: The period vehicle routing problem with time windows. Transp. Res. Part E Logist. Transp. Rev. 2011, 47, 166–181. [Google Scholar] [CrossRef]
- McKinney, W. Data structures for statistical computing in Python. SciPy 2010, 445, 51–56. [Google Scholar]
- Hunter, J.D. Matplotlib: A 2D graphics environment. Comput. Sci. Eng. 2007, 9, 90–95. [Google Scholar] [CrossRef]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- Fortin, F.A.; De Rainville, F.M.; Gardner, M.A.G.; Parizeau, M.; Gagné, C. DEAP: Evolutionary algorithms made easy. J. Mach. Learn. Res. 2012, 13, 2171–2175. [Google Scholar]
- Mirzaei, K.; Arashpour, M.; Asadi, E.; Masoumi, H.; Bai, Y.; Behnood, A. 3D point cloud data processing with machine learning for construction and infrastructure applications: A comprehensive review. Adv. Eng. Inform. 2022, 51, 101501. [Google Scholar] [CrossRef]
- Bezdek, J.C. Pattern Recognition with Fuzzy Objective Function Algorithms; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
- Bora, D.J.; Gupta, D.A.K. A comparative study between fuzzy clustering algorithm and hard clustering algorithm. arXiv 2014, arXiv:1404.6059. [Google Scholar]
- Deng, C.; Gao, J.; Lu, K.; Luo, F.; Sun, H.; Xin, C. Neuc-MDS: Non-Euclidean multidimensional scaling through bilinear forms. Adv. Neural Inf. Process. Syst. 2024, 37, 121539. [Google Scholar]
- Marín Díaz, G.; Gómez Medina, R.; Aijón Jiménez, J.A. Integrating Fuzzy C-Means Clustering and Explainable AI for Robust Galaxy Classification. Mathematics 2024, 12, 2797. [Google Scholar] [CrossRef]
- Sharmila, S.; Sabarish, B.A. Analysis of distance measures in spatial trajectory data clustering. IOP Conf. Ser. Mater. Sci. Eng. 2021, 1085, 012021. [Google Scholar] [CrossRef]
- Mead, A. Review of the development of multidimensional scaling methods. J. R. Stat. Soc. Ser. D (Stat.) 1992, 41, 27. [Google Scholar] [CrossRef]
- Chopde, N.R.; Nichat, M. Landmark based shortest path detection by using A* and Haversine formula. Int. J. Innov. Res. Comput. Commun. Eng. 2013, 1, 298–302. [Google Scholar]
- Kruskal, J.B. Nonmetric multidimensional scaling: A numerical method. Psychometrika 1964, 29, 115–129. [Google Scholar] [CrossRef]
- Baldoquin, M.G.; Martinez, J.A.; Díaz-Ramírez, J. A unified model framework for the multi-attribute consistent periodic vehicle routing problem. PLoS ONE 2020, 15, e0237014. [Google Scholar] [CrossRef]
- Pirkwieser, S.; Raidl, G.R. Multiple variable neighborhood search enriched with ILP techniques for the periodic vehicle routing problem with time windows. In International Workshop on Hybrid Metaheuristics; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
- Rothenbächer, A.K. Branch-and-price-and-cut for the periodic vehicle routing problem with flexible schedule structures. Transp. Sci. 2019, 53, 850–866. [Google Scholar] [CrossRef]
- Gendreau, M.; Iori, M.; Laporte, G.; Martello, S. A Tabu search heuristic for the vehicle routing problem with two-dimensional loading constraints. Networks: Int. J. 2008, 51, 4–18. [Google Scholar] [CrossRef]
- Cattani, S. Time Agitation Heuristic A New Constructive Heuristic for the VRPTW. Available online: https://bdta.abcd.usp.br/directbitstream/75d4c958-9fb0-4df8-926a-2998a867f0e4/SimoneCattani.pdf (accessed on 3 October 2024).
- Ombuki, B.; Ross, B.J.; Hanshar, F. Multi-objective genetic algorithms for vehicle routing problem with time windows. Appl. Intell. 2006, 24, 17–30. [Google Scholar] [CrossRef]
- Luke, S. Essentials of Metaheuristics; Publisher Lulu: Research Triangle, NC, USA, 2013; Available online: http://cs.gmu.edu/~sean/book/metaheuristics/ (accessed on 4 October 2024).
- Cordeau, J.F.; Laporte, G.; Mercier, A. A unified tabu search heuristic for vehicle routing problems with time windows. J. Oper. Res. Soc. 2001, 52, 928–936. [Google Scholar] [CrossRef]
- Kirkpatrick, S.; Gelatt, C.D., Jr.; Vecchi, M.P. Optimization by simulated annealing. Science 1983, 220, 671–680. [Google Scholar] [CrossRef]
- Aydemir, E.; Karagul, K. Solving a periodic capacitated vehicle routing problem using simulated annealing algorithm for a manufacturing company. Braz. J. Oper. Prod. Manag. 2020, 17, 1–13. [Google Scholar] [CrossRef]
- Lin, S.W.; Ying, K.C.; Lee, Z.J.; Chen, H.S. Vehicle routing problems with time windows using simulated annealing. In Proceedings of the 2006 IEEE International Conference on Systems, Man and Cybernetics, Taipei, Taiwan, 8–11 October 2006; IEEE: Piscataway, NJ, USA, 2006; Volume 1, pp. 645–650. [Google Scholar]
- Berger, J.; Salois, M.; Begin, R. A hybrid genetic algorithm for the vehicle routing problem with time windows. In Advances in Artificial Intelligence: 12th Biennial Conference of the Canadian Society for Computational Studies of Intelligence, AI’98 Vancouver, BC, Canada, June 18–20, 1998; Proceedings 12; Springer: Berlin/Heidelberg, Germany, 1998; pp. 114–127. [Google Scholar]
- Nguyen, P.K.; Crainic, T.G.; Toulouse, M. A hybrid generational genetic algorithm for the periodic vehicle routing problem with time windows. J. Heuristics 2014, 20, 383–416. [Google Scholar] [CrossRef]
- Back, T. Evolutionary Algorithms in Theory and Practice: Evolution Strategies, Evolutionary Programming, Genetic Algorithms; Oxford University Press: Oxford, UK, 1996. [Google Scholar]
- Katoch, S.; Chauhan, S.S.; Kumar, V. A review on genetic algorithm: Past, present, and future. Multimed. Tools Appl. 2021, 80, 8091–8126. [Google Scholar] [CrossRef]
- Castro, C.F.; António, C.C.; Sousa, L.C. Multi-Objective Optimisation of Hot Forging Processes using a Genetic Algorithm. In Proceedings of the Tenth International Conference on Computational Structures Technology, Valencia, Spain, 14–17 September 2010. [Google Scholar]
- Deb, K.; Pratap, A.; Agarwal, S.; Meyarivan, T.A.M.T. A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Trans. Evol. Comput. 2002, 6, 182–197. [Google Scholar] [CrossRef]
- Conforti, M.; Cornuéjols, G.; Zambelli, G. Integer programming models. In Integer Programming; Springer International Publishing: Cham, Switzerland, 2014; pp. 45–84. [Google Scholar]
- Blum, C. Ant colony optimization: Introduction and recent trends. Phys. Life Rev. 2005, 2, 353–373. [Google Scholar] [CrossRef]
- Prins, C. A simple and effective evolutionary algorithm for the vehicle routing problem. Comput. Oper. Res. 2004, 31, 1985–2002. [Google Scholar] [CrossRef]
- Vidal, T.; Crainic, T.G.; Gendreau, M.; Prins, C. A hybrid genetic algorithm with adaptive diversity management for a large class of vehicle routing problems with time-windows. Comput. Oper. Res. 2013, 40, 475–489. [Google Scholar] [CrossRef]
- D’Agostino, D.; Minelli, F.; Minichiello, F. New genetic algorithm-based workflow for multi-objective optimization of Net Zero Energy Buildings integrating robustness assessment. Energy Build. 2023, 284, 112841. [Google Scholar] [CrossRef]
Symbol | Description |
---|---|
Set of customers | |
Set of depots (start and end) | |
Set of all nodes (customers and depots) | |
Customers with monthly visits (six in person/year) | |
Customers with 4 yearly visits (two in person) | |
Customers with 2 yearly visits (one in person) | |
Set of planning days | |
Travel time between nodes i and j | |
= [09:00, 16:00] h | Time window, during which service at node i is allowed |
h | Daily working hours of the salesperson |
9 h | Earliest allowable start time |
min | Service duration at customer i |
Large constant used for constraint linearization | |
Binary: A value of 1 if, on day k, j is visited after i; otherwise, the value was 0 | |
blue | Binary: A value of 1 if customer i is visited on day k; otherwise, the value was 0 |
Start time of service at customer i on day k | |
Genetic Algorithm Parameters | |
Population size | 50 individuals per island |
Crossover rate | 100% (always applied) |
Mutation rate | 100% (especially useful in early generations) |
Local refinement | 2-opt (short/mid-distance) or simulated annealing (long-distance) used in mutation |
Number of generations | 50 (short-distance), 100 (mid/long-distance) |
Convergence behavior | No significant gain beyond 100 generations |
Salesperson Type | Method | Total Travel Time (min) | Reduction (%) |
---|---|---|---|
Short-Distance | NN | 49,977 | 69% |
GA | 15,286 | ||
Mid-Distance | NN | 64,270 | 45% |
GA | 35,637 | ||
Long-Distance | NN | 65,369 | 55% |
GA | 29,105 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Costa, F.; Brito, M.; Louro, P.; Gama, S. Genetic Algorithm Optimization of Sales Routes with Time and Workload Objectives. AppliedMath 2025, 5, 103. https://doi.org/10.3390/appliedmath5030103
Costa F, Brito M, Louro P, Gama S. Genetic Algorithm Optimization of Sales Routes with Time and Workload Objectives. AppliedMath. 2025; 5(3):103. https://doi.org/10.3390/appliedmath5030103
Chicago/Turabian StyleCosta, Filipa, Margarida Brito, Pedro Louro, and Sílvio Gama. 2025. "Genetic Algorithm Optimization of Sales Routes with Time and Workload Objectives" AppliedMath 5, no. 3: 103. https://doi.org/10.3390/appliedmath5030103
APA StyleCosta, F., Brito, M., Louro, P., & Gama, S. (2025). Genetic Algorithm Optimization of Sales Routes with Time and Workload Objectives. AppliedMath, 5(3), 103. https://doi.org/10.3390/appliedmath5030103