A vehicle logistics scheduling optimization method based on improved genetic algorithm
By improving the dual chromosome encoding and dynamic decoding of the genetic algorithm, the logistics optimization problems of multiple transport vehicles, multiple commodity vehicles, multiple car tracts and loading and unloading mixing are solved, and stable optimization effects and rapid calculation speed are achieved, adapting to different transportation capacity conditions.
Patent Information
- Application Number
- CN202211449957.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-19
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-11-19
AI Technical Summary
The existing technology is difficult to effectively solve the comprehensive vehicle logistics optimization problems of multi-transport vehicle types, multi-commercial vehicle types, multi-track and loading and unloading mixing, especially in large-scale problems, the complexity of solving the problem is high and the calculation time complexity is increasing exponentially.
Improved genetic algorithms are adopted, dual chromosome encoding and dynamic decoding are used, and initial population optimization and local optimization of greedy algorithms are combined. Through the intersection and mutation of order chromosomes and transporter chromosomes, the paths are dynamically decoded and optimized to ensure that the optimal paths can be found when the capacity is sufficient or insufficient.
The stable optimization effect of multiple transport vehicles, multiple commodity vehicles, multiple tracts and loading and unloading mixing has been achieved, and the comprehensive vehicle logistics problem has been solved with a faster calculation speed to adapt to scenarios with sufficient or insufficient transportation capacity.
Smart Images

Figure CN115689247B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle logistics scheduling, and in particular to a vehicle logistics scheduling optimization method based on an improved genetic algorithm. Background Art
[0002] While continuing to strengthen manufacturing cost optimization and control, major automakers are beginning to prioritize cost and efficiency control across all links of the automotive supply chain. Complete vehicle logistics management has evolved from a previously neglected, operational, and supporting role to a crucial component in the transition to manufacturing services, becoming a third source of profit for companies seeking competitive advantage and cost reduction. With the increasing and diversified demand from end-customer customers in the commodity automobile market and the progress of global economic integration, the scale and complexity of my country's automotive logistics services market continues to grow. Furthermore, the importance of automotive logistics within the automotive supply chain is becoming increasingly prominent, leading automakers to place increasing emphasis on parts and complete vehicle logistics. The scale of the automotive market and the related automotive logistics market are both growing. my country's automotive logistics services are becoming increasingly specialized, and with the advancement of related information technology, they are continuously exploring the paths of standardization, scientific development, informationization, and intelligentization.
[0003] The optimization problem of finished vehicle logistics distribution is essentially the Vehicle Routing Problem (VRP). Since the problem was first proposed in 1959, numerous researchers have proposed numerous algorithms for solving it, primarily exact algorithms and heuristic intelligent algorithms. Exact algorithms include branch-and-bound, integer programming, dynamic programming, and the cutting plane method. Heuristic intelligent algorithms include scanning algorithms, evolutionary strategies, ant colony algorithms, genetic algorithms, tabu algorithms, simulated annealing algorithms, and particle swarm optimization. While exact algorithms can find optimal solutions, they are not suitable for solving large-scale problems. Heuristic algorithms developed for specific problems are only applicable to specific problems and cannot effectively solve comprehensive and complex problems. As the problem size increases, the number of constraints on the expression increases, and the time complexity increases exponentially, making the process of finding the optimal solution extremely complex. Traditional exact algorithms are no longer sufficient for solving large-scale VRPs. Many heuristic intelligent algorithms have been proposed by scholars at home and abroad. Although they can effectively solve most vehicle routing problems, they still cannot effectively solve the comprehensive vehicle logistics optimization problem with multiple transport vehicle types, multiple commodity vehicle types, multiple parking lots, and mixed loading and unloading. Summary of the Invention
[0004] The main purpose of this invention is to overcome the shortcomings of the existing technology and provide a vehicle logistics scheduling optimization method based on an improved genetic algorithm. The method takes into account multiple transport vehicle types, multiple commodity vehicle types, multiple parking lots, and mixed loading and unloading problems in the model.
[0005] The present invention adopts the following technical solutions:
[0006] A vehicle logistics scheduling optimization method based on an improved genetic algorithm comprises the following steps:
[0007] Step (1): Obtain order information, transport vehicle information, commodity vehicle information, and parking lot information. Order information includes the order number, the type and quantity of the commodity required in the order, the operation type (loading or unloading), and the location coordinates of the order demand point; transport vehicle information includes the type and quantity of transport vehicles, the transport vehicle's deadweight, rated load, the length, width, height of the transport vehicle, and the parking lot number to which the transport vehicle belongs; commodity vehicle information includes the type of commodity vehicle, the weight of the commodity vehicle, and its length, width, and height; parking lot information includes the number and number of parking lots, and the location coordinates of the parking lots.
[0008] Step (2): Determine the function optimization objectives and constraints.
[0009] Step (2.1): Objective function: Minimize transportation cost, which includes vehicle depreciation, driver salary, fuel cost, and toll.
[0010] Step (2.2): Constraints: 1. The load and space restrictions must not be exceeded during transportation. 2. Each order point's demand can be completed by any single transporter. 3. Orders are not split; each order point is visited only once, meaning it can only be served by one transporter.
[0011] Step (3): Set the population size pop, crossover probability pc, mutation probability pm and iteration termination condition.
[0012] Step (4): Population initialization. Gene encoding uses dual chromosome natural number encoding, which is called order chromosome encoding and transporter chromosome encoding.
[0013] Step (4.1): The order chromosome encoding length is equal to the number of orders N. The encoding order represents the order of access to the order points. The distance between each order demand point is calculated, and the greedy method is used to generate the gene encoding. One order point is randomly selected as the first encoding gene. The other order demand points closest to the order demand point are found as the second encoding gene. This process is repeated until all order points are encoded into the gene, forming a complete chromosome as an order chromosome.
[0014] Step (4.2): Select a different order point as the first coding gene and repeat step (4.1) to obtain N chromosomes with different orders. Generally speaking, the population size pop should be greater than the number of orders N, and the remaining pop-N order chromosomes are randomly generated. To achieve the goal of optimizing the total cost, step (2) shows that the most important factor affecting the total cost is distance. Therefore, the chromosomes generated by the distance greedy method will have a higher fitness value than randomly generated chromosomes, which can accelerate population convergence.
[0015] Step (4.3): The transporter chromosome encoding length is equal to the number of transporters Nv. Each transporter is encoded with a natural number, numbered 1 to Nv. The encoding order represents the order in which the transporters are used. A random pop of chromosomes of size Nv is generated as the transporter chromosome.
[0016] Step (5): Calculate the fitness value.
[0017] Step (5.1): To calculate the fitness value of the function, the code must be decoded first. Decode according to the rated load of the transport vehicle and the transportation space limit. If the limit is exceeded, it is understood that the current transport vehicle cannot complete the transportation and must return to the yard after completing loading and unloading at the previous demand point. The yard needs to dispatch additional transport vehicles to complete the transportation. The yard is numbered 0, and the decoding process is the process of inserting the number 0 into the order code. How to determine the position to insert 0 requires dynamic calculation of the load and the space allowed for loading (the remaining length, width, and height of the transport vehicle). The dynamic decoding steps are as follows:
[0018] Step (5.1.1): The transport vehicle departs from the parking lot, and the first decoded gene is 0. Determine whether the limit is exceeded during the process of completing the transportation task of the i-th order of the original chromosome (including loading and unloading the vehicle). If the limit is not exceeded, the first decoded surrounding is 0, p1, p2, ..., pi, 0.
[0019] Step (5.1.2): Add the i+1th order point to the decoding cycle. This means that the i+1th order point is considered to be transported on a transport vehicle. The transportation process is simulated to determine whether the restrictions are exceeded during the entire transportation process. If the restrictions are exceeded when loading the vehicle at a certain transportation point or when loading the vehicle at departure, the decoding fails, and the first decoding cycle remains 0, p1, p2, …, pi, 0. Add the i+1th order point to the second decoding cycle. If the restrictions are not exceeded during the simulated transportation process, the decoding is successful, and the decoding cycle is adjusted to 0, p1, p2, …, pi, pi+1, 0. Then add the i+2th order point to the decoding cycle, and repeat the above steps until the i+jth order point is added. If the decoding fails, the next decoding cycle begins.
[0020] Step (5.1.3): Repeat steps (5.1.1) and (5.1.2) until all order points have been decoded. After decoding, the chromosome length will be greater than the number of orders N due to the addition of 0.
[0021] Step (5.1.4): The transporter chromosomes do not need to be decoded. Their order indicates the order of the transporters used. That is, the first number indicates which transporter was used to complete the transport task within the first decoding cycle. It also indicates which depot the transporter departed from and returned to after the transport.
[0022] Step (5.2): Calculate the fitness value based on the decoded chromosome. Calculate the cost corresponding to each section of the road and find the total cost of the transportation route after decoding each chromosome.
[0023] Step (5.3): The inverse of the total cost is used as the fitness value.
[0024] Step (6): Selection operation. According to the elite retention strategy, retain the individuals with the highest fitness in the population; then apply the tournament selection operator to the current population to select individuals with higher fitness to join the new generation population.
[0025] Step (7): Crossover operation. According to the set crossover probability, the chromosomes are randomly crossed. The order chromosome and the transport chromosome are crossed separately. The crossover method uses a double-point crossover: two random numbers are generated, the gene code between the two numbers is copied and inserted into the chromosome, and then the duplicate gene is deleted.
[0026] Step (8): Mutation operation. Randomly mutate the chromosomes according to the set mutation probability. The order chromosome and the transport chromosome are mutated separately. Chromosome mutation uses double-point exchange mutation: two random numbers are generated and the genes at the positions of these two numbers are exchanged to complete the mutation.
[0027] Step (9): Local optimization. Randomly select two adjacent gene codes in the chromosome, swap their order, and calculate the fitness values before and after the swap. The chromosome with the higher fitness value, i.e., the lower total cost, is used as the chromosome code after local optimization. The genetic algorithm has a wide search range for solutions and can effectively avoid falling into the local optimum, but its local search ability is poor. This local optimization operation can effectively search for the nearest optimal solution and improve the local search ability.
[0028] Step (10): Repeat steps (5) to (9) until the termination condition is reached and the optimal solution is output.
[0029] Beneficial effects of the present invention:
[0030] (1) The use of dual chromosome encoding and dynamic decoding can effectively solve the comprehensive vehicle logistics optimization problem of multiple transport vehicle types, multiple commodity vehicle types, multiple yards, and mixed loading and unloading. It can also solve the optimal path when there is sufficient and insufficient transport capacity. When there is sufficient transport capacity, it means that the transport vehicle behind the transport vehicle chromosome code is not used. When there is insufficient transport capacity, it means that all transport vehicles have been dispatched, but some commodity vehicle orders are still unfulfilled.
[0031] (2) Aiming at the comprehensive problem of multiple transport vehicle types, multiple commodity vehicle types, multiple parking lots, and mixed loading and unloading, the improved genetic algorithm, greedy algorithm initial population optimization, dual chromosome encoding dynamic decoding, and local optimization ensure stable optimization effects and faster calculation speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a flow chart of a vehicle logistics scheduling optimization method based on an improved genetic algorithm of the present invention; DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. The specific embodiments described herein are only used to explain the technical solution of the present invention and are not intended to limit the present invention.
[0034] like Figure 1 As shown in FIG, a vehicle logistics scheduling optimization method based on an improved genetic algorithm includes the following steps:
[0035] Step (1): Get order information, transport vehicle information, commodity vehicle information, and parking lot information. See the following table:
[0036] Table 1 Transport vehicle information
[0037]
[0038] Table 2 Commodity vehicle information
[0039]
[0040] Table 3 Order information
[0041]
[0042] Table 4 Parking lot information
[0043]
[0044] Step (2): Determine the optimization objectives and constraints.
[0045]
[0046]
[0047] f1 is the vehicle depreciation and driver salary, f2 is the toll, and f3 is the fuel cost. The overall goal is to minimize the total cost. Constraints:
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059] in:
[0060] N: order node, 0 means parking lot;
[0061] K: transport vehicle type;
[0062] P: Commercial vehicle type;
[0063] U k : Number of k-type transport vehicles;
[0064] g p ,l p ,w p ,h p ,: weight, length, width and height of p-type commercial vehicles;
[0065] G k ,L k ,W k ,H k ,: k-type transport vehicle load capacity, available length, width, height;
[0066] Q k : Weight of Class K transport vehicle;
[0067] d ij : the distance between i and j;
[0068] The total weight of the commodity vehicle of the u-th vehicle of type K transport vehicle during the process from i to j.
[0069] The above formula ensures that the limit is not exceeded, the order is not split, and each order customer point can only be served by one transport vehicle once.
[0070] Step (3): Set the population size pop = 200, the crossover probability pc = 0.8, the mutation probability pm = 0.1, and the iteration termination condition to evolve for 1000 generations.
[0071] Step (4): Population initialization. Gene encoding uses a dual-chromosome natural number encoding, called the order chromosome encoding and the transporter chromosome encoding. The order chromosome encoding length is equal to the number of orders (20). The distance between each order demand point is calculated, and 20 gene codes are generated using the greedy method. The remaining 180 gene codes are randomly generated. The transporter chromosome encoding length is equal to the number of transporters (15); 200 gene codes are randomly generated as transporter chromosomes.
[0072] Step (5): Calculate the fitness value. First, the code must be decoded. Use the dynamic decoding method under the above constraints. For a simple example, if the order code is (1, 2, 3, 4, 5, 6) and the transport vehicle code is (1, 2), then the possible decoding is (0, 1, 2, 3, 0, 4, 5, 6, 0). This means that the first transport vehicle serves customer points 1, 2, 3 and returns to parking lot 1 (to which it belongs). The second transport vehicle serves customer points 4, 5, 6 and then returns to parking lot 2 (to which it belongs). Based on the optimization goal, calculate the total cost F after decoding. Calculate the fitness value f(t) = 1 / F.
[0073] Step (6): Selection operation. According to the elite retention strategy, retain the individuals with the highest fitness in the population; then apply the tournament selection operator to the current population to select individuals with higher fitness to join the new generation population.
[0074] Step (7): Crossover operation. According to the set crossover probability, the chromosomes are randomly crossed. The order chromosome and the transport chromosome are crossed separately. The crossover method uses a double-point crossover: two random numbers are generated, the gene code between the two numbers is copied and inserted into the chromosome, and then the duplicate gene is deleted.
[0075] Step (8): Mutation operation. Randomly mutate the chromosomes according to the set mutation probability. The order chromosome and the transport chromosome are mutated separately. Chromosome mutation uses double-point exchange mutation: two random numbers are generated and the genes at the positions of these two numbers are exchanged to complete the mutation.
[0076] Step (9): Local optimization. Randomly select two adjacent gene codes in the chromosome, swap their order, and calculate the fitness values before and after the swap. The chromosome with the higher fitness value, i.e., the lower total cost, is used as the chromosome code after local optimization.
[0077] Step (10): Repeat steps (5) to (9) until the termination condition is reached.
[0078] Output the optimal solution. The final calculation results are as follows:
[0079] Table 5 Optimal solution
[0080]
[0081]
[0082] The present invention proposes a vehicle logistics scheduling optimization method based on an improved genetic algorithm, which ensures stable optimization effect and faster calculation speed through improved genetic algorithm, greedy algorithm initial population optimization, dual chromosome encoding dynamic decoding, and local optimization.
[0083] Finally, it should be noted that the above description only describes specific embodiments of the present invention in detail. However, the present invention is not limited to the specific embodiments described above. Equivalent modifications and substitutions made by those skilled in the art are also within the scope of the present invention. Therefore, equivalent changes and modifications made without departing from the spirit and scope of the present invention are encompassed within the scope of the present invention.
Claims
1. A vehicle logistics scheduling optimization method based on an improved genetic algorithm, characterized in that: The following steps are involved: Step 1: Obtain order information, transport vehicle information, commodity vehicle information, and parking lot information; Step 2: Determine the function optimization objectives and constraints; Step 3: Set the population size pop, crossover probability pc, mutation probability pm and iteration termination condition; Step 4: Population initialization; gene coding uses double chromosome natural number coding, which is the order chromosome coding and the transporter chromosome coding; Step 5: Calculate the fitness value; Step 6: Select an operation; according to the elite retention strategy, retain the individuals with the highest fitness in the population; apply the tournament selection operator to the current population to select individuals with higher fitness to join the new generation population; Step 7: Crossover operation: Randomly cross the chromosomes according to the set crossover probability; cross the order chromosomes and the transport chromosomes separately; the crossover method uses double-point crossover: generate two random numbers, copy the gene code between the two numbers and insert it into the chromosome, and then delete the duplicate gene; Step 8: Mutation operation: Randomly mutate the chromosomes according to the set mutation probability; mutate the order chromosome and the transport chromosome separately; chromosome mutation uses double-point exchange mutation: generate two random numbers, and exchange the genes at the positions of these two random numbers to complete the mutation; Step 9: Local optimization; randomly select two adjacent gene codes in the chromosome, exchange their order, and calculate the fitness values before and after the exchange; the chromosome with the higher fitness value, that is, the lower total cost, is used as the chromosome code after local optimization; Step 10: Repeat steps 5 to 9 until the termination condition is reached and the optimal solution is output; In step 4, the gene encoding step is as follows: Step 4.1: The order chromosome encoding length is equal to the number of orders N. The encoding order represents the order of order points. The distance between each order point is calculated, and the gene encoding is generated using the greedy method. One order point is randomly selected as the first encoding gene. The other order points closest to it are found as the second encoding gene. This process is repeated until all order points are encoded into the gene, forming a complete chromosome as an order chromosome. Step 4.2: Select a different order point as the first coding gene and repeat step 4.1 to obtain N different order chromosomes; the population size pop must be greater than the number of orders N, and the remaining pop-N order chromosomes are randomly generated; Step 4.3: The transporter chromosome encoding length is equal to the number of transporters Nv; each transporter is encoded with a natural number, numbered 1 to Nv. The encoding order represents the order in which the transporters are used. A chromosome with a pop size of Nv is randomly generated as the transporter chromosome; In step 5, the steps for calculating the fitness value are as follows: Step 5.1: To calculate the fitness value of the function, the code must be decoded; decoding is performed based on the rated load of the transport vehicle and the transport space limit; Step 5.2: Calculate the fitness value based on the decoded chromosomes; calculate the cost corresponding to each section of the road, and find the total cost of the transportation route after decoding each chromosome; Step 5.3: The inverse of the total cost is the fitness value.
2. The vehicle logistics scheduling optimization method based on improved genetic algorithm according to claim 1 is characterized in that: In step 1, the order information includes the order number, the type and quantity of the goods required in the order, the operation type, and the location coordinates of the order demand point; the transport vehicle information includes the type and quantity of the transport vehicle, the transport vehicle's own weight, the rated load, the length, width, height of the transport vehicle, and the parking lot number to which the transport vehicle belongs; the commodity vehicle information includes the type of commodity vehicle, the commodity vehicle's weight, and the length, width, and height; the parking lot information includes the number and number of parking lots, and the location coordinates of the parking lots.
3. The vehicle logistics scheduling optimization method based on improved genetic algorithm according to claim 1 is characterized in that: Step 2 includes: Objective function: Minimize transportation costs, which include vehicle depreciation, driver wages, fuel costs, and tolls; Constraints:
1. The load and space restrictions must not be exceeded during transportation; 2. Any transport vehicle can independently complete the transportation task for each order point; 3. Orders are not split, and each order point is only visited once, that is, it can only be served by one transport vehicle.
4. The vehicle logistics scheduling optimization method based on improved genetic algorithm according to claim 1 is characterized in that: In step 5.1, the decoding steps are as follows: Step 5.1.1: The transport vehicle departs from the parking lot, and the first decoding gene is 0. Determine whether the limit is exceeded during the process of completing the transportation task of the i-th order of the original chromosome. If the limit is not exceeded, the first decoding cycle is 0, p1, p2, ..., pi, 0; Step 5.1.2: Add the i+1th order point to the decoding cycle. That is, consider the i+1th order to be transported on a transport vehicle, simulate the transportation process, and determine whether the limit is exceeded during the entire transportation process. If the limit is exceeded when loading the commodity vehicle at a certain transportation point or when loading the commodity vehicle at departure, it means that the decoding has failed, and the first decoding cycle remains 0, p1, p2, ..., pi, 0; add the i+1th order point to the second decoding cycle. If the limit is not exceeded during the simulated transportation process, it means that the decoding is successful, and the decoding cycle is adjusted to 0, p1, p2, ..., pi, pi+1, 0; then add the i+2th order point to the decoding cycle, repeat the above steps until the i+jth order point is added, decoding fails, and enters the next decoding cycle; Step 5.1.3: Repeat steps 5.1.1 and 5.1.2 until all order points have been decoded; Step 5.1.4: The transporter chromosomes do not need to be decoded; their order indicates the order of transporters to be used.
Citation Information
Patent Citations
Affine transformation solving method under massive control points based on improved genetic algorithm
CN111931934A
Improved genetic algorithm for path optimization
CN112001541A