Genetic algorithm-based warehouse-crossing vehicle scheduling method and system, and medium
Through the vehicle scheduling method based on genetic algorithm, the problems of freshness loss and low logistics efficiency of fresh products during the transfer process are solved, and efficient transportation and freshness of fresh products are achieved.
Patent Information
- Application Number
- CN202510518404.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-05-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing tracing scheme for traversing the warehouse vehicle is difficult to effectively reduce the freshness loss of fresh products during the transfer process, and the traditional non-interrupted scheduling model causes traversing vehicles to wait for specific goods and fail to depart in time, affecting logistics efficiency.
The out-of-reservo vehicle scheduling method based on genetic algorithm is adopted. By establishing the attenuation rate model of different types of fresh products, analyzing the freshness loss information, constructing the objective function and constraints, and outputting multiple vehicle scheduling schemes, and finally obtaining the matching optimal vehicle scheduling scheme.
It effectively reduces the freshness loss of fresh products during transportation, improves logistics efficiency, and meets consumers' high requirements for freshness of fresh products.
Smart Images

Figure CN120046949A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cross-docking vehicle scheduling, and particularly relates to a cross-docking vehicle scheduling method, system and medium based on a genetic algorithm. Background Art
[0002] As a new vehicle scheduling strategy, cross-docking can effectively integrate high-density orders and achieve rapid transshipment, and is particularly suitable for fresh food logistics. At the cross-docking center, fresh food can directly transition from the receiving process to the shipping process, reducing the storage link. Usually, the product stay time does not exceed 24 hours. Therefore, the cross-docking mode can significantly reduce the storage loss of fresh food and improve the logistics efficiency. Although the existing cross-docking scheduling research mainly focuses on time optimization, for fresh food, simple time optimization is not sufficient to solve the attenuation and loss problems. In addition, traditional cross-docking vehicle scheduling schemes all adopt a non-interrupt scheduling mode (that is, once an inbound vehicle or an outbound vehicle enters the platform, it must complete all unloading or loading tasks before leaving the unloading or loading platform), but this will cause the problem that the outbound vehicle cannot depart for a long time waiting for a specific cargo. Therefore, the present invention proposes a cross-docking vehicle scheduling optimization scheme based on minimizing freshness loss, aiming to minimize the loss caused by attenuation during the transshipment of fresh food and improve its final quality. Summary of the Invention
[0003] The object of the present invention is to propose a cross-docking vehicle scheduling method based on a genetic algorithm, including the following steps:
[0004] By modeling the attenuation rates of different types of fresh food, establish an attenuation rate model matching different types of fresh food;
[0005] Based on the attenuation rate model, analyze the freshness loss information generated by fresh food during transshipment due to environmental changes or time lapse;
[0006] Based on the freshness loss information, construct an objective function and set constraint conditions according to the objective function;
[0007] Based on the objective function and the constraint conditions, establish a vehicle scheduling model and output multiple vehicle scheduling schemes;
[0008] Based on the genetic algorithm, output the optimal solution to obtain a matching vehicle scheduling scheme.
[0009] Further, by modeling the attenuation rates of different types of fresh food, establishing an attenuation rate model matching different types of fresh food specifically includes:
[0010] Classify fresh food into categories to obtain vegetables, fruits, meats and aquatic products;
[0011] Analyze the information on the change status of the freshness of vegetables based on the refrigeration index information of vegetables, analyze the decay rate of vegetables according to the information on the change status of the freshness of vegetables, and establish a vegetable decay rate model;
[0012] Analyze the information on the change status of the freshness of fruits based on the refrigeration index information of fruits, analyze the decay rate of fruits according to the information on the change status of the freshness of fruits, and establish a fruit decay rate model;
[0013] Analyze the information on the change status of the freshness of meat based on the refrigeration index information of meat, analyze the decay rate of meat according to the information on the change status of the freshness of meat, and establish a meat decay rate model;
[0014] Analyze the information on the change status of the freshness of aquatic products based on the refrigeration index information of aquatic products, analyze the decay rate of aquatic products according to the information on the change status of the freshness of aquatic products, and establish an aquatic product decay rate model.
[0015] Furthermore, analyze the freshness loss information of fresh products during transportation due to environmental changes or the passage of time based on the decay rate model, specifically including:
[0016] Analyze the vegetable freshness loss value within the set refrigeration time based on the vegetable decay rate model;
[0017] Analyze the fruit freshness loss value within the set refrigeration time based on the fruit decay rate model;
[0018] Analyze the meat freshness loss value within the set refrigeration time based on the meat decay rate model;
[0019] Analyze the aquatic product freshness loss value within the set refrigeration time based on the aquatic product decay rate model;
[0020] Analyze the influence weight coefficients of the temperature, humidity of the refrigeration environment, refrigeration time, and fresh product packaging on the freshness loss values of different categories of fresh products;
[0021] Multiply the influence weight coefficients of different categories of fresh products by the vegetable freshness loss value, fruit freshness loss value, meat freshness loss value, and aquatic product freshness loss value to obtain the freshness loss information of different categories of fresh products.
[0022] Furthermore, construct an objective function based on the freshness loss information, and the formula is as follows:
[0023]
[0024] Among them, represents the set of incoming vehicles, ; represents the set of outgoing vehicles, ; represents the set of the types of fresh products, ; Indicates the quantity of the th fresh product transferred from the inbound vehicle to the outbound vehicle ; Are respectively the times when the th outbound vehicle enters and leaves the platform; Indicates the initial freshness of the th fresh product; Are respectively the decay rates of the th fresh product on the vehicle and in the transfer area; Indicates the time when the inbound vehicle enters the unloading platform; , if there is fresh product transferred from the inbound vehicle to the outbound vehicle it is 1, otherwise it is 0.
[0025] Furthermore, the genetic algorithm design method is as follows:
[0026] Based on the real number coding method, use the vehicle number, fresh product type, and unloading quantity as genes to construct a hybrid chromosome coding scheme based on the batch unloading quantity;
[0027] Randomly generate a set number N of chromosomes as the initial population;
[0028] Calculate the fitness of each chromosome according to the objective function;
[0029] Use the roulette wheel selection method to calculate the proportion of the fitness of each chromosome to the total fitness as the probability of being selected;
[0030] Simulate the process of the roulette wheel through a random number generator to select a set number of parent chromosomes for breeding the next generation;
[0031] Randomly select two crossover points and exchange the gene segments between these two crossover points of the two parent chromosomes to generate two new offspring chromosomes;
[0032] Based on the newly generated offspring chromosomes, replace the parent chromosomes in the population with fitness less than the set threshold to obtain the genetic algorithm.
[0033] Furthermore, based on the genetic algorithm output the optimal solution to obtain the matching vehicle scheduling scheme, specifically including:
[0034] Initialize the algorithm parameters, and the algorithm parameters include the population size , selection probability , maximum number of iterations and adaptive parameter ;
[0035] Based on the batch unloading quantity Divide or the unloading / loading operations of the matrix into segments, and convert them into , the matrix form according to the encoding method, and calculate the corresponding total attenuation value according to the objective function to generate an initial solution set;
[0036] Adopt the reciprocal form of the total attenuation value to calculate the fitness value of each chromosome;
[0037] Adopt the roulette wheel strategy to select the chromosomes that need to be crossed, and perform the partially mapped crossover operation according to the adaptive crossover probability;
[0038] For the chromosomes after the crossover operation, perform the mutation operation according to the adaptive mutation probability, and calculate the fitness value of each chromosome after the mutation operation;
[0039] Record the serial numbers of the chromosomes with the highest and lowest fitness values, and replace the chromosome with the lowest fitness value with the chromosome with the highest fitness value. At the same time, the corresponding fitness value is also replaced;
[0040] Judge whether the termination condition is satisfied. If it is satisfied, end. If it is not satisfied, the roulette wheel strategy is used to select the chromosomes that need to be crossed again to perform the partially mapped crossover operation.
[0041] The present invention also provides a cross-docking vehicle scheduling system based on a genetic algorithm, including a processor, a memory, and at least one program. The program is stored in the memory and is configured to be executed by the processor. The program includes instructions for executing the cross-docking vehicle scheduling method based on a genetic algorithm as described in any one of the above.
[0042] The present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program enables a computer to execute to implement the cross-docking vehicle scheduling method based on a genetic algorithm as described in any one of the above.
[0043] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art:
[0044] By analyzing the losses of attenuation differences between different products and accurately selecting the optimal vehicle scheduling scheme according to the genetic algorithm, the present invention can effectively reduce the freshness loss of fresh products during the transfer process, improve the logistics efficiency, reduce the circulation loss, and thus meet the high requirements of consumers for the freshness of fresh products. Brief Description of the Drawings
[0045] Figure 1Shows the schematic flowchart of the cross-docking vehicle scheduling method based on genetic algorithm provided by the embodiments of the present invention;
[0046] Figure 2 Shows the adaptive genetic algorithm process framework diagram of the cross-docking vehicle scheduling method based on genetic algorithm provided by this embodiment;
[0047] Figure 3 Shows the inbound vehicle interruption flowchart of the cross-docking vehicle scheduling method based on genetic algorithm provided by this embodiment;
[0048] Figure 4 Shows the coding scheme schematic diagram of the cross-docking vehicle scheduling method based on genetic algorithm provided by this embodiment;
[0049] Figure 5 Shows the cross-mapping flowchart of the cross-docking vehicle scheduling method based on genetic algorithm provided by this embodiment;
[0050] Figure 6 Shows the unloading / loading operation sorting schematic diagram in the inbound vehicle interruption mode of the cross-docking vehicle scheduling method based on genetic algorithm provided by this embodiment;
[0051] Figure 7 Shows the schematic diagram of converting the unloading operation sorting into vehicle sorting of the cross-docking vehicle scheduling method based on genetic algorithm provided by this embodiment;
[0052] Figure 8 Shows the fresh product transfer process in the inbound vehicle interruption mode of the cross-docking vehicle scheduling method based on genetic algorithm provided by this embodiment;
[0053] Figure 9 Shows the fresh product transfer flowchart in the outbound vehicle interruption mode of the cross-docking vehicle scheduling method based on genetic algorithm provided by this embodiment. Detailed implementation manners
[0054] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0055] It should be noted that in the description, claims and above-mentioned drawings of this application, terms such as "first", "second", etc. are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so as to implement the embodiments of this application described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0056] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will refer to the drawings and combine with the embodiments to detail this application.
[0057] As Figures 1 - 2 shown, an embodiment of the present invention provides a cross-docking vehicle scheduling method based on a genetic algorithm, including the following steps:
[0058] S1, by modeling the decay rates of different types of fresh produce, establish a decay rate model matching different types of fresh produce;
[0059] S2, based on the decay rate model, analyze the freshness loss information of fresh produce caused by environmental changes or the passage of time during the transfer process;
[0060] S3, based on the freshness loss information, construct an objective function, and set constraint conditions according to the objective function;
[0061] S4, based on the objective function and constraint conditions, establish a vehicle scheduling model, and output multiple vehicle scheduling plans. The vehicle scheduling model comprehensively considers the inbound and outbound times of fresh produce, environmental factors, and product decay characteristics, optimizes the scheduling plan. Through the vehicle scheduling model, the departure and arrival times of vehicles can be accurately arranged, and it is ensured that the time the product stays in the cross-docking center is as short as possible to reduce unnecessary decay;
[0062] S5, based on the genetic algorithm, output the optimal solution to obtain a matching vehicle scheduling plan.
[0063] It should be noted that the method of the present invention for the inbound vehicle that can repeatedly enter the dock with the objective function of minimizing the amount of spoilage, the genetic algorithm part uses real number coding, and takes the vehicle number, fresh produce type, unloading / loading quantity as genes to construct based on the batch unloading quantity Hybrid chromosome coding scheme, and an adaptive genetic algorithm based on the batch unloading quantity is specifically designed. The adaptive genetic algorithm can greatly improve the convergence accuracy and convergence speed of the entire genetic algorithm through the adaptive adjustment of parameters, and can continuously maintain the diversity of the population.
[0064] Model the decay rate of fresh products, establish a decay rate function for fresh products, where the decay rate is related to the type of fresh products, storage conditions, and transportation time; different types of fresh products have different decay rates in different environments.
[0065] According to the embodiments of the present invention, by modeling the decay rates of different types of fresh products, decay rate models matching different types of fresh products are established, specifically including:
[0066] Classify fresh products to obtain vegetables, fruits, meats, and aquatic products;
[0067] Analyze the change status information of vegetable freshness based on the refrigeration index information of vegetables, analyze the decay rate of vegetables according to the change status information of vegetable freshness, and establish a vegetable decay rate model;
[0068] Analyze the change status information of fruit freshness based on the refrigeration index information of fruits, analyze the decay rate of fruits according to the change status information of fruit freshness, and establish a fruit decay rate model;
[0069] Analyze the change status information of meat freshness based on the refrigeration index information of meats, analyze the decay rate of meats according to the change status information of meat freshness, and establish a meat decay rate model;
[0070] Analyze the change status information of aquatic product freshness based on the refrigeration index information of aquatic products, analyze the decay rate of aquatic products according to the change status information of aquatic product freshness, and establish an aquatic product decay rate model.
[0071] It should be noted that by modeling the decay rates of different types of fresh products and considering the influence of environmental factors (such as temperature, humidity, etc.) on the freshness of fresh products, an appropriate decay rate model is set for each product. The decay rate model can reflect in real time the freshness loss of fresh products during the transfer process due to environmental changes or the passage of time. Therefore, if the initial freshness of the fresh product is assumed to be , and then it experiences different decay rates The time under the environment is , then at the cumulative time , the total decay amount calculation formula for the freshness of the fresh product is:
[0072] (1)
[0073] Specifically for the cross-docking center, fresh produce will go through three different storage areas during the transfer process: the inbound vehicle, the conveyor area, and the outbound vehicle. Assume that for the th type of fresh produce, the decay rate on the vehicle (including the inbound vehicle and the outbound vehicle) is , and the decay rate in the conveyor area (referring to the area where fresh produce is unloaded from the unloading platform and conveyed to the loading platform waiting to be loaded) is . The vehicles used to transfer fresh produce are usually cold chain vehicles, so .
[0074] As can be seen from formula (1), the core of calculating the total decay amount is to calculate the decay time value of fresh produce in the three storage areas. First is the decay time on the inbound vehicle. The time when the inbound vehicle enters the unloading platform is , so the decay time of the fresh produce on it while on the inbound vehicle is ; Next, this batch of fresh produce is unloaded and finally loaded onto the outbound vehicle that meets , so the time in the conveyor area is ; Until the moment , all the demands of the outbound vehicle are met and it leaves the loading platform, so the storage time on the outbound vehicle is . In summary, for a certain batch quantity of fresh produce , the total decay time on the vehicle is , and the decay time in the conveyor area is .
[0075] According to the embodiments of the present invention, based on the decay rate model, analyze the freshness loss information of fresh produce during the transfer process due to environmental changes or time lapse, specifically including:
[0076] Analyze and set the freshness loss value of vegetables within the set refrigeration time based on the vegetable decay rate model;
[0077] Analyze and set the freshness loss value of fruits within the set refrigeration time based on the fruit decay rate model;
[0078] Analyze and set the freshness loss value of meat within the set refrigeration time based on the meat decay rate model;
[0079] Analyze and set the freshness loss value of aquatic products within the set refrigeration time based on the aquatic product decay rate model;
[0080] Analyze the influence weight coefficient of the temperature, humidity of the refrigeration environment, refrigeration time, and fresh produce packaging on the freshness loss value of different categories of fresh produce;
[0081] The freshness loss information of different categories of fresh products is obtained by multiplying the influence weight coefficients of the freshness loss values of different categories of fresh products by the freshness loss values of vegetables, fruits, meats, and aquatic products.
[0082] According to the embodiments of the present invention, an objective function is constructed based on the freshness loss information, and the formula is as follows:
[0083] (2)
[0084] Among them, formula (2) is the objective function, that is, to minimize the total attenuation of the freshness of fresh products. The main influencing factor is the entry and exit time of the vehicle. represents the set of inbound vehicles, ; represents the set of outbound vehicles, ; represents the set of the types of fresh products, ; represents the quantity of the th type of fresh product transferred from the inbound vehicle to the outbound vehicle ; are respectively the times when the th outbound vehicle enters and leaves the platform; represents the initial freshness of the th type of fresh product; are respectively the attenuation rates of the th type of fresh product on the vehicle and in the transfer area; represents the time when the inbound vehicle enters the unloading platform; , if there is fresh product transferred from the inbound vehicle to the outbound vehicle , it is 1, otherwise it is 0.
[0085] Furthermore, the constraint conditions are as follows:
[0086] (3)
[0087] (4)
[0088] (5)
[0089] (6)
[0090] (7)
[0091] (8)
[0092] (9)
[0093] (10)
[0094] (11)
[0095] (12)
[0096] (13)
[0097] (14)
[0098] (15)
[0099] Among them, represents the set of different storage areas that fresh products experience during the transfer process. In the present invention, it refers to three storage areas: the incoming vehicle, the transfer area, and the outgoing vehicle, that is ; represents the incoming vehicle loading the quantity of the th type of fresh product; represents the outgoing vehicle requiring the quantity of the th type of fresh product; represents the batch unloading quantity; represents the vehicle conversion time; represents the transfer time of fresh products from the unloading platform to the loading platform; represents a constant; respectively represent the time when the th incoming vehicle enters and leaves the platform; , if the incoming vehicle is in front of , it is 1, otherwise it is 0; ; if the outgoing vehicle is in front of , it is 1, otherwise it is 0.
[0100] Equations (3) and (4) are the relationships between the transfer quantity of fresh products and the unloading / demand quantities of the incoming / outgoing vehicles; Equation (5) emphasizes the relationship between the transfer quantity and .
[0101] Equation (6) is the unloading feature in the non-interrupt mode. The vehicle can only leave the platform after all fresh products are unloaded; Equations (7)-(8) give the requirements for the entry / exit times based on the sequence of the incoming vehicle and ; Equation (9) emphasizes that it is not allowed to arrange the incoming vehicle in front of itself.
[0102] Secondly, Equations (10)-(13) give the time limits for the inbound and outbound trucks by imitating the non-interrupted unloading mode of the inbound trucks in Kuche; Equation (14) connects the inbound trucks and the outbound trucks. Once there are fresh products to be transferred from the inbound trucks to the outbound trucks, this condition needs to be satisfied; Equation (15) is a non-negative constraint.
[0103] To reduce the complexity of the solution space of the model, the present invention proposes the concept of the batch unloading quantity . Its meaning is that when each inbound truck performs the unloading operation, at least quantity of fresh products needs to be unloaded. Through value, the unloading process of a certain inbound truck can be divided into multiple segments, and each segment is called an unloading operation, which means that the quantity of the th type of fresh product unloaded from the th inbound truck is .
[0104] Considering that the total unloading quantity is usually not an integer multiple of, it is necessary to stipulate the unloading quantity of the non-divisible part.
[0105] Specifically, if the fresh products of quantity are unloaded based on the batch unloading quantity , then the required number of unloading times and the quantity of each unloading are respectively:
[0106] (16)
[0107] (17)
[0108] wherein, the symbol means rounding down, and is the serial number of the unloading segment. According to Equation (17), the unloading process of the fresh products of quantity can be divided into segments, and the quantity unloaded in each segment is .
[0109] According to a specific embodiment of the present invention, this embodiment includes two inbound trucks and two types of fresh products. Inbound truck 1 needs to unload 25 of the first type of fresh product, and inbound truck 2 needs to unload 5 of the first type and 15 of the second type. Here, the batch unloading quantity is set to 10.
[0110]
[0111] As can be seen from equations (16) and (17), the number of unloading times corresponding to inbound vehicle 1 is 2, which are unloading 10 and 15 pieces of the first type of fresh produce respectively.
[0112] The number of unloading times corresponding to inbound vehicle 2 is also 2, which are unloading 5 pieces of the first type of fresh produce and unloading 15 pieces of the second type of fresh produce. Thus, it can be known that 4 unloading operations need to be performed during the unloading process, and each operation consists of three elements: inbound vehicle number, type of fresh produce, and unloading quantity.
[0113] Performing different sorting on the 4 unloading operations will result in different outcomes. As shown in Table 1, there are two possible unloading sequences when the number of unloading times is 4.
[0114] Table 1
[0115]
[0116] As can be seen from Table 1, based on the inbound vehicle number, the first possible unloading sequence is 1-1-2-2. Since the first two and the last two unloading operations are for the same inbound vehicle, they can be combined. Therefore, in this unloading sequence, if we want to calculate the unloading completion time, only one vehicle conversion time needs to be calculated , which occurs when changing from unloading position 2 to 3; while the second unloading sequence is 2-1-1-2, and two vehicle conversion times need to be calculated , which occur respectively when changing from unloading position 1 to 2 and from 3 to 4.
[0117] It can be seen that although the unloading operations are divided into the same 4 segments, arranging these 4 segments in different unloading sequences will correspond to different objective function values (such as completion time, total attenuation value, etc.). Different from just sorting the vehicle numbers in the non-interrupt mode, in the inbound vehicle interrupt mode, the object of sorting becomes the unloading operations (consisting of three elements: inbound vehicle number, type of fresh produce, and unloading quantity). Correspondingly, after the outbound vehicle enters the outbound dock, it cannot leave until it is fully loaded with the goods it needs.
[0118] Based on this, it can be known that the key to the mathematical model and solution algorithm for inbound vehicle interrupt is to sort these unloading operations or loading operations. In fact, the interrupt mode can be transformed into the non-interrupt mode.
[0119] Specifically, the non-interrupt mode means that once the vehicle enters the platform, it cannot leave until it completes all unloading / loading tasks. For the convenience of expression, this mode is referred to as NI (Non-interrupt) in this paper.
[0120] The Inbound truck Interrupt (ITI) mode means that the unloading process of inbound trucks can be interrupted (i.e., it is allowed for an inbound truck to leave the platform after unloading only part of the fresh products, wait for other inbound trucks to complete their tasks, and then return to the platform multiple times to unload the remaining fresh products), while outbound trucks still use the non - interrupt mode for loading, as Figure 8 shown. Through the demand pull of outbound trucks, it refers to the multiple unloading operations of inbound trucks, which belongs to the pull - type.
[0121] The Outbound truck Interrupt (OTI) mode means that the loading process of outbound trucks can be interrupted, while inbound trucks still use the non - interrupt mode for unloading, and it promotes and guides the multi - stage loading operations of outbound trucks, as Figure 9 shown, which belongs to the push - type. Among them, each outbound truck only needs one of each of fresh product types 1 and 2, but when inbound truck 1 unloads, it unloads two fresh products of type 1 successively. At this time, the second one can only be temporarily stored in the temporary buffer area and then loaded when outbound truck 2 drives into the platform.
[0122] According to the unloading and loading rules, convert the interrupt mode into the non - interrupt mode of inbound trucks. The specific steps are as follows:
[0123] Taking the second unloading order in Table 1 as an example, that is, inbound trucks unload in the order of 2 - 1 - 1 - 2, and outbound trucks are sorted in the normal 1 - 2 order. Each unloading operation contains three - layer information: vehicle serial number, fresh product type serial number, and unloading quantity. And outbound trucks still use the non - interrupt mode, only need to pay attention to the sorting of vehicle serial numbers, without distinguishing fresh product types. Therefore, the information in the third row is the sum of the quantities of all types of fresh products on the vehicle, as Figure 6 shown.
[0124] Convert the sorting of the unloading operations of inbound trucks into the sorting of inbound vehicles. The specific steps are as Figure 7 shown.
[0125] Specifically, based on the batch unloading quantity divide the unloading operations of the matrix into segments. The decomposition method is shown in Formulas (16) to (17);
[0126] Randomly arrange the segment unloading operations, as shown in Table 1;
[0127] Based on this sorting, if two adjacent unloading operations come from the same inbound truck, then merge them. If they do not come from the same truck, then introduce a new truck, and so on, thus converting it into a expressed in matrix form.
[0128] Among them, the matrix has more rows than . This is equivalent to changing the behavior of the inbound trucks repeatedly entering and leaving the unloading platform into adding some virtual inbound trucks to perform unloading operations.
[0129] Through and matrices, it is convenient to calculate the decay time of fresh products on inbound trucks, in the transfer area, and on outbound trucks, and then obtain the total decay amount value. The specific model is the same as that of equations (2)-(15), except that is changed to . Thus, the cross-docking vehicle scheduling model for fresh products in the inbound truck interruption mode is completely constructed.
[0130] According to the embodiments of the present invention, the genetic algorithm design method is as follows:
[0131] Based on the real number coding method, the vehicle number, the type of fresh product, and the unloading quantity are used as genes to construct a hybrid chromosome coding scheme based on the batch unloading quantity. As Figure 4 shown, it shows a possible coding scheme for 3 inbound trucks and 3 outbound trucks.
[0132] Specifically, a set number N of chromosomes are randomly generated as the initial population;
[0133] Calculate the fitness of each chromosome according to the objective function;
[0134] Adopt the roulette wheel selection method to calculate the proportion of the fitness of each chromosome in the total fitness as the probability of being selected;
[0135] Simulate the process of the roulette wheel through a random number generator to select a set number of parent chromosomes for breeding the next generation;
[0136] Randomly select two crossover points and exchange the gene segments between these two crossover points of the two parent chromosomes to generate two new offspring chromosomes;
[0137] Based on the newly generated offspring chromosomes, replace the parent chromosomes in the population with fitness less than the set threshold to obtain the genetic algorithm.
[0138] Specifically, the chromosome with a smaller total decay amount corresponds to a higher fitness value. On the contrary, the chromosome with a larger total decay amount corresponds to a lower fitness value. Since the total decay amount has the characteristics of being non-negative, continuous, and not easily known in advance, the fitness function in the inverse proportion form is adopted in this application, and the formula is as follows:
[0139]
[0140] Among them, the meaning of the batch unloading quantity is that each time an inbound truck performs unloading operations, at least The quantity of fresh products. It can be seen that through The value can divide the unloading process of a certain inbound vehicle into multiple segments, and each segment is called a unloading operation. Then, the sorting of inbound vehicles is actually the sorting of each unloading operation.
[0141] Furthermore, the design principles of the genetic algorithm mainly include the following two points:
[0142] a: In the initial stage of population evolution, the population should be searched in a relatively large range as much as possible to avoid premature convergence;
[0143] b: In the later stage of population evolution, when the search result approaches the optimal solution, the population should be focused on searching in a local range through the evolution strategy.
[0144] Adaptive crossover probability:
[0145] For the fitness value distribution of each generation of population, construct the following adaptive crossover probability formula:
[0146]
[0147] Among them, Refers to the largest fitness value in the population, Refers to the average fitness value in the population, Refers to the larger fitness value among the two chromosomes to be crossed, , Take The value in the interval can achieve adaptive adjustment. The crossover operator adopts partial mapping crossover. Taking the inbound vehicle interruption mode as an example, the crossover mapping process is as Figure 5 shown.
[0148] Select the swap mutation operator, that is, randomly select two unloading positions for swapping. If the fitness value of the chromosome after swapping is higher than that before swapping, accept the mutation operation. If the fitness value after swapping is lower than that before swapping, retain the original chromosome.
[0149] According to the embodiments of the present invention, based on the genetic algorithm outputting the optimal solution, a matching vehicle scheduling scheme is obtained, specifically including:
[0150] Initialize the algorithm parameters. The algorithm parameters include the population size , the selection probability , the maximum number of iterations and the adaptive parameter ;
[0151] Based on the batch unloading quantity Divide the or loading / unloading operations of the matrix into segment, and convert it according to the encoding method into , in matrix form, and calculate the corresponding total attenuation value according to the objective function to generate an initial solution set;
[0152] Adopt the reciprocal form of the total attenuation value to calculate the fitness value of each chromosome;
[0153] Use the roulette wheel strategy to select the chromosomes that need to cross, and perform the partially mapped crossover operation according to the adaptive crossover probability;
[0154] Perform the mutation operation on the chromosomes after the crossover operation according to the adaptive mutation probability, and calculate the fitness value of each chromosome after the mutation operation;
[0155] Record the chromosome numbers with the highest and lowest fitness values, and replace the chromosome with the lowest fitness value with the chromosome with the highest fitness value. At the same time, the corresponding fitness value is also replaced;
[0156] Judge whether the termination condition is satisfied. If it is satisfied, end. If it is not satisfied, the roulette wheel strategy selects the chromosomes that need to cross again to perform the partially mapped crossover operation.
[0157] This embodiment also provides a cross-docking vehicle scheduling system based on a genetic algorithm, including a processor, a memory, and at least one program. The program is stored in the memory and is configured to be executed by the processor. The program includes instructions for executing any of the above cross-docking vehicle scheduling methods based on a genetic algorithm.
[0158] Those skilled in the art can understand that, for the sake of convenience of description, an example is given in which the number of the memory and the processor are both set to one. In an actual terminal or server, there may be multiple processors and memories. The memory may also be referred to as a storage medium or a storage device, etc. The embodiments of the present application do not limit this.
[0159] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU for short), and the processor may also be other general-purpose processors, digital signal processors (DSP for short), application specific integrated circuits (ASIC for short), field-programmable gate arrays (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor may also adopt a general-purpose microprocessor, a graphics processing unit (GPU), or one or more integrated circuits to execute relevant programs to implement the functions required to be executed in the embodiments of the present application.
[0160] The processor may also be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the present application may be completed by the integrated logic circuit in the hardware of the processor or the instructions in the form of software. The above-mentioned processor may implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the functions required to be executed by the units included in the method, device, and storage medium of the embodiments of the present application.
[0161] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM for short), a programmable read-only memory (PROM for short), an erasable programmable read-only memory (EPROM for short), an electrically erasable programmable read-only memory (EEPROM for short), or a flash memory. The volatile memory may be a random access memory (RAM for short), which is used as an external cache.
[0162] By way of example and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0163] The memory may also be a Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or any other medium capable of carrying or storing the desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor. The memory may store a program, and when the program stored in the memory is executed by the processor, the processor is used to execute each step of the determination method in the above embodiments of the present application.
[0164] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) is integrated in the processor. It should be noted that the memory described herein is intended to include, but not limited to, these and any other suitable types of memory.
[0165] It should be understood that the term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0166] In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware processor, or executed and completed by the combination of the hardware and software modules in the processor. The software module can be located in mature storage media in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. This storage media is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
[0167] Those of ordinary skill in the art can realize that the various illustrative logical blocks (ILBs) and steps described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0168] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the processor, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a computer network, or other programmable devices.
[0169] This embodiment also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and the computer program enables a computer to execute to implement the above-mentioned cross-docking vehicle scheduling method based on a genetic algorithm.
[0170] It should be noted that computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center via wired (such as coaxial cable, optical fiber) or wireless (such as infrared, wireless, microwave, etc.) means, or from a website, computer, server, or data center to a mobile phone processor via wired means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive), etc.
[0171] Finally, it should be noted that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A cross-dock vehicle scheduling method based on genetic algorithm, characterized in that: The following steps are involved: By modeling the decay rates of different types of fresh products, a decay rate model matching different types of fresh products is established; Analyze the freshness loss of fresh products during transportation due to environmental changes or the passage of time based on the decay rate model; Construct an objective function based on the freshness loss information and set constraints according to the objective function; Establish a vehicle dispatch model based on the objective function and constraints, and output multiple vehicle dispatch plans; Output the optimal solution based on the genetic algorithm and obtain the matching vehicle dispatch plan; The objective function is constructed based on the freshness loss information. The formula is as follows: in, Represents the collection of incoming vehicles. ; represents the set of outbound vehicles, ; Represents the number of fresh food categories, ; Indicates that the vehicle is entering the warehouse Transfer to outbound vehicle Previous The number of fresh products; Respectively The time when the outbound vehicles enter and leave the platform; Indicates The initial freshness of fresh produce; Respectively The decay rate of fresh products on vehicles and in the transport area; Indicates the vehicle entering the warehouse Time of entry into the unloading platform; If there are fresh products from the warehouse truck Transfer to outbound vehicle If yes, it is 1, otherwise it is 0; The genetic algorithm design method is as follows: Based on the real number coding method, the vehicle serial number, fresh product type, and unloading quantity are used as genes to construct a hybrid chromosome coding scheme based on batch unloading quantity; Randomly generate a set number N of chromosomes as the initial population; Calculate the fitness of each chromosome according to the objective function; The roulette wheel selection method is used to calculate the proportion of each chromosome's fitness to the total fitness as the probability of being selected; Through the process of simulating roulette with a random number generator, a set number of parent chromosomes are selected for breeding the next generation; Randomly select two crossover points, exchange the gene segments of the two parent chromosomes between the two crossover points, and generate two new daughter chromosomes; The genetic algorithm is obtained by replacing the parent chromosomes whose fitness is less than a set threshold in the population based on the newly generated offspring chromosomes.
2. The cross-dock vehicle scheduling method based on genetic algorithm as claimed in claim 1, characterized in that: By modeling the decay rates of different types of fresh products, a decay rate model matching different types of fresh products is established, including: Fresh products are divided into categories such as vegetables, fruits, meat and aquatic products; Based on the refrigeration index information of vegetables, the vegetable freshness change status information is analyzed, and the vegetable decay rate is analyzed according to the vegetable freshness change status information, and a vegetable decay rate model is established; Analyze the fruit freshness change status information based on the fruit refrigeration index information, analyze the fruit decay rate based on the fruit freshness change status information, and establish a fruit decay rate model; Analyze the meat freshness change status information based on the meat refrigeration index information, analyze the meat decay rate based on the meat freshness change status information, and establish a meat decay rate model; Based on the refrigeration index information of aquatic products, the freshness change status information of aquatic products is analyzed, and based on the freshness change status information of aquatic products, the attenuation rate of aquatic products is analyzed, and an aquatic product attenuation rate model is established.
3. The cross-dock vehicle scheduling method based on genetic algorithm as claimed in claim 2, characterized in that: Based on the decay rate model, the freshness loss information of fresh products caused by environmental changes or the passage of time during transportation is analyzed, including: Based on the vegetable decay rate model analysis, the freshness loss value of vegetables during the refrigeration period is set; The freshness loss value of fruits during the refrigeration period is set based on the fruit decay rate model analysis; The meat freshness loss value during the refrigeration period is set based on the meat decay rate model analysis; Based on the aquatic product decay rate model analysis, the freshness loss value of aquatic products during the refrigeration period is set; The weight coefficients affecting the freshness loss value of different categories of fresh products based on the temperature, humidity, refrigeration time and fresh product packaging analysis of the refrigeration environment; Based on the weight coefficient of freshness loss value of different categories of fresh products, multiply the freshness loss value of vegetables, fruits, meats and aquatic products by the freshness loss value, the freshness loss information of different categories of fresh products can be obtained.
4. The cross-dock vehicle scheduling method based on genetic algorithm as claimed in claim 1, characterized in that: Based on the genetic algorithm, the optimal solution is output and the matching vehicle dispatching solution is obtained, which includes: Initialize algorithm parameters, including population size , selection probability , maximum number of iterations With adaptive parameters ; Based on batch unloading quantity Will or The matrix unloading / loading operations are divided into segment, and is converted into , The matrix form of , and calculate the corresponding total attenuation value according to the objective function to generate the initial solution set; The fitness value of each chromosome is calculated using the inverse form of the total attenuation value; The roulette wheel strategy is used to select the chromosomes that need to be crossed, and the partial mapping crossover operation is performed according to the adaptive crossover probability; The chromosomes that have performed the post-crossover operation are mutated according to the adaptive mutation probability, and the fitness value of each chromosome after the mutation operation is calculated; Record the chromosome numbers with the highest and lowest fitness values, and replace the chromosome with the lowest fitness value with the chromosome with the highest fitness value. At the same time, the corresponding fitness value is also replaced. Determine whether the termination condition is met. If it is met, the process ends. If not, the roulette strategy selects the chromosome that needs to be crossed again to perform a partial mapping crossover operation.
5. A cross-dock vehicle dispatching system based on genetic algorithm, characterized in that: The system comprises a processor, a memory and at least one program, wherein the program is stored in the memory and configured to be executed by the processor, and the program comprises instructions for executing the cross-dock vehicle scheduling method based on a genetic algorithm as claimed in any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program enables a computer to execute to implement the cross-dock vehicle scheduling method based on a genetic algorithm according to any one of claims 1 to 4.
Citation Information
Patent Citations
Injection molding workshop scheduling method and system based on improved genetic algorithm
CN111985841A
Emergency material transportation and loading collaborative optimization method based on double-layer genetic coding
CN113222272A
Cited By
Supply interruption-oriented two-stage warehouse-crossing vehicle scheduling algorithm
CN121169033A
A two-phase cross-depot vehicle scheduling algorithm for supply disruptions
CN121169033B