Abstract
This paper addresses the twodimensional loading open vehicle routing problem with time window (2LOVRPTW). We propose a learning whale optimization algorithm (LWOA) to minimize the total distance; an improved skyline filling algorithm (ISFA) is designed to solve the twodimensional loading problem. In LWOA, the whale optimization algorithm is used to search the solution space and get the highquality solution. Then, by learning and accumulating the block structure and customer location information in the highquality solution individuals, a threedimensional matrix is designed to guide the updating of the population. Finally, according to the problem characteristics, the local search method based on fleet and vehicle is designed and performed on the highquality solution region. IFSA is used to optimize the optimal individual. The computational results show that the proposed algorithm can effectively solve 2LOVRPTW.
1. Introduction
Vehicle routing problem (VRP), as a classical combinatorial optimization problem, was first proposed by Dantzig and Ramser [1]. Open vehicle routing problem (OVRP) is a variant of VRP, which widely exists in the thirdparty logistics distribution. This type of problem is generating a set of vehicle routes that meet vehicle load conditions, compartment volume, and customer service demand. The vehicles do not need to return to the central depot. With the rapid development of ecommerce technology, the importance of thirdparty logistics is more prominent, and the loading link is an essential part of the logistics field. The loading order of goods can directly affect the service efficiency of customer points. In this context, it has important practical significance to study the twodimensional loading open vehicle routing problem with time windows (2LOVRPTW). 2LOVRPTW includes “routing” and “loading.” Generally speaking, we need to consider both “routing” and “loading” to obtain a satisfactory solution. In addition, due to factors such as the weight, height, and fragility of the goods, the goods cannot be stacked on each other during the loading process, such as the distribution of large household appliances and delicate home appliances. Therefore, the study of 2LOVRPTW has an important economic value. In theory, 2LOVRPTW comprises a vehicle routing problem and a twodimensional loading problem, so 2LOVRPTW is an NPhard problem with high complexity.
The research on the vehicle routing problem and the twodimensional loading problem has been relatively mature, but the vehicle routing problem with twodimensional loading constraints (2LCVRP) has gradually received attention in recent years. Research is very limited. Ma et al. [2] proposed a graphbased fuzzy evolutionary algorithm to solve the twoechelon vehiclerouting problem. With the optimization goal of minimizing the cost, each offspring is generated from the parent’s allocation graph through the graphbased fuzzy allocation process, and a fuzzy local search process is designed to further improve the performance of the offspring. Iori et al. [3] proposed 2LCVRP for the first time in 2007 and used an exact algorithm based on branch pricing to solve it, but this algorithm can only effectively solve small and mediumsized cases. Zachariadis et al. [4] proposed a metaheuristic algorithm for 2LCVRP. The algorithm combines the tabu search algorithm and the guiding local search principle. In addition, the paper uses storage structure record feasible loading scheme and a set of heuristic algorithms to solve the loading problem and has achieved good results. Fuellerer et al. [5] proposed a new ant colony optimization algorithm based on saving algorithm to solve 2LCVRP. At the same time, different heuristic algorithms were used to solve the loading problem. Good results were obtained on smallscale issues. Duhamel et al. [6] proposed a GRID × ELS algorithm for 2LCVRP, which transforms loading constraints into resource constrained project scheduling problems. The optimization framework deals with RCPSPCVRP and finally transforms the RCPSPCVRP solution into 2LCVRP solution by solving special loading problems. For 2LCVRP, Guimarans et al. [7] proposed a hybrid simulation algorithm combining Monte Carlo simulation, an iterative local search framework, and a route and bin loading heuristic method with stochastic bias to solve the problem. Wei et al. [8] proposed a variable domain search algorithm to solve the routing problem for 2LCVRP, used skyline heuristic algorithm to solve the loading problem, and designed a data structure to record the loading feasibility information to reduce the loading time. Leung et al. [9] proposed a metaheuristic method combining tabu search and extended guided local search (EGLS). Firstly, it is proved that tabu search algorithm can solve CVRP effectively, and EGLS can avoid the algorithm from falling into local optimal. Secondly, a new heuristic loading algorithm is added to solve the loading problem, which improves the distribution cost significantly. Wei et al. [10], aiming at 2LCVRP, proposed a simulated annealing algorithm with repeated temperature rise and fall mechanism to solve the problem and adopted a heuristic method based on open space to solve the loading problem. Based on 2LCVRP, Rui et al. [11] established the corresponding mathematical model considering the constraints of multidepot and time window. The former is used to solve the vehicle routing problem, and the latter is used to solve the bin loading problem. Two groups of experiments are designed to verify the effectiveness of the algorithm. Wang and Zhou [12] aimed at establishing a multiobjective vehicle scheduling problem model with twodimensional loading constraints based on comprehensively considering the constraints of time window, twodimensional loading, and customer satisfaction. At the same time, a multiobjective ant colony optimization algorithm was proposed. In the loading stage, the twodimensional loading strategy of improved minimum horizontal line search algorithm was adopted to improve the success rate of loading. Ma et al. [2] proposed an adaptive localized decision variable analysis approach under the decompositionbased framework to solve largescale multiobjective optimization problems. An adaptive strategy is used to optimize the decision variables, which can adaptively balance the convergence and diversity of solutions in the target space. Leung et al. [13] established a mathematical model to minimize the transportation cost for the heterogeneous vehicle routing problem with twodimensional loading constraints. A simulated annealing algorithm combined with heuristic local search is proposed, and a set of bin loading heuristic algorithms are designed to solve the bin loading problem. Zhang et al. [14] took the total cost minimization as the optimization objective, studied the heterogeneous vehicle routing problem with loading constraints, designed a hybrid particle swarm optimization algorithm combining artificial bee colony and artificial immune to solve the problem, and proposed several strategies to avoid the algorithm falling into local optimum. Sabar et al. [15] proposed a twostage algorithm to solve the heterogeneous vehicle routing problem with twodimensional bin loading constraints. In the first stage, an adaptive meme algorithm was designed to solve the routing problem. In the second stage, a hybrid algorithm based on five heuristic algorithms was used to solve the bin loading problem. Dominguez et al. [16] proposed a hybrid algorithm based on neighborhood search and loading heuristic algorithm to solve the twodimensional vehicle routing problem with cluster backhaul and used randomization technology to guide the search process. Good results were obtained. Wang et al. [17] established a mathematical model for the logistics distribution problem with twodimensional loading and proposed a memetic algorithm to solve the problem. The algorithm integrates the heuristic search knowledge of loading and route and improves the performance and result quality of existing algorithms. Literature research shows that the research on 2LOVRPTW is still in its infancy.
The 2LOVRPTW can establish two different problem models. One is the 01 mixed integer model (MIP) and the other is the order model. For MIP, the most exact algorithms such as branch and bound and column generation mainly solve the problem. The solution space can be searched through commercial solvers (such as GUROBI or CPLEX) for smallscale problems. The optimal solution can be found reasonably, but the exact algorithm will show a geometric growth trend with the increase of the problem size for largescale problems. For the order model, it is usually composed of customer sequence of vehicle service. The constraints of such problems are often hidden in the order model, mainly by heuristic algorithm and intelligent algorithm. The heuristic algorithm is usually based on the characteristics of the problem to construct feasible solutions, such as Johnson algorithm, palmar algorithm, and Gupta algorithm. This kind of algorithm can obtain a feasible solution quickly, but it cannot guarantee that the solution is the best solution in the global range. Intelligent algorithm is a combination of the characteristics of the problem and intelligent mechanism to solve; through simulating some mechanisms in nature to guide the algorithm search, often in a short time, we can get a satisfactory solution or approximate optimal solution of complex scheduling problems. He pointed out in [18] that the effectiveness of intelligent algorithm depends on the model characteristics of scheduling problem and the mechanism of the intelligent algorithm. The intelligent optimization algorithm only needs to spend a short time searching part of the solution space of the scheduling model to find a satisfactory solution so that it can effectively solve all kinds of complex scheduling problems.
The whale optimization algorithm (WOA) is a new swarm intelligence optimization algorithm proposed by Seyedali and Andrew [19]. WOA simulates the predatorprey process of humpback whales in nature and realizes the search of highquality solution by searching, encircling, and attacking. WOA is widely used in many fields [20–23] because of its advantages of simple operation, few parameters, easy understanding, and strong optimization performance and has achieved good results. From the current research status of WOA, reasonable selection of adaptive weights in the search process can effectively control the search direction and further improve the search ability of the algorithm. At present, WOA is mainly used to solve continuous optimization problems, but for discrete optimization problems, the real solution space needs to be discretized. WOA has a certain effect on global search, but it cannot avoid the problem that the highquality block structure is destroyed in the process of generating new species group. Therefore, WOA is used to construct a threedimensional matrix after the first stage search in the solution space and to search in the second stage. The threedimensional matrix is used to learn and accumulate the block structure and its location information based on customer service order. Then, the population updating process is guided to improve the search efficiency of learning whale optimization algorithm (LWOA), for example, for the customer service order of highquality solution [1,3,5,2,4] and [2,4,5,1,3], where [2, 4] is a block structure based on the order relationship of customer 2 before customer 4 and [2, 4] appears in both the fourth position of the first solution and the first position of the second solution. Therefore, the threedimensional matrix can retain the block structure of the first two and the last four and also record the location information of the block structure, that is, the block structure [2, 4] can be stored in the elements with subscripts (4,2,4) and (1,2,4), respectively, in the threedimensional matrix (the first dimension subscript in the threedimensional matrix represents the location information, and the second and third dimensions represent the order relationship of customers).
In this paper, the model and solution of 2LOVRPTW are studied. In the model aspect, the 2LOVRPTW model integrated by OVRPTW and BPP is established, and the optimization objective of this problem model is to minimize the driving distance. In the process of solving, through the analysis of the properties of the problem, a learning whale optimization algorithm (LWOA) is proposed to optimal vehicle routing problem, and an improved skyline method is designed to solve the loading problem. Specifically, three rules are used to initialize the population, and LOV rules are used to discretize the real solution. Secondly, in the global search, the whale optimization algorithm is used to find the optimal solution in the first stage. In the second stage, the block structure based on the order relation and the threedimensional matrix of its position information are designed to effectively learn the solution and accumulate relevant information. Finally, the local search which combines the exchange operation, swap operation, and insert operation is introduced to carry out the efficient and detailed local search for the solution obtained from the twostage global search, which can effectively balance the global and local search of LWOA and improve the overall search ability of the algorithm. Simulation results and algorithm comparison show that LWOA is an effective algorithm for 2LOVRPTW.
The rest of this paper is arranged as follows. In Section 2, the definition of the OVRPTW is introduced and a corresponding integer programming model is also proposed. In Section 3, the LWOA algorithm is proposed and described in detail. In Section 4, experimental results and comparisons are given and discussed. The current work is summarized and the future research direction is prospected in Section 5.
2. TwoDimensional Loading Open Vehicle Routing Problem with Time Window
2.1. Problem Description and Symbol Definition of the 2LOVRPTW
The 2LOVRPTW can be described as follows. In directed network graph , represents the vertex set, where vertex 0 represents central depot and represents the customer set. is the arc set, and is the distance from customer to customer . There are homogeneous vehicles in the central depot for service, the capacity of each vehicle is , and the length and width of the carriage are; the carriage area is . is the total number of rectangular goods required by customer , is the total weight of goods required by customer , and is the weight of the kth item required by customer ; then, . is the goods required by customer , is the length of the goods required by customer , and is the width of the goods required by customer ; then, . At the same time, considering the needs of customer satisfaction, the time window for customer to receive service is set as , means the earliest service time allowed, means the latest service time, and the service time of each customer is . If the service starts within the time window of customer acceptance, the satisfaction is 1, otherwise it is 0. The time to arrive at the customer is . If the service arrives in advance, it needs to wait until the service start time.
The objective of 2LOVRPTW is to minimize the distance and consider the following constraints:(1)Each vehicle starts from the central depot and does not need to return back after serving all customers(2)When serving current customers, it is not necessary to move the goods of other customers (the principle of last in first out)(3)The loading edge of all articles must be parallel to the carriage edge(4)All goods in the carriage shall not be overlapped(5)The goods loaded on each vehicle shall not exceed the length and width of the carriage and the maximum load of the vehicle(6)Each vehicle must be serviced after the service time allowed by the customer
Figure 1 shows a distribution route of the 2LOVRPTW. It can be seen from Figure 1 that three homogeneous vehicles serve 11 customers in the central depot. The service routes of vehicle 1, vehicle 2, and vehicle 3 are , , and . The loading scheme of vehicle 2 is shown in Figure 2. The goods are placed at the lowerleft corner of the top view of the carriage (the front of the carriage is on the left). When unloading the goods, the current customer’s goods are unloaded through a straight line parallel to the length of the carriage. The thick line in the figure represents the skyline, the thick line parallel to the length of the carriage is the longitudinal skyline, and the thick line parallel to the width of the carriage is the transverse skyline; the shaded part is the redundant space (wasted space) of the vehicle.
2.2. Mathematical Model of the 2LOVRPTW
In the above model, (1) gives the objective function of 2LOVRPTW. Constraint (1) represents the minimization of the total distance. Constraint (2) ensures that the load of the vehicle does not exceed the maximum load of the vehicle. Constraint (3) ensures that every customer can be served. Constraints (4) and (5) ensure that every customer has and only has one vehicle to serve. Constraints (6)–(11) are the loading constraints, in which constraints (6) and (7) ensure that all items are fully loaded into the compartment. Whereas and , respectively, represent the item width and length of the vehicle serving the customer. and , respectively, represent the horizontal and vertical coordinates of the upperleft corner of the item of the customer served by the vehicle. Constraints (8)–(10) show that customers cannot overlap. Constraint (11) satisfies the principle of first in and last out. Constraints (12) and (13) show the time window constraints. Constraints (14) and (15) show the value range of decision variables.
3. The LWOA for Solving 2LOVRPTW
3.1. Global Search
In this section, the population initialization, standard WOA, block structure and threedimensional matrix, local search, and loading strategy are introduced. Finally, the loading flowchart and the flowchart of LWOA are given.
3.1.1. Population initialization
In order to ensure the diversity and dispersion of the solutions, two individuals are generated by rule1 and rule2, and then, the rest individuals are generated by rule3. Rule1 considers the nearest neighbor principle, rule2 considers the highest satisfaction principle, and rule3 adopts the quasiopposition strategy. Placing all unserved customers in set , the specific rules are as follows: Rule1 is the nearest neighbor principle. After the vehicle departs from the central depot, the distance between the central depot and each customer in is calculated, and the nearest customer (if there are multiple customers, the customer with the highest satisfaction) is selected for service. The customer from set was removed and the distances between customer and other customers in are calculated. After selecting the nearest customer , if the constraints are still met when continuing to serve the customer , it is necessary to remove the customer from set and calculate the distance between the customer and other customers in . Otherwise, the vehicle will give up serving the customer and dispatch the vehicle from the central depot to serve the customers in again. This cycle will last until all customers in are served. Rule2 is the maximum satisfaction principle. After vehicle starts from the central warehouse, we calculate the arrival time of each customer in from the central depot and select the customer meeting the time window constraint to serve. If there are multiple customers whose arrival time is within the time window, the nearest customer is selected to serve. Move customer out of set and calculate the time from customer to other customers in . Select customer that meets the time window constraint. If customer still meets the constraint, it is necessary to move customer out of set and calculate the arrival times from customer to other customers in . Otherwise, the vehicle will give up serving the customer and send the vehicle from the central depot to serve the customers in again until all the customers in are served. Rule3 is quasiantagonistic strategy. Let the population size be and use the quasiopposition strategy to generate 2 individuals with n customers (that is, the search space is n). Let denote the individual (distribution scheme) in the population. Let be the customerbased discrete sort in individual (i.e., the customer sequence without central depot), and let be the real number sequence corresponding to the customer’s discrete sort . As shown in equation (16), the quasiantagonistic strategy is to obtain the opposite inverse solution (quasiantagonistic solution) of the generation individual through the calculation of equation (16) in the real number field . Therefore, the population with quasiopposite solution can be obtained when the population is randomly generated. 2 individuals are selected from the two populations as the next generation population:
The population obtained by through rule3 is a real number sequence over a continuous field. Therefore, this paper uses LOV (largeorder value) rule to transform the individual real number sequence into discrete customer sequence .
The specific steps of LOV rules are as follows: Step 1: we select the real number sequence , arrange in the descending order to get , find the corresponding sequence number in , and place it in to get the intermediate sequence Step 2: for discrete customers, the values in are obtained successively by the formula
As shown in Table 1, an example of LOV application is given. If the real number sequence of an individual is , the real number sequence after descending is . Through the above steps, the intermediate sequence and the customer’s discretization sequence are obtained.
By calling the LOV rule, we can realize the transformation from real sequence to discrete sequence. Similarly, if the customer’s discrete sequence changes, we can adjust it by using the reverse largest order value (RLOV) rule. Therefore, the RLOV rule is used to real number the discrete customer sequence obtained by rule1 and rule2 to get the corresponding real number solution. The initialization population is composed of 2 individuals generated by rule3.
3.1.2. Standard WOA
Wang et al. [17] designed a whale optimization algorithm (WOA) by studying the foraging behavior of humpback whales. WOA mainly includes three search mechanisms: encircling search mechanism, spiral search mechanism, and random search mechanism.
Encircling search mechanism: when finding prey (solution), individual whales communicate with each other in the whole population so that the individual whales in the population keep approaching the prey. The mathematical model of encircling search mechanism is shown in formula (17)∼(18):where is the current number of iterations, is the individual in the generation, is the position of prey in the generation, and C are coefficient vectors, is the control parameter, is the current number of iterations, each iteration updates the population, and is the maximum number of iterations, with the increase of the number of iterations.
Spiral search mechanism: after calculating the distance from the prey, the individual whale takes the prey as the center and constantly approaches it in a spiral form. The mathematical model of spiral search mechanism is shown aswhere is the parameter controlling the shape of the spiral, is the random value of [−1,1], and is the search factor.
In equation (20), the probability is introduced to choose whether to update the position information of individual whale by using the encircling search mechanism or the spiral search mechanism:
Random search mechanism: when the value of is greater than 1, it will search outside the bounding circle. When we cannot get the effective information of the prey, we will choose a random way to search the prey to update the position information of the population, which can effectively enhance the diversity of the population. Then, the mathematical model of random search mechanism is as follows:where is a randomly selected individual in the generation population.
3.1.3. Block Structure and ThreeDimensional Matrix
For any solution of 2LOVRPTW, the block structure refers to the order of two consecutive adjacent customers in the solution. In the process of updating, the solution set shows certain similarities in the structure of the solution (block structure and its location information). The threedimensional matrix proposed in the second stage of global search can effectively learn and accumulate the block structure. The location information of the solution set is obtained in the first stage so as to improve the overall effect of the algorithm. Because the same block structure in different positions will have a great impact on the target value of the solution, the first dimension of the designed threedimensional matrix is used to record the location information of the block structure, and the other two dimensions represent two customers in the block structure.
We define , where is the generation population, and , where is the individual and is the customer in the individual of population. Let represent the threedimensional matrix based on block structure and its location information in generation population, where represents the value of block structure in position and is the twodimensional probability matrix normalized at position. The specific definition is as follows:where is the number of times that customer and customer appears in position of individual in the generation, that is, the number of times that block structure appears in position of individual . For example, for individual and individual , let ; then, the client block structure of individual 1 in position 2 is [3,2], and the client block structure of individual 2 in position 2 is [5,3]. Therefore, , , , and . As shown in Figure 3, the block structure information of each position is recorded in .
In the first stage of global search, the improved WOA is used to search in the whole solution space to obtain high quality. In the second stage, a threedimensional matrix TM is constructed based on the highquality solution obtained in the first stage. When the population is updated by using the threedimensional matrix, the structure and location information of customer blocks in the current highquality solution is learned and accumulated after each update and used to generate new individuals. The specific update process is as follows: Step 1: construct a threedimensional probability matrix by using the highquality solution obtained by WOA and construct a list of remaining optional customers and a list of selected customers. Perform step 2. Step 2: let , and randomly generate a random number and execute step 3. Step 3: select the matrix of position , set the occurrence times of block structure containing customers in to 0, and get the probability matrix of position after normalization as ; ; if , perform step 4; otherwise, perform step 5. Step 4: if there is a selectable block structure, the roulette method is used to select the customer block structure for . Let ; perform step 6. Step 5: if there is no optional block structure in the current position, randomly select a customer in and place it in this position; let , and then, go to step 6. Step 6: delete the selected customers from and add the selected customers to . Step 7: if , output the generated new individual ; if , return to step 5; otherwise, return to step 3.
The pseudocode of the LWOA algorithm is as follows.

The values range of , , and are analyzed in detail in Section 4.2.
3.2. Local Search
According to the characteristics of the 2LOVRPTW problem, the solution space is huge, and the highquality solutions are usually distributed in each local region of the solution space. Therefore, it is necessary to search the highquality solutions from the global search; VNS includes three neighborhood operations: interchange operation, insert operation, and swap operation. Interchange operation is used between vehicles, and insert operation and swap operation are used inside vehicles. In this way, local search can be carried out more carefully to update the current optimal solution. The variable neighborhood local search execution pseudocode is as follows.

3.3. Complexity Analysis of the LWOA
Let the population size be popsize, the number of running iterations of global search be gen_{global}, and the number of iterations of each generation of local search be gen_{local}. The number of times that local search actually uses neighborhood operators in each generation of search is Z(Z = 20 ∗ 40). The algorithm complexity of LWOA T_{LWOA} is composed of global search complexity and local search complexity, respectively. In each generation, the global search complexity consists of population initialization complexity O(popsize ∗ N, where N is the number of customers), discretization complexity (2 ∗ popsize ∗ N!), threedimensional probability matrix update complexity O(N^{2} ∗ (N − 1)), complexity O(popsize∗ (1 + N^{2} ∗ (N − 1))) of generating new population based on threedimensional probability matrix, and population evaluation complexity (popsize ∗ N); the result is O(popsize ∗ (1 + N^{2} ∗ (N − 1))). The complexity of local search is O(gen_{local} ∗ Z ∗ (N)) (the worstcase scenario).
Through the above analysis, T_{LWOA} = O(gen_{global} ∗ (popsize ∗ (1 + N^{2} ∗ (N − 1)) + gen_{local} ∗ Z ∗ (N))).
3.4. Loading Strategy
For the loading problem based on the principle of “first in, last out” in the customer service order, this paper adopts the loading strategy of the skyline filling method to check every feasible solution generated. Only when the loading constraint is satisfied can the solution be retained. This section mainly includes initialization of loading order and loading mechanisms.
3.4.1. Initialize Loading Sequence
Each time we get a solution, we need to make sure that all the customers’ goods can be loaded into the car in the reverse order of the customers’ order. However, the loading order of multiple goods of each customer is not unique. Therefore, this paper proposes two rules for the initial loading order of customers’ goods. Rule1: sort items according to their length Rule2: sort items by area from small to large
For example, if the vehicle service sequence is customer 1, customer 2, customer 3, and customer 4, customer 4 of the final service uses rule1 for initial loading and the other three customers use rule2 for initial loading.
3.4.2. Loading Method
The loading process of articles is based on the skyline. Initially, the horizontal skyline and the vertical skylines are the width of the carriage and the length of both sides of the vehicle, respectively. The loading position of articles is determined by the score of articles placed on each section of the horizontal skyline. (1) When the width is equal to the horizontal skyline, if the length is equal to either side of the adjacent vertical skyline, the score is 5. If the length is lower than the longitudinal skyline of the lowest adjacent side, the score is 4. If the length is between the two sides, the score is 3. Otherwise, the score is 2. (2) If the width is less than the transverse skyline, the score is 4 if the length is equal to either side of the longitudinal skyline of the two adjacent sides. If the length is lower than the longitudinal skyline of the lowest adjacent side, the score is 3. Otherwise, the score is 2. (3) If the width is greater than the transverse skyline, the score is 1. If all the horizontal skylines are less than the width of the object, it is necessary to fill the skyline before loading the object. In addition, when placing the object, it is also necessary to consider whether it exceeds the length and width limits of the vehicle. Loading the object into the vehicle and updating the skyline at the position with the highest score.
3.5. Flowchart of LWOA
This section gives the flowchart of LWOA. In the whole operation process, the individual needs to be boxed after each update of the individual, and the individual meeting the boxing constraints will be retained. The overall schematic diagram of the LWOA algorithm and the detailed flowchart of local search are shown in Figures 4 and 5.
4. Simulation Experiment and Comparative Analysis
The main content of this section includes the design of customer goods, performance index and parameter setting, and simulation experiment comparison and analysis. All experiments are run on Windows 10 platform, which has 3.0 GHz CPU and 8 GB RAM, and are on a single thread. The algorithm in this paper is implemented by Python 3.7.
4.1. Experimental Setup
Since there is no standard testing benchmark suitable for 2LOVRPTW, this paper uses the dataset and generates customer items according to [24], as shown in Table 2. In the homogeneous fleet, the length and width (L, W) of the car are (40, 20). Category 1 corresponds to the pure CVRP instance, and no boxing constraint is imposed on it. Therefore, this paper uses categories 2–5 to generate rectangular items needed by customers. As shown in Table 2, select category 4 for the dataset with less than 25 customers, that is, randomly select the number of items required by customers in [1, 4] and then assign one of three possible shapes to each item with the same probability. The three shapes are vertical (relative height is greater than relative width), uniform (relative height and width are generated in the same interval), or horizontal (relative height is less than relative width). Similarly, for datasets with more than 25 customers, category 3 is used.
4.2. Parameter Setting
The parameters involved in LWOA include population size, search factor, and learning times of the threedimensional matrix. This paper selects problem C201 with 25 customers for experimental analysis and uses design of experiment (DOE) to explore the influence of parameters on LWOA performance. Four level values are selected for each parameter, as shown in Table 3, and the orthogonal test table of the L16 (4^{3}) scale is established. In each group of parameters, the algorithm runs independently 20 times, intending to minimize the mileage. The experimental results are as follows. The experimental results are as follows.
It can be seen from Tables 3–5 that different parameter combinations have a great influence on the algorithm. Therefore, to maximize the algorithm’s performance, this paper sets the parameter combination based on the experimental analysis. That is, the later experimental part will also be based on this parameter combination.
4.3. Comparison and Analysis of Simulation Experiments
In order to verify the effectiveness of LWOA in solving 2LOVRPTW, this paper compares LWOA with WOA, GA, and EDA. The objective of the optimization is to minimize the driving mileage for 20 independent experiments. The three performance indexes of optimal value (BST), the worst (WST) and the average value (AVG) are selected for comparative analysis, and the optimal results are roughened. The experimental results are shown in Table 6. It can be seen from Table 6 that the three indexes of LWOA in most cases are significantly better than other comparison algorithms. This shows that the proposed threedimensional matrix can effectively learn and accumulate block structure information based on customer order relationship, improve the overall search effect of the algorithm, and verify the effectiveness of LWOA in solving 2LOVRPTW.
For the objective function values (BST, WST, and AVG) as test samples, nonparametric paired sample test is carried out on the operation results of each algorithm with 95% confidence. The results are shown in Table 7.
5. Conclusions
In this paper, a learning whale optimization algorithm (LWOA) combined with improved skyline filling algorithm (ISFA) is proposed to solve 2LOVRPTW. The specific contributions are as follows. (1) Establish the 2LOVRPTW model with the aim of minimizing the total distance. (2) In the route optimization stage, after the whale optimization algorithm is used to update the population, a threedimensional matrix update strategy based on customer order relationship is designed to learn and accumulate the block structure and customer location information in the highquality solution, which can effectively guide the population update. According to the characteristics of the problem, the variable neighborhood local search between and within vehicles is designed to carry out the detailed and efficient local search for the highquality solution individuals after global search. (3) In the loading optimization stage, to improve the feasibility of the post solution of path optimization, ISFA is used to optimize the loading process, and the customer’s goods are effectively loaded into the carriage through the scoring mechanism based on the skyline.
Future work will focus on the multiobjective problem with loading and time window constraints, refine the nature of the problem, and design an efficient algorithm to solve it so that the research is more in line with the actual distribution of logistics transportation.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.
Acknowledgments
This research was partially supported by the National Science Foundation of China (61963022), the National Science Foundation of China (62173169), and National Science Foundation of China (51665025).