Solving XpressBees Logistics Problem by
Solving XpressBees Logistics Problem by
Received: 25 January 2022; Revised: 9 March 2022; Accepted: 18 March 2022; Published: 6 May
2022
Abstract: Finding the shortest travelling distance based on various situations might assist travelers
in making a better selection of route decisions. The main goal of this paper is to solve the routing
problem for the company's fleet vehicle (XpressBees) in order to find the best route under various
constraints such as Signalized Intersections, Vehicle Capacity, Customer Demands, and Time
Windows in order to reduce transportation costs by using real data. TSP and VRP and their variants
are common problems for logistics companies that handle commodities transportation. In addition,
for signalised intersections, the Highway Capacity Manual is used, and for truck optimization, the
Product Loading Algorithm is used. As a result, there are various algorithms that provide a solution
to this problem, such as the Branch and Bound Penalty Method, Dijikstra’s Algorithm, Dynamic
Programming, Clarke and Wright savings algorithm and Holmes and Parker Heuristic. These
algorithm returns the best option, which is the cheapest route.
Keywords: Highway capacity manual, product loading algorithm, dynamic programming, Clarks
and Wright saving based algorithm, Holmes and Parker heuristic
1. Introduction
With the integration of logistics industry, information technology, and globalization trend, logistics
distribution as a whole is assuming an increasingly essential role in the system. The total process of
managing how resources are bought, stored, and transported to their final destination is referred to
as logistics [1]. This paper is focused on the routing problem of XpressBees Logistics Company
with real life data. The Routing Problem [2] provides solutions to different types of difficulties. The
basic goal of this task is to construct a route with the lowest delivery cost, starting with a depot that
serves a set of customers. The Travelling Salesman Problem (TSP) [3] and Vehicle Routing
Problem (VRP) [4-6] can be used to represent the routing problem in Operational Research [7]. The
37
research on TSP and VRP problems, as well as a strategy for solving them, can be seen in [8] with a
variety of constraints. Capacitated Vehicle Routing Problem (CVRP) [9,10] and Capacitated
Vehicle Routing Problem with Time Windows (CVRPTW) [11,12] are one of the two variants of
VRP. In terms of CVRP vehicles with restricted carrying capacity must pick up or deliver things to
many locations and CVRPTW contains time windows.
8𝑘𝑙𝑋
𝑑2 = 900𝑇 (𝑋 − 1) + √(𝑋 − 1)2 + , [-] (3)
𝑐𝑇
(1−𝑃)
𝑃𝐹 = ( 𝑔
) , [-] (4)
(1−( ))
𝑐
39
Fig. 3 Road intersection parameters. Source: authors
Finding Optimal Route by Using Dijkstra’s Algorithm with Signalized Intersection
Constraint
When all of the weight numbers are Wij≥0, the Dijkstra technique [15,16] is considered the best.
The time taken to reach from one node to another is represented by Wij (min). We establish a series
of N and put starting points based on the calculation to weight values. When the N point is not null,
we select a node 𝑣𝑖 from the N as the current node. Then we calculate all of the road network node
𝑣𝑖 's adjacent nodes 𝑣𝑗 . If, l(s, 𝑣𝑗 ) > l(s, 𝑣𝑖 + 𝑙𝑖𝑗 ) the control delay is 𝑙𝑖𝑗 so, l(s, 𝑣𝑗 ) = l(s, 𝑣𝑖 ) + 𝑙𝑖𝑗 .
Subsequently we add the neighbouring point to the sequence of N, modify it with the shortest time
taken, and keep it rising in accordance with the length of each road section.
40
2.3.3 Distribution of Items from Central Location (HUB) to Customers
There are created different types of scenarios which a logistics company may expect in real life.
• Scenario 1: Truck Loading and Routing
The aim is to fit a set of boxes into the minimum number of trucks the best, and thus reduce the
shipping cost while the weight should not be exceeded and then the route of the trucks is evaluated.
Box Loading Problem
The main objective of the problem is to minimise the total number of used boxes. To find the
number of boxes required to pack the products, lb is calculated.
𝑇𝑜𝑡𝑎𝑙 𝑤𝑒𝑖𝑔ℎ𝑡 𝑜𝑓 𝐵𝑜𝑥
𝑙𝑏1 = (5)
𝑇𝑜𝑡𝑎𝑙 𝑤𝑒𝑖𝑔ℎ𝑡 𝑜𝑓 𝑜𝑛𝑒 𝑝𝑟𝑜𝑑𝑢𝑐𝑡
𝑇𝑜𝑡𝑎𝑙 𝑣𝑜𝑙𝑢𝑚𝑒 𝑜𝑓 𝐵𝑜𝑥
𝑙𝑏2 = (6)
𝑇𝑜𝑡𝑎𝑙 𝑣𝑜𝑙𝑢𝑚𝑒 𝑜𝑓 𝑜𝑛𝑒 𝑝𝑟𝑜𝑑𝑢𝑐𝑡
To retrieve the findings for greater data, a Python Software Programming Language pseudo
code is constructed, which is given in Table 4.
41
Table 4 Algorithm 1. Source: authors
1 IMPORT numpy as np 8 SET curr_vol TO truck_vol ET count TO 1 19 IF sortedBoxes[i][3]<=
2 SET boxes 9 SET count TO 1 14 curr_vol -= vol curr_wei and vol <=
3 SET truck_wei 10 FOR i IN range(len(sortedBoxes)): 15 ELSE: curr_vol:
4 SET truck_vol 11SETvolTOsortedBoxes[i][0]*sorted 16 count += 1 20 curr_wei -=
5 DEFINE FUNCTION main(): Boxes[i][1]*sortedBoxes[i][2] 17 SET curr_wei TO sortedBoxes[i][3]
6 SET sortedBoxes 12 IF sortedBoxes[i][3]<= curr_wei and truck_wei 21 curr_vol -= vol
TOboxes[boxes[:,3].argsort()] vol <=curr_vol: 18 SET curr_vol TO 22 OUTPUT(count)
7 SET curr_wei TO truck_wei 13 curr_wei -= sortedBoxes[i][3] truck_vol 23 main ()
42
Now, from equation (9), the Savings matrix is created, which is shown in Table 7, using Table
6 between every possible route. The complete steps can be seen in [8].
Table 7 Saving matrix. Source: authors
Routes 1to2 1to3 2to6 2to4 3to6 1to6 3to4 2to5 1to4 1to5 5to6 3to5 4to6 2to3 4to5
Savings(km) 16 16 16 14 12 11 10 8 6 6 5 4 3 0 -2
A vehicle can be assigned to each route listed in Table 5 for all of the routes shown in Table 5,
Table 6, and Table 7. For route 1-2, the total requirement is 10 units, as shown in Table 5, and the
capacity is 15 units, thus the requirement is less than capacity. The routes where the condition of
requirement is greater than demand are eliminated. Also the routes where the saving is negative, it
is not considered, as distance cannot be negative.
Table 8 Assigned vehicles. Source: authors
Routes 1to2 1to3 2to6 2to4 3to6 1to6 3to4 2to5 1to4 1to5 5to6 3to5 4to6 2to3 4to5
Demand 10 13 19 18 19 19 18 16 18 16 9 - 4 - -
Capacity 15 15 15 15 15 15 15 15 15 15 15 - 15 - -
Vehicle V1 V1 - - - - V2 - V2 - -
To retrieve the findings for greater data, a Python Software Programming Language pseudo
code is constructed, which is given in Table 9.
Table 9 Algorithm 2. Source: authors
1 SET curr_truck_capacity 12 continue 20OUTPUT(weight_list[i]) 31 break
2 SET mp 13 FOR i IN 21 IF weight_list[i] + values[3] 32 IF flag EQUALS 1:
3 SET vertex range(len(new_adj_list)): <= curr_truck_capacity: 33 break
4 SET adj 14 SET keys TO 22 weight_list[i] += values[3] 34IF flag EQUALS 0:
5 DEFINE FUNCTION new_adj_list[i] 23SET mp[values[0]] TO 1 35new_adj_list.append([values[0],
main(): 15 IF values[0] IN keys and 24SET mp[values[1]] TO 1 values[1]])
6 SET curr_trucks TO [] values[1] IN keys: 25 SET flag TO 1 36 weight_list.append(values[3])
7 SET new_adj_list TO [] 16 SET flag TO 1 26 IF keys[j] != values[0]: 37 OUTPUT("truck weighted list
8 SET weight_list TO [] 17 continue 27 keys.append(values[0] : ");
9 FOR values IN adj: 18 FOR j IN range(len(keys)): 28 break 38 OUTPUT(weight_list)
10 SET flag TO 0 19 IF keys[j] EQUALS 29 ELSE: 39OUTPUT("Final path IN
11IF mp[values[0]] > 0 values[0] or keys[j] EQUALS 30keys.append((values[1])) eachtruck")
and mp[values[1]] > 0: values[1]: 40 OUTPUT(new_adj_list)
41 main ()
43
Table 10 Customer’s data. Source: authors
Customer Location Demand Time window
1 Azad Nagar 4 units [9:30am,10:00am]
2 Geeta Colony 6 units [9:00am,10:00am]
3 DilshadColony 3 units [9:00am,10:00am]
4 Dallupura 2 units [8:30am,10:00am]
5 JagatPuri 3 units [9:00am,10:00am]
6 Anand Vihar Colony 2 units [8:30am,10:00am]
Also, The Time Window for seller’s warehouse and hub is [8:00am,8:00am] and
[10:00am,12:00am].
Heuristic Solution Using Holmes and Parker’s Method [20]
For our research analysis the equation (9) is modified in terms of taken time and savings are
computed on the basis the travelled time.
S(i, j) =t(D, i) +t(D, j)−t(i, j) (10)
The saving of matrix by using equation (10) between every possible route by using Table 11 is
based on Clark and Wright Saving Based Algorithm [8], which is shown in Table 12.
Table 12 Saving matrix. Source: authors
Routes 1to2 1to3 2to6 2to4 3to6 1to6 3to4 2to5 1to4 1to5 5to6 3to5 4to6 2to3 4to5
Savings(min) 16 16 16 14 12 11 10 8 6 6 5 4 3 0 -2
The solution by using Clark's and Wright saving based algorithm is calculated. By using Table
12 for different routes, the vehicles can be assigned. The process started with s=0, means when
there is no saving, for the first route 1-2 with the saving of 16 min. The rest can be depicted from
Figure 6.
Fig 6 Solution by using Clarks and Wright saving based algorithm. Source: authors
44
The solution obtained by using Clark and Wright Saving Algorithm is 40 min. The Holmes and
Parker Method compute a better solution, as shown in Figure 7.
3. Results
Experiments with various scenarios were conducted to ensure that the suggested algorithms were
effective. The proposed model was also built in the Python programming language, which a
logistics company may use to solve its problem. To begin, the Branch and Bound penalty approach
generates 18 branches, as illustrated in Figure 8, and the best route is
0→4→3→1→7→6→5→10→2→9→8→0 with a total distance of 49.3 km.
Fig 8 Finding solution through branch and bound penalty method. Source: authors
45
In the case of signalised junctions, the best route is 1→ 5→9→11→12→ 13 with a weight of
40.1 minutes. The shortest path becomes the fastest path since the used weight is travel time rather
than mileage. As a result, the fastest route is 1→ 5→9→11→ 12→13 (40.1 minutes).
In scenario 1, the least number of trucks required to contain all of the boxes is two, as
determined by the product loading algorithm, and the routing of these two trucks was determined by
dynamic programming to be either 1→2→5→8 or 1→3→7→8, with a total distance of 23 km.
In scenario 2, the results show that only two out of five vehicles were used to deliver the items,
and Table 14 shows the optimal route for both vehicles. If the vehicle travelled sequentially to each
customer and returned, it would have travelled 20 + 18 + 14 + 16 + 12 + 19 = 99.2 = 198 km,
however by using Clark's Wright Savings Based Algorithm, it only travelled 158 km, saving 198 –
158= 40 km. As a result, the logistics company saves money by minimizing the travelled distance
and saving vehicles.
Table 14 Final evacuation path. Source: authors
Vehicles Optimal Path Distance(Km) Savings(km) Demand Capacity
Vehicle 1 0→2→1→3→0 72 32 13 units 15 units
Vehicle 2 0→5→6→4→0 86 8 14 units 15 units
In scenario 3, the result shows that vehicles will leave the seller’s warehouse at 08:00 am and
meet the needs of all customers within a predetermined window, and then return to the hub.
Additionally, by applying the Holmes and Parker heuristic, the vehicle actually travelled 148
minutes, saving 198-148=50 minutes. The final evacuation path with in specified time slots can be
observed in Table 15.
Table 15 Final evacuation path. Source: authors
Vehicles Optimal Path TimeTaken Demand Capacity
(min)
Vehicle 0[08: 00𝑎𝑚, 08: 00𝑎𝑚] →4[08: 16am, 08: 35am] → 74 12 units 15 units
1 3[08:55am,09:07am]→ 1[09: 25am, 09: 40am] →
7[10: 00am, 10: 00am]
Vehicle 0[08:00am,08:00am]→6[08:19am,08:41am]→ 74 15 units 15 units
2 2[09:02am,09:15am]→5[09:37am,09:50am]→7[10:02am,10:02am]
4. Discussion
For Logistics, vehicle routing is a challenge. There are a variety of items, organizations, and
timeframes to consider. Different qualities for vehicle routing problems are preserved here. Traffic
congestion and peak hours at traffic lights should be considered while planning efficient
transportation in urban areas. The loading of products into trucks and their routing is a second key
topic. Finally, the dynamism of the logistics business and the emergence of new communication
technologies encourage the study of dynamic VRP, in which vehicle routes can be re-optimized
depending on various types of data.
46
5. Conclusion
In this paper, a mathematical model of the XpressBees Logistics Company was set up after defining
a transport problem. The exact and heuristic methods were applied to solve the problem of routing
vehicles in the transport network. The purpose of applying mathematical methods is to reduce
transportation costs by optimizing routes and the number of vehicles, which makes savings and
increases profits for businesses. As a result, any logistic company with the same difficulty as the
one described above can apply the model to enhance their routing problem and revenues.
Acknowledgments
We would like to thank Delhi Technological University's Applied Mathematics Department and our
supervisor for their assistance in completing our research work.
References
[1] Yen-Chun, W., Goh, M., Chih-Hung, Y. & Shan-Huen, H. (2017). Logistics management
research collaboration in Asia. The International Journal of Logistics Management 28(1),
206-223. DOI: 10.1108/IJLM-09-2013-0104.
[2] Khalid, A.E., AbdelHadi, N.A. & AbdelMonaem F.M.A. (2008). Routing Problems: A
Survey. In The 43rd Annual Conference on Statistics, Computer Sciences and Operations
Research, 22-25 December 2008 (pp. 51-70). San Francisco, California: Academia
Publishers.
[3] Dahiya, C. & Sangwan, S. (2018). Literature Review on Travelling Salesman Problem.
International Journal of Research 5(16), 1152-1155. Retrieved March 18, 2022, from:
https://journals.pen2print.org/index.php/ijr/article/view/15490/15018
[4] Toro, E.M., Escobar Z.A.H. & Granada E.M. (2015). Literature review on the vehicle
routing problem in the green transportation. Luna Azul 15(42), 362–387.
DOI: 10.17151/luaz.2016.42.21.
[5] Liong, C.-Y., Wan, I. & Khairuddin. O. (2008). Vehicle routing problem: Models and
solutions. Journal of Quality Measurement and Analysis 4(1), 205-218. Retrieved January
2008, from:
https://www.researchgate.net/publication/313005083_Vehicle_routing_problem_Models_an
d_solutions
[6] Braekers, K., Ramaekers, K. & Nieuwenhuyse, I. (2015). The Vehicle Routing Problem:
State of the Art Classification and Review. Computers & Industrial Engineering 99, 300-
313. DOI: 10.1016/j.cie.2015.12.007.
[7] Hrablik, H., Horňáková, N. & Babčanová, D. (2015). Use of operational research methods in
logistics. In Carpathian Logistics Congress, PriessnitzSpa, Jesenik, Czech Republic, EU, 4 –
6 November 2015 (pp. 307-312). Philadelphia, United States. London, United Kingdom:
Web of Science.
[8] Malhotra S. & Khandelwal, M. (16 March 2022) XpressBees Logistics Problem Using Exact
and Heuristic Method. Retrieved March 16, 2022, from
https://drive.google.com/file/d/130u99Z9w5GTpWVKIL1JBiW
47
[9] Satyananda, D. & Wahyuningsih, S. (2019). VND in CVRP, MDVRP, and VRPTW Cases.
Journal of Physics: Conference Series 19(1), 12-25. DOI: 10.1088/1742-
6596/1320/1/012025.
[10] Akhand, M.A., Peya, Z.J., Sultana, T. & Al-Mahmud (2015). Solving Capacitated Vehicle
Routing Problem with route optimization using Swarm Intelligence. In 2nd International
Conference on Electrical Information and Communication Technologies (EICT), 10-12
December 2015 (pp. 112-117). Manhattan, New York, U.S: Institute of Electrical and
Electronics Engineers.
[11] Gan, X., Wang, Y., Li, S. & Niu, B. (2012). Vehicle Routing Problem with Time Windows
and Simultaneous Delivery and Pick-Up Service Based on MCPSO. Mathematical Problems
in Engineering 12, 1–11. DOI: 10.1155/2012/104279.
[12] Ombuki, B., Ross, B.J. & Hanshar F. (2006). Multi-Objective Genetic Algorithms for
Vehicle Routing Problem with Time Windows. Springer Science and Business 6(1), 17–30.
DOI: 10.1007/s10489-006-6926-z.
[13] Sharma, R., Patel, P., Umrigar, N. & Zala, L.B. (2018). Delay estimation at signalized
intersections under heterogeneous traffic conditions. International Research Journal of
Engineering and Technology 5(5), 2945-2952. DOI:10.13140/RG.2.2.16273.76644.
[14] Adepu, R. & Molugaram, K. (2018). Evaluation of delay characteristics at signalized
intersections for improvement in level of service. International journal for traffic and
transport engineering 18(3), 309–19. DOI:10.7708/ijtte.2018.8(3).05.
[15] Almash, A. & Faruq, O. (2019) Finding Shortest Path for Road Network Using Dijkstra’s
Algorithm. Bangladesh Journal of Multidisciplinary Scientific Research 19(2), 41–45.
DOI: 10.46281/bjmsr.v1i2.366.
[16] Javaid, M.A. (2013). Understanding Dijkstra Algorithm. SSRN Electronic Journal 13, 1-27.
DOI: 10.2139/ssrn.2340905.
[17] Sitinjak, A.A., Pasaribu, E., Simarmata, J.E., Putra, T. & Mawengkang, H. (2018). The
Analysis of Forward and Backward Dynamic Programming for Multistage Graph. In IOP
Conference Series: Materials Science and Engineering, January 2018 (pp. 1-7). Bristol,
England, United Kingdom: IOP publishing.
[18] Caccetta, L., Alameen, M. & Abdul-Niby, M. (2013). An Improved Clarke and Wright
Algorithm to Solve the Capacitated Vehicle Routing Problem. Engineering, Technology &
Applied Science Research 3(2), 413–415. DOI:10.48084/etasr.292.
[19] Pichpibul, T. & Kawtummachai, R. (2013). A Heuristic Approach Based on Clarke-Wright
Algorithm for Open Vehicle Routing Problem. The Scientific World Journal 13(1), 1-11.
DOI: 10.1155/2013/874349.
[20] Shankar, R.B.S., Reddy, K.D. & Venkataramaiah, P. (2018). Solution to a Capacitated
Vehicle Routing Problem Using Heuristics and Firefly Algorithm. International Journal of
Applied Engineering Research 13(21), 15247-15254. Retrieved 2018, from:
https://www.ripublication.com/ijaer18/ijaerv13n21_59.pdf
48