A Multi-Logistics Vehicle Collaborative Scheduling Method Based on a Customer-Centered Ant Colony System
By optimizing the ant colony algorithm through a customer-oriented selection ant colony system and a local search strategy, the path orientation and cost imbalance problems in the collaborative scheduling of multiple distribution centers and multiple logistics vehicles are solved, and an efficient collaborative scheduling solution for logistics vehicles is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-03-10
AI Technical Summary
Existing ant colony algorithms face challenges in the collaborative scheduling optimization problem involving multiple distribution centers and multiple logistics vehicles, such as poor path construction guidance, uneven distribution of logistics tasks, low search efficiency, and low quality of solutions. They cannot effectively solve the NP-hard dual optimization problem.
An ant colony system based on guided customer selection is adopted. Each ant selects the last customer to serve from m customers with the minimum service cost between the initial customers using a roulette wheel selection method. The next customer is pre-selected by combining the current customer information and the information of the last customer served. The path is optimized by using 2-opt and point insertion local search strategies to construct a globally optimal logistics vehicle scheduling scheme.
It improved the guidance of route construction, balanced the transportation costs of logistics vehicles, reduced the differences in service costs among logistics vehicles, and improved the balance of logistics task allocation and the quality of scheduling schemes.
Smart Images

Figure CN121279910B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computational intelligence technology, and in particular to a multi-logistics vehicle collaborative scheduling method based on a guided customer selection ant colony system. Background Technology
[0002] With the rapid development of the logistics industry, customer logistics orders are increasing daily, making the traditional single-distribution-center logistics model unable to meet current logistics and distribution needs. Therefore, multi-distribution-center, multi-vehicle collaborative delivery has become an important method for solving large-scale logistics task delivery optimization problems. However, the multi-distribution-center, multi-vehicle collaborative optimization problem involves both the optimization of logistics task allocation and the optimization of the service order of allocated logistics tasks, making it a typical NP-hard dual optimization problem, which renders traditional optimization algorithms ineffective.
[0003] Ant Colony System (ACS) is a swarm optimization algorithm that maintains an ant colony and iteratively searches the solution space, exhibiting strong global search capability, high robustness, and strong adaptability. However, existing ACS algorithms face challenges in solving the multi-delivery vehicle collaborative scheduling optimization problem across multiple distribution centers, including poor path construction guidance, uneven distribution of logistics tasks, low search efficiency, and low quality of solutions. Summary of the Invention
[0004] Purpose of the invention: The purpose of this invention is to provide a multi-logistics vehicle collaborative scheduling method based on a guided customer selection ant colony system, so as to increase the guidance of the algorithm in constructing paths, improve the balance of logistics task allocation, reduce the transportation costs of all logistics vehicles, and balance the transportation costs of each logistics vehicle as much as possible, thereby reducing the differences.
[0005] Technical solution: A multi-vehicle collaborative scheduling method based on a customer-selection ant colony system, comprising the following steps:
[0006] S1: Obtain customer information and logistics vehicle information, construct a multi-logistics vehicle collaborative scheduling model, and set optimization goals;
[0007] S2, calculate the service cost matrix between customers based on their locations; set the ant colony system parameters and initialize the pheromone matrix;
[0008] S3, Initialization NP Each ant team is assigned [number] ant teams. m There are only ants, and each ant is responsible for building the service path for one logistics vehicle; at the same time, an empty customer taboo table is initialized for each ant team. tabu This is used to record customers who have already been served;
[0009] S4: For each ant in each ant team, randomly select a customer as the initial customer. Then, based on the initial customer, find the ant that minimizes the service cost between each ant and the initial customer. m The final customer to be served is selected from among the customers using a roulette wheel selection method, and the lower the service cost, the greater the probability of being selected.
[0010] S5, each ant obtains a set of potential customers based on the customer taboo list, and pre-selects the next customer based on the information of the current node and the information of the last customer served;
[0011] S6. Calculate the future service cost of each ant based on the pre-selected customers, select the pre-selected customer of the ant with the lowest future service cost, add it to the path of this ant, and add this pre-selected customer to the customer taboo table. Call the local pheromone update.
[0012] S7. Repeat steps S5 to S6 until all customers are served by the logistics vehicle and a complete preliminary logistics vehicle dispatch plan is obtained.
[0013] S8 employs a 2-opt and point insertion local search strategy to optimize the service cost of each logistics vehicle in the Ant Team and balance the service costs between logistics vehicles, thereby obtaining a locally optimal logistics vehicle scheduling scheme.
[0014] S9 compares the service costs of all local logistics vehicle scheduling solutions built by the Ant team, updates the globally optimal logistics vehicle scheduling solution, and performs a global pheromone update.
[0015] S10. Repeat steps S3 to S9 until the iteration termination condition is met, and output the finally found globally optimal logistics vehicle scheduling scheme.
[0016] Furthermore, the construction of the multi-logistics vehicle collaborative scheduling model is as follows: Given n One customer and m A logistics vehicle, constructing an undirected graph G = ( V,E ),in V Represents the set of all customers. E This represents the edge set between customers, where each customer has one and only one logistics vehicle passing through, and each logistics vehicle eventually returns to the starting point.
[0017] If the optimization objective is to minimize the maximum service cost among multiple logistics vehicles, then:
[0018] ,
[0019] in, Representing the k Service routes of a logistics vehicle; Representing thek Service routes of logistics vehicles The total service cost is calculated from the service cost matrix;
[0020] The service cost matrix is as follows: ,in, c i,j On behalf of clients i To the customer j The service cost.
[0021] Furthermore, the parameters of an ant colony system include: the number of ant colonies. NP Number of algorithm iterations iteration Heuristic information weights α Pheromones concentration weighting β Global pheromone evaporation rate ρ The probability of greedily selecting customers q 0 and local pheromone evaporation rate δ A feasible logistics vehicle scheduling scheme is constructed using a greedy algorithm, and the pheromone matrix is initialized based on this scheme.
[0022] Initialize pheromone concentration The calculation formula is as follows:
[0023] ,
[0024] in, The initial pheromone concentration, n For the number of customers, Represents a greedy scheduling scheme The largest service cost among all logistics vehicles;
[0025] The pheromone matrix is a Two-dimensional matrix ,in On behalf of clients i and customers j The pheromone concentration between, and when At that time, Initialize to ;when i = j At that time, Initialize to 0;
[0026] The greedy scheduling scheme The specific construction steps are as follows:
[0027] S201, each logistics vehicle randomly selects a customer as its service starting point and places them into its respective service route and prohibition list. tabu ;
[0028] S202, each logistics vehicle selects the next customer to visit from the set of accessible customers, and its mathematical expression is as follows:
[0029] ,
[0030] in, V k,next Representing the k The next customer to visit for a logistics vehicle, argmin represents the customer with the lowest service cost among the candidate customers served by the logistics vehicle from its current customer. Representing the k Current customers of logistics vehicles V k,current and customers i Service costs between tabu Representative Client Taboos List; Once the next customer for a logistics vehicle is identified... V k,next Then, the visiting client V k,next Remove from the accessible customer set and add to the taboo list. tabu ;
[0031] S203, Repeat step S202 until there are no more customers to visit;
[0032] S204, each logistics vehicle returns to the starting point, completing the construction of the greedy scheduling scheme;
[0033] S205 compares the service costs of each logistics vehicle in the greedy scheduling scheme and selects the highest service cost as the maximum. .
[0034] Furthermore, in step S4, each ant in each ant team randomly selects a customer as its initial service customer. Then, based on the initial service customer, the ant is assigned the service cost with the initial customer that is minimized. m The final customer to be served is selected from among the customers using a roulette wheel selection method. The probability of selecting the final customer for each logistics vehicle is calculated as follows:
[0035] ,
[0036] in, Representing the k Customers who selected the logistics vehicle i The probability of being the last customer served. Representing the k The starting point of the logistics vehicle V k,start and customers i The service costs between them.
[0037] Furthermore, in step S5, each ant pre-selects customers based on current customer information and the information of the last customer served. The specific selection formula is as follows:
[0038] ,
[0039] ,
[0040] Where argmax represents taking the maximum value. tabu Client Taboos List α Represents heuristic information weights. β Represents pheromone concentration weights ,V k,end Representing the k The last customer served by the ant Representing the k Ant Group's current customers V k,current and customers i The pheromone concentration between them On behalf of clients i With the k The last customer served by the ant V k,end The pheromone concentration between them Representing heuristic information, q 0 represents the probability of greedily selecting pre-selected customers. J k Representing customers selected by the roulette wheel selection method. Representing the k The logistics vehicles currently serving customers V k,current and customers i Service costs between On behalf of clients i and customers V k,end The service cost between them; rand() represents a random function;
[0041] The specific method for calculating the probability of each customer's choice in the roulette wheel selection method is as follows:
[0042] ,
[0043] in, Representing the k A logistics vehicle in a roulette wheel selection method customer i The probability of choosing, Representing the k Ant Group's current customers V k,current and customers j The pheromone concentration between them On behalf of clients j With the k The last customer served by the ant V k,end The pheromone concentration between them.
[0044] Furthermore, in step S6, after all ants have pre-selected the next customer, the following steps are used to select one ant and make its pre-selected customer the next visiting customer:
[0045] S601, add the current service cost of each ant serving the customer, the service cost from the current customer to the pre-selected customer, and the service cost from the pre-selected customer to the last customer served, to obtain the future service cost of that ant serving the customer. The formula for calculating the future service cost is as follows:
[0046] ,
[0047] in, Representing the k The future service costs of Ant Group Representing the k The current service cost for Ant Financial's existing customers along its existing path. V k,selected Representing the k Ant's pre-selected customers Representing the k Ant's current customers V k,current to its pre-selected customers V k,selected The service cost, Representing the k Ant's pre-selected customers V k,selected To its last customer V k,end Service costs;
[0048] S602, select the ant with the lowest future service cost for path construction, and add its pre-selected customers to this ant's path. The specific formula for selecting the ant is as follows:
[0049] ,
[0050] ,
[0051] in, ant selected Ant Group represents the lowest cost in the future. Representing the k The future service costs of Ant Group The customers pre-selected by the chosen ants;
[0052] S603 will pre-select customers V next Add it to the selected Ant service path and update its service cost. The service cost update formula is as follows:
[0053] ,
[0054] in, This represents the current service cost of the selected ant. Represents the current customers of the selected ant to its pre-selected customers Service costs;
[0055] S604, keep the remaining ant paths and service costs unchanged;
[0056] S605, update the customer prohibition list as follows:
[0057] ,
[0058] in, This represents the pre-selected customers who have been chosen and added to the path;
[0059] S606, update the pheromones of the selected ant along the edge from its current client to the pre-selected client, as follows:
[0060] ,
[0061] in, δ Represents the local evaporation coefficient, 0 < δ <1; Represents the current customers of the selected ant and pre-selected customers The pheromone concentration between them This represents the initial pheromone concentration.
[0062] Furthermore, in step S8, the specific implementation steps for executing the local search strategy that combines 2-opt and point insertion are as follows:
[0063] S801, for each path in each scheduling scheme If the path If the number of customers on the path is greater than 1, excluding the customers at the starting point and the last service point, then the path... Perform a 2-opt operation; randomly select two customers on the path and reverse the customer sequence between these two customers. The change in service cost after the reversal is shown below:
[0064] ,
[0065] in, This represents the first customer selected. This represents the second customer selected. On behalf of clients The previous customer, On behalf of clients The next visiting customer, On behalf of clients and customers Service costs between On behalf of clients and customers Service costs between On behalf of clients and customers Service costs between On behalf of clients and customers The service costs between; if This indicates that the service cost decreases after the reversal. Therefore, we accept this reversal of the customer sequence and update the service cost of this path. The service cost update formula is as follows:
[0066] ,
[0067] in, Representing the k Service routes of logistics vehicles Total service cost Representing the k The change in service cost after a logistics vehicle performs a 2-opt operation;
[0068] For path All clients on the path perform the 2-opt operation until the path is reversed. No two customers on the same path can reduce the service cost of that path.
[0069] S802, perform point insertion operation;
[0070] First, identify the logistics vehicle with the highest service cost in the scheduling plan, and then remove one customer from this vehicle to maximize the change in its service cost. The customer to be removed is selected using the following formula:
[0071] ,
[0072] in, pre On behalf of clients i Previous customers, pos On behalf of clients i Subsequent visitors, cpre,i On behalf of clients pre and customers i Service costs between c i,pos On behalf of clients i and customers pos Service costs between c pre,pos On behalf of clients pre and customers pos Service costs between The logistics vehicle service path with the highest service cost in the dispatching scheme;
[0073] Subsequently, the service cost with the customer to be deleted was selected. m For each customer, a pre-insertion operation is performed: the deleted customers are greedily inserted into the logistics vehicle routes of these customers to minimize the change in their service costs. This excludes the logistics vehicle routes with the highest service costs. The specific insertion method is as follows:
[0074] ,
[0075] in, del The customer who was removed from the delivery route with the highest service cost was inserted into the delivery route with the lowest service cost. i and customers pos between, c i,del On behalf of clients i and customers del Service costs between c del,pos On behalf of clients del and customers pos Service costs between;
[0076] Select the insertion path with the minimum maximum service cost of the entire scheduling scheme after the pre-insertion operation and insert it; if the maximum service cost of the entire scheduling scheme is reduced after this point insertion method, then use this point insertion, update the service paths and service costs involved in the scheduling scheme, and repeat the above operation; otherwise, keep the original scheduling scheme unchanged and end the point insertion operation.
[0077] Furthermore, in step S9, the service cost of all local scheduling schemes built by the Ant team is evaluated, and then the globally optimal logistics vehicle scheduling scheme is updated. The specific steps are as follows:
[0078] S901, the service cost of the scheduling scheme built by each Ant team is evaluated based on the optimization objective function, and the calculation formula is as follows:
[0079] ,
[0080] in, path p Representing the p The scheduling scheme built by the Ant Group team This indicates the first [number] in the scheduling scheme. k The service cost of a logistics vehicle m Represents the number of logistics vehicles;
[0081] S902, comparison NP There are several scheduling schemes, and the best scheduling scheme is selected. The selection steps are as follows:
[0082] ,
[0083] in, path best This represents the current optimal scheduling scheme. NP Represents the number of ant teams. f ( path p ) represents the first p The service cost of the scheduling solution built by the Ant Group team;
[0084] like f ( path best )< f ( path gbest If the current optimal scheduling scheme is selected, then... path best Replace the globally optimal scheduling scheme path gbest And update the globally optimal scheduling service cost. f ( path gbest ) = f ( path best Otherwise, keep path gbest and f ( path gbest )constant;
[0085] S903, perform a global pheromone update using the following formula:
[0086] ,
[0087] ,
[0088] in, ρ The global pheromone evaporation rate. On behalf of clients i and customersj The pheromone concentration between them path gbest This represents the globally optimal scheduling scheme. f ( path gbest ) represents the service cost of the globally optimal scheduling scheme;
[0089] During global pheromone updates, only edges belonging to the globally optimal scheduling scheme are updated according to the above formula; other edges remain unchanged.
[0090] Compared with the prior art, the significant advantages of this invention are as follows:
[0091] 1. This invention employs a guided customer selection ant colony system, which minimizes the service cost for each ant between itself and the starting point. m This method pre-selects one customer from among the customers using a roulette wheel selection method as the last customer to be served, making the ants more directional when building paths, reducing the likelihood of service paths from one ant to another crossing, and making it easier to build an excellent multi-logistics vehicle collaborative scheduling solution.
[0092] 2. This invention uses current customer information and last customer information to pre-select the next customer, calculates the future path service cost based on the pre-selected customer, selects the ant with the lowest future path service cost, and puts the pre-selected customer into its path as the next customer to be visited, thus constructing a preliminary logistics vehicle scheduling scheme. The method of pre-selecting the last customer proposed in this invention not only makes it easy to construct an excellent multi-logistics vehicle collaborative scheduling scheme, but also effectively balances the service costs between logistics vehicles.
[0093] 3. This invention, based on the obtained preliminary logistics vehicle scheduling scheme, uses a local search method that integrates 2-opt and point insertion to obtain a locally optimal logistics vehicle scheduling scheme; and evaluates all locally optimal logistics vehicle scheduling schemes to obtain a globally optimal logistics vehicle scheduling scheme. Specifically, the 2-opt operation effectively avoids intersection problems in logistics vehicle service paths, further reducing service costs; the point insertion operation not only reduces service costs but also narrows the service cost gap between logistics vehicles, further optimizing the multi-logistics vehicle collaborative scheduling scheme. Attached Figure Description
[0094] Figure 1 This is a flowchart of the present invention;
[0095] Figure 2 This is a customer distribution diagram illustrating the multi-logistics vehicle collaborative scheduling optimization problem of this invention;
[0096] Figure 3 This is a schematic diagram illustrating the customer selection of the final service in this invention;
[0097] Figure 4 This is a schematic diagram of the customer selection method in the path construction process of this invention;
[0098] Figure 5 This is a schematic diagram illustrating the selection of ants based on future costs according to the present invention;
[0099] Figure 6 This is the route map of the first multi-vehicle collaborative scheduling scheme before optimization using the 2-opt operation;
[0100] Figure 7 This is the route map of the first multi-logistics vehicle collaborative scheduling scheme optimized using 2-opt operations;
[0101] Figure 8 This is the first multi-vehicle collaborative scheduling scheme roadmap before optimization using point insertion operations;
[0102] Figure 9 This is the first multi-vehicle collaborative scheduling scheme roadmap optimized using point insertion operations;
[0103] Figure 10 This is a schematic diagram of the path using the globally optimal multi-logistics vehicle collaborative scheduling scheme found by this invention. Detailed Implementation
[0104] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0105] This embodiment is an example of a multi-vehicle collaborative scheduling problem, involving 48 different customers and 3 distribution centers. One logistics vehicle is assigned to each distribution center, for a total of 3 logistics vehicles. Each logistics vehicle starts from the origin (distribution center), traverses the customers, and finally returns to its respective origin.
[0106] like Figure 1 As shown, this example provides a multi-vehicle collaborative scheduling method based on a customer-selection ant colony system. The method includes the following steps:
[0107] Step 1: Obtain customer group information and logistics vehicle information, and construct a multi-logistics vehicle collaborative scheduling model. The customer group information includes the number of customers. n = 48, Customer's serial number i Customer's location coordinates ( x i ,y i ), x i ,y i The x and y coordinates represent the customer's location, in meters or kilometers. The customer distribution is as follows: Figure 2 As shown; logistics vehicle information includes the number of logistics vehicles.m = 3, Logistics vehicle serial number k Customer location information is shown in Table 1:
[0108] Table 1 Customer Location Coordinates
[0109]
[0110] The multi-logistics vehicle collaborative scheduling model is as follows: Given n One customer and m A logistics vehicle, constructing an undirected graph G =( V,E ),in V Represents the set of all customers. E Let represent the set of edges between customers, where each customer is visited by exactly one delivery vehicle, and each delivery vehicle eventually returns to its starting point. The optimization objective is to minimize the maximum service cost among multiple delivery vehicles, and in this example, distance is used as the service cost. The mathematical definition of the optimization objective is:
[0111] (1)
[0112] in m Represents the number of logistics vehicles. Representing the k Service routes of a logistics vehicle; Representing the k Service routes of logistics vehicles The total service cost can be calculated from the service cost matrix.
[0113] Step 2: Calculate the service cost matrix (i.e., distance matrix) between customers based on their locations; set the ant colony system parameters and initialize the pheromone matrix;
[0114] Configure parameters for guiding customer selection of ant colony systems, including population size. NP = 10. Number of logistics vehicles m = 3. Number of customers n = 48. Number of algorithm iterations iteration = 1000, Heuristic Information Weight α = 1. Pheromones concentration weighting β =2. Global pheromone evaporation rate ρ = 0.1, Greedy customer selection probability q 0 = 0.9 and local pheromone evaporation rate δ = 0.1, initialize pheromone concentration using service cost. And initialize the pheromone matrix.
[0115] Among them, the service cost matrix is a Two-dimensional matrix ,in c i,j On behalf of clients i With customers j The specific formula for calculating the service cost between them is as follows:
[0116] (2)
[0117] in, x i ,y i Representing clients i The x and y coordinates, x j ,y j Representing clients j The horizontal and vertical coordinates;
[0118] Initialize pheromone concentration Greedy scheduling scheme The largest service cost among all logistics vehicles The specific calculation formula is as follows:
[0119] (3)
[0120] in, The initial pheromone concentration, n For the number of customers, This represents the maximum service cost among all logistics vehicles in the greedy scheduling scheme; the greedy scheduling scheme. The specific construction steps are as follows:
[0121] Step 201: Each logistics vehicle randomly selects a customer as its service starting point and places them into its respective service route and taboo list. tabu ;
[0122] Step 202: Each logistics vehicle selects the next customer to visit from the set of accessible customers, as shown in the following mathematical expression:
[0123] (4)
[0124] in, V k,next Representing the k The next customer to visit for a logistics vehicle, argmin represents the customer with the lowest service cost among the candidate customers served by the logistics vehicle from its current customer. Representing the k Current customers of logistics vehicles V k,current and customers i Service costs between tabu Client Taboos List;
[0125] The customer with the lowest service cost among potential customers for a logistics vehicle will be selected as the next customer to be visited. Once the next customer for a logistics vehicle is determined... V k,next Then, the visiting client V k,next Remove from the accessible customer set and add to the taboo list. tabu .
[0126] Step 203: Repeat step 202 until there are no more customers to visit, meaning all customers are served by the logistics vehicle.
[0127] Step 204: Each logistics vehicle returns to its starting point, completing the construction of the greedy scheduling scheme;
[0128] Step 205: Compare the service costs of each logistics vehicle in the greedy scheduling scheme, and select the highest service cost as the maximum service cost. ;
[0129] Find the greedy solution greedy_tour Given the following data sets: {[34, 35, 2, 19, 28, 20, 33, 29, 37, 4, 36, 14, 32, 18, 39, 17, 13], [38, 9, 48, 8, 49, 15, 1, 10, 31, 0, 21, 27, 30, 7, 25, 5, 23], [6, 22, 47, 26, 50, 45, 11, 46, 3, 16, 43, 44, 41, 40, 12, 24, 42]}, calculate the maximum service cost among all logistics vehicles. Thus, calculate ;
[0130] The pheromone matrix is a Two-dimensional matrix ,in On behalf of clients i and customers j The pheromone concentration between, and when At that time, Initialize to ;when i = j At that time, Initialize to 0.
[0131] Step 3, Initialization NP = 10 ant teams, each ant team is assigned m= 3 ants (i.e., each ant corresponds to one logistics vehicle, and every 3 logistics vehicles form an ant team), and assign these 3 ants to 3 distribution centers respectively, while initializing an empty customer taboo table. .
[0132] Step 4: For each ant in each ant team, randomly select a customer as the initial customer. Then, based on the initial customer, find the ant with the lowest service cost between itself and the initial customer. m The final customer to be served is selected from among the customers using a roulette wheel selection method, making the ants more purposeful in their path search. The lower the service cost, the higher the probability of being selected, thus strengthening the directionality of path construction. The probability of selecting the final customer for each logistics vehicle is calculated as follows:
[0133] (5)
[0134] in, Representing the k Customers who selected the logistics vehicle i The probability of being the last customer served. Representing the k The starting point of the logistics vehicle V k,start and customers i Service costs between Representing the k The starting point of the logistics vehicle V k,start and customers j Service costs between;
[0135] In the first iteration of this example, the three distribution centers had 17, 50, and 10 customers, respectively. The customers selected for final service using a roulette wheel selection method based on service cost were 3, 45, and 15, respectively. The final customers selected in this embodiment are as follows: Figure 3 As shown.
[0136] Step 5: Each ant obtains a set of potential customers based on the customer taboo list, and pre-selects the next customer based on the information of the current node and the information of the last customer served, giving full play to the advantage of the directional enhancement brought by the information of the last customer served.
[0137] Each ant starts from the starting point, obtains a set of potential customers based on the customer taboo list, and selects a customer from the accessible customer set as a pre-selected customer based on the current customer information and the information of the last customer served. The specific selection formula is as follows:
[0138] (6)
[0139] (7)
[0140] Where argmax represents taking the maximum value. tabu Client Taboos List α Represents heuristic information weights, β Represents pheromone concentration weights ,V k,end Representing the k The last customer served by the ant Representing the k Ant Group's current customers V k,current and customers i The pheromone concentration between them On behalf of clients i With customers V k,end The pheromone concentration between them; This represents heuristic information that integrates current customer needs. V k,current To the customer i Service cost information and customers i To the last customer V k,end Service cost information; q 0 represents the probability of greedily selecting pre-selected customers. J k Representing customers selected by the roulette wheel selection method. Representing the k The logistics vehicles currently serving customers V k,current and customers i Service costs between On behalf of clients i and customers V k,end The service cost between them, and rand() represents a random function.
[0141] The specific method for calculating the probability of each customer's choice in the roulette wheel selection method is as follows:
[0142] (8)
[0143] in, Representing the k A logistics vehicle in a roulette wheel selection method customer i The probability of choosing, Representing the k Ant Group's current customers V k,current and customers j The pheromone concentration between them On behalf of clientsj With the k The last customer served by the ant V k,end The pheromone concentration between them.
[0144] In this example, Ant Team 1 obtained the path after several customer selections. solution Given the following ant groups: {[17,46, 16, 36, 43, 41, 18, 40, 12, 24, 13, 23], [50, 11, 4, 31, 26, 0, 47, 5, 22, 6], [10, 37, 8, 49, 20, 28, 1, 21, 19, 2, 34]}, the pre-selected customers of the three ants are 42, 7, and 35 respectively. In this example, the pre-selected customers of the three ants are as follows: Figure 4 As shown.
[0145] Step 6: Calculate the future service cost of each ant based on the pre-selected customers (in this embodiment, the service cost is the distance, and the future service cost is the future path service cost), select the pre-selected customer of the ant with the shortest future path, add it to the path of this ant, add this pre-selected customer to the customer taboo table, and call the local pheromone update.
[0146] After all ants have pre-selected the next customer, the service cost of the current ant, the service cost from the current customer to the pre-selected customer, and the service cost from the pre-selected customer to the last customer served are added together to obtain the future service cost of that ant. Then, the future service costs of all ants in the ant team are compared, and the ant with the lowest future service cost is selected. Its pre-selected customer is added to its service path and then to the customer taboo list, improving the consistency of the logistics vehicle service cost. Subsequently, its current service cost is updated. During this process, the service paths and service costs of all other ants remain unchanged. Finally, the local pheromone update rule is called to update the pheromone on the edge from the current customer to the pre-selected customer for the selected ant. The specific steps are as follows:
[0147] Step 601: Add the current service cost of each ant serving a customer, the service cost from the current customer to the pre-selected customer, and the service cost from the pre-selected customer to the last customer served to obtain the future service cost of that ant serving a customer. The formula for calculating the future service cost is as follows:
[0148] (9)
[0149] in, Representing the k The future service costs of Ant Group Representing the kThe current service cost for Ant Financial's existing customers along its existing path. V k,selected Representing the k Ant's pre-selected customers Representing the k Ant's current customers V k,current to its pre-selected customers V k,selected The service cost, Representing the k Ant's pre-selected customers V k,selected To its last customer V k,end Service costs;
[0150] Step 602: Select the ant with the lowest future service cost to construct the path and pre-select its customers. V next Adding an ant to the path of this ant effectively reduces the difference in service costs between ants. The specific formula for selecting ants is shown below:
[0151] (10)
[0152] (11)
[0153] in, ant selected Ant Group represents the company with the lowest future service costs. Representing the k The future service costs of Ant Group The customers pre-selected by the chosen ants;
[0154] Step 603: Add the pre-selected customers obtained in step 602 to the selected Ant service path and update their service costs. The specific service cost update formula is as follows:
[0155] (12)
[0156] in, This represents the current service cost of the selected ant. Represents the current customers of the selected ant to its pre-selected customers Service costs;
[0157] Step 604: Keep the remaining ant paths and service costs unchanged.
[0158] The future service costs for the three ants are calculated to be 146.484, 125.349, and 123.411, respectively. Since the third ant has the lowest future service cost, it is chosen for path updating. The pre-selected customer 35 of the third ant is added to its path, while the paths of the other ants remain unchanged. The updated path is: {[17, 46, 16, 36, 43, 41, 18, 40, 12, 24, 13, 23], [50, 11, 4, 31, 26, 0, 47, 5, 22, 6], [10, 37, 8, 49, 20, 28, 1, 21, 19, 2, 34, 35]}. In this example, ants are selected based on future costs. Figure 5 As shown.
[0159] Step 605, update the customer prohibition list, the specific update is as follows:
[0160] (13)
[0161] in, tabu Client Taboos List This represents the pre-selected customers who have been chosen and added to the path;
[0162] Step 606: Update the local pheromone, that is, update the pheromone along the edge from the selected ant's current client to the pre-selected client. The specific update method is as follows:
[0163] (14)
[0164] in, δ Represents the local evaporation coefficient (0 < δ <1), Represents the current customers of the selected ant and pre-selected customers The pheromone concentration between them This represents the initial pheromone concentration.
[0165] In this example, customer 1 from Ant Team 1 is added to the customer taboo table, and the edge is updated according to formula (14). pheromones .
[0166] Step 7: Repeat steps 5 and 6 until all customers have been served by the delivery vehicle, resulting in a preliminary delivery vehicle scheduling plan. In this example, a preliminary delivery vehicle scheduling plan for 10 ant teams is obtained, as shown below:
[0167] Solution1= {【17, 46, 16, 36, 43, 41, 18, 40, 12, 24, 13, 23, 42, 14,44, 32, 39, 3】, 【50, 11, 4, 31, 26, 0, 47, 5, 22, 6, 7, 25, 30, 48, 45】, 【10,37, 8, 49, 20, 28, 1, 21, 19, 2, 34, 35, 27, 33, 29, 9, 38, 15】};
[0168] Solution 2= {【8, 15, 20, 33, 29, 48, 37, 10, 31, 0, 26, 45, 50, 4, 9,38, 32, 49】, 【2, 19, 35, 28, 1, 21, 27, 30, 7, 25, 47, 22, 6, 42, 34】, 【16,46, 17, 11, 36, 43, 14, 44, 41, 18, 40, 12, 24, 13, 5, 23, 39, 3】};
[0169] Solution 3= {【6, 47, 5, 26, 0, 7, 25, 30, 27, 21, 1, 15, 49, 8, 20,28, 19, 2, 34, 35, 22】, 【42, 13, 24, 17, 46, 50, 45, 11, 31, 10, 37, 48, 29,33, 38, 23】, 【40, 18, 39, 41, 3, 16, 36, 43, 14, 44, 4, 9, 32, 12】};
[0170] Solution 4= {【48, 8, 49, 15, 10, 4, 11, 45, 50, 26, 5, 46, 36, 16, 14,43, 3, 17, 24, 39, 37】, 【30, 7, 21, 0, 31, 1, 25, 47, 6, 22, 23, 42, 13, 27】,【35, 19, 2, 28, 20, 33, 29, 9, 38, 32, 44, 41, 18, 40, 12, 34】};
[0171] Solution5= {【4, 37, 8, 49, 15, 29, 9, 38, 32, 44, 14, 7, 30, 34, 35,48】, 【16, 46, 17, 13, 24, 12, 40, 18, 41, 43, 36, 39, 23, 42, 3】, 【50, 45,10, 31, 26, 5, 47, 0, 21, 1, 28, 20, 33, 19, 2, 27, 25, 22, 6, 11】};
[0172] Solution 6= {【27, 30, 21, 19, 34, 35, 28, 1, 15, 49, 20, 33, 8, 48,29, 2】, 【47, 22, 6, 23, 13, 24, 12, 40, 18, 41, 43, 14, 44, 32, 9, 38, 5】,【26, 45, 11, 46, 17, 3, 16, 36, 4, 37, 10, 31, 0, 7, 25, 42, 39, 50】};
[0173] Solution 7= {【19, 1, 15, 49, 20, 33, 8, 29, 38, 32, 44, 14, 43, 41,39, 28】, 【22, 6, 42, 13, 24, 5, 47, 7, 25, 30, 27, 21, 2, 34, 35, 23】, 【31,0, 26, 45, 50, 11, 4, 37, 48, 9, 36, 16, 46, 17, 3, 40, 18, 12, 10】};
[0174] Solution 8= {【45, 11, 46, 17, 3, 16, 10, 31, 26, 5, 47, 0, 21, 1, 28,20, 19, 2, 27, 50】, 【38, 29, 48, 8, 49, 33, 37, 4, 36, 14, 44, 32, 43, 15,34, 35, 9】, 【18, 41, 39, 12, 24, 13, 23, 22, 6, 42, 7, 25, 30, 40】};
[0175] Solution9 = {【48, 8, 49, 15, 1, 28, 20, 33, 29, 9, 38, 32, 14, 44, 34, 35, 37】, 【23, 22, 6, 25, 7, 47, 5, 13, 24, 12, 40, 18, 39, 30, 42】, 【31, 0, 26, 45, 50, 11, 4, 36, 16, 46, 17, 3, 43, 41, 21, 27, 2, 19, 10】};
[0176] Solution 10 = {【4, 45, 50, 46, 3, 17, 13, 5, 26, 31, 10, 15, 49, 33, 20,28, 1, 19, 2, 27, 30, 25, 11】, 【18, 41, 39, 12, 24, 23, 22, 47, 0, 21, 7, 6,42, 40】, 【14, 43, 36, 16, 32, 9, 48, 8, 37, 29, 38, 34, 35, 44】}.
[0177] Step 8: Execute a local search strategy that combines 2-opt and point insertion to obtain a locally optimal logistics scheduling scheme. This can further reduce the service cost of each logistics vehicle and narrow the gap between high-cost and low-cost logistics vehicles. The specific implementation steps are as follows:
[0178] Step 801, for each path in each scheduling scheme If the path If the number of customers on the path is greater than 1 (excluding the starting and ending customers), then the path... Perform a 2-opt operation; randomly select two customers on the path (excluding the starting and last customers served), and reverse the customer sequence between these two customers. The change in service cost after the reversal is shown below:
[0179] (15)
[0180] in, This represents the first customer selected. This represents the second customer selected. On behalf of clients The previous customer, On behalf of clients The next visiting customer, On behalf of clients and customers Service costs between On behalf of clients and customers Service costs between On behalf of clients and customers Service costs between On behalf of clients and customers The service costs between them. If This indicates that the service cost decreases after the reversal. Therefore, we accept the reversal of this customer sequence and update the service cost of this path. The specific update formula is as follows:
[0181] (16)
[0182] in, Representing the k Service routes of logistics vehicles Total service cost Representing the k The change in service cost after a logistics vehicle performs a 2-opt operation;
[0183] For path All clients on the path perform the 2-opt operation until the path is reversed. No two customers on the path can reduce the service cost of that path.
[0184] In this example, taking Ant Team 1 as an example, the service path before executing the 2-opt operation is: solution1 = {【17, 46, 16, 36, 43, 41, 18, 40, 12, 24, 13, 23, 42, 14, 44, 32, 39, 3】, 【50, 11, 4, 31, 26, 0, 47, 5, 22, 6, 7, 25, 30, 48, 45】, 【10, 37, 8, 49, 20, 28, 1, 21, 19, 2, 34, 35, 27, 33, 29, 9, 38, 15】}, The maximum service cost in this ant team is 250.289. Taking the path constructed by the first ant as an example, after one 2-opt operation, the service path of the first ant is updated to [17, 42, 23, 13, 24, 12, 40, 18, 41, 43, 36, 16, 46, 14, 44, 32, 39, 3], and its service cost decreases from 250.289 to 237.745. After multiple 2-opt operations until flipping any two customers on the path can no longer reduce the service cost of the path, the path of ant team 1 is updated to... solution 1 = {【17, 13, 23, 42, 24, 12, 40, 39, 18, 41, 43, 44, 32, 14, 36, 16, 46, 3】,【50, 5, 22, 6, 25, 30, 7, 47, 26, 0, 31, 48, 4, 11, 45】, 【10, 21, 27, 2, 35,34, 19, 1, 28, 20, 33, 29, 38, 9, 37, 8, 49, 15】}, the highest service cost update in this ant team is 181.949. Figure 6 and Figure 7 The diagrams show the path before and after performing the 2-opt operation in this example. The path lines that changed after performing the 2-opt operation are shown below. Figure 7 The text is represented by red, blue, or green lines.
[0185] Step 802: Perform the point insertion operation. First, find the logistics vehicle with the highest service cost in the scheduling plan, and delete one customer from this logistics vehicle so that deleting this customer maximizes the change in the service cost of this logistics vehicle. The customer to be deleted is selected according to the following formula:
[0186] (17)
[0187] in, pre On behalf of clients i Previous customers, pos On behalf of clientsi Subsequent visitors, c pre,i On behalf of clients pre and customers i Service costs between c i,pos On behalf of clients i and customers pos Service costs between c pre,pos On behalf of clients pre and customers pos Service costs between The logistics vehicle service path with the highest service cost in the dispatching scheme;
[0188] Subsequently, the service cost with the customer to be deleted was selected. m For each customer, a pre-insertion operation is performed: the deleted customers are greedily inserted into the delivery vehicle routes of these customers (except for the delivery vehicle routes with the highest service costs) to minimize the change in their service costs. The specific insertion method is as follows:
[0189] (18)
[0190] in, del The customer who was removed from the delivery route with the highest service cost was inserted into the delivery route with the lowest service cost. i and customers pos between, c i,del On behalf of clients i and customers del Service costs between c del,pos On behalf of clients del and customers pos The service cost between them is considered; the insertion path with the minimum maximum service cost of the entire scheduling scheme after the pre-insertion operation is selected for insertion; if the maximum service cost of the entire scheduling scheme is reduced after this point insertion method, then this point insertion is adopted, the service paths and service costs involved in the scheduling scheme are updated, and the above operation is repeated; otherwise, the original scheduling scheme is kept unchanged, and the point insertion operation is terminated.
[0191] In this example, taking Ant Team 1 as an example, the service path before the insertion operation at the execution point is: solution1 = {[17, 13, 23, 42, 24, 12, 40, 39, 18, 41, 43, 44, 32, 14, 36, 16, 46, 3], [50, 5, 22, 6, 25, 30, 7, 47, 26, 0, 31, 48, 4, 11, 45], [10, 21, 27, 2, 35, 34, 19, 1, 28, 20, 33, 29, 38, 9, 37, 8, 49, 15]}, with a maximum service cost of 181.949. Next, perform a point insertion operation: delete customer 42 from ant 1, which has the highest service cost, to maximize the change in service cost for this ant. Select the three customers with the lowest service costs between them and the customer to be deleted: 6, 23, and 22. Perform a pre-insertion operation: greedily insert the deleted customer into the ant paths of these customers (excluding the path of the ant with the highest service cost), namely ant 2, ant 1 (which had the highest service cost before the point insertion operation and does not participate in the pre-insertion operation), and ant 2. If the customer to be deleted is greedily inserted into the path of ant 2, the maximum service cost of the entire scheduling scheme is 160.712. Since pre-inserting the customer to be deleted into the path of ant 2 minimizes the maximum service cost of the entire scheduling scheme, the customer to be deleted is greedily inserted into the path of ant 2. Since the maximum service cost of ant team 1 after the point insertion operation is 160.712, which is lower than the maximum service cost before the point insertion operation, the path of ant team 1 is updated. solution 1 = {【17, 13, 23, 24, 12, 40, 39, 18,41, 43, 44, 32, 14, 36, 16, 46, 3】, 【50, 5, 22, 42, 6, 25, 30, 7, 47, 26, 0,31, 48, 4, 11, 45】, 【10, 21, 27, 2, 35, 34, 19, 1, 28, 20, 33, 29, 38, 9, 37,8, 49, 15】}, the largest service cost update in this ant team is 160.712. Figure 8 This shows the path diagram before the point insertion operation is performed in this example. Figure 9 This example displays the path graph after performing the point insertion operation, showing the changes to the path lines after the point insertion operation. Figure 9 The text is represented by red or blue lines.
[0192] Step 9: Evaluate the service cost of all scheduling schemes built by the Ant team, and then update the globally optimal logistics vehicle scheduling scheme. The specific steps are as follows:
[0193] Step 901: Evaluate the service cost of the scheduling scheme built by each Ant team according to the optimization objective function. The specific calculation formula is as follows:
[0194] (19)
[0195] in, path p Representing the p The scheduling scheme built by the Ant Group team This indicates the first [number] in the scheduling scheme. k The service cost of a logistics vehicle m Represents the number of logistics vehicles;
[0196] Step 902, Comparison NP We have several scheduling schemes, and we select the best one. The specific selection steps are as follows:
[0197] (20)
[0198] in, path best This represents the current optimal scheduling scheme. NP Represents the number of ant teams. f ( path p ) represents the first p The service cost of the scheduling solution built by the Ant Group team.
[0199] like f ( path best )< f ( path gbest If the current optimal scheduling scheme is selected, then... path best Replace the globally optimal scheduling scheme path gbest And update the globally optimal scheduling service cost. f ( path gbest ) = f ( path best Otherwise, keep path gbest and f ( path gbest )constant.
[0200] In this example, the scheduling scheme of the ant team in a certain generation is as follows:
[0201] Solution1= {【22, 42, 23, 47, 7, 0, 31, 21, 19, 34, 35, 2, 27, 30, 25,6】, 【18, 41, 43, 44, 32, 14, 36, 16, 3, 11, 46, 17, 13, 24, 12, 39, 40】, 【29,38, 9, 48, 37, 4, 45, 50, 5, 26, 10, 1, 28, 20, 33, 49, 15, 8】};
[0202] Solution 2= {【28, 20, 19, 34, 35, 2, 21, 27, 30, 25, 7, 47, 0, 31, 10,1】, 【33, 29, 38, 48, 4, 45, 50, 5, 23, 42, 6, 22, 26, 37, 15, 49, 8】, 【16,36, 9, 32, 44, 14, 43, 41, 18, 39, 40, 12, 24, 13, 17, 46, 11, 3】};
[0203] Solution 3= {【42, 23, 5, 26, 50, 3, 16, 36, 45, 31, 0, 47, 7, 30, 25,6, 22】, 【34, 19, 28, 20, 33, 29, 38, 14, 10, 1, 21, 27, 2, 35】, 【49, 15, 37,4, 11, 46, 17, 13, 24, 12, 40, 39, 18, 41, 43, 44, 32, 9, 48, 8】};
[0204] Solution 4= {【13, 17, 46, 11, 3, 16, 36, 14, 43, 41, 18, 39, 40, 12,24】, 【32, 44, 38, 29, 33, 20, 28, 19, 34, 35, 2, 1, 15, 49, 8, 48, 9】, 【23,22, 5, 26, 50, 45, 4, 37, 10, 31, 0, 21, 27, 30, 25, 7, 47, 6, 42】};
[0205] Solution5= {【35, 2, 27, 21, 10, 15, 49, 8, 48, 9, 38, 29, 33, 20, 28,1, 19, 34】, 【22, 5, 17, 46, 11, 50, 26, 45, 4, 37, 31, 0, 47, 7, 30, 25, 6】,【42, 24, 12, 40, 39, 18, 41, 43, 44, 32, 14, 36, 16, 3, 13, 23】};
[0206] Solution 6= {【1, 34, 27, 30, 21, 7, 25, 6, 47, 0, 31, 10, 37, 48, 9,8, 49, 15】, 【19, 35, 2, 42, 23, 22, 5, 26, 50, 45, 4, 29, 33, 20, 28】, 【12,24, 13, 17, 46, 11, 3, 16, 36, 14, 38, 32, 44, 43, 41, 18, 39, 40】};
[0207] Solution 7= {【18, 39, 40, 12, 24, 42, 23, 13, 14, 32, 44, 43, 41】,【37, 10, 31, 0, 21, 1, 15, 2, 35, 34, 19, 28, 20, 33, 29, 38, 9, 48, 49, 8】,【17, 3, 16, 36, 4, 27, 30, 25, 7, 47, 6, 22, 5, 26, 50, 45, 11, 46】};
[0208] Solution 8= {【35, 34, 2, 21, 27, 30, 7, 25, 6, 42, 23, 1, 20, 28, 19】,【33, 29, 38, 9, 14, 41, 18, 39, 40, 12, 24, 13, 17, 46, 11, 4, 48, 37, 15,49, 8】, 【45, 32, 44, 43, 36, 16, 3, 5, 22, 47, 0, 31, 10, 26, 50】};
[0209] Solution9 = {【33, 20, 28, 1, 19, 34, 35, 2, 27, 21, 10, 15, 49, 8, 48, 9, 38, 29】, 【39, 40, 12, 24, 13, 17, 46, 11, 3, 16, 36, 14, 32, 44, 43, 41, 18】, 【23, 5, 50, 45, 4, 37, 31, 0, 26, 47, 7, 30, 25, 6, 22, 42】};
[0210] Solution 10 = {【0, 31, 4, 11, 46, 3, 40, 17, 13, 23, 42, 6, 7, 47, 5, 50, 45, 26】, 【29, 38, 32, 44, 14, 43, 41, 39, 16, 36, 9, 48, 37, 15, 28, 20, 33, 49, 8】, 【2, 35, 34, 19, 1, 10, 18, 12, 24, 22, 25, 30, 21, 27】}
[0211] The service costs were 158.651, 171.153, 169.465, 151.494, 167.759, 177.153, 174.057, 190.937, 155.511, and 186.474, respectively. f ( path best = 151.494, due to the current f ( path gbest =152.219 f ( path best )< f ( path gbest Therefore, path gbestUpdated to {【13, 17, 46, 11, 3, 16, 36, 14, 43, 41, 18, 39, 40, 12, 24】, 【32, 44, 38, 29, 33, 20, 28, 19, 34, 35, 2, 1, 15, 49, 8, 48, 9】, 【23, 22, 5, 26, 50, 45, 4, 37, 10, 31, 0, 21, 27, 30, 25, 7, 47, 6, 42】}, globally optimal scheduling service cost. f ( path gbest Updated to 151.494.
[0212] Step 903: Perform a global pheromone update. The specific update formula is shown below:
[0213] (twenty one)
[0214] (twenty two)
[0215] in, ρ The global pheromone evaporation rate. On behalf of clients i and customers j The pheromone concentration between them path gbest This represents the globally optimal scheduling scheme. f ( path gbest ) represents the service cost of the globally optimal scheduling scheme. It is worth noting that when the global pheromone is updated, only the edges belonging to the globally optimal scheduling scheme will be updated according to the above formula (22); other edges remain unchanged.
[0216] Step 10: Repeat steps 3 through 9 until the iteration termination condition is met, and output the final globally optimal logistics vehicle scheduling scheme. path gbest = {【1, 19, 35, 34, 28, 20, 33, 29, 38, 9, 48, 4, 37, 8, 49, 15,10】, 【12, 40, 39, 18, 41, 43, 44, 32, 14, 36, 16, 3, 11, 46, 17, 13, 24】, 【0,31, 45, 50, 26, 5, 23, 42, 6, 22, 47, 7, 25, 30, 27, 2, 21】}, with a service cost of 143.161, and its scheduling path is as follows. Figure 10As shown, in the multi-vehicle collaborative scheduling scheme obtained using the method of this invention, there are no intersections within the paths of each logistics vehicle. Thanks to the customer selection strategy, the service costs among the logistics vehicles are relatively balanced.
[0217] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A multi-vehicle collaborative scheduling method based on a guided customer selection ant colony system, characterized in that, The method comprises the following steps: S1, obtaining customer information and logistics vehicle information, constructing a multi-logistics vehicle cooperative scheduling model, and setting an optimization target; S2, calculating a service cost matrix between customers according to the positions of the customers; Setting ant colony system parameters and initializing pheromone matrix; S3, initialization NP a team of ants, each team of ants is assigned m only one ant, and each ant is responsible for building a service path for one logistics vehicle; at the same time, an empty customer tabu list is initialized for each team of ants tabu for recording the customers that have been served S4, randomly selecting a customer as a starting service customer for each ant in each ant team, and then based on the starting service customer, selecting a last service customer for each ant in a roulette selection method from customers between the starting service customer and the last service customer with a minimum service cost between the starting service customer and the last service customer m for each ant. S5, each ant obtains a set of customers to be selected according to the customer tabu list, and pre-selects the next customer based on the information of the current node and the information of the last serviced customer; S6, calculating the future service cost of each ant according to the pre-selected customer, selecting the pre-selected customer of the ant with the minimum future service cost, adding the pre-selected customer to the path of the ant, and adding the pre-selected customer to the customer tabu list, and calling local pheromone updating; S7, repeating steps S5-S6 until all customers are serviced by the logistics vehicles, and obtaining a complete preliminary logistics vehicle scheduling scheme; S8, adopting a 2-opt and point insertion local search strategy to optimize the service cost of each logistics vehicle in the ant team and balance the service cost between the logistics vehicles, and obtaining a local optimal logistics vehicle scheduling scheme; S9, comparing the service costs of the local logistics vehicle scheduling schemes constructed by all ant teams, updating the global optimal logistics vehicle scheduling scheme, and performing global pheromone updating; S10, repeating steps S3-S9 until the iteration end condition is met, and outputting the global optimal logistics vehicle scheduling scheme finally found; In step S6, when all ants pre-select the next customer, the following steps are adopted to select an ant and take the pre-selected customer of the ant as the next visited customer: S601, adding the current cost of the customer serviced by each ant, the service cost from the current customer to the pre-selected customer, and the service cost from the pre-selected customer to the last serviced customer, to obtain the future service cost of the customer serviced by the ant, and the future service cost calculation formula is as follows: , in Representing the k The future service costs of Ant Group Representing the k The current service cost for Ant Financial's existing customers along its existing path. V k,selected Representing the k Ant's pre-selected customers Representing the k Ant Group's current customers V k,current to its pre-selected customers V k,selected The service cost, Representing the k Ant's pre-selected customers V k,selected To its last customer V k,end Service costs; S602, selecting the ant with the minimum future service cost to construct a path, adding the pre-selected customer of the ant to the path of the ant, and the specific formula of selecting the ant is as follows: wherein, ant selected an ant representing the minimum future cost, representing the first k future service cost of the only ant, representing the preselected customer of the selected ant; S603, pre-selecting customers V next Join the selected ant service path, and update its service cost, service cost update formula as follows: , wherein, represents the current service cost of the selected ant, represents the current customer of the selected ant to its preselected customer service cost; S604, keeping the paths and service costs of the remaining ants unchanged; S605, updating the customer tabu list as follows: wherein tabu represent a client's forbidden list; S606, updating the pheromone on the edge from the current customer to the pre-selected customer of the selected ant, and the updating mode is as follows: , wherein delta represents the local evaporation coefficient, 0 delta < 1 ; represents the current customer of the selected ant and the preselected customer between the pheromone concentration, is the initial pheromone concentration; In step S8, the specific implementation steps of the local search strategy of fusing 2-opt and point insertion are as follows: S801, for each path in each scheduling scheme l k , if the number of customers on the path l k is greater than 1, excluding the start and last served customers, perform a 2-opt operation on the path l k ; randomly select two customers on the path, and reverse the sequence of customers between the two customers, the change in service cost after the reversal is as follows: wherein, represents the first selected customer, represents the second selected customer, represents the customer the previous visiting customer, represents the customer the next visiting customer, represents the customer and the customer the service cost between, represents the customer and the customer the service cost between, represents the customer and the customer the service cost between, represents the customer and the customer the service cost between; if , it indicates that the service cost after reversing decreases, the reversal of the customer sequence is accepted, and the service cost of the path is updated, and the service cost update formula is as follows: in, Representing the k Service routes of logistics vehicles Total service cost Representing the k The change in service cost after a logistics vehicle performs a 2-opt operation; perform a 2-opt operation on all customers on the path until no two customers on the path can reduce the service cost of the path. S802, performing a point insertion operation; First, find the logistics vehicle with the maximum service cost in the scheduling scheme, and delete one customer in the logistics vehicle, so that the service cost change of the logistics vehicle after deleting the customer is the largest; the customer to be deleted is selected according to the following formula: wherein, pre representative client i previously visited clients, pos representative client i subsequently visited clients, c pre,i representative client pre and client i service costs, c i,pos representative client i and client pos service costs, c pre,pos representative client pre and client pos service costs, representative client representative client Subsequently, the service cost with the customer to be deleted was selected. m For each customer, a pre-insertion operation is performed: the deleted customers are greedily inserted into the logistics vehicle routes corresponding to these customers, minimizing the change in their service costs, excluding the logistics vehicle routes with the highest service costs; the specific insertion method is as follows: wherein, del is the customer that is dropped from the service cost largest logistic vehicle and inserted between the service cost smallest logistic vehicle path customer i and customer pos , c i,del represents the service cost between customer i and customer del , c del,pos represents the service cost between customer del and customer pos . Select the insertion path with the minimum maximum service cost of the entire scheduling scheme after the pre-insertion operation for insertion; if the maximum service cost of the entire scheduling scheme is reduced after the point insertion method, the point insertion is adopted, the service path and service cost involved in the scheduling scheme are updated, and the above operation is repeated; otherwise, the original scheduling scheme is kept unchanged, and the point insertion operation is ended.
2. The method according to claim 1, wherein, The construction of the multi-vehicle collaborative scheduling model is as follows: given n customers and m vehicles, a undirected graph G = ( V,E ) is constructed, wherein V denotes the set of all customers, E denotes the edge set between customers, each customer has and only has one vehicle passing through, and finally each vehicle returns to the starting point; With the optimization objective of minimizing the maximum service cost in the multi-vehicle, we have: wherein, representing the service path of the first k vehicle; representing the service path of the first k vehicle total service cost of the service path of the first vehicle, calculated by the service cost matrix; The service cost matrix is wherein, c i,j representing the customer i to the customer j service cost.
3. The method of claim 1, wherein, Parameters of the ant colony system include: number of ant teams NP , number of algorithm iterations iteration , weight of heuristic information α , weight of pheromone concentration β , global pheromone evaporation rate ρ , probability of greedy selection of customers q 0 and local pheromone evaporation rate δ ; a feasible logistics vehicle scheduling scheme is constructed using a greedy algorithm, and a pheromone matrix is initialized based on the feasible logistics vehicle scheduling scheme; Initialization of pheromone concentration The calculation formula is as follows: wherein, is the initial pheromone concentration, n is the number of customers, represents the greedy dispatching scheme the largest service cost among all the logistic vehicles; The pheromone matrix is a Two-dimensional matrix ,in On behalf of clients i and customers j The pheromone concentration between, and when At that time, Initialize to ;when i = j At that time, Initialize to 0; The greedy scheduling scheme The specific construction steps are as follows: S201, each logistics vehicle is randomly selected as a starting point of service, and put into the respective service path and tabu table tabu ; S202, each vehicle selects the next visiting customer from the accessible customer set, and the mathematical expression is as follows: wherein, V k,next represents the first k vehicle to visit the next customer, argmin represents the customer with the lowest service cost from the set of accessible customers to the current customer served by the vehicle, represents the first k vehicle to visit the next customer V k,current and the service cost between the current customer i of the vehicle and the customer; V k,next Once the next customer to visit is determined V k,next by the vehicle, the visiting customer is removed from the set of accessible customers and placed in the tabu list tabu ; S203, repeat step S202 until there is no accessible customer; S204, each vehicle returns to the starting point, and the construction of the greedy scheduling scheme is completed; S205, compare the service cost of each logistics vehicle in the greedy scheduling scheme, and take the maximum service cost as .
4. The method of claim 1, wherein, In step S4, each ant in each ant team randomly selects a customer as its initial service customer. Then, based on the initial service customer, the ant is assigned the service cost with the initial service customer that is minimized. m The final customer to be served is selected from among the customers using a roulette wheel selection method. The probability of selecting the final customer for each logistics vehicle is calculated as follows: wherein, representing the k first vehicle i selected by the customer probability that the customer is the last service, k representing the V first vehicle k,start and the service cost between the customer i .
5. The method of claim 1, wherein, In step S5, each ant pre-selects the customer according to the current customer information and the last serviced customer information, and the specific selection formula is as follows: Where argmax represents taking the maximum value. tabu Client Taboos List α Represents heuristic information weights. β Represents pheromone concentration weights ,V k,end Representing the k The last customer served by the ant Representing the k Ant Group's current customers V k,current and customers i The pheromone concentration between them On behalf of clients i With customers V k,end The pheromone concentration between them Representing heuristic information, q 0 represents the probability of greedily selecting pre-selected customers. J k Representing customers selected by the roulette wheel selection method. Representing the k The logistics vehicles currently serving customers V k,current and customers i Service costs between On behalf of clients i and customers V k,end The service cost between them; rand() represents a random function; In the roulette selection method, the selection probability of each customer is calculated as follows: wherein, represent the first k vehicle in the roulette selection method the selection probability of the customer, i represent the first k ant the pheromone concentration between the current customer V k,current and the customer j represent the pheromone concentration between the customer j and the customer V k,end . 6. The method of claim 1, wherein, In step S9, the service cost of the local scheduling scheme constructed by all ant teams is evaluated, and the global optimal vehicle scheduling scheme is updated, and the specific steps are as follows: S901, according to the optimization objective function, the service cost of the scheduling scheme constructed by each ant team is evaluated, and the calculation formula is as follows: wherein, path p representing a dispatching scheme constructed by a team of p representing a service cost of the i-th logistics vehicle in the dispatching scheme, k m representing the number of logistics vehicles; S902, compare NP one of the scheduling schemes, and selects the best scheduling scheme. The selection step is shown as follows: wherein, path best represents the current best scheduling scheme, NP represents the number of ant teams, f path p represents the service cost of the scheduling scheme constructed by the p th ant team. If f ( path best ) < f ( path gbest ), then replace the current optimal dispatching scheme path best with the global optimal dispatching scheme path gbest and update the global optimal dispatching service cost f ( path gbest ) = f ( path best ); otherwise, keep path gbest and f ( path gbest ) unchanged; S903, the global pheromone is updated as follows: wherein, ρ is the global pheromone evaporation rate, represents the pheromone concentration between the client i and the client j , path gbest represents the global optimal scheduling scheme, f ( path gbest ) represents the service cost of the global optimal scheduling scheme; In the global pheromone update, only the edges belonging to the global optimal scheduling scheme are updated according to the above formula; other edges remain unchanged.
Citation Information
Patent Citations
Multi-warehouse multi-logistics vehicle path planning method based on adaptive neighborhood ant colony system
CN121032380A