Abstract

The goods collection and delivery process often relates to distribution logistics problems. The task is to deliver goods from warehouses to customers under specific circumstances. Efforts to optimize the process are largely aimed at reducing overall costs of goods transportation. Among the prominent algorithms for solving the basic type of the delivery (or collection) problem, which includes a single depot and a homogeneous vehicle fleet, is the algorithm developed by Clarke and Wright in 1964. This algorithm minimizes transportation costs by maximizing the savings achieved through merging multiple routes into one. This paper primarily aims to solve the pickup and delivery problem where the goods must be delivered and empty packaging collected in a single process. The request of a customer can be routed from the depot or from another customer. Similarly, the destination of the request may be the depot or another customer. Unlike the original version of the Clarke and Wright algorithm, the initial routes are created to satisfy delivery orders, and therefore, the same customer can occur in multiple routes. Consequently, a situation may arise in which two routes containing one or more common vertices must be combined during the calculation. Furthermore, these vertices need not be the outermost vertices of the routes. This situation cannot be addressed by using the original version of the Clarke and Wright algorithm, and that is why we propose its modification. Merging routes through inner vertices means that the cost savings depend on the configurations of the routes, and therefore, they cannot be calculated a priori. Instead, the dynamic savings matrix must be used.

1. Introduction

The transportation of goods and people is an integral part of the everyday world, involving significant expenditures on vehicle fuels and maintenance each day. Clearly, this sector provides ample opportunities for cost optimization through advancements in technology, transportation network infrastructure, and sophisticated planning. In practical terms, the challenges to be addressed include the efficient transport of goods under specific conditions, aiming for minimal costs, the shortest possible time, or maximizing profits. The utilization of mathematical methods and optimization approaches proves convenient for addressing these complex problems.

Two types of problems are frequently encountered in goods logistics and distribution. The first one is the vehicle routing problem (VRP), where goods are transported from/to a depot, such as goods from warehouses to customers and packaging material from customers back to the warehouses. The other problem is the pickup and delivery problem (PDP), where goods are transported between customers. In distribution, multiple vehicle types are typically involved. The problems usually involve many other parameters, including time constraints (e.g., limited duration of a route, time windows for goods delivery to customers, mandatory driving breaks for rest, and maximum driving time for a vehicle), maximum route length, maximum number of customers serviced within a route, or maximum load dimensions.

The distribution problems are too complex to be tractable using a single method for their solution. Instead, a suitable combination of methods and procedures must be applied. A heuristic approach is usually adopted when addressing complex problems. Many real-world problems have been successfully solved by operations research methods, allowing costs to be reduced by 5% to 20% [1], with the additional advantage of reducing greenhouse gas production, mainly CO2.

This paper addresses a problem where the distribution processes encountered in both problems mentioned above occur; i.e., the goods are transported from/to a depot as well as among customers. Both good unloading and loading can occur at the customer’s site. The goods loading/unloading costs and time demands are known as well. The objective is to identify vehicle routes that minimize the total goods delivery costs. A specific food distribution problem was chosen to validate the algorithm within a case study. The goods flow consists largely (∼80%) of transports from the depot to various customers, mostly food sellers. The remaining fraction of the flow consists of goods transport between customers and collection from the customers. Figure 1 illustrates the flow of goods.

2. Literature Review

We commence with the formal description of the classical VRP involving a single depot and a homogeneous vehicle fleet. The problem can be effectively represented using graph theory. The classical VRP is defined on a directed graph , where is the vertex set and is the arc set. Vertex 0 represents a depot where a set of identical vehicles, each with a capacity Q, is available. Each customer situated at vertex is associated with a nonnegative demand . A cost matrix is defined on A. When the cost matrix is symmetric, i.e., for all i, jV, it is common practice to define the problem on an undirected graph where is the edge set. The travel cost may represent the length or travel time along the edge [i, j]. The objective is to determine a set of vehicle routes starting and ending at the depot, ensuring that each customer is visited by precisely one vehicle, the total demand of any route does not exceed Q, and the total routing cost is minimized [2].

The simplest VRP variant involves one depot and one vehicle type with a known capacity. The aim is to identify vehicle routes meeting these constraints while minimizing the goods delivery. In the simplest case, the cost is directly proportional to the distance travelled (sometimes it is immediately this distance). However, real-world situations often necessitate the application of more complex VRP variants involving multiple vehicle types and/or multiple depots. An overview of the various problem modifications and methods to address them can be found in the monograph [3].

Numerous heuristic approaches exist to tackle general VRPs, aiming to find a suboptimal problem solution. The methods not only differ in their selected approaches but also in the specific class of problems for which they were devised.

Pioneering work was conducted by Dantzig and Ramser in 1959, focusing on the identification of fuel tank truck routes between a large-volume terminal and service stations. They achieved a near-optimal solution using a method based on a linear programming formulation [4]. A well-known and frequently used heuristic algorithm for solving vehicle routing problems was developed by Clarke and Wright in 1964 [5]. This algorithm is designed to solve the classical VRP as defined previously. It is a constructive heuristic that gradually merges simple tours into more complex ones by applying a savings criterion, referring to the distance savings achieved by combining two routes into one. The advantages of the algorithm include its simplicity, short computing time, and easy implementation.

Since its development in 1964, the Clarke and Wright algorithm has undergone many improvements and modifications for specific problems, such as the multidepot problem [6] or scenarios where vehicles do not return to the depot [7]. Various modifications to the original saving criterion have been proposed in the literature [8]. Gaskell [9] and Yellow [10] parameterized the formula to enhance the algorithm’s exploration ability. Paessens [11] introduced another term to allow merging customers with very different distances from the depot, while Altınel and Öncan [12] enhanced the criterion by incorporating customers’ demands in addition to distance. Other modifications involve combining the algorithm with Monte Carlo simulation [13, 14]. Plenty of practical applications of the Clarke and Wright algorithm have been reported in the literature. Sarmah et al. [15] successfully applied the algorithm to the solid municipal waste collection problem for 15 municipality districts of Bilaspur (India). Jiang et al. [16] focused on optimizing the vehicle routing for baggage pickup in airport terminals. Noteworthy results were obtained when comparing the Clarke and Wright algorithm with other methods. Destyanto et al. [17], for instance, compared nearest neighbour heuristics with the Clarke and Wright algorithm in the medicinal drug distribution area, demonstrating that the Clarke and Wright algorithm is the most effective tool for tackling this distribution problem.

Metaheuristics represent a distinct approach to solving VRPs, functioning as heuristic methods that form a superstructure above other heuristics types. Well-known metaheuristics include genetic algorithms, tabu search, simulated annealing, and ant colony optimization. These methods emulate natural phenomena, such as animal behaviour or genetic processes.

Metaheuristics, either independently or in conjunction with the Clarke and Wright algorithm, have been applied to solve problems across various application areas. For instance, Escobar et al. [18] utilized a hybrid approach to the VRP; here, they initially found the problem solution using the Clarke and Wright algorithm and then optimized it using tabu search metaheuristics. Addressing the mail delivery problem, Huang et al. [19] developed two integer models for the delivery service. Their heuristic algorithm is a combination of the Clarke and Wright algorithm with a tabu search metaheuristic. Zhai et al. [20] focused on combining the Clarke and Wright algorithm with ant colony optimization. Berghida and Boukra [21] and Pan et al. [22] also employed a combination of metaheuristics to address the VRP.

Heuristics and metaheuristics prove to be practical approaches for addressing real-world pickup and delivery problems [23]. A common technique involves creating an initial set of routes using an insertion heuristic. Customers are gradually inserted into the routes based on a time-spatial proximity criterion. Subsequently, either local search or a metaheuristic is applied to improve the solution. A simpler variant of the problem, featuring one depot but simultaneous chilled food pickup and delivery, was addressed by Ji et al. [24] using their own heuristics based on a genetic algorithm. Chun-Hua et al. [25] also developed a genetic algorithm to handle simultaneous pickups and deliveries, considering time windows and setting penalties for delayed delivery. Chen and Fang [26] approached the simultaneous pickup and delivery problem using a two-layer discrete particle swarm optimization, with the first phase dedicated to vehicle assignment and the second phase focused on identifying optimal routes. Yu and Lin [27] took a different approach, successfully employing simulated annealing metaheuristics for the PDP. Sathyanarayanan et al. [28] used a modified genetic algorithm to solve the combined problem with multiple depots and stochastic vehicle routing.

While the literature overview illustrates the frequent use of the Clarke and Wright algorithm and its combination with metaheuristics for routing problems with various parameters and constraints, to our knowledge, the Clarke and Wright algorithm has not been applied to solve the PDP. In this paper, we aim to fill this gap by proposing a new heuristic method based on the Clarke and Wright algorithm. This choice is motivated by several factors. The most important is the algorithm’s computation speed. Metaheuristics may provide a better solution, but the computation takes a long time. When faced with a problem that occurs in operational management, we need to find a solution quickly even at the expense of its lower quality. Another advantage of the Clarke and Wright algorithm is that it makes easy to add additional constraints to the problems, such as time windows for handling goods, a maximum route travel time, a maximum number of stops on the route, mandatory breaks for the driver’s rest, and load temperature regime combinations. This algorithm can be relatively easily implemented and modified.

3. Materials and Methods

The problem to be solved is a single depot PDP with a heterogeneous vehicle fleet. Customers’ requests are specified through delivery orders. The delivery order data include the dispatch and destination locations of the goods, along with the quantity of goods to be delivered. A customer, as well as a depot, may serve as the pickup point for one request and, simultaneously, as the delivery point for another request. Multiple orders can have the same pickup points and/or destinations. Both unloading and loading operations are conceivable at a customer’s site. Moreover, the cost of loading and unloading operations at each pickup and delivery location is also given, affecting the total cost to be minimized. We propose a solution method for the basic version of the problem where time windows are not specified.

Although we will solve the problem heuristically, a mathematical programming formulation can be useful for a better understanding of the problem and its features. The formulation stems from the graph model of the problem [23]. Let us define a network in which nodes correspond to the depot, pickup points, and delivery points. Different nodes may represent the same geographical location. If the request is dispatched from the depot, an artificial node corresponding to the pickup operation is added to the network. Delivery to the depot is modelled in a similar way. Let r be the number of requests. We denote the set of pickup nodes by and the set of delivery nodes by . Furthermore, we define . Let be the set of all nodes inclusive the depot and be the set of all feasible arcs. Request i consists of transporting units from node i to r + i. Consequently, let and . Let K be a set of vehicles, be the capacity of vehicle k, and be the travel cost between nodes i and j related to vehicle k.

The mathematical model involves two types of decision variables: binary variables that equal to 1 if vehicle k travels through the arc (i, j) A and 0 otherwise and variables giving the load of vehicle k after the service at node i have been completed. The linear programming formulation is as follows:subject to

The objective function (1) minimizes the total travel cost. Constraints (2) ensure that each pickup location is visited. Constraints (3) impose that the delivery location is visited if the pickup location is visited and that the visit is performed by the same vehicle. Constraints (4) are the flow conservation constraints. Constraints (5) and (6) adjust the vehicle load during a route and, simultaneously, prevent a route from being separated into subtours that do not contain a depot. Constraints (7) and (8) are the capacity intervals at pickup and delivery nodes. The initial vehicle load is imposed by (9). Finally, constraints (10) define binary variables.

3.1. The Clarke and Wright Algorithm

The Clarke and Wright algorithm operates on a graph where vertices correspond to individual customers, not the requests. The formal description of the graph was provided at the beginning of the Literature Review Section.

The algorithm starts with the initial solution, consisting of elementary routes. An elementary route, in the form of depot ⟶ serviced vertex ⟶ depot, is created for each serviced vertex. This initial solution is then modified, and routes are merged to achieve the maximum savings in the total cost. The savings, denoted as , indicate how much the cost is reduced by combining two routes into one (Figure 2), as expressed by the equation:

Since the savings remain constant throughout the algorithm, they can be computed a priori. The savings are recorded in a matrix of dimension (n + 1) × (n + 1). In each iteration, the maximum element in the savings matrix must be; it determines the routes that can be joined, provided that the problem constraints are respected. The basic constraint relates to vehicle capacity: two routes can be merged into one only if the vehicle used can carry all the goods delivered via the two routes. After each step of the algorithm, more complex routes visiting two or more vertices may emerge. The routes can only be joined through their outermost vertices, the first after the depot or the last one before the depot. Connecting additional routes to vertices within the existing routes is not possible.

3.2. Modifications of the Clarke and Wright Algorithm

We modify the Clarke and Wright algorithm in the following ways:(1)The orders can be directed to/from any vertex(2)A customer may be visited by multiple vehicles, meaning one vertex may occur in multiple routes(3)Routes can be merged at any common vertex(4)The savings resulting from joining routes depend on the configuration of the routes, necessitating changes during the algorithm run and repeated calculation, leading to a dynamic savings matrix

The algorithm is adapted to situations where the routes obtained by the initial solution can lead to the same vertices. In contrast to the basic Clarke and Wright algorithm variant, the initial solution is based on the delivery orders rather than the customers. Each route in the initial solution satisfies one order. The goods for one order can be managed by one vehicle (this need not be tested). However, multiple orders can be directed to the same network vertex. Thus, a situation can occur where two routes containing one or more identical vertices must be joined during the computation. This is a problem that cannot be solved using the original Clarke and Wright algorithm and its numerous modifications encountered in literature [812].

The calculation of savings is a next modification of the algorithm. In the original version of the Clarke and Wright algorithm, the savings are calculated in the initialization phase based on graph edge weighting and are independent of the configuration of the routes being combined. In the problem addressed here, savings are affected by multiple factors. They are calculated from the costs of the routes being combined, including a fixed cost component and a variable cost component. These savings depend not only on the distance but also on the number of units of goods to be loaded/unloaded and other factors, such as the cost of having the vehicle driven to the ramp or the cost of the vehicle idle time during the loading/unloading operations. Furthermore, the savings accruing from route joining depend on the order of the vertices on the resulting route. Hence, the savings accruing from the potential combination of the newly created route with the existing routes must be calculated after each route combination performed. This affects the savings matrix in such a way that the savings for the newly created route are calculated and stored in a new row and column, while the rows and columns for the routes from which the new route was formed are eliminated from the matrix. In this way, the saving matrix becomes a dynamic matrix.

3.3. Initial Solution

Each order specifies the pickup vertex (dispatch site) and the delivery vertex (destination). The dispatch site can be the depot (typically) or any other vertex, and the same applies to the destination. In addition, the amount of goods to be delivered is defined. The orders are categorized into three groups. The initial solution is constructed with respect to these groups:(1)Group 1 includes delivery orders with the depot as the dispatch site. The initial route for the order is depot ⟶ delivery vertex ⟶ depot.(2)Group 2 encompasses pickup orders where the depot is the destination point. The initial route is depot ⟶ pickup vertex ⟶ depot.(3)Group 3 involves orders where the depot is neither the dispatch site nor the destination site. Instead, the goods are transported between two nondepot vertices. The initial route is depot ⟶ pickup vertex ⟶ delivery vertex ⟶ depot.

3.4. Saving Matrix

As in the Clarke and Wright algorithm, the saving matrix must be set up first. The saving matrix has dimensions of the number of orders × number of orders, and it is not symmetric. Each matrix row and column represents one route, with every route originating and terminating at the depot. The matrix elements include 2 items: the savings and the potentially newly created route. The initial saving matrix is shown in Table 1.

The following symbols will be used to describe a route:(i)m is the number of vertices within a route(ii) is the k-th vertex on the route t(iii) is the first vertex on the route t representing the depot, which is the vehicle’s starting point(iv) is the last vertex on the route t representing the depot, which is the vehicle’s finish point

3.5. Saving Calculation

The value of the savings is obtained from the costs of the joined routes i and j, as shown in the equation:

3.6. Cost of a Route

The cost of a route comprises four items: the cost of vehicle travel along the route, the cost of servicing the vertices on the route, the waiting cost, and the vehicle deployment cost. The total time of the route must also be determined for the total cost calculation. Therefore, the servicing times in the vertices and the time of travel between the vertices must also be determined.

Cost factors are the same for each route:(i)cost_v is the vehicle deployment cost (price)(ii)cost_t is the travel cost (price/km)(iii)cost_w is the waiting cost (hourly price)

3.7. Distance Matrix

This matrix includes the distances (lengths of the shortest paths) between the vertices . The first distance matrix row and column represent the depot.

3.8. Travel Time Matrix

This matrix includes the travel times between the vertices . The first travel time matrix row and column represent the depot.

3.9. Vertex Parameters

The loading/unloading cost in vertex k on route t is as follows:(i)cost_fix () is the fixed cost (e.g., transport document inspection fee)(ii)cost_var () is the variable cost per transported goods unit

The loading/unloading time in vertex k on route t is as follows:(i)t_fix () is the fixed time (e.g., driving the vehicle in for handling)(ii)t_var () is the variable time per transported goods unit

The requirements in vertex k on route t are as follows:(i)C_n () is the number of units of goods loaded in vertex (the sum of loaded units of goods from all orders on route t for which the vertex is the dispatch point)(ii)C_v () is the number of units of goods unloaded in vertex (the sum of unloaded units of goods from all orders on route t, for which the vertex is the destination)

3.10. Service times in the Vertices on the Route and Servicing Cost

The service time in consists of the fixed and variable parts, where the latter is dependent on the number of loaded and unloaded units of goods equation:

The service cost in the route vertex also consists of a fixed component, independent of the number of loaded/unloaded units (e.g., the cost of having the vehicle driven to the ramp), and a variable component that depends on the number loaded/unloaded units, such as the cost of the vehicle idle time during the loading/unloading operations. These costs are directly proportional to the vertex servicing time equation:

3.11. Cost of Travel between Two Vertices

The cost of travel between vertices and depends on the distance travelled equation:

3.12. Route Implementation Cost

The route implementation cost is expressed by the equation:

3.13. Route Implementation Time

The route implementation time includes only the net vehicle travel time and all vertex servicing times. The latter includes the vehicle idle time during the loading or unloading operation. The route implementation time does not include other components, such as waiting time for a free ramp, mandatory drivers’ breaks for rest, and waiting time for a relevant time window, in situations where time windows are included in the problem being solved and the vehicle arrived at the vertex earlier. This is expressed by the equation:

3.14. Total Route Time

The total route time is the complete route duration, including waiting for the free ramp, mandatory drivers’ rest breaks, and time of waiting for a free time window where this is relevant. Each of those constitutes a subproblem that has to be solved and used to determine the real route start and end times, which are input data in the computation equation:

3.15. Cost of Waiting for the Vehicle

The previous items are used to determine the total vehicle waiting time, from which the total cost of waiting for the vehicle is derived. The vehicle waiting time is the following difference equation:

The waiting cost is expressed by the equation:

3.16. Route Cost Calculation

The total route cost is calculated as the sum of the travel cost, customer servicing cost, waiting cost, and vehicle deployment cost, as expressed by equation (21). The last-mentioned item can include vehicle renting cost.

The total cost of a vehicle is

3.17. Route Joining

The following situations are examined when joining two routes into oneVariant 0: The routes are joined through the outermost vertices, have no common vertex except the depot, and do not overlap. For example, routes D-1-2-D and D-3-4-D create route D-1-2-3-4-D (Figure 3).Variant 1: The last vertex (before the depot) of one route coincides with the first vertex (after the depot) of the other route, and this common vertex serves to join the routes together. For example, routes D-1-2-3-D and D-3-4-D create route D-1-2-3-4-D (Figure 4).The difference between variants 0 and 1 is that in variant 0, the routes have no common vertex (except the depot), while in variant 1, they share one vertex (except the depot).Variant 2: The last two vertices (before the depot) of the one route coincide with the two first vertices (after the depot) of the other route. For example, routes D-1-2-3-D and D-2-3-4-D create route D-1-2-3-4-D (Figure 5).Variant 3: The last three vertices of route 1 coincide with the first three vertices of route 2 (in the same order). For example, routes D-1-2-3-4-D and D-2-3-4-5-D create route D-1-2-3-4-5-D (Figure 6).Variant 4: Route j contains only such vertices as also present on route i in the same direction. For example, routes D-1-2-3-4-5D and D-2-3-4-D create route D-1-2-3-4-5-D (Figure 7).

The procedure in variants 1, 2, and 3 can be further generalized to multiple common vertices. In the future, we could consider modifying the algorithm in such a way that the number of common vertices to be examined for both routes will be the algorithm’s parameter. One can expect that such exploration would improve the solution quality but increase the computing time. In our experiments, we did not investigate the sensitivity of the algorithm to this parameter.

The procedure of selecting the routes to be joined follows the principle of the Clarke and Wright algorithm. The maximum positive element is identified in the saving matrix. This element determines the routes that can (while meeting the constraints of the problem) be combined into one (in the following description of the algorithm, we consider the only constraint regarding the vehicle capacity). If the routes cannot be joined, the saving matrix element is not filled out and will not be considered for the selection of the maximum savings.

The modified Clark and Wright algorithm operates with a dynamic saving matrix. In contrast to the classical Clark and Wright algorithm, which calculates savings solely from distances and considers savings only between outermost vertices of the routes, the modified algorithm computes savings from costs that depend on various factors, including the configuration of the resulting route and the quantity of goods loaded and unloaded along the route. This distinction leads to variable savings throughout the calculation. When two routes are combined, the quantity of goods must be recalculated, resulting in changes to the costs of other routes that could potentially be combined in subsequent iterations. A new route is created and included in the matrix to replace the merged routes. Thus, after each of these operations, the saving matrix must be updated. The two rows and columns pertaining to the joined routes must be removed from the matrix, and simultaneously, a row and a column corresponding to the new route are added. This dynamic adjustment in matrix dimension occurs during the execution of the algorithm. The algorithm terminates when no positive savings are present in the saving matrix.

3.18. Algorithm Implementation

In this section we describe the implementation of the algorithm. The notation used is given in Table 2 and the functions are summarized in Table 3.

The basic concept of the modified approach is described by Algorithm 1.

(1)for each do
(2)
(3)
(4)
(5)end

Algorithm 2 creates the initial routes R from the set of all orders O by using the functions and .

(1)function do
(2)
(3)for each do
(4)  switch
(5)   case
(6)     create_route
(7)   case
(8)     create_route
(9)   case
(10)     create_route
(11)  end
(12)  if
(13)  
(14)  end
(15)end
(16)return R
(17)end

Algorithm 3 calculates the saving matrix. The input parameters include the vehicle and the set of all routes R. The algorithm uses the function , which is described in detail by using a pseudocode in Algorithm 4.

(1)function do
(2)A = 
(3)for each do
(4)  for each do
(5)   if
(6)    
(7)   end
(8)  end
(9)end
(10)return A
(11)end
(1)function do
(2) create_route()
(3)if
(4)  for each k do
(5)   
(6)  end
(7)  oined_vertex ()
(8)  for each kdo
(9)   
(10)  end
(11)else
(12)  if
(13)   for each k do
(14)    
(15)   end
(16)   
(17)   
(18)   for each k do
(19)    
(20)   end
(21)  else
(22)   if
(23)    for each k do
(24)     
(25)    end
(26)    
(27)    
(28)    
(29)    for each kdo
(30)     
(31)    end
(32)   else
(33)    if
(34)     for each k do
(35)      for each l do
(36)       if ()
(37)        
(38)       else
(39)        
(40)       end
(41)      end
(42)     end
(43)    else
(44)     for each k do
(45)      
(46)     end
(47)     for each k do
(48)      
(49)     end
(50)    end
(51)   end
(52)  end
(53)end
(54)if
(55)  
(56)  
(57)  
(58)else
(59)  
(60)end
(61)end

Algorithm 5 uses a loop (which runs until no positive savings are present in savings matrix A) in which the next route with the currently highest savings is selected and the route is added to the set of all routes R. The initial routes and (now joined into the new one) are removed from the set of routes and from matrix A by the function .

(1)function do
(2)if ()
(3)  return
(4)
(5)whiledo
(6)  
(7)  
(8)  
(9)  
(10)  add
(11)  for each do
(12)   for each do
(13)    if
(14)     
(15)    end
(16)   end
(17)  end
(18)  
(19)end
(20)end

Algorithm 4 handles the process of joining the routes and into a new potential route . The procedure examines the specific variants where the end vertices of may coincide with the starting vertices of . The following variants are tested:(1)(2)(3)

Furthermore, the function is used to examine whether the vertices of route make up a subset of route in the same direction. If coinciding vertices in the right position according to the above conditions are identified, those vertices on the new route are joined together by using the function . If the new route meets the vehicle capacity constraint (), the new savings () are calculated by the function and saved in the saving matrix A.

4. Use of the Modified Clarke and Wright Algorithm in a Case Study

4.1. Case Study

The case study aimed to assess the effectiveness of the modified Clarke and Wright algorithm in the context of distribution logistics, particularly in the intelligent management of goods transport flows. The successful implementation of this algorithm has the potential to enhance efficiency, improve planning dynamics, optimize routing, and consequently lead to better utilization of vehicles transport capacity. This, in turn, could result in reduced CO2 emissions, improved overall operating economy, and increased competitiveness.

For the case study, collaboration was stablished with MD Logistika a.s., a company specializing in the pickup and delivery of foods in the Czech Republic and transboundary trade. The company handles schedules for numerous vehicles daily, managing 500–700 delivery orders from various clients. Operational planning at MD Logistika involves addressing multiple constraints, including vehicle loading capacities, time windows for loading/unloading, drivers’ rest breaks, ramp assignment, and the limitations on travel duration and distances for both route components and entire routes. Challenges such as a shortage of qualified staff for expert planning and the absence of comprehensive planning software that considers all constraints are prominent.

Currently, MD Logistika planners do not use any decision support tool and manually construct distribution plans. The primary aim of the study was to contribute to the innovation of the planning process. The goal was to develop a rapid algorithm capable of solving a relaxed version of the problem in a matter of seconds. Upon validation of its results by decision-makers, the algorithm could be refined, adapted to more complex problems with practical constraints, and potentially implemented in planning software. In the initial phase, the case study focused on transport capacity-related constraints, with time windows not being specified.

4.2. Input Data

Input data analysis is a crucial step in preparing for computational experiments. In the case of MD Logistika, the analysis focused on various aspects of their business data, including fleet information and customer details.

4.3. Fleet Information

The fleet used for the computation experiments was taken from the real operation at MD Logistika, consisting of approximately 200 trucks. The majority (85%) of vehicles in the fleet have a capacity of 33 transport units (pallets), while the remaining vehicles (15%) have capacities between 10 and 21 transport units. The primary parameters considered for each vehicle included the transport capacity and price per travelled kilometre.

4.4. Customer Information

Customer information was also derived from real data. Customers are primarily food product sellers. Key information includes their fixed costs and variable costs related to goods loading/unloading. Additional details encompass customer identification and position information (GPS). The distance matrix and matrix of travel times between customers were obtained along with the input data.

4.5. Delivery Orders

Delivery orders represent requirements for goods transportation between nodes. The majority (80%) of the requests are from the depot to customers, while the remaining fraction (20%) includes goods transport between customers and the collection of items from customers to the depot. The goods are transported on pallets, with each pallet representing one transport unit. The data includes the number of transported pallets and the loading/unloading site.

5. Results and Discussion

In the case study collaboration with MD Logistika, ten scenarios were devised, each corresponding to a specific day of operation. These scenarios captured real-world daily requirements consisting of 600 to 700 delivery orders.

The algorithm processed each day consecutively with the goal to optimize the initial routes that were set up based on the delivery orders. The scenarios are presented in Table 4 as follows:(1)Number of initial routes: This indicates the initial set of routes established based on the delivery orders for each day.(2)Final number of routes: After the optimization process using the modified Clarke and Wright algorithm, the final number of routes is determined.(3)Percentage of routes reduced: This metric reflects the percentage reduction in the number of routes achieved through the optimization process. It provides insights into the algorithm’s effectiveness in consolidating routes.(4)Total computing time: It is the time taken for the algorithm to complete the optimization process for each scenario.

These scenarios and their associated metrics help evaluate the algorithm’s performance in real-world scenarios, providing valuable insights into route optimization, reduction efficiency, and computational speed.

The evaluation of the experiments in the case study focused on various optimization results, as outlined in Table 5. The key optimization metrics are as follows:(1)Total cost is the overall cost incurred in the transportation process, considering factors such as travel costs, servicing costs, waiting costs, and vehicle deployment costs(2)Cost per pallet is the cost associated with transporting each pallet, providing insights into the efficiency of cost allocation(3)Total length is the length of optimized routes, representing the total distance travelled by the vehicles(4)The number of processed orders is the count of delivery orders that were successfully processed and incorporated into the optimized routes(5)The number of delivered pallets is the count of pallets that were successfully transported on the optimized routes(6)The number of remaining orders is the count of orders that were not included in the optimized routes due to capacity constraints.(7)The number of remaining pallets is the count of pallets that were not included in the optimized routes, indicating any unprocessed or pending items.

These metrics collectively provide a comprehensive overview of the algorithm’s performance, including cost efficiency, order processing capability, and the overall impact on the goods transportation process. The ability to handle various aspects of the real-world logistics challenges is crucial for the algorithm’s practical utility.

The above table demonstrates that in each of the scenarios, the algorithm was unable to plan all delivery orders, mainly due to the inadequate capacity of the fleet available for the relevant day. Goods dispatch planners confirmed that this situation is not uncommon in everyday practice. Since the proportion of orders that could not be processed is at the level of 1%, the company solves each problem individually by outsourcing the delivery. For the algorithm, this shortcoming can be eliminated by extending the input fleet. Furthermore, the mean cost of satisfying the orders is about CZK 1,341 thousand, (STD CZK 81 thousand), the mean summary length of all routes is 54.4 thousand km (STD about 3.5 thousand km), and the mean number of orders processed daily is 637 (STD 16).

As a result of a more detailed analysis of the scenarios, Table 6 includes the average number of stops on a route and the average length and duration of a route for each scenario.

In the case study, the Clarke and Wright algorithm modification was tested on a selected subproblem, primarily focusing on the constraints posed by the limited transport capacity. Since our algorithm was not designed to account for all practical constraints, such as limitations associated with the use of the loading ramps, driver’s breaks for rest, and time windows allocated to goods loading/unloading operations, it was not possible to directly compare the numerical results with real schedules.

The main conclusion resulting from empirical testing is that despite utilizing the dynamic saving matrix concept, one of the algorithm’s favourable key properties is retained: the relatively short computing time. If it becomes evident that the new algorithm maintains low computing complexity even after the inclusion of all constraints compelled by real-world circumstances, it will be feasible to use it in everyday dispatch planning practice, and moreover, in real time, owing to its potential high speed. Furthermore, if the algorithm is to be integrated into the daily work of dispatchers, a comprehensive software tool must be set up to include not only the algorithm itself but also basic input/output control, preferably transformed into a textual and graphic format.

6. Conclusions

The objective of this paper was to outline a modification of the Clarke and Wright algorithm tailored for application in delivery order-oriented distribution logistics. The proposed modification was then put to the test within a case study utilizing real internal data from MD Logistika company. The algorithm was tested on a selected subproblem, with a specific focus on constraints related to transport capacity.

The expert assessment of the results by MD Logistika’s operative planning professionals provided evidence that the outcomes are reasonable, especially concerning the total cost per route—a crucial parameter for efficient and competitive goods delivery. In essence, the accuracy of the modifications made to the Clarke and Wright algorithm has been affirmed. Consequently, additional real-world constraints can be gradually incorporated into the algorithm during the subsequent stages of research. As a result, the operational planning dispatchers may soon have access to an efficient software tool, aiding them in planning large-scale goods delivery with significantly reduced costs and staffing requirements compared to common industry practices.

Data Availability

The datasets used and analysed during the current study are available from the corresponding author on reasonable request.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

The work was supported from the Operational Program for Entrepreneurship and Innovation for Competitiveness within the Project Development of Technology for Intelligent Management of Transport Flows of Goods with registration number CZ.01.1.02/0.0/0.0/17_107/0012371 and by the Slovak Research and Development Agency, grant number APVV-19-0441.