A super-heuristic ant colony optimization method for green delivery process of a chain bakery
Patent Information
- Application Number
- CN202310389382.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-04-12
AI Technical Summary
随着面包店与客户的数量增加,若采用运筹学方法求解该问题且想在有限时间内为决策者提供满意的解决方案是困难的;当采用传统启发式算法求解该问题时无法保证得到解的质量
[0045]本发明的有益效果是:本发明通过确定连锁面包店绿色配货过程的调度模型,使得调度两级车辆的过程表达清晰明确;在算法的高层策略域阶段,提出信息素矩阵与启发函数矩阵同时记录优质个体的块序列和块位置信息,从而有效引导全局搜索;在算法的低层问题域阶段,设计9种符合问题特征的局部操作算子对问题解空间深入搜索以增强算法性能,同时种群初始化采用最近邻规则与随机规则生成个体以有效保证种群的质量及避免个体过于集中。该调度方法可以有效保证在较短时间内获得连锁面包店绿色配货过程调度问题的优质解信息,从而得到两级车辆服务面包店与客户点的绿色行驶路径,积极响应国家节能减排政策的号召。
Smart Images

Figure CN116468162B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a hyperheuristic ant colony optimization method for the green distribution process of chain bakeries, belonging to the field of intelligent optimization and scheduling technology for two-level vehicle routing problems. Background Technology
[0002] With the rapid growth and diversification of urban delivery demand, most cities have limited space resources, especially in city centers. Shared public and private transportation spaces, including passenger, freight, and parking facilities, are severely lacking. The use of large vehicles for delivery in the main urban area exacerbates urban congestion and increases exhaust and noise pollution. Therefore, limiting the frequency of large delivery vehicles and using smaller vehicles to serve customers in the main urban area is crucial to optimizing the urban delivery network, thereby alleviating congestion and reducing carbon emissions. Thus, the rational scheduling of large and small vehicles within the two-tiered transportation network to serve bakeries and customers is urgently needed.
[0003] Today, achieving low-carbon transportation can enhance a company's image, meet societal environmental needs, strengthen a company's sense of social responsibility and sustainable development awareness, improve social equity and economic sustainability, and reduce greenhouse gas emissions. It is essential for chain bakery companies to use low-carbon optimized scheduling methods when conducting two-tier vehicle dispatching.
[0004] In the order fulfillment process of a chain bakery, multiple vehicles depart from the depot. Under the condition of satisfying vehicle load constraints, the goal is to optimize possible routes to minimize carbon emissions, visit multiple service points, and return to the original depot. This optimization scheduling process is an NP-hard problem. As the number of bakeries and customers increases, it becomes difficult to solve this problem using operations research methods and provide a satisfactory solution to decision-makers within a limited time. Furthermore, traditional heuristic algorithms cannot guarantee the quality of the solution obtained. Summary of the Invention
[0005] This invention provides a hyperheuristic ant colony optimization method for the green distribution process of chain bakeries. By determining a low-carbon scheduling model and using a hyperheuristic ant colony optimization method to optimize the scheduling model with carbon emissions as the objective, high-quality individuals can be obtained for the two-level vehicle scheduling problem in the green distribution process of chain bakeries.
[0006] The technical solution of this invention is: a hyperheuristic ant colony optimization method for the green distribution process of chain bakeries, comprising: determining a low-carbon scheduling model for the distribution process of chain bakeries; and designing an optimization scheduling method based on a hyperheuristic ant colony algorithm to optimize the objective function with the lowest carbon emissions in the scheduling model.
[0007] The scheduling model is as follows:
[0008]
[0009] st
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018] x ijk ∈{0,1}(i,j∈N w i≠j, k∈K w (w = 1, 2)
[0019] In the formula: FU ij FV represents the carbon emissions generated by a vehicle traveling from node i to node j within the primary transportation network. ij Let k be the carbon emissions generated by a vehicle traveling from node i to node j in the secondary transportation network; k is the vehicle number, where the vehicle numbers in the primary transportation network form vehicle set K1, and the vehicle numbers in the secondary transportation network form vehicle set K2; N1 = {0} ∪ N s Let N represent the set of warehouses and bakeries, where 0 is the warehouse number and all the bakery numbers constitute the set of bakeries. s N2 = N s ∪N c Let N represent the set of bakeries and customers, where all customer point numbers constitute the customer point set N. c ;x ijk It is a decision variable, taking the value 1 or 0. It takes the value 1 if the k-th vehicle leaves node i and goes to service node j, otherwise it takes the value 0; q j Q1 represents the demand for goods at node j; Q2 represents the maximum loading capacity of large vehicles in the primary transportation network; Q3 represents the maximum loading capacity of small vehicles in the secondary transportation network; in the primary transportation network, i and j represent warehouses / bakeries; in the secondary transportation network, i and j represent bakeries / customer points.
[0020] The specific steps of the optimization scheduling method based on the hyperheuristic ant colony algorithm are as follows:
[0021] Step 1: Construct the encoding and decoding methods for individuals in the low-level problem domain and individuals in the high-level strategy domain;
[0022] Step 2: Initialize parameters, pheromone matrix, and heuristic function matrix;
[0023] Step 3: Generate a low-level problem domain population;
[0024] Step 4: Generate a high-level policy domain population;
[0025] Step 5: Decode the individuals in the high-level strategy domain;
[0026] Step 6: Update the pheromone matrix and heuristic function matrix: Evaluate the best individual in the high-level policy domain population, and update the pheromone matrix and heuristic function matrix using the best individual in the high-level policy domain population;
[0027] Step 7: Determine the termination condition: Determine if the termination condition is met; if it is, end the loop and output the optimal individual in the problem domain and its corresponding target value; otherwise, go to Step 4 to continue the loop.
[0028] The encoding and decoding methods for constructing low-level problem domain individuals and high-level policy domain individuals include:
[0029] Encoding of individuals in the lower-level problem domain: Assume the warehouse number is 0 and the bakery numbers are {1,2,…,n}. s}, the customer point number is {n s +1,n s +2,…,n s +n c First, the individual is obtained by encoding a random sequence containing all customer point numbers. Similarly, we can obtain an individual containing all bakery numbers. During decoding, considering the capacity constraints of vehicles in the primary and secondary transportation networks, the bakery number and warehouse number are inserted into individual π(1) and π(2) respectively to separate sub-paths.
[0030] High-level strategy domain individual π G The encoding consists of n low-level heuristics (LLHs) permutations, and the same low-level heuristic is allowed to appear repeatedly in the same individual; decoding π. G At that time, for the population {π1,π2,…,π} in the lower-level problem domain... m1 The solution π in} x Execute π sequentially G The heuristic operations in the code, after each heuristic operation is executed, will produce a new solution π'. x With π x For comparison, if π' x Better than πx Then use π' x Replace π x Otherwise, do not replace; then continue executing π. G The remaining heuristic operations, after all heuristic operations have been executed, assume the solution is π. x Updated to π″ x Then π G The fitness value is the sum of the individual π″ values of all individuals in the lower-level problem domain population. x fitness value and π x The difference in fitness values.
[0031] The initialization parameters, pheromone matrix, and heuristic function matrix include: the initial values of the parameters are obtained through orthogonal experimental design; the parameters include the population size m1 of the lower-level problem domain and the population size m2 of the higher-level strategy domain, the importance factor α1 and the volatile coefficient rho1 of the pheromone matrix, the importance factor β1 and the volatile coefficient rho2 of the heuristic function matrix; an initial lower-level problem domain individual π0 is generated using a greedy strategy based on minimizing the travel distance, and the target value Z(π0) of π0 is calculated, and each element in the pheromone matrix is initialized to 1 / Z(π0); the heuristic function matrix is initialized to an all-zero matrix.
[0032] The process of generating the low-level problem domain population involves generating one solution using the nearest neighbor rule, while the remaining individuals are generated using a random rule.
[0033] The generation of the high-level policy domain population includes: generating individuals in the high-level policy domain population by sampling the pheromone matrix and the heuristic function matrix; and using the Mth high-level policy domain population individual... For example, Among them O h Represents the individual in the Mth high-level strategy domain population. The heuristic operation selected at position h, M = 1, 2, ..., m2:
[0034]
[0035] In the formula: A is the set of n heuristic operators; α1 represents the elements in the pheromone matrix. Importance factor; O n1 O h The previous operation, if O h If O is the first element in the population of the high-level strategy domain, then O n1 This represents a heuristic operation that is randomly selected; β1 represents the element in the n1-th row and n2-th column of the pheromone matrix; β1 represents the element in the heuristic function matrix. Importance factor; The n1-th row and n2-th column of the heuristic function matrix represents the element; q is a random number uniformly distributed in [0,1], q0 is a user-defined constant; R is a heuristic operation randomly selected from A.
[0036] The expressions for updating the pheromone matrix and the heuristic function matrix are as follows:
[0037]
[0038]
[0039] In the formula, rho1 is the pheromone matrix evaporation coefficient; Rho2 is the pheromone increment for the gen generation, and rho2 is the volatile coefficient of the heuristic function matrix. This is the increment of the heuristic function information for the genth generation.
[0040] The information increment is expressed as:
[0041]
[0042]
[0043] In the formula, The optimal individual in the high-level strategy domain population of the genth generation; This indicates that in the optimal individual, there exists an operation order in which the x1-th operation is executed first, followed by the y-th operation. Let be the target value corresponding to the optimal individual in the genth generation. This indicates the number of times the y-th operation to be executed occurs at position x1 and after position x1.
[0044] Nine neighborhood operations from the high-level policy domain are performed on individuals in the problem domain: Insert-in1, Insert-in2, Swap-in1, Swap-in2, Inverse, Insert-out1, Insert-out2, Swap-out1, and Swap-out2. Each neighborhood operation is executed at a randomly selected location, and it is necessary to consider whether each sub-path satisfies the vehicle capacity constraint after the operation to avoid generating illegal solutions. The first five neighborhood operations are all performed within sub-paths, representing operations such as selecting one or two elements to insert after other elements within the sub-path, selecting one or two elements to swap with other elements within the sub-path, and randomly selecting two elements from the sub-path sequence and reversing the sequence containing these two elements. The last four neighborhood operations are all performed between sub-paths, representing operations such as selecting one or two elements to insert before other elements outside the sub-path, and selecting one or two elements to swap with other elements outside the sub-path.
[0045] The beneficial effects of this invention are as follows: By determining the scheduling model for the green distribution process of chain bakeries, this invention makes the process of scheduling two-level vehicles clear and explicit. In the high-level policy domain stage of the algorithm, a pheromone matrix and a heuristic function matrix are proposed to simultaneously record the block sequence and block position information of high-quality individuals, thereby effectively guiding the global search. In the low-level problem domain stage of the algorithm, nine local operation operators that conform to the characteristics of the problem are designed to conduct in-depth searches of the solution space to enhance the algorithm performance. At the same time, the population initialization adopts the nearest neighbor rule and random rule to generate individuals to effectively ensure the quality of the population and avoid excessive concentration of individuals. This scheduling method can effectively ensure that high-quality solution information of the green distribution process scheduling problem of chain bakeries is obtained in a short time, thereby obtaining the green driving path for two-level vehicles to serve bakeries and customer points, actively responding to the call of the national energy conservation and emission reduction policy. Attached Figure Description
[0046] Figure 1 This is a flowchart of the overall algorithm of the present invention;
[0047] Figure 2 This is a schematic diagram illustrating the optimized vehicle scheduling in the green delivery process for chain bakeries according to the present invention.
[0048] Figure 3 This is a schematic diagram of the Insert-in1 operation, a local operation operator of the present invention.
[0049] Figure 4 This is a schematic diagram of the Insert-in2 local operation operator of the present invention;
[0050] Figure 5 This is a schematic diagram of the Swap-in1 operation, a local operation operator of the present invention.
[0051] Figure 6 This is a schematic diagram of the Swap-in2 local operation operator of the present invention;
[0052] Figure 7 This is a schematic diagram of the Inverse operation of the local operation operator of the present invention;
[0053] Figure 8 This is a schematic diagram of the Insert-out1 local operation operator of the present invention;
[0054] Figure 9 This is a schematic diagram of the Insert-out2 local operation operator of the present invention;
[0055] Figure 10 This is a schematic diagram of the Swap-out1 local operation operator of the present invention;
[0056] Figure 11This is a schematic diagram of the Swap-out2 local operation operator of the present invention. Detailed Implementation
[0057] The invention will be further described below with reference to the accompanying drawings and embodiments, but the scope of the invention is not limited to the description.
[0058] Example 1: As Figure 1-11 As shown, according to one aspect of the present invention, a hyperheuristic ant colony optimization method for the green distribution process of a chain bakery is provided, comprising: determining a low-carbon scheduling model for the distribution process of the chain bakery; and designing an optimization scheduling method based on a hyperheuristic ant colony algorithm to optimize the objective function with the lowest carbon emissions in the scheduling model.
[0059] Furthermore, the scheduling model is as follows:
[0060]
[0061] st
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070] x ijk ∈{0,1}(i,j∈N w i≠j, k∈K w (w = 1, 2)
[0071] In the formula: Z represents total carbon emissions, and minimizing Z is the objective function; FU ij FV represents the carbon emissions (total CO2 emissions) generated by a vehicle from node i to node j within the primary transportation network; ij Let k be the carbon emissions generated by a vehicle traveling from node i to node j in the secondary transportation network; k is the vehicle number, where the vehicle numbers in the primary transportation network form vehicle set K1, and the vehicle numbers in the secondary transportation network form vehicle set K2; N1 = {0} ∪ N sLet N represent the set of warehouses and bakeries, where 0 is the warehouse number and all the bakery numbers constitute the set of bakeries. s N c ={1,2,3,…,n c};N2=N s ∪N c Let N represent the set of bakeries and customers, where all customer point numbers constitute the customer point set N. c N c ={1,2,3,…,n c};x ijk This is a decision variable, taking the value 1 or 0. It takes the value 1 if the k-th vehicle leaves node i and goes to service node j, otherwise it takes the value 0. (In a primary transportation network, if the k-th vehicle leaves warehouse i and goes to service bakery j, then x...) ijk Take 1 if the vehicle is in the k-th vehicle and then goes to serve customer j, then x... ijk Take 1 otherwise take 0; q j Q1 represents the demand for goods at node j; Q2 represents the maximum loading capacity of large vehicles in the primary transportation network; Q3 represents the maximum loading capacity of small vehicles in the secondary transportation network; in the primary transportation network, i and j represent warehouses / bakeries; in the secondary transportation network, i and j represent bakeries / customer points.
[0072] Furthermore, the carbon emissions FU generated by the vehicle from node i to j ij With FV ij The expression is:
[0073]
[0074]
[0075] Where: μ is the engine friction coefficient, N 转 V represents engine speed. 发 The engine displacement is represented by λ = ξ / κψ, and γ = 1 / 1000n. tf η, α = τ + gsinθ + gC r cosθ, β=0.5C d ρA; ξ represents the fuel-to-air mass ratio; κ represents the calorific value of diesel fuel; ψ represents the conversion coefficient; n tf Indicates the efficiency of the vehicle's transmission system; η represents the engine efficiency parameter; τ represents acceleration; g represents gravitational acceleration; θ represents the road gradient; C r Rolling resistance coefficient; C d ρ represents the air drag coefficient; A represents the air density; d represents the frontal area; ij Let f be the distance from node i to j. ijLet w1 represent the incremental product demand from node i to node j; w1 and w2 represent the weight of the vehicles transporting goods in the primary and secondary networks, respectively; v1 and v2 represent the speeds of the vehicles transporting goods in the primary and secondary networks, respectively. Considering that the large vehicles in the primary transportation network transport products from warehouses to bakeries in non-main urban areas, where traffic is relatively smooth, their speed is relatively fast, so v1 is taken as 60 km / h. On the other hand, the small vehicles in the secondary transportation network transport products from bakeries to customers in the main urban areas, where traffic is relatively congested, so their speed is relatively slow, so v2 is taken as 35 km / h.
[0076] Table 1. Symbol definitions and values for carbon emission-related parameters.
[0077] μ Engine friction coefficient (kJ / rev / L) 0.2 <![CDATA[N 转 ]]> Engine speed (rev / s) 33 <![CDATA[V 发 ]]> Engine displacement (L) 5 ξ Fuel to air mass ratio 1 κ Diesel fuel calorific value (kJ / g) 44 ψ Conversion factor (g / s to L / s) 737 <![CDATA[n tf ]]> Vehicle transmission system efficiency 0.4 η Engine efficiency parameters 0.9 τ <![CDATA[Acceleration (m / s 2 )]]> 0 g <![CDATA[Gravitational acceleration (m / s 2 )]]> 9.81 θ Road slope 0 <![CDATA[C r ]]> Rolling resistance coefficient 0.01 w Vehicle curb weight (kg) 6350 <![CDATA[C d ]]> air drag coefficient 0.7 ρ <![CDATA[Air density (kg / m 3 )]]> 1.2014 A <![CDATA[Windward area (m 2 )]]> 3.912
[0078] Further, the specific steps of the optimization scheduling method based on the hyperheuristic ant colony algorithm are as follows: Step 1, construct the encoding and decoding methods for individuals in the low-level problem domain and individuals in the high-level policy domain; Step 2, initialize parameters, pheromone matrix, and heuristic function matrix; Step 3, generate the low-level problem domain population; Step 4, generate the high-level policy domain population; Step 5, decode the individuals in the high-level policy domain; Step 6, update the pheromone matrix and heuristic function matrix: evaluate the high-level policy domain population to obtain the optimal individual, and update the pheromone matrix and heuristic function matrix with the optimal individual in the high-level policy domain population; Step 7, determine the termination condition: determine whether the termination condition is met; if it is met, end the loop and output the optimal individual in the problem domain and its corresponding target value; otherwise, go to Step 4 to continue the loop.
[0079] Furthermore, the optimization scheduling method of the present invention, optionally based on the hyperheuristic ant colony algorithm, is described as follows:
[0080] Step 1: Construct the encoding and decoding methods for individuals in the low-level problem domain and individuals in the high-level strategy domain;
[0081] Encoding of individuals in the lower-level problem domain: Assume the warehouse number is 0 and the bakery numbers are {1,2,…,n}. s}, the customer point number is {n s +1,n s +2,…,n s +n c First, the individual is obtained by encoding a random sequence containing all customer point numbers. Similarly, we can obtain an individual containing all bakery numbers. During decoding, considering the capacity constraints of vehicles in the primary and secondary transportation networks, the bakery number and warehouse number are inserted into individuals π(1) and π(2) respectively to separate sub-paths; for example, π1={π(1),π(2)}={[(1,5,4,1),(2,6,7,2),(3,8,3)],[0,1,0,3,2,0]} is an individual, thus it can be seen that π1 in π consists of three paths: in The small vehicle of level 2 starts from bakery number 1, serves customer points 5 and 4 and then returns to bakery 1, while meeting the maximum load limit of the vehicle. The small vehicles of level 2 start from bakery number 2, serve customer points 6 and 7 while meeting the maximum load capacity constraints, and then return to bakery 2. This indicates that a level 2 small vehicle departs from bakery number 3, serves customer point 8 while satisfying the vehicle's maximum load capacity constraint, and then returns to bakery 3; π(2) = [0,1,0,3,2,0] in π1 indicates that a level 1 large vehicle departs from warehouse 0, serves bakery 1, exceeds the vehicle's maximum load capacity constraint, and then returns to warehouse 0. The next vehicle departs from warehouse 0, serves bakeries 3 and 2 while satisfying the vehicle's maximum load capacity constraint, and then returns to warehouse 0; Additionally... Figure 2 The diagram shows a solution that includes 7 customer locations and 3 bakeries.
[0082] High-level strategy domain individual π G The encoding consists of 9 low-level heuristic operations (LLHs), with an individual length of 9. Repetition of the same low-level heuristic operation within the same individual is allowed. Decoding π... G At that time, for low-level problem domain populations The solution π x Execute π sequentially G The heuristic operations in the code, after each heuristic operation is executed, will produce a new solution π'. x With π x For comparison, if π' x Better than π x Then use π' x Replace π x Otherwise, do not replace; then continue executing π. G The remaining heuristic operations, after all heuristic operations have been executed, assume the solution is π. x Updated to π″ x Then π G The fitness value is the sum of the individual π″ values of all individuals in the lower-level problem domain population. x fitness value and π x The difference in fitness values can be expressed as:
[0083]
[0084] Step 2: Initialize parameters, pheromone matrix, and heuristic function matrix; among which, the parameters mainly include the population size m1 of the lower-level problem domain and the population size m2 of the higher-level strategy domain, the importance factor α1 and the volatile coefficient rho1 of the pheromone matrix, and the importance factor β1 and the volatile coefficient rho2 of the heuristic function matrix.
[0085] The initialization parameters, pheromone matrix, and heuristic function matrix in Step 2 are as follows:
[0086] The initial values of the six parameters were obtained through orthogonal experimental design. In this embodiment of the invention, the initial values of the six parameters are as follows: m1 = 40, m2 = 20, α = 2, β = 3, rho1 = 0.3, rho2 = 0.5.
[0087] An initial low-level problem domain individual π0 is generated using a greedy strategy based on minimizing the travel distance, and the target value Z(π0) of π0 is calculated. Each element in the pheromone matrix is initialized to 1 / Z(π0).
[0088] The heuristic function matrix is initialized to an all-zero matrix.
[0089] Step 3: Generate a population in the low-level problem domain: A solution is generated using the nearest neighbor rule, while the remaining individuals are generated using a random rule. Based on this design, on the one hand, the quality of the population can be ensured, and on the other hand, the individuals in the population are dispersed, thus providing a higher probability of obtaining better solutions later.
[0090] Step 4: Generate a high-level policy domain population: Generate individuals in the high-level policy domain population by sampling the pheromone matrix and heuristic function matrix; for example... Among them O h Represents the individual in the Mth high-level strategy domain population. The heuristic operation selected at position h, M = 1, 2, ..., m2:
[0091]
[0092] In the formula: A is the set of n heuristic operators; α1 represents the elements in the pheromone matrix. Importance; O n1 O h The previous operation, if O h If O is the first element in the population of the high-level strategy domain, then O n1 This represents a heuristic operation that is randomly selected; β1 represents the element in the n1-th row and n2-th column of the pheromone matrix; β1 represents the element in the heuristic function matrix. The degree of importance; The n1-th row and n2-th column represents the element in the heuristic function matrix; q is a random number uniformly distributed in [0,1], q0 is a user-defined constant; R is a heuristic operation randomly selected from A;
[0093] Step 5: Decode the individuals in the high-level strategy domain;
[0094] Step 6: Update the pheromone matrix and heuristic function matrix: Evaluate the best individual in the high-level policy domain population, and update the pheromone matrix and heuristic function matrix using the best individual in the high-level policy domain population;
[0095]
[0096]
[0097] In the formula, This represents the pheromone (sequence sequence information) accumulated at the coordinates (x1, y) formed by the points x1 and y after the execution of operation y. This represents the heuristic function information (sequence position information) accumulated at the coordinates (x1, y) formed by the points x1 and y after the execution of operation y; rho1 is the pheromone matrix evaporation coefficient; Rho2 is the pheromone increment for the gen generation, and rho2 is the volatile coefficient of the heuristic function matrix. The increment of the heuristic function information in the genth generation is calculated using the following formula:
[0098]
[0099]
[0100] In the formula, The optimal individual in the high-level strategy domain population of the genth generation; This indicates that in the optimal individual, there exists an operation order in which the x1-th operation is executed first, followed by the y-th operation. Let be the target value corresponding to the optimal individual in the genth generation. This indicates the number of times the y-th operation to be executed occurs at position x1 and after position x1.
[0101] Step 7: Determine the termination condition: Determine if the termination condition is met; if it is, end the loop and output the optimal individual in the problem domain and its corresponding target value; otherwise, go to Step 4 to continue the loop.
[0102] Furthermore, some of the nine neighborhood operations from the high-level policy domain individual are executed on the problem domain individual: Insert-in1, Insert-in2, Swap-in1, Swap-in2, Inverse, Insert-out1, Insert-out2, Swap-out1, and Swap-out2. Each neighborhood operation is executed at a randomly selected location, and it is necessary to consider whether each sub-path satisfies the vehicle capacity constraint after the operation to avoid generating illegal solutions. The first five neighborhood operations are all performed within the sub-path. Insert-in1 and Insert-in2 respectively represent selecting a single element or two elements to insert into other elements within the sub-path. The operations after, Swap-in1, and Swap-in2 represent operations that select a single or two elements and swap them with other elements within the sub-path, respectively. Inverse represents the operation of randomly selecting two elements from the sub-path sequence and reversing the sequence containing these two elements. The latter four neighborhood operations are all based on sub-paths. Insert-out1 and Insert-out2 represent operations that select a single or two elements and insert them before other elements outside the sub-path, respectively. Swap-out1 and Swap-out2 represent operations that select a single or two elements and swap them with other elements outside the sub-path, respectively (i.e., only when there are more than two sub-paths, otherwise no corresponding operation is performed). The problem domain in this invention has two encoding sequences. In specific use, when performing neighborhood operations on an individual in the current problem domain, one of the two encoding sequences is randomly selected for the neighborhood operation. The individual is obtained by encoding the two encoding sequences, i.e., the random sequence of customer point numbers. bakery number individual If the encoded sequence has one or more sub-paths, and the Insert-in2 operation is being performed, the sub-path with two elements is selected before the operation is performed. If no sub-path with two elements is found after traversing the sub-paths, the operation is not performed. The same applies to other operations. Figures 2-11 This is an example based on the coding sequence of the bakery's number.
[0103] To verify the algorithm's performance, five examples (sets 2-6) of the 2E-VRP standard dataset with different customer sizes of 21, 32, 50, 75, and 100 were used, with a time complexity of 0.1×n. s ×n c (n s Let n be the number of bakeries. cUsing the number of customers as the termination condition, the traditional intelligent algorithms standard Ant Colony Optimization (ACO) and Genetic Algorithm (GA) are compared with the Hyperheuristic Ant Colony Optimization (HHACOA) method. Table 2 shows the running results of the three algorithms in solving the vehicle optimization scheduling problem of the green delivery process of chain bakeries of different sizes (different numbers of customers). All algorithms were tested using an Intel i5 processor (2.5GHz), 16GB of memory, Win11 operating system, and MATLAB 2021a programming environment. Each algorithm was run independently 20 times on each example. The best, mean, and worst values obtained are shown in Table 2. For easy observation, the best values of the three algorithms at different scales are marked in bold.
[0104] Table 2 Comparison of results of the three algorithms under different problem sizes
[0105]
[0106] As shown in Table 2, among the considered indicators, except for a few indicators in the two data points of 50 customers, the hyperheuristic ant colony optimization method proposed in this invention outperforms the standard ant colony algorithm and genetic algorithm in Best, Mean, and Worst for different customer sizes. This indicates that the optimization scheduling scheme based on the hyperheuristic ant colony optimization method can reasonably learn the information of high-quality individuals to correctly guide the search direction of the algorithm. At the same time, based on the nine operation operators of Insert, Inverse, and Swap that meet the characteristics of the problem, a comprehensive search is performed on the better solution region to find high-quality solutions, thereby quickly and effectively solving the vehicle optimization scheduling problem of the green distribution process of chain bakeries.
[0107] According to another aspect of the present invention, a hyperheuristic ant colony optimization system for the green distribution process of a chain bakery is provided, comprising: a determination module for determining a low-carbon scheduling model for the distribution process of the chain bakery; and an optimization module for designing an optimization scheduling method based on a hyperheuristic ant colony algorithm to optimize the objective function with the lowest carbon emissions in the scheduling model.
[0108] According to another aspect of the present invention, a processor is provided for running a program, wherein the program executes the hyperheuristic ant colony optimization method for the green distribution process of a chain bakery as described in any one of the above embodiments.
[0109] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the hyperheuristic ant colony optimization method for the green distribution process of a chain bakery as described above.
[0110] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A hyperheuristic ant colony optimization method for the green distribution process of a chain bakery, characterized in that, include: Determine a low-carbon scheduling model for the distribution process of chain bakeries; An optimization scheduling method based on the hyperheuristic ant colony algorithm is designed to optimize the objective function of the scheduling model with the lowest carbon emissions. The specific steps of the optimization scheduling method based on the hyperheuristic ant colony algorithm are as follows: Step 1: Construct the encoding and decoding methods for individuals in the low-level problem domain and individuals in the high-level strategy domain; Step 2: Initialize parameters, pheromone matrix, and heuristic function matrix; Step 3: Generate a low-level problem domain population; Step 4: Generate a high-level policy domain population; Step 5: Decode the individuals in the high-level strategy domain; Step 6: Update the pheromone matrix and heuristic function matrix: Evaluate the best individual in the high-level policy domain population, and update the pheromone matrix and heuristic function matrix using the best individual in the high-level policy domain population; Step 7: Determine the termination condition: Determine whether the termination condition is met; If the target value is achieved, the loop ends, and the optimal individual in the problem domain and its corresponding target value are output; otherwise, proceed to Step 4 to continue the loop. The expressions for updating the pheromone matrix and the heuristic function matrix are as follows: In the formula, The pheromone matrix evaporation coefficient; For the first The increase in pheromone levels The volatile coefficients are the heuristic function matrix. For the first Information increment of heuristic function; The information increment is expressed as: In the formula, For the first The optimal individual in the high-level strategy domain population; This indicates that in the optimal individual, there exists an operation order in which the x1-th operation is executed first, followed by the y-th operation. For the first The target value corresponding to the optimal individual. Indicates the first The pending operations are located at... and location The number of times it appears afterward; Nine neighborhood operations from the high-level policy domain are performed on individuals in the problem domain: Insert-in1, Insert-in2, Swap-in1, Swap-in2, Inverse, Insert-out1, Insert-out2, Swap-out1, and Swap-out2. Each neighborhood operation is executed at a randomly selected location, and it is necessary to consider whether each sub-path satisfies the vehicle capacity constraint after the operation to avoid generating illegal solutions. The first five neighborhood operations are all performed within sub-paths, representing operations such as selecting one or two elements to insert after other elements within the sub-path, selecting one or two elements to swap with other elements within the sub-path, and randomly selecting two elements from the sub-path sequence and reversing the sequence containing these two elements. The last four neighborhood operations are all performed between sub-paths, representing operations such as selecting one or two elements to insert before other elements outside the sub-path, and selecting one or two elements to swap with other elements outside the sub-path.
2. The hyperheuristic ant colony optimization method for the green distribution process of chain bakeries according to claim 1, characterized in that, The scheduling model is as follows: st In the formula: For vehicles in the primary transportation network from nodes To the node The amount of carbon emissions generated; For vehicles in the secondary transportation network from nodes To the node The amount of carbon emissions generated; Vehicle numbers are used to form a vehicle set within the primary transportation network. Vehicle numbers in the secondary transportation network form a vehicle set. ; This represents a combination of warehouses and bakeries, where... The warehouse numbers are used to represent the bakery numbers, and all bakery numbers together form a set of bakeries. , This represents the set of bakeries and customers, where all customer point numbers constitute the customer point set. ; It is a decision variable, taking values of or If the first The vehicle leaves the node Then go to the service node Then take 1, otherwise take ; Represents a node The demand for goods at the location; This indicates the maximum loading capacity of large vehicles in the primary transportation network; This indicates the maximum load capacity of small vehicles in the secondary transport network; in the primary transport network, i, Indicates a warehouse / bakery; In the secondary transportation network, i, This indicates a bakery / customer location.
3. The hyperheuristic ant colony optimization method for the green distribution process of chain bakeries according to claim 1, characterized in that, The encoding and decoding methods for constructing low-level problem domain individuals and high-level policy domain individuals include: Encoding of individuals in the lower-level problem domain: Assume the warehouse number is 0 and the bakery number is... Customer point number is First, an individual is obtained by encoding a random sequence containing all customer point numbers. Similarly, we can obtain an individual containing all bakery numbers. During decoding, considering the capacity constraints of vehicles in the primary and secondary transportation networks, the bakery number and warehouse number are inserted into the individual data respectively. and It serves to separate sub-paths; High-level strategy domain individuals The encoding consists of n low-level heuristic operations. Permutations are allowed, and the same low-level heuristic operations are allowed to occur repeatedly within the same individual; decoding At that time, for low-level problem domain populations The solution Execute sequentially In the heuristic operations, after each heuristic operation is executed, a new solution is obtained. and To make a comparison, if Superior Then use replace Otherwise, do not replace; then continue execution. The remaining heuristic operations, after all heuristic operations have been executed, assume the solution... Updated to ,but The fitness value is the sum of the fitness values of all individuals in the lower-level problem domain population. fitness value and The difference in fitness values.
4. The hyperheuristic ant colony optimization method for the green distribution process of chain bakeries according to claim 1, characterized in that, The initialization parameters, pheromone matrix, and heuristic function matrix include: The initial values of the parameters were obtained through orthogonal experimental design; the parameters include the population size of the lower-level problem domain. Population size of high-level strategy domain Importance factors of the pheromone matrix and the volatile coefficient of the pheromone matrix Importance factor of heuristic function matrix and the volatility coefficient of the heuristic function matrix ; An initial low-level problem domain individual is generated using a greedy strategy based on minimizing the travel distance. and calculate target value Initialize each element in the pheromone matrix to ; The heuristic function matrix is initialized to an all-zero matrix.
5. The hyperheuristic ant colony optimization method for the green distribution process of chain bakeries according to claim 1, characterized in that, The process of generating the low-level problem domain population involves generating one solution using the nearest neighbor rule, while the remaining individuals are generated using a random rule.
6. The hyperheuristic ant colony optimization method for the green distribution process of chain bakeries according to claim 1, characterized in that, The generation of the high-level policy domain population includes: generating individuals in the high-level policy domain population by sampling the pheromone matrix and the heuristic function matrix; and using the Mth high-level policy domain population individual... For example, ,in Represents the individual in the Mth high-level strategy domain population. The heuristic operation selected at position h, M=1,2,...,m2: In the formula: Let n be the set of heuristic operators; Represents the elements in the pheromone matrix Importance factor; express The previous operation, if If it is the first element in the population of the high-level strategy domain, then This represents a heuristic operation that is randomly selected; This represents the element in the n1-th row and n2-th column of the pheromone matrix; Represents the elements in the heuristic function matrix Importance factor; This represents the element in the n1-th row and n2-th column of the heuristic function matrix; To distribute evenly in random numbers, For user-defined constants; In order to be in Randomly select a heuristic operation.
Citation Information
Patent Citations
Delivery vehicle scheduling method with time limitation
CN105069523A
Method and apparatus for using entropy in ant colony optimization circuit design from high level systhesis
WO2012050678A1