Logistics distribution path optimization method based on evolutionary multi-task optimization
Through the evolutionary multi-task optimization method, combined with manifold learning and reinforcement learning, the problem of low-efficiency solving in the logistics distribution path optimization method is solved, more efficient path optimization is achieved, and multiple optimal solutions are provided. The correlation accelerates convergence.
Patent Information
- Application Number
- CN202411038523.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-08
AI Technical Summary
The existing logistics distribution path optimization method has low resolution efficiency and has failed to effectively utilize the similarity and prior knowledge between problems. It mainly stays in single-objective or multi-objective optimization methods, ignoring the similarity and information exchange between problems.
Using an evolutionary multi-task optimization method, by constructing an objective function that minimizes driving distance and minimizes delivery time, combining manifold learning and reinforcement learning mechanisms, initializes populations and performs iterative optimization, enhances the correlation between problems, and generates Optimal delivery plan.
It effectively improves the solution efficiency of logistics distribution path optimization, provides more optimal solutions, uses the correlation between different problems to accelerate the convergence of algorithms, and provides better path selection.
Smart Images

Figure CN118917769A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of logistics distribution path optimization, and specifically relates to a logistics distribution path optimization method based on evolutionary multi-task optimization. Background Art
[0002] The logistics distribution path optimization problem is a classic combinatorial optimization problem that aims to find the optimal or near-optimal delivery route with the minimum driving distance and time. Generally speaking, this problem can be divided into two types: (1) The courier places the package or mail at a nearby delivery station, and only considers the optimal delivery route. (2) The courier needs to deliver the goods to the door, and not only considers the optimal delivery route but also the service time such as door-to-door delivery. At present, the research on this problem mainly stays in the single-objective optimization method and the multi-objective optimization method. These algorithms start from scratch every time they solve the problem. Not only do they not consider the prior knowledge of the problem, but they also ignore the similarities between problems.
[0003] Different from traditional optimization algorithms, the evolutionary multi-task optimization algorithm can solve multiple optimization problems simultaneously in one operation and realize information exchange between different tasks. It uses the idea of solving complex problems through simple problems, effectively solves the problem of logistics distribution path optimization, and provides more solutions for decision makers to choose from. Summary of the invention
[0004] The purpose of the present invention is to provide a logistics distribution path optimization method based on evolutionary multi-task optimization, which solves the problem of low solution efficiency of existing logistics distribution path optimization methods.
[0005] The technical solution adopted in the present invention is: a logistics distribution path optimization method based on evolutionary multi-task optimization. First, optimization tasks are established with the courier's minimization of driving distance and minimization of delivery time as objective functions, and then the population is initialized according to the objective function. An evolutionary multi-task optimization algorithm based on manifold learning and reinforcement learning mechanism is used to enhance the correlation between problems and solve them to obtain the optimal solutions for the two tasks.
[0006] The present invention is also characterized in that it comprises the following steps:
[0007] Step 1: Construct two objective functions F1 and F2, with the courier’s minimization of travel time as the optimization task. The objective function is expressed as:
[0008] (1) When the courier places the package or mail at a nearby delivery point, only the courier's driving distance is considered, and the total time is:
[0009]
[0010] (2) When a courier delivers a package or mail to a door, the total time taken, taking into account the courier's travel distance and service time, is:
[0011]
[0012] Where D represents the number of delivery points, D = {1, 2, .., d}, each delivery point is represented by i, and the position matrix L is used to represent the location where the area needs to be delivered, L = {l(x i ,y i ),i=1,2,..,d}, where the distance from the i-th delivery point to the i+1-th delivery point x, y are longitude and latitude respectively, and the time matrix T is used to represent the service time of the courier at each delivery point T = {t i ,i=1,2,...,d};,v represents the courier’s driving speed, t i represents the door-to-door delivery service time at the i-th location;
[0013] The objective functions F1 and F2 are regarded as two tasks T1 and T2 that need to be optimized simultaneously. Then the multi-task function to be optimized is in, and is the optimal solution for the two tasks to be solved, and Ω is the decision space;
[0014] Step 2: Generate two independent randomly initialized populations POP1 and POP2 in the decision space for the objective functions F1 and F2 and initialize the Q table. Each individual in the population corresponds to a solution to the logistics distribution path optimization problem.
[0015] Step 3: With probability cp k The two populations POP1 and POP2 are aligned in base and distribution through popular learning in the form of;
[0016] Step 4: Start the iterative optimization process of the population with probability rmp k The knowledge transfer between different problems is realized through different crossover operators in the form of, the offspring individuals are generated, and the individuals aligned by popular learning are marked with Flag(k,i);
[0017] Step 5: Evaluate the offspring individuals and update the population, record the number of marked Flag(k,i)=1 and the objective function value of the marked individuals;
[0018] Step 6: Update the probability parameter rmp according to the survival status of individuals in different populations k , update the probability parameter cp by marking the best fitness value of the individual in the last two generations k and Q-table;
[0019] Step 7: Determine whether the number of iterations reaches the maximum number of iterations. If not, jump to step 3; if satisfied, output the current population as the final solution, that is, the optimal distribution plan.
[0020] Step 2 specifically includes the following steps:
[0021] Step 2.1, randomly initialize populations POP1 and POP2 respectively: When there are D delivery points, randomly initialize N vectors of length D, which contain random permutations of the delivery point numbers from 1 to d, then the vector X = (x1, x2, ..., x d ); N is the population size. The population needs to be encoded during initialization. During the encoding process, POP1 and POP2 are compressed to decimals between 0 and 1, and then the decimals are converted to integers during the decoding process;
[0022] Step 2.2: Assign a Q-table in Q-Learning to each task, and set each Q value in the Q-table to 0 in the initial stage.
[0023] Step 3 is as follows: According to the Q table, select the action with the largest Q value in the current state as the probability parameter cp k size; if all Q values are 0, an action is randomly selected as the probability parameter; when the random number meets the probability parameter condition, manifold learning is used to align the basis and distribution of different tasks. Assuming that the task being solved is the target task T, the other task is the source task S.
[0024] The specific steps of popular learning in step 3 are:
[0025] Step 3.1. Determine the optimal dimension to embed into the subspace
[0026] The PCA subspaces of the source task S and the target task T are denoted as PCA S and PCA T , combining the subspaces of the source and target tasks into PCA S+T ; The PCA subspace inconsistency measure is defined as follows:
[0027]
[0028] Among them, D(d) is the total measure of the two protagonists, α d For PCA s and PCA S+T The protagonist between d For PCA T and PCA S+T The protagonist between them, sinα d and sinβ d is the minimum correlation distance;
[0029] A greedy strategy is used to increase the dimension d while avoiding pushing the two subspaces to orthogonality, that is:
[0030] d * =min{d|D(d)=1} (4)
[0031] Among them, d * The dimension required to preserve sufficient structural information in a local region of the manifold, D is the total dimension of the individual;
[0032] Step 3.2: Construct geodesic flow
[0033] On the popular space G(d,D), Represent the basis of source task S and target task T respectively, P S The orthogonal complement of Φ(t) is the mapping function of the geodetic line in the Grassmann popular space. The source task and target task matrices are mapped to between 0 and 1 through Φ(t). For other points between 0 and 1, the calculation formula is as follows:
[0034] Φ(t)= s U1Γ(t)- s U2∑(t) (5)
[0035] Where Φ(0)=P s , Φ(1)=P T , Γ(t), U2 and ∑(t) are decomposed according to and The calculation method is as follows:
[0036]
[0037] Among them, U1 and U2 are orthogonal matrices, Γ and ∑ are d×d diagonal matrices, and the diagonal elements are sinθ i and cosθ i (i=1,2,...,d);
[0038] Step 3.3: Calculate the flow core of the geodetic line
[0039] For two original D-dimensional individuals x i and x j , then Φ(t) T x i is the feature vector x i The projection to the subspace Φ(t) is if all projections are connected to the infinite-dimensional eigenvector z i ∞ and z j ∞ , use z i ∞and z j ∞ The inner product of defines the geodesic flow core:
[0040]
[0041] in, is a semi-positive definite matrix, and the calculation method is as follows:
[0042]
[0043] Among them, Λ1, Λ2, Λ3 are diagonal matrices, and the diagonal elements are:
[0044]
[0045] Finally, the source task individual x is mapped to the target task individual v through the geodesic line flow kernel basis alignment:
[0046]
[0047] Step 3.4: Use the CORAL algorithm to reduce the distribution difference between the source task and the target task after base alignment
[0048] First, the covariance statistics of the source task and the target task are calculated, and then whitening and coloring changes are applied to the original features to obtain the transformed matrix A coral , the calculation method is as follows:
[0049]
[0050] Among them, cov s and cov t are the covariance statistics of the source task and the target task respectively, and are calculated as follows:
[0051]
[0052] Among them, d represents the dimension of the population, x i Represents the i-th dimension column vector of the population.
[0053] Step 4 specifically includes the following steps:
[0054] Step 4.1: For the generation of offspring within the task, two crossover operators SHADE and JAYA are used according to the excellence of the individuals. The offspring generation methods are as follows:
[0055]
[0056] Among them, individual x i 、x r1 and x r2 are random individuals in population k, is the better individual in population k, F k ∈[0,1] is the balance factor;
[0057]
[0058] Among them, individual x i is the worst individual in population k, x pbest and x worst are the best individual and the worst individual respectively;
[0059] Step 4.2: For the generation of inter-task offspring, use the SHADE operator. The calculation method is as follows:
[0060]
[0061] Among them, individual x i is the k-parent individual of the population, is the best individual in population r, x r1 and x r2 are random individuals in population r;
[0062] At the same time, during the knowledge transfer process, the individuals whose manifolds are generated by the parameter offspring are marked as learned, that is, Flag(k,i)=1.
[0063] Step 6 specifically includes the following steps:
[0064] Step 6.1: Update the probability parameter rmp according to the survival status of individuals in different populations k , that is, to update the control probability of knowledge transfer according to the survival status of the parent individuals in the population:
[0065]
[0066] Among them, N S Represents the survival rate of offspring individuals in the population, N d represents the mortality rate of individuals in the population;
[0067] Step 6.2: Update the popular learning probability parameter cp through the Q table k The size of the agent is divided into three states: improvement, regression and no change; assuming that G represents the current generation, then the best fitness of the current generation, the previous generation and the previous two generations through popular learning is Fit G , Fit G-1 and Fit G-2 , according to the improvement of the best fitness, the difference in the best fitness between the three generations is:
[0068]
[0069] Different states are represented by the size of d. When d>0, it means that the current task benefits from the popular learning alignment. At this time, the reward value of reinforcement learning is reworded to 10; when d<0, it means that popular learning hinders the solution of the current task. At this time, the reward value of reinforcement learning is reworded to -5, indicating a penalty; when d=0, it means that popular learning has no effect on the solution of the current task, but it does not hinder it either. At this time, the reward value of reinforcement learning is reworded to 5;
[0070] The update of the Q table relies on the Bellman equation, which is calculated as follows:
[0071]
[0072] Among them, α is the learning rate, β is the discount factor, and Q t (S t ,A t ) represents the Q value of state S action A at time t, R t+1 represents the reward value at time t+1, Q t+1 (S t ,A t ) is Q(S t ,A t ) is the Q value at time t+1.
[0073] The beneficial effects of the present invention are as follows: the present invention is based on the logistics distribution path optimization method of evolutionary multi-task optimization. First, the courier's minimization of driving distance and minimization of delivery time are taken as the objective function, and then the population is initialized according to the objective function. The evolutionary multi-task optimization algorithm based on manifold learning and reinforcement learning mechanism is used to solve the problem. Manifold learning and reinforcement learning are used to enhance the correlation between problems. The correlation between different problems can be well utilized, the convergence of the algorithm can be accelerated, and more optimal solutions can be provided, thereby effectively solving the problem of low solution efficiency of existing logistics distribution path optimization methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 It is a flow chart of the logistics distribution path optimization method based on evolutionary multi-task optimization of the present invention;
[0075] Figure 2 Only the location coordinates and the courier's driving speed are considered, and the logistics distribution path optimization method based on evolutionary multi-task optimization of the present invention is run on the test set for 1000 generations, and the optimal path configuration information graph is obtained by decoding the optimal solution;
[0076] Figure 3While considering the location coordinates and the courier's driving speed, the courier's other time is also considered. The logistics distribution path optimization method based on evolutionary multi-task optimization of the present invention is run on the test set for 1000 generations, and the optimal path configuration information graph is obtained by decoding the optimal solution. DETAILED DESCRIPTION
[0077] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0078] Example 1
[0079] The present invention provides a logistics distribution path optimization method based on evolutionary multi-task optimization. Firstly, optimization tasks are established with the courier's minimization of driving distance and minimization of delivery time as objective functions. Then, the population is initialized according to the objective function, and an evolutionary multi-task optimization algorithm based on manifold learning and reinforcement learning mechanism is used to enhance the correlation between problems and solve them to obtain the optimal solutions for the two tasks.
[0080] Through the above method, the present invention uses manifold learning and reinforcement learning to enhance the correlation between problems. Specifically: (1) The maximum density difference is used to select highly similar auxiliary tasks as source tasks for the target problem. (2) Manifold learning control parameters are assigned to each problem and adjusted adaptively through reinforcement learning. In this way, the correlation between different problems can be well utilized, the convergence of the algorithm can be accelerated, and more optimal solutions can be provided, thereby effectively solving the problem of low solution efficiency of existing logistics distribution path optimization methods.
[0081] Example 2
[0082] The present invention provides a logistics distribution path optimization method based on evolutionary multi-task optimization, such as Figure 1 As shown, the following steps are included:
[0083] Step 1: Based on the logistics distribution path optimization problem, two objective functions F1 and F2 are constructed to minimize the courier's travel time as the optimization goal. The objective function is expressed as:
[0084] (1) When the courier places the package or mail at a nearby delivery station, the present invention will ignore the courier's other service time such as door-to-door delivery, and only consider the courier's travel distance. The total time consumed is:
[0085]
[0086] (2) When a courier needs to deliver a package or mail to a door, the present invention will take into account the time spent on door-to-door delivery, such as delivery time, contact time, etc. At this time, not only the courier's driving distance but also his service time will be considered. The total time consumption is:
[0087]
[0088] Among them, c(x i ,x i+1 ) is the distance from the ith delivery point to the i+1th delivery point, v is the driving speed of the courier, assuming that the courier’s driving speed is 60 km / h, t i The present invention uses D to represent the number of delivery points, D = {1, 2, .., d}, each delivery point is represented by i, and the position matrix L is used to represent the location where the area needs to be delivered, L = {l(x i ,y i ),i=1,2,..,d}, where the distance from the i-th delivery point to the i+1-th delivery point is x, y are longitude and latitude respectively, and the time matrix T is used to represent the service time of the courier at each delivery point T = {t i ,i=1,2,...,d}.
[0089] The above two functions F1 and F2 are regarded as two tasks T1 and T2 that need to be optimized at the same time, and the knowledge between them is used to guide the other task to quickly explore the optimal solution. Then the function of the multi-task to be optimized is: in, and is the optimal solution for the two tasks to be solved, and Ω is the decision space.
[0090] Step 2: Generate two independent randomly initialized populations POP1 and POP2 in the decision space for two different objective functions and initialize the Q table. Each individual in the population corresponds to a solution to the logistics distribution path optimization problem.
[0091] Step 2.1, randomly initialize populations POP1 and POP2 respectively: When there are D delivery points, randomly initialize N vectors of length D, which contain random permutations of the delivery point numbers from 1 to d, then the vector X = (x1, x2, ..., x d); where N is the population size. The population needs to be encoded during initialization. Each individual in the population represents a feasible solution in path optimization. The path in the logistics distribution path optimization problem is a set of integers without duplication. In order to achieve knowledge transfer between different problems, during the encoding process, the present invention compresses POP1 and POP2 to decimals between 0 and 1, and then converts the decimals into integers during the decoding process. For example, assuming that the solution x = {21, 35, 15, 8, 95, 75} represents a feasible solution, it is compressed to a decimal between 0 and 1 according to the interval in the population to traverse the knowledge transfer between different tasks. Assuming that the upper and lower bounds in the population are 100 and 0 respectively, x can be compressed to x = {0.21, 0.35, 0.15, 0.08, 0.95, 0.75}. During the decoding process, it needs to be restored in the reverse direction, sorted in ascending order of dimension, and then the permutation solution x′={3,4,2,1,6,5} is obtained, so the courier should arrive at the third, fourth, second, first, sixth and fifth delivery points in turn.
[0092] Step 2.2, initializing corresponding parameters: In order to adaptively achieve base alignment and distribution alignment between populations, the present invention uses reinforcement learning to adjust the probability parameter cp k Specifically, a Q-table in Q-Learning is assigned to each task, which can select the appropriate probability for each task based on the current state, as shown in Table 1. A 3-row 9-column matrix is used to represent the Q-table, where the rows represent the actions that the agent can take and the columns represent the states that the agent may experience. In the initial stage, each Q value in the table is set to 0.
[0093] Table 1 Q table used in the present invention
[0094]
[0095] Step 3: With probability cp k The two populations POP1 and POP2 are aligned in the form of base alignment and distribution alignment through popular learning. The specific operation is: according to the Q table, the action with the largest Q value in the current state is selected as the probability parameter cp k If all Q values of the agent's state are 0, an action is randomly selected as the probability parameter. When the random number meets the probability parameter condition, manifold learning is used to align the basis and distribution of different tasks. Assuming that the task being solved is the target task T, the other task is the source task S. The specific manifold learning content in step 3 includes:
[0096] Step 3.1, determine the optimal dimension of the embedding subspace. The PCA subspaces of the source task S and the target task T are denoted as PCA S and PCA T, combining the subspaces of the source task and the target task into PCA S+T If the population distribution is small, then the three subspaces will not be too far apart on the Grassmann space. The subspace inconsistency measure (SDM) is defined as follows:
[0097]
[0098] Among them, D(d) is the total measure of the two protagonists, α d For PCA S and PCA S+T The protagonist between d For PCA T and PCA S+T The protagonist between them, sinα d and sinβ d is the minimum correlation distance. When these two values are very small, it means that the degree of alignment in the d dimension is very high. Otherwise, the variance of one subspace cannot be migrated to another subspace.
[0099] In order to determine the optimal dimension, the present invention adopts a greedy strategy, which increases the dimension d as much as possible to improve the degree of alignment, but avoids pushing the two subspaces to orthogonality, that is:
[0100] d * =min{d|D(d)=1} (4)
[0101] Among them, d * The dimension required to preserve sufficient structural information in local regions of the manifold is , and D is the total dimension of the individuals.
[0102] Step 3.2: Construct geodesic flow. On the popular space G(d,D), Represent the basis of source task S and target task T respectively, P S Φ(t) is the orthogonal complement of . Φ(t) is the mapping function of the geodesic line in the Grassmann popular space. The source task and target task matrices can be mapped to between 0 and 1 through Φ(t). For other points between 0 and 1, the calculation formula is as follows:
[0103] Φ(t)= s U1Γ(t)- s U2∑(t) (5)
[0104] Where Φ(0)=P s , Φ(1)=P T , Γ(t), U2 and ∑(t) are decomposed according to and The calculation method is as follows:
[0105]
[0106] Among them, U1 and U2 are orthogonal matrices, Γ and ∑ are d×d diagonal matrices, and the diagonal elements are sinθ i and cosθ i (i=1,2,...,d).
[0107] Step 3.3, calculate the geodetic line flow core. For the two original D-dimensional individuals x i and x j , then Φ(t) T x i is the feature vector x i The projection to the subspace Φ(t) is if all projections are connected to the infinite-dimensional eigenvector z i ∞ and z j ∞ , and use their inner product to define the geodesic flow core:
[0108]
[0109] in, is a semi-positive definite matrix, which is calculated as follows:
[0110]
[0111] Among them, Λ1, Λ2, Λ3 are diagonal matrices, and the diagonal elements are:
[0112]
[0113] Finally, the source task individual x is mapped to the target task individual v through the geodesic line flow kernel basis alignment:
[0114]
[0115] Step 3.4, CORAL alignment algorithm is a domain adaptation technology, which mainly solves the problem of mismatch between source domain and target domain data distribution in machine learning. In the present invention, the present invention uses the CORAL algorithm to reduce the distribution difference between the source task and the target task after the basis alignment. First, the present invention calculates the covariance statistics of the source task and the target task, and then applies whitening and coloring changes to the original features to obtain the transformed matrix A coral The specific calculation method is as follows:
[0116]
[0117] Among them, cov s and cov t are the covariance statistics of the source task and the target task respectively, and are calculated as follows:
[0118]
[0119] Among them, d represents the dimension of the population, x i Represents the i-th dimension column vector of the population.
[0120] Step 4: Start the iterative optimization process of the population with probability rmp k The knowledge transfer between different problems is realized through different crossover operators in the form of, offspring individuals are generated, and the individuals aligned through popular learning are marked with Flag(k,i).
[0121] Step 4.1: For the generation of offspring within the task, the present invention uses two crossover operators SHADE and JAYA according to the excellence of the individuals, and the offspring generation methods are as follows:
[0122]
[0123] Among them, individual x i , x r1 and x r2 are random individuals in population k, is a relatively good individual in population k. k ∈[0,1] is the balancing factor.
[0124]
[0125] Among them, individual x i is the worst individual in population k, x pbest and x worst They are the best individual and the worst individual respectively. The original intention is to guide the worse individuals away from the worst solution and closer to the best solution.
[0126] Step 4.2: For the generation of inter-task offspring, the present invention uses the SHADE operator, and the calculation method is as follows:
[0127]
[0128] Among them, individual x i is the k-parent individual of the population, is the best individual in population r, x r1 and x r2 are random individuals in population r respectively. The main idea is to use the optimal solution in population r to assist in solving population k.
[0129] At the same time, during the knowledge transfer process, the present invention will mark the individuals whose parameter offspring-generated manifolds have been learned, that is, Flag(k,i)=1.
[0130] Step 5: Evaluate the offspring individuals and update the population, record the number of individuals marked with Flag(k,i)=1 and the objective function value of the marked individuals. For problem 1, the objective function value F1(x) is calculated as shown in formula (1), and no other time needs to be considered in the total time. For problem 2, the objective function F2(x) is calculated as shown in formula (2), which needs to consider the courier's driving time as well as the service time.
[0131] Step 6: Update the probability parameter rmp according to the survival status of individuals in different populations k , update the probability parameter cp by marking the best fitness value of the individual in the last two generations k and Q table.
[0132] Step 6.1: Update the probability parameter rmp according to the survival status of individuals in different populations k , that is, to update the control probability of knowledge transfer according to the survival status of the parent individuals in the population:
[0133]
[0134] Among them, N S Represents the survival rate of offspring individuals in the population, N d Represents the mortality rate of individuals in a population.
[0135] Step 6.2: For the popular learning probability parameter cp k The update of size mainly depends on the Q table. In this invention, the state of the agent is divided into three types: State1 (improvement), State2 (degradation) and State3 (no change). Assuming G represents the current generation, the best fitness of the current generation, the previous generation and the previous two generations through popular learning is Fit G , Fit G-1 and Fit G-2 According to the improvement of the best fitness, the difference in the best fitness between the three generations is:
[0136]
[0137] The present invention represents different states according to the size of d. When d>0, it means that the current task benefits from the popular learning alignment. At this time, the reward value reword of reinforcement learning is set to 10. When d<0, it means that popular learning hinders the solution of the current task. At this time, the reward value reword of reinforcement learning is set to -5, indicating a penalty. When d=0, it means that popular learning has no effect on the solution of the current task, but it does not hinder it either. At this time, the reward value reword of reinforcement learning is set to 5.
[0138] The update of the Q table mainly depends on the current state, action and reward of the agent. Its update mainly relies on the Bellman equation. The specific calculation is as follows:
[0139]
[0140] Among them, α is the learning rate, β is the discount factor, and Q t (S t ,A t ) represents the Q value of state S action A at time t, R t+1 Represents the reward value at time t+1. t+1 (S t, A t ) is Q(S t, A t ) is the Q value at time t+1.
[0141] Step 7: Determine whether the number of iterations reaches the maximum number of iterations. If not, jump to step 3; if satisfied, output the current population as the final solution, that is, the optimal distribution plan.
[0142] Example 3
[0143] The present invention is based on the logistics distribution path optimization method of evolutionary multi-task optimization. The test functions used in the simulation experiment are the 8 most classic test problems used in path planning problems, which are: att48, st70, eil76, pr76, rat98, pr136, gr96 and eil51. Each problem contains different express delivery points, and each express delivery point has its own location coordinates and time window and other information. In the present invention, two different situations are considered. Problem 1: only consider the location coordinates and the courier’s driving speed. Problem 2: while considering the location coordinates and the courier’s driving speed, also consider the courier’s service time. The logistics distribution path optimization algorithm of the present invention is run on these test sets for 1000 generations, and the optimal path configuration part information is obtained by decoding the optimal solution, as shown in the following figure. Figure 2 and Figure 3 As shown in the figure, it is completely feasible to use a multi-task optimization algorithm to solve the logistics distribution problem, and it can solve two different tasks at the same time in one run, which saves certain resources compared to multi-objective or single-objective optimization algorithms. Therefore, the method of the present invention effectively utilizes the knowledge between tasks and quickly obtains the optimal path solution under multiple tasks.
Claims
1. A logistics distribution path optimization method based on evolutionary multi-task optimization, characterized in that: Firstly, optimization tasks are established with the courier's minimization of driving distance and delivery time as the objective functions. Then, the population is initialized according to the objective functions. The evolutionary multi-task optimization algorithm based on manifold learning and reinforcement learning mechanism is used to enhance the correlation between problems and solve them to obtain the optimal solutions for the two tasks.
2. The logistics distribution path optimization method based on evolutionary multi-task optimization according to claim 1 is characterized in that: The following steps are involved: Step 1: Construct two objective functions F1 and F2, with the courier’s minimization of travel time as the optimization task. The objective function is expressed as: (1) When the courier places the package or mail at a nearby delivery point, only the courier's driving distance is considered, and the total time is: (2) When a courier delivers a package or mail to a door, the total time taken, taking into account the courier's travel distance and service time, is: Where D represents the number of delivery points, D = {1, 2, .., d}, each delivery point is represented by i, and the position matrix L is used to represent the location where the area needs to be delivered, L = {l(x i ,y i ),i=1,2,..,d}, where the distance from the i-th delivery point to the i+1-th delivery point x, y are longitude and latitude respectively, and the time matrix T is used to represent the service time of the courier at each delivery point T = {t i ,i=1,2,...,d};,v represents the courier’s driving speed, t i represents the service time of the i-th location; The objective functions F1 and F2 are regarded as two tasks T1 and T2 that need to be optimized simultaneously. Then the multi-task function to be optimized is in, and is the optimal solution for the two tasks to be solved, and Ω is the decision space; Step 2: Generate two independent randomly initialized populations POP1 and POP2 in the decision space for the objective functions F1 and F2 and initialize the Q table. Each individual in the population corresponds to a solution to the logistics distribution path optimization problem. Step 3: With probability cp k The two populations POP1 and POP2 are aligned in base and distribution through popular learning in the form of; Step 4: Start the iterative optimization process of the population with probability rmp k The knowledge transfer between different problems is realized through different crossover operators in the form of, the offspring individuals are generated, and the individuals aligned by popular learning are marked with Flag(k, i); Step 5: Evaluate the offspring individuals and update the population, record the number of individuals marked with Flag(k, i)=1 and the objective function value of the marked individuals; Step 6: Update the probability parameter rmp according to the survival status of individuals in different populations k , update the probability parameter cp by marking the best fitness value of the individual in the last two generations k and W table; Step 7: Determine whether the number of iterations reaches the maximum number of iterations. If not, jump to step 3; if satisfied, output the current population as the final solution, that is, the optimal distribution plan.
3. The logistics distribution path optimization method based on evolutionary multi-task optimization as claimed in claim 2 is characterized in that: The step 2 specifically includes the following steps: Step 2.1, randomly initialize populations POP1 and POP2 respectively: When there are D delivery points, randomly initialize N vectors of length D, which contain random permutations of the delivery point numbers from 1 to d, then the vector X = (x1, x2, ..., x d ); N is the population size. The population needs to be encoded during initialization. During the encoding process, POP1 and POP2 are compressed to decimals between 0 and 1, and then the decimals are converted to integers during the decoding process; Step 2.2: Assign a W table in Q-Learning to each task, and set each W value in the W table to 0 in the initial stage.
4. The logistics distribution path optimization method based on evolutionary multi-task optimization as claimed in claim 2 is characterized in that: The step 3 is specifically: select the action with the largest W value in the current state as the probability parameter cp according to the W table: k size; if all W values are 0, an action is randomly selected as the probability parameter; when the random number meets the probability parameter condition, manifold learning is used to align the basis and distribution of different tasks. Assuming that the task being solved is the target task T, the other task is the source task S.
5. The logistics distribution path optimization method based on evolutionary multi-task optimization as claimed in claim 4 is characterized in that: The specific steps of popular learning in step 3 are: Step 3.
1. Determine the optimal dimension to embed in the subspace The PCA subspaces of the source task S and the target task T are denoted as PCA S and PCA T , combining the subspaces of the source and target tasks into PCA S+T ; The PCA subspace inconsistency measure is defined as follows: Among them, D(d) is the total measure of the two protagonists, α d For PCA S and PCA S+T The protagonist between d For PCA T and PCA S+T The protagonist between them, Sina d and sinβ d is the minimum correlation distance; A greedy strategy is used to increase the dimension d while avoiding pushing the two subspaces to orthogonality, that is: d*=min{d|D(d)=1} (4) Where d* is the dimension required to retain sufficient structural information in the local area of the manifold, and D is the total dimension of the individual; Step 3.2: Construct geodesic flow On the popular space G(d, D), Represent the basis of source task S and target task T respectively, P S The orthogonal complement of Φ(t) is the mapping function of the geodetic line in the Grassmann popular space. The source task and target task matrices are mapped to between 0 and 1 through Φ(t). For other points between 0 and 1, the calculation formula is as follows: Φ(t)=P s U1Γ(t)-R s U2∑(t) (5) Where Φ(0)=P s , Φ(1)=P T , Γ(t), U2 and ∑(t) are decomposed according to and The calculation method is as follows: Among them, U1 and U2 are orthogonal matrices, Γ and ∑ are d×d diagonal matrices, and the diagonal elements are sinθ i and cosθ i (i=1, 2, ..., d); Step 3.3: Calculate the flow core of the geodetic line For two original D-dimensional individuals x i and x j , then Φ(t) T x i is the feature vector x i The projection to the subspace Φ(t) is if all projections are connected to the infinite-dimensional eigenvector z i ∞ and z j ∞ , use z i ∞ and z j ∞ The inner product of defines the geodesic flow core: in, is a semi-positive definite matrix, and the calculation method is as follows: Among them, Λ1, Λ2, Λ3 are diagonal matrices, and the diagonal elements are: Finally, the source task individual x is mapped to the target task individual v through the geodesic line flow kernel basis alignment: Step 3.4: Use the CORAL algorithm to reduce the distribution difference between the source task and the target task after base alignment First, the covariance statistics of the source task and the target task are calculated, and then whitening and coloring changes are applied to the original features to obtain the transformed matrix A coral , the calculation method is as follows: Among them, cov s and cov t are the covariance statistics of the source task and the target task respectively, and the calculation method is as follows: Among them, d represents the dimension of the population, x i Represents the i-th dimension column vector of the population.
6. The logistics distribution path optimization method based on evolutionary multi-task optimization as claimed in claim 2 is characterized in that: The step 4 specifically comprises the following steps: Step 4.1: For the generation of offspring within the task, two crossover operators SHADE and JAYA are used according to the excellence of the individuals. The offspring generation methods are as follows: Among them, individual x i 、x r1 and x r2 are random individuals in population k, is the better individual in population k, F k ∈[0, 1] is the balance factor; Among them, individual x i is the worst individual in population k, x pbest and x worst are the best individual and the worst individual respectively; Step 4.2: For the generation of inter-task offspring, use the SHADE operator. The calculation method is as follows: Among them, individual x i is the k-parent individual of the population, is the best individual in population r, x r1 and x r2 are random individuals in population r; At the same time, during the knowledge transfer process, the individuals whose manifolds are generated by the parameter offspring are marked as learned, that is, Flag(k, i)=1.
7. The logistics distribution path optimization method based on evolutionary multi-task optimization as claimed in claim 2 is characterized in that: The step 6 specifically comprises the following steps: Step 6.1: Update the probability parameter rmp according to the survival status of individuals in different populations k , that is, to update the control probability of knowledge transfer according to the survival status of the parent individuals in the population: Among them, N S Represents the survival rate of offspring individuals in the population, N d represents the mortality rate of individuals in the population; Step 6.2: Update the popular learning probability parameter cp through the W table k The size of the agent is divided into three states: improvement, regression and no change; assuming that G represents the current generation, then the best fitness of the current generation, the previous generation and the previous two generations through popular learning is Fit G , Fit G -1 and Fit G -2, the difference in the best fitness between the three generations brought by the improvement of the best fitness is: Different states are represented by the size of d. When d>0, it means that the current task benefits from the popular learning alignment. At this time, the reward value of reinforcement learning is reworded to 10; when d<0, it means that popular learning hinders the solution of the current task. At this time, the reward value of reinforcement learning is reworded to -5, indicating a penalty; when d=0, it means that popular learning has no effect on the solution of the current task, but it does not hinder it either. At this time, the reward value of reinforcement learning is reworded to 5; The update of the W table relies on the Bellman equation, which is calculated as follows: Among them, α is the learning rate, β is the discount factor, and Q t (S t , A t ) represents the Q value of state S action A at time t, R t+1 represents the reward value at time t+1, Q t+1 (S t , A t ) is Q(S t , A t ) is the Q value at time t+1.
