You are currently viewing a new version of our website. To view the old version click .
Mathematics
  • Article
  • Open Access

29 February 2024

A Multi-Objective Learning Whale Optimization Algorithm for Open Vehicle Routing Problem with Two-Dimensional Loading Constraints

,
,
and
1
Faculty of Science, Kunming University of Science and Technology, Kunming 650032, China
2
Huaxin Consulting Co., Ltd., Hangzhou 430074, China
3
School of Minority Education, Northeastern University, Shenyang 110819, China
4
College of Engineering, Qufu Normal University, Rizhao 276826, China
This article belongs to the Special Issue Advanced Methods in Intelligent Transportation Systems

Abstract

With the rapid development of the sharing economy, the distribution in third-party logistics (3PL) can be modeled as a variant of the open vehicle routing problem (OVRP). However, very few papers have studied 3PL with loading constraints. In this work, a two-dimensional loading open vehicle routing problem with time windows (2L-OVRPTW) is described, and a multi-objective learning whale optimization algorithm (MLWOA) is proposed to solve it. As the 2L-OVRPTW is integrated by the routing subproblem and the loading subproblem, the MLWOA is designed as a two-phase algorithm to deal with these subproblems. In the routing phase, the exploration mechanisms and learning strategy in the MLWOA are used to search the population globally. Then, a local search method based on four neighborhood operations is designed for the exploitation of the non-dominant solutions. In the loading phase, in order to avoid discarding non-dominant solutions due to loading failure, a skyline-based loading strategy with a scoring method is designed to reasonably adjust the loading scheme. From the simulation analysis of different instances, it can be seen that the MLWOA algorithm has an absolute advantage in comparison with the standard WOA and other heuristic algorithms, regardless of the running results at the scale of 25, 50, or 100 datasets.

1. Introduction

Third-party logistics (3PL) is an outsourcing model used by companies wishing to entrust some or all of their logistics to third-party professional logistics service providers to reduce their material costs. A key challenge in third-party logistics involves understanding how to effectively plan and arrange the path of vehicles to meet customer needs and minimize transportation costs. This involves the open vehicle routing problem (OVRP). The OVRP is an important variant of the vehicle routing problem (VRP) proposed by Dantzig and Ramser [], which assumes that vehicles depart from the warehouse and do not need to return to the warehouse after serving customers. In the actual transportation process, it is necessary to properly load various sizes and shapes of goods from customers; this involves knowing how to reasonably load the goods to maximize the quantity of loaded goods and maximize space utilization. Many valuable items cannot be stacked because they require special protection and safety measures to ensure their integrity and value; this is called the two-dimensional loading problem. Two-dimensional loading refers to the length and width of items that cannot be stacked in the carriage. These valuable items can be artworks, electronic devices, jewelry, medicine, etc.
In this paper, we investigate the application of the two-dimensional loading open vehicle routing problem with time window constraints (2L-OVRPTW). As the OVRP is NP-complete property [] and can be reduced to the 2L-OVRPTW, the latter is also NP-complete. Therefore, we develop a multi-objective learning whale optimization algorithm (MLWOA) to solve it. In VRP problem research, it is common to consider variants such as time windows and delivery constraints. However, there are relatively few multi-objective optimizations that consider loading constraints in actual transportation. Therefore, considering this issue in this context has certain scientific significance and management guidance value.
In terms of a solution, the 2L-OVRPTW can build two different models. One is the 0–1 mathematical programming model, and the other is the sorting model. For the former, branch and bound, column generation, and other exact algorithms are used to provide a solution. The common feature of these algorithms is that they decompose the original problem and adopt a step-by-step optimization strategy to continuously generate and evaluate candidate solutions, thereby approaching the optimal solution. In each iteration of the solution, it is necessary to consider the constraints to ensure that the generated solution does not violate the constraints, in order to ensure the feasibility and effectiveness of the solution. For example, Yu et al. [] propose a hybrid column generation algorithm for the open vehicle routing problem with time windows. For the latter, the heuristic algorithm is mainly used. This type of algorithm does not rely on knowledge in specific problem domains but utilizes general search strategies to solve various types of problems. These algorithms originate from the observation and abstraction of natural phenomena or mathematical principles. For example, for the metaheuristic algorithms based on the population, Zhao et al. [] designed a cooperative water wave optimization algorithm to address the distributed assembly no-idle flow-shop scheduling problem. For the heuristic algorithms based on the probability model, Zhou et al. [] developed a self-adaptive differential evolution algorithm (DEA) for a scheduling problem involving single batch-processing machines with unequal release times and job sizes. The main contributions of this paper are as follows:
(1)
This paper studies a multi-objective problem and establishes a mathematical model of the 2L-OVRPTW, in which the optimization goals are to minimize the total driving distance and to maximize customer satisfaction. The MLWOA is designed as a two-phase algorithm to deal with this problem.
(2)
The sorting operation based on the largest order value (LOV) rule is designed in the MLWOA to replace the single individual update mode in the standard whale optimization algorithm (WOA) and to realize the discretization of the algorithm, so that the algorithm can be directly used to solve the 2L-OVRPTW.
(3)
Based on the consideration of the customer service order, this paper proposes a learning strategy that considers the location information of the block structure formed by two adjacent customers.
(4)
This paper proposes a scoring method and disturbance mechanism in the loading phase to effectively improve the loading efficiency of items.
The rest of this paper is organized as follows. Section 2 discusses related work. The problem description and formulation are discussed in Section 3. Section 4 introduces the solution approach, including the population initialization, global search, local search, and loading strategy. The simulation experiment and comparative analysis results are summarized in Section 5. Section 6 gives the conclusion and some future potential studies.

3. Problem Description and Formulation

3.1. Problem Description

The 2L-OVRPTW is defined on a directed network graph G = ( V , E ) , where V = { 0 , 1 , 2 , , N } represents the vertex set. E = { ( i , j ) | i , j V , i j } is a set of directions. The set V = V \ { 0 } represents the customers that need to be served. The vertex 0 represents the central warehouse where all the vehicles k K need to leave from but do not need to return to.
Each arc ( i , j ) E is associated with a travel distance d i j and a travel time t i j , and they are equal since the velocity of the vehicle is 1. Table 1 is the definition of symbols.
Table 1. The definition of symbols.
This paper takes the minimization of the total driving distance and the maximization of customer satisfaction as the optimization objectives and satisfies the following constraints:
(a)
Each vehicle starts from the central warehouse and does not need to return to the central warehouse after serving customers.
(b)
When serving the current customer, the items of other customers are not moved.
(c)
The loading edge of all items must be parallel to the edge of the carriage.
(d)
All items in the carriage shall not be overlapped.
(e)
The items on each vehicle are not allowed to exceed the length, width, and maximum carrying capacity of the vehicle.
Figure 1 shows a sample solution for the 2L-OVRPTW, in which 3 vehicles departed from the central warehouse to serve 11 customers. The distribution routes include route_1 = 0, 1, 11, 3, route_2 = 0, 4, 6, 7, 2 and route_3 = 0, 8, 9, 10, 5. The loading scheme of the items of vehicle 1 is shown in Figure 2. After using the upper left corner of the carriage as the coordinate origin, the items are loaded into the carriage as required. During the unloading process, all the items are unloaded in a direction parallel to the length of the carriage. The bold lines in Figure 2 represent the skyline. The thick line segments parallel to the length and width of the carriage are the longitudinal and horizontal skylines, respectively, and the shaded part is the redundant space of the carriage.
Figure 1. A sample solution for the 2L-OVRPTW.
Figure 2. Loading scheme.

3.2. Mathematical Formulation

Goal: Minimize total travel distance and maximize customer satisfaction. The mathematical model of the 2L-OVRPTW is as follows:
m i n   f 1 = k = 1 K i = 0 N j = 0 N d i j x k i j
m a x   f 2 = 1 N i = 1 N o t r i
i = 0 N q i y i k Q   ,   k K
k = 1 K y i k = 1   , i V
j = 1 N x 0 j k = 1 , k K
i = 1 N x i 0 k = 0 , k K
i = 0 N x i j k = y j k , j V , k K
j = 0 N x i j k = y i k , i V , k K
0 V k i g W w k i g , k K , i V , g M i
0 H k i g L l k i g   ,   k K , i V , g M i
H H i i g g = ( max ( y i k ( H k i g + l i g ) , y i k ( H k i g + l i g ) ) min ( y i k H k i g , y i k H k i g ) ( y i k l i g + y i k l i g ) ) , i , i V , g , g M i , g g , k , k K
L L i i g g = ( max ( y i k ( V k i g + w i g ) , y i k ( V k i g + w i g ) ) min ( y i k V k i g , y i k V k i g ) ( y i k w i g + y i k w i g ) ) , i , i V , g , g M i , g   g     , k , k K
max ( H H i i g g , L L i i g g ) 0   ,   i , i V ,   g , g M i
max ( H H i i g g , ( V k i g V k i g ) ) 0   ,   i , i V ,   g , g M i ,   i i
r t j = s t i + f i + t i j , i , j V
r t j < h j , j V
s t i = m a x ( r t i , e i )
o t r i { 0 , 1 } ,   i V
x i j k { 0 , 1 } , i , j V , k K
y i k { 0 , 1 } , i V , k K
In the above model, objective functions (1) and (2) give the objective functions of the 2L-OVRPTW, where function (1) represents the minimum total driving distance, and function (2) represents the maximum customer satisfaction. The constraints (3) ensure that the loading capacity does not exceed the maximum load capacity. Equation (4) ensures that all the customers can be served. Equations (5) and (6) indicate that all the vehicles should leave the central warehouse to serve a group of customers without returning to the central warehouse. Equations (7) and (8) ensure that each customer can only be served by one vehicle. Equations (9)–(14) are loading constraints. Equations (9) and (10) ensure that the loaded items do not exceed the scope of the carriage. Equations (11)–(13) ensure that the items do not overlap in the carriage. Equation (14) ensures that the items satisfy the first in and last out (FILO) principle. Equations (15)–(17) represent the time window constraints, where Equation (17) represents the possibility that the vehicle arrives early; if so, it needs to wait until the earliest service time. Equations (18)–(20) ensure the integrality constraints on the binary variable.

4. Solution Approach

The MLWOA proposed for the 2L-OVRPTW consists of two stages, the routing phase and the loading phase. The routing phase includes encoding and decoding, population initialization, the global search, and the local search. The loading phase load includes the scoring method, the arrangement of the loading sequence, and the disturbance mechanism. The general flow chart of the MLWOA is given at the end. For the convenience of expression, the symbols in this section and their definitions are given in Table 2.
Table 2. Symbols used in this section and their descriptions.

4.1. Encoding and Decoding

The important problem when applying the MLWOA to the 2L-OVRPTW involves finding a suitable mapping between the customer sequence and the individuals (continuous vectors) in the MLWOA. The 2L-OVRPTW is a discrete optimization problem; so, this paper adopts the largest order value (LOV) rule to map the real position information to the discrete position information. Similarly, after the discrete sequence changes, the real position information can also be adjusted by the reverse largest order value (RLOV) rule. The specific steps of the LOV rule are given below.
Step 1: X g , w is the sequence from the largest to the smallest, which can be obtained by real position information X g , w = [ X g , w [ 1 ] , X g , w [ 2 ] , , X g , w [ g ] , X g , w [ N ] ] .
Step 2: Find out the corresponding position of each number in X g , w in X g , w and place it in φ g , w in turn. Then, the intermediate sequence φ g , w is obtained.
Step 3: Each number in the discrete sequence P g , w can be obtained by P g , w [ φ g , w [ g ] ] = g .
As shown in Table 3, an example of the LOV rule is given. The individual sequence of real location information is X g , w = [ 1.49 , 2.41 , 2.17 , 1.78 , 2.06 , 1.80 , 0.88 ] , and the sequence after ranking from the largest to the smallest is X g , w = [ 2.41 , 2.17 , 2.06 , 1.80 , 1.78 , 1.49 , 0.88 ] . It can be seen that X g , w [ 1 ] = 1.49 ; so, the position is φ g , w [ 1 ] = 6 , P g , w [ φ g , w [ 1 ] ] = P g , w [ 6 ] = 1 , and with X g , w [ 2 ] = 2.41 , the position is φ g , w [ 2 ] = 1 , P g , w [ φ g , w [ 2 ] ] = P g , w [ 1 ] = 2 . By analogy, the customer’s discrete sequence is P g , w = [ 2 , 3 , 5 , 6 , 4 , 1 , 7 ] . After all the customers in P g , w are assigned a vehicle, the non-dominated solution must be an active schedule, in which the minimized total travel distance or maximized customer satisfaction is better than that of the other solutions.
Table 3. Example of LOV.

4.2. Population Initialization

The individual in the first generation of the population is generated by three rules. Firstly, Rule 1 and Rule 2 are used to generate two individuals, respectively; then, Rule 3 is used to generate other individuals. The detailed procedures of these rules are as follows:
Rule 1: Nearest principle
Let i = 0 , j Z , and G = . The nearest customer j can be funded by Equation (21). If r t j [ e j ,   h j ] are met, the customer j will be served and moved from Z to G . Let i = j and find the next nearest customer to serve. Otherwise, let i = 0 and choose another vehicle to service other customers.
m i n   d i j = ( x i x j ) 2 + ( y i y j ) 2   ,   j Z
Rule 2: Satisfaction principle
Step 1: Let i = 0 , j Z , and G = .
Step 2: Let Z 0 = . All the unserved customers that meet constraints (15)–(17) are placed in Z 0 . Randomly select a customer j in set Z 0 to service; if the constraints (3)–(14) are met, let i = j and then move j from Z to G and perform step 4. If no customer meets the constraints, then go to step 3.
Step 3: Select customer j from Z = Z \ { Z 0 } . If the constraints are met, let i = j and move j from Z to G . If there are no customers that can meet the constraints, perform step 4.
Step 4: If Z = , output G . Otherwise, return to step 1.
Rule 3: Quasi-opposition strategy
The quasi-opposition strategy refers to the opposite individual j   X g , j = [ X g , j [ 1 ] , X g , j [ 2 ] , , X g , j [ g ] , , X g , j [ N ] ] ( X g , j [ g ] [ a , b ] ) of individual i calculated by Equation (22) in the real field [ a , b ] .
X g , j [ g ] = { r a n d ( X ¯ , X g , i [ g ] ) X g , i [ g ] > X ¯ r a n d ( X g , i [ g ] , X ¯ ) X g , i [ g ] X ¯   ,   X ¯ = a + b 2
The initial population can be generated according to the three rules. And a non-dominated solution set is formed by the high-quality solutions in the population.

4.3. Global Search

Global search consists of exploitation mechanisms and a learning strategy. They are introduced in detail below. The symbols in this section and their definitions are given in Table 4.
Table 4. Symbols used in this section and their definitions.

4.3.1. Exploration Mechanisms

In the WOA, the individual randomly selected from the non-dominated solution set is regarded as the prey, and the other individuals are whales. By simulating the process of a whale catching prey, the whale keeps approaching the prey position and guides the optimization algorithm, which includes three mechanisms that are used to search for the high-quality solution area.
D = | C X g X g , w |
a = a i n t a f i n + 1 g / g e n max 1 μ g / g e n max
A = 2 a r 1 a
C = 2 r 2
Equation (23) indicates the absolute value of the distance between the individual X g , w and the non-dominant solution X g . Equation (24) shows the calculation process of nonlinear factor a and the coefficient μ = 25 . Equations (25) and (26) show the calculation process of the coefficients; A and C are the coefficients []. The mechanisms are expressed as follows:
Surrounding search mechanism: After determining the location of the non-dominant solution, the other individuals would keep approaching the prey. Equation (27) is used for the calculation of the surrounding search mechanism.
X g + 1 , w = X g A D
Spiral search mechanism: After calculating the distance between the non-dominant solution and individuals, the spiral Equation (28) is then created to mimic the helix-shaped movement.
X g + 1 , w = D e b l cos ( 2 π l ) + X g
In Equation (29), the individual approaches the high-quality solution in the form of a reduced circle or along a spiral path. In order to simulate this simultaneous behavior, we assume that during the optimization process, γ is the probability that the surrounding search mechanism or the spiral search mechanism is chosen to update the individual position.
X g + 1 , w = { X g A D , p 0 < γ D e b l cos ( 2 π l ) + X g ,   p 0 γ
Random search mechanism: An individual that was randomly selected would be used to update the location of other individuals in the population. Equation (30) indicates the absolute value of the distance between the individual X g , w and a random individual X g . Equation (31) is used for the calculation of the random search mechanism.
D = | C X g X g , w |
X g + 1 , w = X g A D
The WOA starts with an initialized population. In each iteration, the individuals update their location based on the randomly selected individual or the non-dominant solution that is currently obtained. When | A | > 1 , select the randomly individual X g , and when | A | 1 , select non-solution X g . According to the value of p 0 , it can switch between the surrounding search mechanism and the spiral search mechanism. The mechanisms in WOA have the advantages of simple operation, the ability to find the optimal solution quickly, and good convergence and stability for various types of optimization problems.

4.3.2. Learning Strategy

After the global search with the WOA-based mechanisms, the next process in the MLWOA is the learning strategy. It includes the block structure, three-dimensional information matrix, and three-dimensional probability matrix, which are designed to accumulate each customer location and the order relationship information of the non-dominated solutions. The relevant definitions are as follows:
Block structure: This consists of two adjacent customers in any solution of the 2L-OVRPTW. Therefore, the number of the block structure in a solution is n 1 if there are n customers in this solution. The customer service order information in the block structure is given by the Equation (32). If the block structure [ x ,   y ] exists, O N E _ T p × x × y g , w = 1 , otherwise, O N E _ T p × x × y g , w = 0 .
O N E _ T p × x × y g , w = { 1 , i f   x = π b e s t , P g , w ,   y = B e s t _ π b e s t , p + 1 g , w 0 , e l s e , p = 1 , 2 , , m   x , y = 1 , 2 , , n
Three-dimensional information matrix: An example is shown in Figure 3; the first dimension ( m ) records the location of the block structures. The two-dimensional matrix ( n , n ), which is composed of the second and third dimensions, records the information of the customer service order of all the block structures in the same location. The specific mathematical formulas of the three-dimensional information matrix description are as follows:
T M m × n × n g ( p , x , y ) = w = 1 n u m _ b e s t O N E _ T m × n × n g , w ( p , x , y ) , p = 1 , 2 , , m   x , y = 1 , 2 , , n
T M m × n × n g ( p ) = [ T M m × n × n g ( p , x , 1 ) , , T M m × n × n g ( p , x , n ) ]   = [ T M m × n × n g ( p , 1 , 1 ) ,   ,   T M m × n × n g ( p , 1 , n ) T M m × n × n g ( p , n , 1 ) ,   ,   T M m × n × n g ( p , n , n ) ]
T M m × n × n g = [ T M m × n × n g ( 1 ) , T M m × n × n g ( 2 ) , , T M m × n × n g ( p ) , , T M m × n × n g ( m ) ]
Figure 3. Three-dimensional information matrix.
Equations (33)–(35) give the hierarchical structure of the three-dimensional information matrix. Equation (33) is used to count the distribution information of all the block structures. T M m × n × n g ( p , x , y ) represents the element which is the cumulative number of the block structure [ x ,   y ] at position P . The T M m × n × n g ( p ) given in Equation (34) is a two-dimensional matrix ( n , n ) and refers to the customer service order information of all the block structures at location P . In Equation (35), the T M m × n × n g is a three-dimensional information matrix; it records the information of all the block structures in the non-dominated solution set.
Three-dimensional probability matrix: After the three-dimensional information matrix is determined, the three-dimensional probability matrix will be calculated in the next step. The specific mathematical formulas are as follows:
s u m p g = x = 1 n y n T M m × n × n g ( p , x , y ) ,   p = 1 , 2 , , m  
  P M m × n × n g ( p ) = [ T M m × n × n g ( p , 1 , 1 ) s u m p g ,   ,   T M m × n × n g ( p , 1 , n ) s u m p g   T M m × n × n g ( p , n , 1 ) s u m p g ,   ,   T M m × n × n g ( p , n , n ) s u m p g ]
P M m × n × n g = [ P M m × n × n g ( 1 ) , P M m × n × n g ( 2 ) , , P M m × n × n g ( p ) , , P M m × n × n g ( m ) ]
P M m × n × n g + 1 = η P M m × n × n g + 1 + ( 1 - η ) P M m × n × n g
In Equation (36), the s u m p g represents the number of all the block structures in position P . Equation (37) gives the probability of each element in P M m × n × n g ( p ) at position P. Equation (38) gives the three-dimensional probability matrix. Equation (39) represents the update method of the probability matrix, and η is the random numbers in [ 0 ,   1 ] .
As shown in Figure 3, an example of a three-dimensional information matrix that includes six individuals is given. For example, in the first individual, π 1 = [ 1 , 2 , 5 , 3 , 4 ] , the block structures are [1, 2], [2, 5], [5, 3], and [3, 4]. In addition, at the position P = 1 , there are six block structures, including [1, 2], [1, 2], [5, 2], [3, 5], [4, 5], and [2, 3]. Therefore, in the three-dimensional information matrix, the values of the elements with subscripts the (1, 2, 3), (1, 3, 5), (1, 4, 5), and (1, 5, 2) are 1; the value of the element with the subscripts (1, 1, 2) is 2; and the other elements are 0.
As mentioned above, the new individuals can be generated based on the three-dimensional probability matrix. The pseudocode of the update strategy is shown in Algorithm 1.
The pseudocode of the update strategy is shown in Algorithm 1.
Algorithm 1 Update strategy
1:Input:
2: Set the number of p o p s i z e and N.
3:Begin:
4: Set l o o p = 1 , n u m = 1 , p = 1 .
5:while  l o o p max _ l do
6:   Calculate the T M m × n × n g through the non-dominated solution set π b e s t g .
7:   while  n u m n u m _ b e s t g do
8:     while  p n u m _ c u s t o m e r do
9:      Generate the probability matrix of position p as P M m × n × n g ( p ) .
       s u m = x = 1 n y = 1 n P M m × n × n g ( p , x , y )
10:       if s u m > 0 , then
11:        Place the block structure in the position p and the t a b u
12:        Let p = p + 2 .
13:       else
14:        Randomly select a customer from c o s s e q u e n c e to position p and the t a b u
15:        Let p = p + 1 .
17:       end if
18:     end while
19:    Put the t a b u into the population as an individual
20       Let n u m = n u m + 1
21:   end while
22:   Update the π g and π b e s t g
23:   Let l o o p = l o o p + 1
24:end while
25:Output:
26: The current population π g and its non-dominated solution set π b e s t g

4.4. Local Search

After the global search, a better non-dominated solutions set is obtained. However, the 2L-OVRPTW has a large solution space, and the non-dominated solutions are distributed in various regions. Therefore, the local search of the MLWOA is used for the exploitation of the non-dominated solutions. As shown in Figure 4, Figure 5 and Figure 6, this section designs a local search with three neighborhood operations.
Figure 4. Interchange operation.
Figure 5. Insert operation.
Figure 6. Swap operation.
Interchange operation: Randomly select customer i and customer j from r o u t e [ k ] and r o u t e [ l ] , respectively, and then exchange them.
Insert operation: Randomly select two non-adjacent customers i and customer j in r o u t e [ k ] , and then insert the customer i in front of customer j .
Swap operation: Randomly select customers i and customer j in r o u t e [ k ] , and then exchange them.
After each operation, if a better solution that satisfies the constraints is generated, the better solution will replace the current optimal solution. Otherwise, it will not be accepted.
The complexity analysis for the algorithm is detailed as follows. Let the population size of the MLWOA be p o p s i z e , the number of customers be N , the number of global search iterations be g e n g l o b a l , the number of updates based on the three-dimensional probability matrix be m a x _ l , the number of local search iterations be g e n l o c a l , and the average total number of neighborhood operations used during the local search be Z . The algorithm complexity T M L W O A of the MLWOA consists of global search complexity and local search complexity. The algorithm complexity of the MLWOA consists of global search complexity and local search complexity, where the global search complexity includes the complexities of the initialization of the population O ( p o p s i z e N ) , the updating of the three-dimensional probability matrix O ( p o p s i z e 2 N 2 ) , the generation of individuals based on the sampling probability matrices O ( p o p s i z e N ) , and the evaluation of the population O ( p o p s i z e N ) . The local search complexity is O ( g e n l o c a l Z N ) . Therefore, T M L W O A = O ( g e n g l o b a l ( m a x _ l p o p s i z e N 2 + g e n l o c a l Z N ) ) .
The pseudocode of the local search is shown in Algorithm 2.
Algorithm 2 Variable neighborhood local search
1:Input:
2: Set m a x _ s e a r c h = 10 l o o p = 1 , N _ i n t e r = 1 , N _ i n s = 1 , N _ s w a p = 1 and N _ m a x = 10 .
3:Begin:
4:while l o o p 10 do
5:  while N _ i n t e r 10 . do
6:   Randomly select a solution π b e s t g , w , randomly select vehicle k and vehicle l ,
   k , l π b e s t g , w , and randomly select customer i and customer j . i v e h i c l e   k ,
   j v e h i c l e   l , then i n t _ π b e s t g , w =interchange ( π b e s t g , w , k , l , i , j )
7:   if i n t _ π b e s t g , w satisfies all constraints, then
8:    π b e s t g , w = i n t _ π b e s t g , w
9:   else N _ i n t e r = N _ i n t e r + 1
10:  end while
11:  while  N _ i n s 10 do
12:   Randomly select vehicle k , k π b e s t g , w , randomly select customer i and customer j ,
    i , j v e h i c l e   k , then i n s _ π b e s t g , w =insert ( π b e s t g , w , k , i , j )
15:   if i n s _ π b e s t g , w satisfies all constraints, then
16:     i n s _ π b e s t g , w = i n s _ π b e s t g , w
19:   else N _ i n s = N _ i n s + 1
20:  end while
21:  while  N _ s w a p 10 do
22:   Randomly select vehicle l , l π b e s t g , w , and randomly select customer i and customer j ,
    i , j v e h i c l e   l , then s w a p _ π b e s t g , w =swap ( π b e s t g , w , l , i , j )
23:   if s w a p _ π b e s t g , w satisfies all constraints, then
24:     π b e s t g , w = s w a p _ π b e s t g , w
27:   else N _ s w a p = N _ s w a p + 1
28:   end while
30: l o o p = l o o p + 1
31:end while
32:Output:
33: Updated non-dominated solution set π b e s t g .

4.5. Loading Strategy

The 2L-OVRPTW is integrated by the routing subproblem and the loading subproblem. The non-dominated solutions optimized by the MLWOA’s routing phase also need to be loaded. This section describes in detail how to optimize the loading process of the non-dominated solutions by the MLWOA’s loading phase.
The loading strategy based on the skyline mainly consists of a scoring method, the arrangement of the loading sequence, and the disturbance mechanism.

4.5.1. Loading Sequence

The loading sequence of the customers adopts the first in and last out (FILO) principle. For example, the service sequence of the route is [,,,]. It can be seen that the loading sequence is [7,6,5,4]. Obviously, the FILO principle can save service time.
In addition, the number of each customer’s items is not unique; Rule 4 and Rule 5 are used to initialize the order of each customer’s items. Then, all the items are loaded into the carriage through the scoring method.
Rule 4: Initialize and sort according to the length of the first customer’s items from small to large.
Rule 5: Initialize and sort according to the size of the rest of the customers’ items from small to large.

4.5.2. Scoring Method

The scoring method is an important part of the skyline-based loading strategy. As shown in Figure 7, the red line segment represents the horizontal skyline, and the green line segment represents the vertical skyline. The figure shows all the scores that would appear when an item I was placed on any horizontal skyline. That means that the items placed on each horizontal skyline receive a score, with a full score of 5 points.
Figure 7. Scoring method. (a,b) Five points; (c,d) Four points; (eg) Three points; (hj) Two points; (k) One point.
The specific scoring methods are as follows:
Five points: When the width of the item is equal to the horizontal skyline of the current segment: if the length of the item is equal to the length of the vertical skyline on either side of the adjacent sides, the score is 5 points, as shown in parts (a) and (b).
Four points: There are two cases; the first is that the width of the item is equal to the horizontal skyline of the current segment, and the length is less than the vertical skyline on the adjacent two sides, as shown in part (c) in Figure 7. The other is that the width of the item is less than the horizontal skyline of the current segment, and the length is equal to the shorter side of the vertical skyline on both adjacent sides, as shown in part (d).
Three points: There are three cases; the first is that the width of the item is equal to the horizontal skyline of the current segment, and the length is between both adjacent sides, as shown in part (e) in Figure 7. The second is that the width is less than the horizontal skyline of the current segment, and the length is less than the vertical skyline on both adjacent sides, as shown in part (f) in Figure 7. Finally, the width is less than the horizontal skyline of the current segment, and the length is equal to the vertical skyline of the longer side on both adjacent sides, as shown in part (g).
Two points: There are three cases; the first is that the width of the item is equal to the horizontal skyline of the current segment, and the length is more than the vertical skyline on both adjacent sides, as shown in part (h) in Figure 7. The second is that the width is less than the horizontal skyline of the current segment, and the length is between the vertical skylines on both adjacent sides, as shown in part (i) in Figure 7. Finally, the width is less than the horizontal skyline of the current segment, and the length is more than the vertical skyline on both adjacent sides, as shown in part (j).
One point: If the width of the item is more than the horizontal skyline of the current segment, the score is 1 point, as shown in part (k).
If all horizontal skylines are less than the item’s width, the horizontal skylines that need to be filled are selected before loading the item. Otherwise, the item will be inserted at the horizontal skyline position with the highest score, and the skyline will be updated. As shown in Figure 8, the loading process of the customer’s items is given. The solid line represents the customer’s service sequence, and the dotted line represents the customer’s item loading sequence.
Figure 8. Distribution route and skyline update.

4.5.3. Disturbance Mechanism

Integrating a disturbance mechanism is conducive to the optimization of the loading processes. If the loading process is unreasonable, there may be a large area of redundant space, which will make it impossible to load all the customers’ items on the service route into the carriage. In view of this situation, the loading order of two items of any customer are randomly selected to exchange and are then re-loaded, as shown in parts (a) and (b) in Figure 9.
Figure 9. Exchanging the loading sequence of items.
Table 5 below shows the comparison results of the loading success rate related to whether or not the disturbance mechanism is used in the different customer sizes. The No represents the non-use of the disturbance mechanism, and the Yes represents the use of the disturbance mechanism during loading. Among them, the success rate refers to the proportion of the number of times that all the goods are loaded into the carriage after 20 independent operations. It can be clearly seen that the results after adding the disturbance mechanism are significantly higher. In Figure 10, the flow chart of the MLWOA, except for loading, and the flow chart of loading can be seen.
Table 5. Loading success rate.
Figure 10. (a) Flow chart of MLWOA except loading; (b) flow chart of loading.
The pseudocode of the MLWOA algorithm is shown in Algorithm 3.
Algorithm 3 Multi-objective learning whale optimization algorithm
1:Input:
2: Set g e n _ max , p o p s i z e , max _ l , γ
3:Begin:
4: Let   l r a n d o m [ 1 , 1 ] ,   p r a n d o m [ 0 , 1 ]
5:Population initialization
6:while  g g e n _ max do
7:  while  t max _ l do
8:   while  i < p o p s i z e do
9:    if A 1 , then
10:     Update π g , i by Equation (30)
11:    else
12:     if p < γ , then
13:      Update π g , i by Equation (24)
14:     else
15:      Update π g , i by Equation (27)
16:     end if
17:    end if
18:    i = i + 1
19:    end while
20:    t = t + 1
21:    end while
22:   Update the population, non-dominated solution set and three-dimensional probability matrix
23:   for π b e s t g , w π b e s t g , do
24:    Initialize the loading sequence of all items of customers by Rule 4 and Rule 5.
25:    for  M M i , k π b e s t g , w do
26:     for  c M M i , k do
27:      for  I n g c do
28:       Loading the customer’s items into the carriage by the loading strategy.
29:       end for
30:      end for
31:     end for
32:    end for
33:   g = g + 1
34end while
35:Output:
36: Return the non-dominated solution set π b e s t g .

5. Simulation Experiment and Comparative Analysis

5.1. Experimental Setup

As there is currently no dataset suitable for 2L-OVRPTW, this paper selects an available international dataset related to VRP (datasets from http://www.bernabe.dorronsoro.es/vrp/ (accessed on 1 January 2024)). All experiments are run on Windows 10 platform, which has 3.0 GHz CPU and 16 GB RAM, and are on a single thread. The algorithms in this paper are implemented by Python 3.7. The coordinates of the central warehouse and its service time window are (0, 0) and [ 0 ,   ] , respectively. Each vehicle’s load capacity Q is 200. The items in the datasets are generated by using the method from references [,], as shown in Table 6. In this paper, there are datasets of different customer sizes. There are four categories, as shown in Table 6. Category 4 is used to generate all items in an instance containing 25 customers, and the items of the other instances are randomly generated by the other categories. Each category can randomly generate the number M i of items required by the customer i . Vertical, uniform, and horizontal are three different ways to generate the shape of all the items. The length and width of each item are generated based on the (L, W) of the carriage. The L and the W refer to the length and width of the carriage, respectively, and their values are (40, 20).
Table 6. Rectangular corresponding items.

5.2. Performance Index and Parameter Setting

5.2.1. Performance Index

(1)
N index
For the non-dominated solution sets obtained by the different algorithms, the more non-dominated solutions in the set, the better the algorithm’s performance in solving the problem.
(2)
N ¯ index
This performance is evaluated by counting the number of solutions remaining after the set of non-dominated solutions obtained by the algorithm is dominated by the other non-dominated solutions.
N ( S j ) = | S j { x S j | y S s u m : y x } |
In Formula (40), S s u m represents the set of non-dominated solutions obtained by all the algorithms, and S j is the solution set of the non-dominated solutions found by algorithm j . N ( S j ) represents the number of solutions remaining after the other non-dominated solution sets dominate the non-dominated solution set obtained by the algorithm j .
(3)
R index
In Formula (41), R ( S j ) represents the ratio of the solution obtained by the algorithm j in S s u m to the non-dominated solution set obtained by algorithm j
R ( S j ) = | S j { x S j | y S s u m : y x } | / | S j |

5.2.2. Parameter Setting

The parameters involved in the MLWOA include the population size, the search factor, and the number of iterations based on the three-dimensional probability matrix; these are denoted by by p o p s i z e , γ , and m a x _ l , respectively. This paper selects the C201 instance for parameter testing and analysis in the dataset. The DOE method is used to discuss the influence of each parameter on the performance of the MLWOA. First, four level values are set for each parameter, then an L16 (43) orthogonal test table is established. As shown in Table 7, Table 8 and Table 9, The first target value is the average value of the number of non-dominated solutions divided by the population size after each group of parameters runs 20 times. The sum of all the non-dominated solutions obtained by running 20 times is denoted by S _ P . S _ R is the number remaining after removing the dominated solution from S _ P ; so, the second target value is S _ R S _ P . The target values are each worth 50% in RV, which is used as an evaluation metric to analyze the parameter performance.
Table 7. Parameter level.
Table 8. Orthogonal test results.
Table 9. Average response value of parameters.
Therefore, the parameter combination set based on the experimental analysis is p o p s i z e = 70 , γ = 0.6 , m a x _ l = 60 .

5.3. Comparison with Standard WOA

To verify the effectiveness of the MLWOA, the MLWOA was compared with the WOA. Several instances, including 25, 50, and 100 customers, were selected for experimental analysis. The experimental results after running for the same time are shown in Table 10. The optimal results are shown in bold. The performance of the Wilcoxon rank-sum test based on the N , N ¯ , and R parameters is shown in Table 10. Table 11 shows that with p < 0.001, the effectiveness of the MLWOA algorithm is significantly higher than that of the WOA algorithm.
Table 10. Comparison results of the MLWOA with WOA.
Table 11. The results of the Wilcoxon rank-sum test for MLWOA and WOA.
The MLWOA makes the search scope in the solution space wider and the search degree deeper and more detailed. The use of nonlinear factors in the MLWOA also makes the algorithm not fall into local optimization. Therefore, compared with the WOA, the number of non-dominant solutions obtained by the MLWOA is higher. In addition, the non-dominated solutions obtained by the two algorithms are liberated together. After removing the dominated solutions, the number of solutions from the MLWOA is obviously more than that of the WOA. This shows that the quality of the solutions obtained by the MLWOA is better.

5.4. Comparison with Other Algorithms

In order to verify the effectiveness of the MLWOA in solving the 2L-OVRPTW, this paper compares the MLWOA with other algorithms that solved similar problems at home and abroad, including the QPSO algorithm [], VNS algorithm [], and SAHLS algorithm []. The instances with 25, 50, and 100 customers are selected for testing. The results are shown in Table 12. For index N , all four algorithms can obtain some non-dominated solutions, but obviously, the number of non-dominated solutions obtained by the MLWOA is more. For index N ¯ , after being dominated by the non-dominated solution sets of the other algorithms, all three algorithms (QPSO, VNS, and SAHLS) have a small number of non-dominated solutions left, while the MLWOA can retain most of the solutions. For index R , good results are achieved in the MLWOA. According to the results from Figure 11, it can be observed that our algorithm outperforms the other heuristic algorithms. For large-scale instances in particular, the MLWOA obtained more non-dominated solutions. The findings given above show that the MLWOA can effectively solve the 2L-OVRPTW.
Table 12. Comparison results of MLWOA with QPSO, VNS, and SAHLS.
Figure 11. Box plots of results for 3 heuristics and MLWOA for different indexes.
The main reason is that the three-dimensional probability matrix used in the MLWOA’s learning strategy can not only learn valuable information about the customer order existing in the non-dominated solution but also accurately and reasonably record the position of each block structure. With the algorithm that only considers the order of customers, it is difficult to achieve the effect of the MLWOA. According to the above experiments and analysis, it can be concluded that the three-dimensional probability matrix plays an important role in the MLWOA.

6. Conclusions

In this paper, a learning whale optimization algorithm (MLWOA) is proposed to solve the two-dimensional loading open vehicle routing problem with time window constraints (2L-OVRPTW). The objective of the optimization is to minimize the distance and maximize customer satisfaction. The 2L-OVRPTW problem integrates both routing and loading problems. In this context, both problems need to be considered together. When solving this problem using the MLWOA, the individuals are first discretized using the LOV rules, allowing the population to be updated using the update mechanism of the whale optimization algorithm (WOA). During the initialization stage, diverse initial populations are generated using different rules. To better capture customer location and order relationship information in high-quality solutions, a three-dimensional probability matrix based on the block structure of adjacent customers is constructed. A loading strategy based on the skyline and scoring method is adopted to improve the loading efficiency. Compared to the standard WOA and the other algorithms in the literature, the computational results derived from the 2L-OVRPTW instances show that the MLWOA obtains better results than the others.
The future research will consider expanding two-dimensional loading to three-dimensional loading problems based on open vehicle routing problems and will consider more practical delivery constraints, such as pickup and delivery constraints, periodic constraints, etc. In terms of solution methods, different learning mechanisms will be integrated on the basis of the WOA, so that it can be applied in different scenarios.

Author Contributions

Conceptualization, Y.Z. and Z.W.; methodology, Y.Z.; software, Y.Z. and Z.W.; writing—original draft, Y.Z.; writing—review and editing, Y.Z., H.L. and H.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

Hongwei Li was employed by Huaxin Consulting Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. Huaxin Consulting Co., Ltd. had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

References

  1. Dantzig, G.B.; Ramser, J.H. The Truck Dispatching Problem. Manag. Sci. 1959, 6, 80–91. [Google Scholar] [CrossRef]
  2. Letchford, A.N.; Lysgaard, J.; Eglese, R.W. A branch-and-cut algorithm for the capacitated open vehicle routing problem. J. Oper. Res. Soc. 2017, 58, 1642–1651. [Google Scholar] [CrossRef]
  3. Yu, N.K.; Qian, B.; Hu, R.; Chen, Y.W.; Wang, L. Solving open vehicle problem with time window by hybrid column generation algorithm. J. Syst. Eng. Electron. 2022, 33, 997–1009. [Google Scholar] [CrossRef]
  4. Zhao, F.; Zhang, L.; Cao, J.; Tang, J. A Cooperative Water Wave Optimization Algorithm with Reinforcement Learning for the Distributed Assembly No-idle Flowshop Scheduling Problem. Comput. Ind. Eng. 2020, 153, 107082. [Google Scholar] [CrossRef]
  5. Zhou, S.; Xing, L.; Zheng, X.; Du, N.; Wang, L.; Zhang, Q. A Self-Adaptive Differential Evolution Algorithm for Scheduling a Single Batch-Processing Machine with Arbitrary Job Sizes and Release Times. IEEE Trans. Cybern. 2021, 51, 1430–1442. [Google Scholar] [CrossRef] [PubMed]
  6. Cai, Y.; Cheng, M.; Zhou, Y.; Liu, P.; Guo, J.M. A hybrid evolutionary multitask algorithm for the multiobjective vehicle routing problem with time windows. Inf. Sci. 2022, 612, 168–187. [Google Scholar] [CrossRef]
  7. Michel, D.; Andrea, D.; Jean, D. Tabu search for the time-dependent vehicle routing problem with time windows on a road network. Eur. J. Oper. Res. 2021, 288, 129–140. [Google Scholar] [CrossRef]
  8. Marinakis, Y.; Marinaki, M.; Migdalas, A. A multi-adaptive particle swarm optimization for the vehicle routing problem with time windows. Inf. Sci. 2019, 481, 311–329. [Google Scholar] [CrossRef]
  9. Moradi, B. The new optimization algorithm for the vehicle routing problem with time windows using multi-objective discrete learnable evolution model. Soft Comput. 2020, 24, 6741–6769. [Google Scholar] [CrossRef]
  10. Shi, Y.; Zhou, Y.; Boudouh, T.; Grunder, O. A lexicographic-based two-stage algorithm for vehicle routing problem with simultaneous pickup–delivery and time window. Eng. Appl. Artif. Intell. 2020, 95, 103901. [Google Scholar] [CrossRef]
  11. Zhou, Y.; Kong, L.; Cai, Y.; Wu, Z.; Liu, S.; Hong, J.; Wu, K. A decomposition-based local search for large-scale many-objective vehicle routing problems with simultaneous delivery and pickup and time windows. IEEE Syst. J. 2020, 14, 5253–5264. [Google Scholar] [CrossRef]
  12. Barth, M.; Boriboonsomsin, K. Real-World Carbon Dioxide Impacts of Traffic Congestion. Transp. Res. Rec. J. Transp. Res. Board 2008, 2058, 163–171. [Google Scholar] [CrossRef]
  13. Xiao, Y.; Zuo, X.; Huang, J.; Konak, A.; Xu, Y. The continuous pollution routing problem. Appl. Math. Comput. 2020, 387, 125072. [Google Scholar] [CrossRef]
  14. Zhang, C.B.; Wang, W.Z.; Zhao, X.S.; Gu, J.W.; Yan, Y.Z. A Memetic Algorithm Based on Two_Arch2 for Multi-depot Heterogeneous-vehicle Capacitated Arc Routing Problem. Swarm Evol. Comput. 2021, 63, 100864. [Google Scholar] [CrossRef]
  15. Xiao, Y.; Zhang, Y.; Kaku, I.; Kang, R.; Pan, X. Electric vehicle routing problem: A systematic review and a new comprehensive model with nonlinear energy recharging and consumption. Renew. Sustain. Energy Rev. 2021, 151, 111567. [Google Scholar] [CrossRef]
  16. Iori, M.; José, J.; González, S.; Vigo, D. An Exact Approach for the Vehicle Routing Problem with Two-Dimensional Loading Constraints. Transp. Sci. 2007, 41, 253–264. [Google Scholar] [CrossRef]
  17. Fuellerer, G.; Doerner, K.F.; Hartl, R.F.; Iori, M. Ant colony optimization for the two-dimensional loading vehicle routing problem. Comput. Oper. Res. 2009, 36, 655–673. [Google Scholar] [CrossRef]
  18. Wei, L.; Zhang, Z.; Zhang, D.; Lim, A. A variable neighborhood search for the capacitated vehicle routing problem with two-dimensional loading constraints. Eur. J. Oper. Res. 2015, 243, 798–814. [Google Scholar] [CrossRef]
  19. Wei, L.; Zhang, Z.; Zhang, D.; Leung, S.C.H. A simulated annealing algorithm for the capacitated vehicle routing problem with two-dimensional loading constraints. Eur. J. Oper. Res. 2018, 265, 843–859. [Google Scholar] [CrossRef]
  20. Wang, Z.C.; Zhou, L. Modeling and Optimization of Vehicle Scheduling Problem with Two-dimensional Loading Constraints. Comput. Technol. Dev. 2018, 28, 105–110. [Google Scholar]
  21. Yan, R.; Zhu, X.N.; Zhang, Q.; Qi, Y.Y.; Lin, Y.Z. Research on model and algorithm of multi depot vehicle routing problem with time windows considering two-dimensional packing constraints. China Manag. Sci. 2017, 25, 67–77. [Google Scholar]
  22. Leung, C.H.; Stephen, Z.; Zhang, D.; Zhang, X.; Lim, M.K. A meta-heuristic algorithm for heterogeneous fleet vehicle routing problems with two-dimensional loading constraints. Eur. J. Oper. Res. 2013, 225, 199–210. [Google Scholar] [CrossRef]
  23. Sabar, N.R.; Bhaskarh, A.; Chung, E.; Turky, A.; Song, A. An Adaptive Memetic Approach for Heterogeneous Vehicle Routing Problems with two-dimensional loading constraints. Swarm Evol. Comput. 2020, 58, 100730. [Google Scholar] [CrossRef]
  24. Liu, W.; Zhou, Y.; Qiu, J.; Xie, N.; Chang, X.; Chen, J. A hybrid ACS-VTM algorithm for the vehicle routing problem with simultaneous delivery & pickup and real-time traffic condition. Comput. Ind. Eng. 2021, 162, 107747. [Google Scholar] [CrossRef]
  25. Seyedali, M.; Lewis, A. The Whale Optimization Algorithm. Adv. Eng. Softw. 2016, 95, 51–67. [Google Scholar] [CrossRef]
  26. Zheng, W.D.; Li, Z.G.; Jia, H.Z.; Gao, C. Study on prediction model of steel making end point based on improved whale optimization algorithm and least square support vector machine. J. Electron. 2019, 47, 700–706. [Google Scholar]
  27. Wang, T.; Xin, Z.; Miao, H.; Zhang, H.; Du, Y. Optimal Trajectory Planning of Grinding Robot Based on Improved Whale Optimization Algorithm. Math. Probl. Eng. 2020, 2020, 1–8. [Google Scholar] [CrossRef]
  28. Zeng, N.; Song, D.; Li, H.; You, Y.; Alsaadi, F.E. A Competitive Mechanism Integrated Multi-objective Whale Optimization Algorithm with Differential Evolution. Neurocomputing 2020, 432, 170–182. [Google Scholar] [CrossRef]
  29. Dewi, S.K.; Utama, D.M. A New Hybrid Whale Optimization Algorithm for Green Vehicle Routing Problem. Syst. Sci. Control Eng. 2021, 9, 61–72. [Google Scholar] [CrossRef]
  30. Yu, N.K.; Jiang, W.; Qian, B.; Hu, R.; Wang, L. Learning Whale Optimization Algorithm for Open Vehicle Routing Problem with Loading Constraints. Discret. Dyn. Nat. Soc. 2021, 2021, 1–14. [Google Scholar] [CrossRef]
  31. Long, W.; Cai, S.; Jiao, J.; Tang, M.; Tiebin, W.U. Improved whale optimization algorithm for solving large-scale optimization problems. Syst. Eng. Theory Pract. 2017, 37, 2983–2994. [Google Scholar]
  32. Gendreau, M.; Iori, M.; Laporte, G.; Martello, S. A Tabu Search Heuristic for The Vehicle Routing Problem With Two-Dimensional Loading Constraints. Networks 2008, 51, 4–18. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.