INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025


Page 4858 www.rsisinternational.org





A Comparative Analysis of Heuristic and Dynamic Algorithms for
Route Optimization in Johor’s Delivery Hubs

Kan Ho Li, Suliadi Firdaus Bin Sufahani*

Department of Mathematics and Statistics, Faculty of Applied Science and Technology, Universiti Tun
Hussein Onn Malaysia, Pagoh Campus, 84600 Pagoh, Malaysia.

*Corresponding Author

DOI: https://dx.doi.org/10.47772/IJRISS.2025.910000401

Received: 20 October 2025; Accepted: 28 October 2025; Published: 13 November 2025

ABSTRACT

Delivery route optimization is crucial for enhancing logistics efficiency and reducing operational costs in the e-
commerce industry. During the COVID-19 pandemic, Movement Control Order (MCO) in Malaysia led to a
surge in online shopping as physical stores were closed. This study focuses on optimizing delivery routes
between J&T hubs in Johor using three algorithms: Dynamic Programming (DP), Genetic Algorithm (GA) and
Simulated Annealing (SA). The objectives include employing these algorithms to determine optimal routes,
considering both distance and time and comparing GA and SA against DP as a benchmark. Data from 18
delivery hubs were analyzed using Python, with distance and travel times from Google Maps. All three
optimazation methods were successfully applied to determine the optimal delivery route. The results
demonstrated that DP consistently provides optimal solutions and emerged as the most effective method. The
ideal departure time for both weekdays and weekends was identified as 10 p.m., with 667 minutes for
weekdays and 641 minutes for weekends, respectively.In the comparison between GA and SA, GA
outperformed SA in 8 out of 9 cases. However, at 6 p.m. on a weekend, SA achieved a shorter duration of 720
minutes compared to GA’s 742 minutes. These findings suggest that GA could be effectively adopted by
logistics companies to optimize operations, reduce delivery times and meet the growing demands of e-
commerce. Future applications could involve integrating real-time traffic data to further refine route
optimization in dynamic environments. Additionally, hybrid approaches combining the strengths of DP, GA
and SA could be explored to address complex logistics challenges in various regions, contributing to optimized
delivery systems for congested urban areas, faster deliveries, and reduced the environmental impact.

Keywords: Delivery route, E-commerce industry, Dynamic Programming, Genetic Algorithm, Simulated
Annealing

INTRODUCTION

During the COVID-19 pandemic, Malaysia experienced a shift from physical shopping to online purchasing
due to government-imposed Movement Control Orders (MCO). Courier services became essential for
facilitating logistics for e-commerce platforms, serving both small-scale vendors on platforms like Shopee and
Lazada and large enterprises operating nationally and internationally [1]. Courier services offer a diverse range
of options, including express same-day deliveries for urgent shipments, overnight services guaranteeing
delivery within 24 hours, international logistics handling cross-border tariffs and taxes and standard services
providing reliable, cost-effective solutions for everyday shipping. With features like tracking, door-to-door
delivery and real-time updates, they ensure faster, safer and more reliable than traditional postal services.
Although couriers come at a higher cost, this is justified by their advanced logistics and professionalism [2].

The growth of e-commerce in Malaysia has driven the expansion of the courier industry. Companies such as
Pos Malaysia, J&T Express and DHL has expanded their operations to meet the growing demands for efficient
delivery solutions [3]. Reliability, a key factor in courier services, ensures timely, accurate and damage-free
deliveries, driving customer satisfaction, loyalty and operational efficiencies. In 2021, Malaysia’s e-commerce

Page 4859 www.rsisinternational.org

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025






transactions reached RM 1.09 trillion, a 21.8% increase from the previous year, creating challenges for courier
companies to optimize delivery routes, ensure timely deliveries and meet customer expectations for reliable
service [4].

Numerous studies have examined the impact of COVID-19 on e-commerce, highlighting significant shifts in
consumer behavior during the pandemic. Bhatti et.al (2020) observed an increase in e-commerce frequency in
the early months of the outbreak, driven by the need to minimize physical interactions and comply with safety
protocols [5]. Similarly, Kawasaki et al. (2022) noted that consumers turned to e-commerce primarily to
maintain social distancing [6]. These studies also suggest that the pandemic not only accelerated the adoption
of online shopping but also reshaped shopping habits, with many consumers substituting trips to physical
stores with online purchases. This shift was particularly evident during the initial waves of disease and
lockdown periods, while e-commerce’s role as a critical alternative for accessing goods and services during the
infection.

This study focused on optimizing the delivery routes between hubs in Johor using advanced algorithms such
dynamic programming, genetic algorithms and simulated annealing to identify the most efficient routes based
on distance and time. These findings will provide valuable insights for improving courier service efficiency,
reducing costs and enhancing customer satisfaction, ultimately supporting the growth of Malaysia's e-
commerce industry.

MATERIALS AND METHODS

The data for the study was obtained from two main sources: the official J&T website and Google Maps. The
delivery hub locations within Johor were sourced from the official J&T website. A total of 18 hubs were
considered in the analysis. The distances between the hubs, measured in kilometers, were collected from
Google Maps while the travel times between hubs, measured in minutes, were also collected from Google
Maps. The study considered different traffic conditions during weekdays and weekends at four key time
periods (8 a.m., 1 p.m., 6 p.m., and 10 p.m.).

Table 1 List of 18 delivery hubs in Johor

District Hub Name Hub Node

Pontian Kukup 1

Johor Bahru Nusa Bestari

Pulai Mutiara

Larkin

Bukit Batu

Kangkar Pulai

Nusa Sentral

Pasir Gudang

Ulu Tiram

2

3

4

5

6

7

8

9

Kulai Kulai

Kelapa Sawit

10

11

Muar Parit Jawa 12

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025


Page 4860 www.rsisinternational.org





Pagoh 13

Tangkak Tangkak 14

Batu Pahat Penggaram 15

Mersing Tenggaroh 16

Kluang Taman Emas 17

Kota Tinggi Desaru 18

The analysis was conducted using Python, a versatile programming language well-suited for data analysis and
optimization tasks. The implementation of the algorithms utilized Python’s extensive libraries, such as NumPy,
Pandas, NetworkX and SciPy, to handle the distance matrix, perform computations and evaluate results
systematically. Python’s flexibility and robust ecosystem ensured efficient and execution and accurate
comparisons of the algorithms, providing reliable insights into their effectiveness for solving the Traveling
Salesman Problem (TSP).

Travelling Salesman Problem (TSP)

The Travelling Salesman Problem (TSP) aims to find the shortest route that starts and ends at the same hub
while visiting all other hubs exactly once [5]. The objective is to minimize the total travel distance or time, as
expressed by equation:


(1)

The constraints ensure that each hub is visited exactly once, with one incoming and one outgoing route for
each hub:


(2)


(3)

where

= distance or time between hub i and j,


= binary decision variable indicating whether travel occurs between

hub i and j

This study employs dynamic programming, genetic algorithms, and simulated annealing to solve the TSP. The
problem is asymmetric, meaning the travel distances or times between hubs may differ based on the direction
of travel, accurately reflecting real-world delivery scenarios. This approach ensures comprehensive and
efficient optimization of delivery routes.

Dynamic Programming (DP)

Dynamic Programming (DP) is an effective method for solving the TSP by storing and reusing intermediate
results. Chauhan et al. (2012) introduced a layered network model for TSP, denoted G* = (V*, A*), which
consists of n+1 layers corresponding to tour positions, with the home city acting as both the starting and
ending point [7]. This structure links feasible tours to the shortest paths in the network.

Page 4861 www.rsisinternational.org

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025






The DP approach involves several key steps: selecting an initial city IS, generating a power set of remaining
cities and iterating through combinations. The cost function is initialized with and updated using:


(4)

The minimum cost to return to the starting city is computed as:


(5)

where

= Cost of traveling from city i to city j

= A subset of cities that remain to be visited

= The set of all cities excluding the starting city

The time complexity of this DP solution is approximately , due to the exponential number of subsets.
Overall, this technique efficiently finds optimal solutions for TSP while minimizing redundant calculations
through memorization, making it suitable for problems classified as nondeterministic polynomial time.

Genetic Algorithm (GA)

The genetic algorithm (GA), inspired by the principle of natural selection, is a meta-heuristic technique that
operates using three key processes: selection, crossover and mutation. These processes are guided by
parameters that significantly influence the algorithm’s performance. The selection operator identifies the fittest
individuals based on a fitness function, ensuring that high-quality solutions propagate to the next generation
while the crossover and mutation operators facilitate reproduction and introduce diversity, exploring the
solution space effectively. In the context of transportation logistics, where the goal is to minimize distance and
cost in distribution network, the performance of the GA can be enhanced by adjusting key parameters:
population size, crossover probability and mutation probability [8]. Figure (a) illustrates the flowchart of the
Genetic Algorithm (GA). The process begins with an initial population and utilizes selection, crossover and
mutation to address problems.


Fig. 1 Flowchart of Genetic Algorithm

The population size determines the number of individuals (chromosomes) in each generation, impacting both
diversity and computational efficiency. Various population sizes were tested to identify the optimal size for
route optimization. Crossover probability governs how often the crossover operator is applied, combining

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025


Page 4862 www.rsisinternational.org





genetic material from two parent chromosomes to create offspring. Different crossover probabilities were
experimented with to assess their impact on performance. A one-point crossover was used, where sub-tours
from two parent routes are swapped to generate new solutions. A higher crossover probability promotes the
transmission of advantageous traits but must be balanced to avoid premature convergence.

The mutation probability introduces random changes to a chromosome, maintaining genetic diversity and
preventing early convergence. Mutation probabilities were tested to explore their effect on the algorithm’s
ability to explore the solution space. In the Traveling Salesman Problem, mutations could involve rearranging
cities along a path, helping the GA escape local optima and explore a broader solution space. By adjusting
these parameters, the GA can be fine-tuned to effectively solve complex root optimization problems and
sharing a balance between aspirations and exploitation of the solutions space [9].


Fig. 2 Parent chromosomes (a) 1st parent chromosomes, (b) 2nd parent chromosomes

For instance, the crossover operation in the genetic algorithm (GA) for the TSP involves a single-point
crossover at a designated city, such as city 5. Parent chromosomes are split at this point, with cities from parent
1 copied into cities from parent 2 copied into child 2 up to the crossover point. For the remaining cities, the
nearest-neighbor approach is used to select the next city based on the shortest distance. This ensures that the
offspring inherits optimal traits while improving the solution. This process is applied to both children,
generating complete routes. This modified crossover enhances the algorithm’s ability to explore and exploit the
solution space, improving performance in TSP challenges.

Simulated Annealing (SA)

Simulated Annealing (SA) is a powerful method used to solve complex optimization problems, like TSP. It is
inspired by the annealing process in metallurgy, which reduces defects through controlled cooling [10]. The
algorithm starts with an initial solution and iteratively explores nearby solutions. If a new solution is better, it
replaces the current one; if worse, it may still be accepted based on a probability determined by the
temperature parameter, calculated using:


(6)

where

T = temperature

C = normalization constant

Econf = configuration energy

In Simulated Annealing, the key parameters—temperature (T), normalization constant (C), and configuration
energy (Econf) play a crucial role in balancing exploration and exploitation. The temperature controls the
acceptance of worse solutions, allowing broader exploration at higher values and promoting convergence at
lower values. The normalization constant scales, the temperature and energy values, influencing the probability
of accepting worse solutions. Configuration energy represents the objective function value and determines the
acceptance probability based on the energy difference between solutions. The cooling schedule, typically
exponential, gradually reduces the temperature, ensuring that the algorithm starts with extensive exploration
and eventually focuses on refining the solution. The rationale behind these parameters is essential for

Page 4863 www.rsisinternational.org

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025






optimizing SA’s performance and ensuring reproducibility, as their values and schedules directly impact the
algorithm’s ability to escape local optima and find a global optimum.

As the algorithm progresses, the temperature decreases, reducing the likelihood of accepting worse solutions
[11]. This process allows for a broader search for global optima while gradually refining the solution space,
effectively balancing exploration and exploitation in complex optimization landscapes.

Furthermore, Simulated Annealing permits uphill moves to escape local optima by relying on randomization. It
evaluated neighbors in random order, moving to the first one that improves the solution or satisfied a random
acceptance test based on a temperature parameter. This parameter decreases over time, simulating the
annealing process where higher temperatures allow larger uphill movements and lower temperature reduce
their likelihood. At zero temperature, SA becomes a randomized iterative improvement algorithm that rejects
all uphill moves.

SA has been widely applied to problems like the Traveling Salesman Problem (TSP), demonstrating
effectiveness in large-scale combinatorial optimization. Johnson et al. (1995) highlighted the importance of
temperature schedules and neighborhood definitions [12].

Assumptions and Comparative Analysis of Algorithms

The study operates under the assumption that delivery route data is measured in kilometers for distance and
minutes for time with distance record in decimals. The research employed the DP, GA and SA to develop
models for optimizing the delivery routes between hubs in Johor, utilizing Python for precise and efficient
model development and solution analysis. The model allows users to input data, which is then processed to
generate optimal solutions. DP served as the benchmark for performance evaluations, with GA and SA
compare against it to assess which method yields results closer to DP. The evaluations focused on delivery
distance and time, aiming to highlight the strengths and weaknesses of GA and SA as alternatives to DP in
route optimization.

RESULTS AND DISCUSSION

Preliminary Analysis

In this study, three optimization algorithms DP, GA and SA were employed to establish optimal delivery
routes between J&T hubs in Johor. The primary objective was to assess the effectiveness of these algorithms in
improving delivery route efficiency by minimizing the total distance and time travelled. Dynamic
Programming (DP) provided a solution with a total distance of 696.40 km. The route sequence generated was
Kukup → Nusa Sentral → Nusa Bestari → Larkin → Ulu Tiram → Pasir Gudang → Desaru → Tenggaroh →
Taman Emas → Penggaram → Parit Jawa → Tangkak → Pagoh → Bukit Batu → Kelapa Sawit → Kulai →
Kangkar Pulai → Pulai Mutiara → Kukup. The result is shown in Table 2.

Table 2 Delivery Route Sequence based on Distance Optimized by DP

Node Hub Name Sequence Route Distance (km)

1 Kukup 1 1→ 7 33.6

7 Nusa Sentral 2 7→ 2 8.1

2 Nusa Bestari 3 2→ 4 12.5

4 Larkin 4 4→ 9 14.7

9 Ulu Tiram 5 9→ 8 25.7

8 Pasir Gudang 6 8→ 18 45.6

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025


Page 4864 www.rsisinternational.org





18 Desaru 7 18→ 16 85.9

16 Tenggaroh 8 16→17 73.1

17 Taman Emas 9 17→ 15 89.1

15 Penggaram 10 15→ 12 41.9

12 Parit Jawa 11 12→ 14 37.5

14 Tangkak 12 14→ 13 34.3

13 Pagoh 13 13→ 5 109.0

5 Bukit Batu 14 5→ 11 11.5

11 Kelapa Sawit 15 11→ 10 12.1

10 Kulai 16 10→ 6 14.4

6 Kangkar Pulai 17 6→ 3 8.8

3 Pulai Mutiara 18 3→ 1 38.6

Total Distance travelled (km) 696.40

Table 3 Delivery route sequence based on distance optimized by GA

Node Hub Name Sequence Route Distance (km)

5 Bukit Batu 1 5→13 108

13 Pagoh 2 13→14 34.7

14 Tangkak 3 14→12 38

12 Parit Jawa 4 12→15 41.3

15 Penggaram 5 15→17 89

17 Taman Emas 6 17→16 73.1

16 Tenggaroh 7 16→18 85.8

18 Desaru 8 18→8 45.7

8 Pasir Gudang 9 8→9 24.8

9 Ulu Tiram 10 9→4 18.5

4 Larkin 11 4→2 11.9

2 Nusa Bestari 12 2→7 7.3

7 Nusa Sentral 13 7→1 35.9

1 Kukup 14 1→3 38.5

3 Pulai Mutiara 15 3→6 7.9

Page 4865 www.rsisinternational.org

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025






6 Kangkar Pulai 16 6→10 14.3

10 Kulai 17 10→11 12.2

11 Kelapa Sawit 18 11→5 11.4

Total Distance travelled (km) 698.30

Genetic Algorithm (GA) and Simulated Annealing (SA) also produced viable solutions, with GA yielding a
total distance of 698.30 km and SA resulting in 727.10 km. These results illustrated the practical application of
these three algorithms in solving complex route optimization problems.

By employing these three methods, this study demonstrates their capability to identify efficient delivery routes,
offering valuable insights into optimizing logistics operations. The findings highlight the potential of DP, GA
and SA as effective tools for solving real-world route optimization challenges. Table 2, 3 and 4 summarize the
outcomes of the algorithms and their application in this context.

Table 4 Delivery route sequence based on distance optimized by SA

Node Hub Name Sequence Route Distance (km)

13 Pagoh 1 13 → 14 34.7

14 Tangkak 2 14 → 12 38

12 Parit Jawa 3 12 → 15 41.3

15 Penggaram 4 15 → 1 93.3

1 Kukup 5 1 → 7 33.6

7 Nusa Sentral 6 7 → 2 8.1

2 Nusa Bestari 7 2 → 3 17.4

3 Pulai Mutiara 8 3 → 6 7.9

6 Kangkar Pulai 9 6 → 5 32.9

5 Bukit Batu 10 5 → 11 11.5

11 Kelapa Sawit 11 11 → 10 12.1

10 Kulai 12 10 → 4 29.3

4 Larkin 13 4 → 9 14.7

9 Ulu Tiram 14 9 → 8 25.7

8 Pasir Gudang 15 8 → 18 45.6

18 Desaru 16 18 → 16 85.9

16 Tenggaroh 17 16 → 17 73.1

17 Taman Emas 18 17 → 13 122

Total Distance travelled (km) 727.10

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025


Page 4866 www.rsisinternational.org





Optimization of Delivery Routes: Minimizing Distance and Time

This analysis highlights the effectiveness of three algorithms in logistic optimization, particularly in
determining efficient delivery routes. The study focuses on determining the most efficient algorithm based on
two key factors: minimizing travel distance and accounting for variations in time periods (weekdays and
weekends). By leveraging a distance matrix, the analysis ensures precise calculations of travel distances
between cities, enabling each algorithm to identify optimal routes.

In addition to considering distance, the analysis also evaluates delivery routes over two distinct periods:
weekdays and weekends. This temporal distinction is critical for reflecting variations in traffic patterns,
delivery schedules and customer demand. By incorporating these two periods, DP identifies optimal routes that
account for practical constraints and real-world conditions, ensuring the solutions are not only theoretically
efficient but also operationally viable. The results confirmed the DP's ability to adapt to dynamic scenarios,
providing tailored recommendations that optimize both the distance and time across different periods.

The results generated by DP identified optimal delivery routes based on both distance and time. For the
shortest distance, the optimal route sequence is Kukup → Nusa Sentral → Nusa Bestari → Larkin → Ulu
Tiram → Pasir Gudang → Desaru → Tenggaroh → Taman Emas → Penggaram → Parit Jawa → Tangkak →
Pagoh → Bukit Batu → Kelapa Sawit → Kulai → Kangkar Pulai → Pulai Mutiara, covering a total distance of
696.40 km, as shown in Table 5.

Table 5 Delivery route sequence based on distance travelled optimized by DP

Node Hub Name Sequence Route Distance (km)

1 Kukup 1 1→ 7 33.6

7 Nusa Sentral 2 7→ 2 8.1

2 Nusa Bestari 3 2→ 4 12.5

4 Larkin 4 4→ 9 14.7

9 Ulu Tiram 5 9→ 8 25.7

8 Pasir Gudang 6 8→ 18 45.6

18 Desaru 7 18→ 16 85.9

16 Tenggaroh 8 16→17 73.1

17 Taman Emas 9 17→ 15 89.1

15 Penggaram 10 15→ 12 41.9

12 Parit Jawa 11 12→ 14 37.5

14 Tangkak 12 14→ 13 34.3

13 Pagoh 13 13→ 5 109.0

5 Bukit Batu 14 5→ 11 11.5

11 Kelapa Sawit 15 11→ 10 12.1

10 Kulai 16 10→ 6 14.4

6 Kangkar Pulai 17 6→ 3 8.8

Page 4867 www.rsisinternational.org

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025






3 Pulai Mutiara 18 3→ 1 38.6

Total Distance travelled (km) 696.40

Table 6 Delivery route sequence based on time (10 p.m. Weekdays) using DP

Node Hub Name Sequence Route Distance (km)

1 Kukup 1 1 → 2 39

2 Nusa Bestari 2 2 → 4 16

4 Larkin 3 4 → 9 24

9 Ulu Tiram 4 9 → 8 26

8 Pasir Gudang 5 8 → 18 39

18 Desaru 6 18 → 16 68

16 Tenggaroh 7 16 → 17 62

17 Taman Emas 8 17 → 15 89

15 Penggaram 9 15 → 12 43

12 Parit Jawa 10 12 → 14 46

14 Tangkak 11 14 → 13 27

13 Pagoh 12 13 → 5 67

5 Bukit Batu 13 5 → 11 14

11 Kelapa Sawit 14 11 → 10 17

10 Kulai 15 10 → 6 17

6 Kangkar Pulai 16 6 → 3 16

3 Pulai Mutiara 17 3 → 7 20

7 Nusa Sentral 18 7 → 1 37

Min time Delivery (min) 667


For time optimization during weekdays, the best departure time is 10 p.m., with a total travel time of 667
minutes. The optimal route sequence is Kukup → Nusa Bestari → Larkin → Ulu Tiram → Pasir Gudang →
Desaru → Tenggaroh → Taman Emas → Penggaram → Parit Jawa → Tangkak → Pagoh → Bukit Batu →
Kelapa Sawit → Kulai → Kangkar Pulai → Pulai Mutiara → Nusa Sentral → Kukup. On weekends, the
optimal delivery route also departs at 10 p.m., achieving a total travel time of 641 minutes. The sequence is
Nusa Bestari → Nusa Sentral → Kukup → Pulai Mutiara → Kangkar Pulai → Kulai → Kelapa Sawit → Bukit
Batu → Pagoh → Tangkak → Parit Jawa → Penggaram → Taman Emas → Tenggaroh → Desaru → Pasir
Gudang → Ulu Tiram → Larkin → Nusa Bestari. These results demonstrated the effectiveness of DP in
determining efficient delivery routes tailored to both distance and time constraints. The results are shown in
Table 6 and Table 7, respectively.

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025


Page 4868 www.rsisinternational.org





Table 7 Delivery route sequence based on time (10 p.m. Weekends) using DP

Node Hub Name Sequence Route Distance (km)

2 Nusa Bestari 1 2 → 7 12

7 Nusa Sentral 2 7 → 1 35

1 Kukup 3 1 → 3 46

3 Pulai Mutiara 4 3 → 6 13

6 Kangkar Pulai 5 6 → 10 19

10 Kulai 6 10 → 11 17

11 Kelapa Sawit 7 11 → 5 13

5 Bukit Batu 8 5 → 13 63

13 Pagoh 9 13 → 14 28

14 Tangkak 10 14 → 12 42

12 Parit Jawa 11 12 → 15 41

15 Penggaram 12 15 → 17 87

17 Taman Emas 13 17 → 16 61

16 Tenggaroh 14 16 → 18 65

18 Desaru 15 18 → 8 40

8 Pasir Gudang 16 8 → 9 23

9 Ulu Tiram 17 9 → 4 21

4 Larkin 18 4 → 2 15

Min time Delivery (min) 641

In conclusion, Dynamic Programming (DP) proved to be a superior method for solving Travelling Salesman
Problem (TSP) compared to Genetic Algorithms (GA) and Simulated Annealing (SA). DP consistently
delivers optimal solutions by systematically exploring all possible routes and utilizing a distance matrix for
precise calculations, ensuring accurate route selections. While GA and SA offer heuristic approaches that can
be effective in certain scenarios that often rely on probabilistic methods and parameter tuning, which may lead
to inconsistent results. Overall, DP's reliability and guaranteed optimality make it the preferred choice for
logistic optimization tasks, particularly when accuracy and efficiency are crucial.

Comparison of Algorithm Performance

The results shown in Table 8 and Fig.3 highlight the comparative performance of GA and SA in optimizing
delivery routes. GA achieved a shorter total distance of 698.30 km compared to SA’s 727.10 km, indicating
GA’s higher efficiency in route optimization. This difference indicates GA’s ability to generate solutions that
are closer to the optimal route, reducing the overall travel distance required.

On weekdays, GA consistently outperformed SA in travel times across all time slots. For instance, at 6 p.m., a
peak traffic period, GA recorder a travel time of 723 minutes, whereas SA took significantly longer at 764

Page 4869 www.rsisinternational.org

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025






minutes. Similarly, at 10 p.m., GA achieved a travel time of 679 minutes, compared to SA’s 726 minutes,
showing its efficiency even during off-peak hours. The smallest difference was observed at 8 a.m., where GA
recorded 721 minutes and SA recorded 730 minutes, still favouring GA.

On weekends, GA maintained its superior performance in most time slots. At 10 p.m., GA recorded a travel
time of 646 minutes, compared to SA’s 654 minutes, highlighting its ability to optimize routes effectively
during non-working days. However, an exception occurred at 6 p.m., where SA slightly outperformed GA,
recording a travel time of 720 minutes, compared to GA’s 742 minutes. Despite this anomaly, GA provided
better results overall.

These findings underline the advantages of GA’s population-based search approach, which evaluates multiple
solutions simultaneously, enabling it to explore a broader solution space and avoid local optima. In contrast,
SA’s reliance on a cooling schedule for optimization makes it more sensitive to parameter tuning, which could
result in less consistent performance. Overall, GA demonstrated superior performance in minimizing both
distance and travel time, making it a more effective method for optimizing delivery route compared to SA.

Table 8 Algorithm Performance Comparison: GA vs. SA

GA SA

Distance (km) 698.30 727.10

Weekdays

(minutes)

8 a.m. 721 730

1 p.m. 710 744

6 p.m. 723 764

10 p.m. 679 726

Weekends

(minutes)

8 a.m. 693 697

1 p.m. 706 727

6 p.m. 742 720

10 p.m. 646 654


Fig. 3 Algorithm Performance Comparison: GA vs. SA

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025


Page 4870 www.rsisinternational.org





CONCLUSION

All objectives of this study were successfully achieved. The first objective, to employ Dynamic Programming
(DP), Genetic Algorithm (GA) and Simulated Annealing (SA) to establish optimal delivery routes between
J&T hubs in Johor, was accomplished using data from 18 hubs and nine datasets analyzed with Python. The
second objective, to determine the optimal delivery route considering distance and time, demonstrated DP as
the most effective method, consistently providing optimal solutions, while GA ranked second with near-
optimal results and SA showed less consistency due to sensitivity to parameter settings. The third objective, to
compare GA and SA against DP as a benchmark, revealed that GA outperformed SA in 8 out of 9 cases,
delivering results closer to the optimal solutions due to its robust evolutionary processes.

These findings are highly relevant to the e-commerce industry, especially for optimizing last-mile delivery,
which is a critical factor in meeting customer expectations and maintaining competitive advantage. By
offering near-optimal solutions in complex, resource-constrained environments, GA provides a cost-effective
alternative to DP for logistic companies and e-commerce platforms like Shopee and Lazada. Implementing
these optimized routes can significantly reduce operational costs, minimize fuel consumption, and improve
delivery times, directly enhancing customer satisfaction. For example, businesses operating in densely
populated urban areas or regions with high delivery demands can leverage GA to streamline their logistic
network. Further studies could expand on these findings by using a larger data set and incorporating dynamic
factors such as real-time traffic and weather conditions, making the models more adaptable to real scenarios.
Exploring hybrid approaches that combine GA and SA could unlock even greater efficiencies, while applying
these models globally would validate their versatility across diverse logistic contexts. Additionally, automating
parameter tuning and considering environmental factors like fuel consumption could lead to more sustainable
and efficient logistic solutions.

ACKNOWLEDGEMENT

The authors would like to thank the Faculty of Applied Sciences and Technology, Universiti Tun Hussein Onn
Malaysia for its support.

Conflict of Interest

Authors declare that there is no conflict of interest regarding the publication of the paper.

Author Contribution

The authors confirm contribution to the paper as follows: study conception and design: Kan Ho Li, Suliadi
Firdaus Bin Sufahani; data collection: Kan Ho Li; analysis and interpretation of results: Kan Ho Li, Suliadi
Firdaus Bin Sufahani; draft manuscript preparation: Kan Ho Li, Suliadi Firdaus Bin Sufahani. All authors
reviewed the results and approved the final version of the manuscript.

REFERENCES

1. Tang, R. Q., Tan, Y. J., Tan, Z. X., Tan, Y. T., Almawad, G., & Alosaimi, A. (2022). A Study of
Courier Service Quality and Customer Satisfaction. International Journal of Applied Business and
International Management, 7(1). https://doi.org/10.32535/ijabim.v7i1.1447

2. Zulazmi, Z. (2021). Customer Satisfaction and Customer Loyalty On Courier Service Quality In
Malaysia: A Review Of Poslaju.

3. Fida, B. A., Ahmed, U., Al-Balushi, Y., & Singh, D. (2020). Impact of Service Quality on Customer
Loyalty and Customer Satisfaction in Islamic Banks in the Sultanate of Oman. SAGE Open, 10(2).
https://doi.org/10.1177/2158244020919517

4. Singhal, A., & Pandey, P. (2016). TRAVELING SALESMAN PROBLEMS BY DYNAMIC
PROGRAMMING ALGORITHM. International Journal of Scientific Engineering and Applied Science,
2(April).

Page 4871 www.rsisinternational.org

INTERNATIONAL JOURNAL OF RESEARCH AND INNOVATION IN SOCIAL SCIENCE (IJRISS)
ISSN No. 2454-6186 | DOI: 10.47772/IJRISS | Volume IX Issue X October 2025






5. Bhatti, A., Akram, H., Muhammad Basit, H., Khan, A., Mahwish, S., Naqvi, R., & Bilal, M. (2020). E-
commerce trends during COVID-19 Pandemic. International Journal of Future Generation
Communication and Networking, 13.

6. Kawasaki, T., Wakashima, H., & Shibasaki, R. (2022). The use of e-commerce and the COVID-19
outbreak: A panel data analysis in Japan. Transport Policy, 115, 88–100.
https://doi.org/https://doi.org/10.1016/j.tranpol.2021.10.023

7. Chauhan, C., Gupta, R., & Pathak, K. (2012). Survey of Methods of Solving TSP along with its
Implementation using Dynamic Programming Approach. International Journal of Computer
Applications, 52, 12–19. https://api.semanticscholar.org/CorpusID:6677215

8. Sharma, S., & Jain, V. (2021). A Novel Approach for Solving TSP Problem Using Genetic Algorithm
Problem. IOP Conference Series: Materials Science and Engineering, 1116, 012194.
https://doi.org/10.1088/1757-899X/1116/1/012194

9. Asih, H., Rahman, S., Usandi, K., Alwafi, Q., & Marza, A. (2023). Enhancing logistics efficiency: A
case study of genetic algorithm- based route optimization in distribution problem. OPSI, 16, 208–216.
https://doi.org/10.31315/opsi.v16i2.8962

10. Henderson, D., Jacobson, S. H., & Johnson, A. W. (2006). The Theory and Practice of Simulated
Annealing. In Handbook of Metaheuristics. https://doi.org/10.1007/0-306-48056-5_10

11. Sarvepalli, S. K. (2015). Solving Travelling Salesman Problem (TSP) using Hopfield Neural Network
(HNN) and Simulated Annealing (SA). https://doi.org/10.13140/RG.2.2.14124.10887/1

12. Johnson, D. S., & McGeoch, L. A. (2008). The Traveling Salesman Problem: A Case Study in Local
Optimization. https://api.semanticscholar.org/CorpusID:208903251