A production order and production path scheduling method based on the ant colony algorithm
Through the improved ant colony algorithm combined with equipment maintenance plans and human resource constraints, the production path is optimized, which solves the problem that production scheduling algorithms in the existing technology is difficult to deal with emergencies, and achieves efficient and flexible production scheduling.
Patent Information
- Application Number
- CN202411650066.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2044-11-19
AI Technical Summary
Existing production scheduling algorithms are difficult to cope with emergencies in the production environment, such as equipment maintenance plans and human resource restrictions, resulting in inefficient production and waste of computing resources.
The improved ant colony algorithm is adopted, combined with equipment maintenance planning and human resource constraints, and the production path is optimized to improve production efficiency through pheromone matrix update and taboo table management.
It improves equipment utilization, shortens production cycle, reduces order overdue situations, reduces the risk of human error, enhances the flexibility and adaptability of production scheduling, and reduces calculation time.
Smart Images

Figure CN119180466B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of production path planning, and particularly relates to a production order and production path scheduling method based on the ant colony algorithm. Background Art
[0002] At present, more and more intelligent optimization algorithms are applied to the production scheduling field to improve the efficiency and quality of scheduling, such as genetic algorithms, simulated annealing algorithms, particle swarm optimization algorithms, etc., but there are still some deficiencies that need to be improved and perfected. In the actual production environment, conditions such as order demands and equipment status may change, while general optimization algorithms usually assume that the environment is static and unchanged, making it difficult for the algorithms to handle emergencies. In large-scale production systems, a large amount of computing resources will be consumed in the iterative process, which poses high requirements on the enterprise's IT infrastructure. Many existing algorithm models focus on theoretical optimization goals, such as minimizing the production cycle or maximizing equipment utilization rate, but ignore some important constraints in actual production, such as equipment maintenance plans and human resource limitations.
[0003] For example, the Chinese patent with the authorization announcement number CN112966876B discloses a production scheduling method, device, electronic device and readable medium for orders. The method includes: obtaining an order to be processed; allocating the order to be processed to a target queue according to the target execution duration of the order to be processed; when processing the order to be processed in the target queue according to the priority information of the target queue, determining the production path of the order to be processed according to the production capacity information of the candidate nodes at the current moment; and producing the order to be processed according to the production path. The production scheduling method, device, electronic device and readable medium for orders provided by the invention can shorten the production cycle of the order and make the utilization of warehouse production capacity more reasonable, but still has the problems proposed in the background art, ignoring the constraints in actual production, such as equipment maintenance plans, etc., making it difficult for the method to handle emergencies.
[0004] The information disclosed in this background art section is only intended to increase the understanding of the overall background of the present invention, and should not be regarded as an admission or any form of suggestion that this information constitutes prior art already known to those of ordinary skill in the art. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a production order and production path scheduling method based on the ant colony algorithm, introducing an improved ant colony algorithm and combining with actual production constraints, providing efficient, flexible and low-cost scheduling for production orders, and helping to improve the efficiency of order production.
[0006] To solve the above technical problems, the present invention provides the following technical solutions:
[0007] A production order and production path scheduling method based on the ant colony algorithm, comprising the following steps:
[0008] S1: Obtain order data and equipment data, construct and initialize a pheromone matrix, and set the ant colony size and the maximum number of iterations;
[0009] S2: Perform one iteration of the ant colony based on the order data and the pheromone matrix;
[0010] S3: Update the pheromone matrix based on the production path explored by each ant in the ant colony and the fitness function;
[0011] S4: Repeat steps S2 - S3 until the maximum number of iterations is reached;
[0012] S5: Obtain the production path with the highest fitness in all iterations as the optimal production path, and output a production schedule and the corresponding equipment plan Gantt chart based on the optimal production path.
[0013] As a preferred solution of the production order and production path scheduling method based on the ant colony algorithm of the present invention, wherein: the order data includes the order number, delivery deadline of each order, all processes included in each order and the execution order of the processes, the equipment corresponding to each process, and the standard working time of each process;
[0014] The equipment data includes the equipment code of each equipment and the equipment maintenance plan; wherein, the equipment code includes the equipment type and the equipment number; the equipment maintenance plan includes the equipment codes to be maintained and the maintenance start time and maintenance duration of each equipment to be maintained; the pheromone matrix is a matrix with N rows and N columns, where N represents the number of orders to be completed; the element in the a-th row and b-th column of the pheromone matrix represents the pheromone concentration between the directed path ab; the directed path ab means selecting the b-th order after selecting the a-th order; each element in the initialized pheromone matrix is equal.
[0015] As a preferred solution of the production order and production path scheduling method based on the ant colony algorithm of the present invention, wherein: the production path represents an order sequence composed of orders in the execution order; a complete production path is a production path that includes all orders to be executed;
[0016] The method for performing one iteration of the ant colony is as follows:
[0017] S201: Initialize a taboo list and an equipment plan Gantt chart for each ant;
[0018] S202: Randomly select an order as the current order for each ant and calculate the completion time of the current order;
[0019] S203: Update the taboo list and the equipment plan Gantt chart for each ant;
[0020] S204: Select the next order for each ant based on the pheromone matrix;
[0021] S205: Repeat steps S203 - S204 until each ant explores a complete production path.
[0022] As a preferred solution of the production order and production path scheduling method based on the ant colony algorithm of the present invention, wherein: the taboo list includes a completed area and an occupied area, and during the iteration, the orders in the taboo list cannot be selected; the method for initializing the taboo list for any ant is to fill the occupied area, and the method is as follows:
[0023] Calculate the completion time of each order outside the taboo list, and the formula is as follows:
[0024] ;
[0025] Wherein, represents the completion time of any order; represents the current moment; represents the equipment waiting time corresponding to the i-th process of the order; represents the standard working time of the i-th process; the value range of i is 1, 2,..., M, and M is the number of processes included in the order; if the completion time of any order A is later than the start time of the maintenance of the equipment involved in the order, then order A is added to the occupied area; the processes of any order are executed in sequence, that is, the adjacent next process starts to be executed after the previous process is completed;
[0026] The equipment waiting time is the time difference between the start time of the process and the start time when the equipment is available, and if the start time when the equipment is available is not later than the corresponding process start time, then the equipment waiting time is 0; if the equipment is under maintenance, the calculation method of the start time when the equipment is available is the maintenance start time plus the maintenance duration; otherwise, the calculation method of the start time when the equipment is available is the start time of the previous process executed by the equipment plus the standard working time of the previous process executed by the equipment.
[0027] As a preferred solution of the production order and production path scheduling method based on the ant colony algorithm according to the present invention, the device planned Gantt chart is used to represent the working time and idle time of each device. The initialization method is as follows: In the device planned Gantt chart, assign a vertical coordinate to all devices, and the horizontal coordinate is time. Draw each ongoing process in the device planned Gantt chart, with the vertical coordinate being the device corresponding to the process, the starting point of the horizontal coordinate being the current moment, the ending point of the horizontal coordinate being the current moment plus the remaining working time of the process, and mark the process name on the device planned Gantt chart.
[0028] As a preferred solution of the production order and production path scheduling method based on the ant colony algorithm according to the present invention, the method for updating the taboo list and the device planned Gantt chart for each ant is as follows:
[0029] S2031: Add each process included in the current order to the device planned Gantt chart. Among them, the starting point of the horizontal coordinate is the available start time of the device corresponding to the process; the ending point of the horizontal coordinate is the starting point plus the standard working time of the process.
[0030] S2032: Remove the orders in the occupied area of the taboo list from the taboo list.
[0031] S2033: Add the current order to the completed area of the taboo list.
[0032] S2034: Fill the occupied area of the taboo list.
[0033] As a preferred solution of the production order and production path scheduling method based on the ant colony algorithm according to the present invention, the method for each ant to select the next order is as follows:
[0034] S2041: Calculate the probability that the ant selects any order as the next order. The formula is as follows:
[0035] ;
[0036] Among them, D represents the current order, and both B and C represent any order in the set ; among them, the set includes all orders outside the taboo list; represents the probability of selecting order B as the next order; represents the pheromone concentration on the directed path DB, represents the pheromone concentration on the directed path DC, both obtained based on the pheromone matrix; represents the heuristic factor on the directed path DB; represents the heuristic factor on the directed path DC; is the pheromone adjustment factor;
[0037] S2042: Determine the next order selected through the roulette wheel algorithm based on the probability of each order being selected by the ants as the next order;
[0038] S2043: Update the current order to the next order selected.
[0039] As a preferred solution of the production order and production path scheduling method based on the ant colony algorithm of the present invention, wherein: the calculation formula of the heuristic factor is as follows:
[0040] ;
[0041] Wherein, represents the total number of devices involved in order D; represents the number of devices jointly involved in order D and order C;
[0042] The expression of the pheromone adjustment factor is as follows:
[0043]
[0044] Wherein, n represents the current iteration number; is the maximum number of iterations.
[0045] As a preferred solution of the production order and production path scheduling method based on the ant colony algorithm of the present invention, wherein: the formula of the fitness function is as follows:
[0046] ;
[0047] Wherein, H represents the fitness of any production path; , , are all weight coefficients; represents the completion time of the last order in the production path; represents the number of normal orders in the production path, and the normal order is an order whose completion time is earlier than the delivery deadline; represents the number of overdue orders in the production path, and the overdue order is an order whose completion time is not earlier than the delivery deadline; represents the delivery deadline of the jth normal order; represents the order completion time of the jth normal order; represents the delivery deadline of the kth overdue order; represents the order completion time of the kth overdue order.
[0048] As a preferred solution of the production order and production path scheduling method based on the ant colony algorithm of the present invention, wherein: the method for updating the pheromone matrix is as follows:
[0049] Calculate the fitness of each production path obtained in this iteration, sort them, and select the m production paths with the highest fitness as the reference paths, where m is a positive integer; update each element in the pheromone matrix, and the formula is as follows:
[0050] ;
[0051] Among them, represents any pheromone concentration in the pheromone matrix in this iteration; EF is the corresponding directed path; represents the updated value; represents the pheromone concentration left by the ant corresponding to the pth reference path in this iteration between the directed paths EF. If the pth reference path does not include the directed path EF, then takes a value of 0; otherwise, the calculation formula of
[0052] ;
[0053] Among them, represents the fitness of the pth reference path in this iteration; represents the highest fitness of the m production paths in this iteration;
[0054] is the evaporation coefficient of the pheromone, and the calculation formula is as follows:
[0055] ;
[0056] Among them, represents the highest fitness of all production paths up to this iteration.
[0057] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0058] By effectively managing the working time and idle time of the equipment, the present invention helps to improve the equipment utilization rate. This solution helps to shorten the production cycle and improve the overall production efficiency. The present invention can better adapt to changes in the production environment, such as changes in the equipment maintenance plan, thus making the production scheduling more flexible.
[0059] By minimizing the total time cost of the production path, this solution can accurately predict the order completion time, reduce the situation of order overdue, and improve customer satisfaction. Automated production scheduling reduces the dependence on manual production scheduling and reduces the risk of production delays caused by human errors. By comprehensively considering various production constraints, this solution improves the adaptability of the production scheduling plan to various uncertain factors in actual production.
[0060] Through the dynamic adjustment of the pheromone volatility coefficient and the application of the genetic algorithm strategy, this solution can, to a certain extent, accelerate the convergence speed of the algorithm and reduce the calculation time. The output production schedule and the Gantt chart of the equipment plan enable production managers to intuitively understand the entire production process, facilitating monitoring and management. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. Among them:
[0062] Figure 1 is a flowchart of a production order and production path scheduling method based on the ant colony algorithm provided by the present invention;
[0063] Figure 2 is a flowchart of a method for updating the taboo list and the Gantt chart of the equipment plan provided by the present invention;
[0064] Figure 3 is a flowchart of a method for selecting the next order provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0065] The following will detail the technical solutions of the present invention through the drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solutions of the present invention, rather than limitations on the technical solutions of the present invention. Without conflict, the technical features in the embodiments of the present invention and the embodiments can be combined with each other.
[0066] This embodiment introduces a production order and production path scheduling method based on the ant colony algorithm. Referring to Figure 1 , the method includes the following steps:
[0067] S1: Obtain order data and equipment data, construct and initialize the pheromone matrix, and set the ant colony size and the maximum number of iterations;
[0068] The order data includes the order number, delivery deadline of each order, all processes included in each order and the execution order of the processes, the equipment corresponding to each process, and the standard working time of each process;
[0069] The device data includes the device code of each device and the device maintenance plan; wherein, the device code includes the device type and the device number; the device maintenance plan includes the device code to be maintained and the maintenance start time and maintenance duration of each device to be maintained; the pheromone matrix is a matrix with N rows and N columns, where N represents the number of orders to be completed; the element in the a-th row and b-th column of the pheromone matrix represents the pheromone concentration between the directed path ab; the directed path ab means selecting the b-th order after selecting the a-th order; each element in the initialized pheromone matrix is equal.
[0070] S2: Perform one iteration of the ant colony based on the order data and the pheromone matrix; One iteration of the ant colony is completed when each ant in the ant colony explores a complete production path;
[0071] The production path represents an order sequence formed by orders in the execution order; A complete production path is a production path that includes all orders to be executed;
[0072] The method for performing one iteration of the ant colony is as follows:
[0073] S201: Initialize the taboo list and the device plan Gantt chart for each ant;
[0074] The taboo list includes a completed area and an occupied area. During the iteration, the orders in the taboo list cannot be selected; The method for initializing the taboo list for any ant is to fill the occupied area, and the method is as follows:
[0075] Calculate the completion time of each order outside the taboo list, and the formula is as follows:
[0076] ;
[0077] where, represents the completion time of any order; represents the current time; represents the waiting time of the device corresponding to the i-th process of the order; represents the standard working time of the i-th process; The value range of i is 1, 2,..., M, and M is the number of processes included in the order; If the completion time of any order A is later than the maintenance start time of the device involved in the order, then add order A to the occupied area; The processes of any order are executed in sequence, that is, the adjacent next process starts to be executed after the previous process is completed;
[0078] The waiting time of the device is the time difference between the start time of the process and the start time when the device becomes available. If the start time when the device becomes available is not later than the corresponding process start time, the device waiting time is 0. If the device is under maintenance, the start time when the device becomes available is calculated as the maintenance start time plus the maintenance duration. Otherwise, the start time when the device becomes available is calculated as the start time of the previous process executed by the device plus the standard working time of the previous process executed by the device.
[0079] The Gantt chart of the device plan is used to represent the working time and idle time of each device. The initialization method is as follows: Assign a vertical coordinate to all devices in the Gantt chart of the device plan, and the horizontal coordinate is time. Plot each ongoing process in the Gantt chart of the device plan, with the vertical coordinate being the device corresponding to the process, the starting point of the horizontal coordinate being the current time, the ending point of the horizontal coordinate being the current time plus the remaining working time of the process, and the process name being marked on the Gantt chart of the device plan.
[0080] S202: Randomly select an order for each ant as the current order and calculate the completion time of the current order.
[0081] S203: Update the taboo list and the Gantt chart of the device plan for each ant, and the method refers to Figure 2 , specifically as follows:
[0082] S2031: Add each process included in the current order to the Gantt chart of the device plan. Among them, the starting point of the horizontal coordinate is the start time when the device corresponding to the process becomes available, representing the start execution time of the process; the ending point of the horizontal coordinate is the starting point plus the standard working time of the process, representing the completion time of the process.
[0083] S2032: Remove the orders in the occupied area of the taboo list from the taboo list.
[0084] S2033: Add the current order to the completed area of the taboo list.
[0085] S2034: Fill the occupied area of the taboo list.
[0086] S204: Select the next order for each ant based on the pheromone matrix, and the method refers to Figure 3 , specifically as follows:
[0087] S2041: Calculate the probability that an ant selects any order as the next order. The formula is as follows:
[0088] ;
[0089] Among them, D represents the current order, and both B and C represent any order in the set ; among them, the set Include all orders outside the tabu list; Indicates the probability of selecting order B as the next order; Indicates the pheromone concentration on the directed path DB, Indicates the pheromone concentration on the directed path DC, both obtained based on the pheromone matrix; Indicates the heuristic factor on the directed path DB; Indicates the heuristic factor on the directed path DC; The calculation formula is as follows:
[0090] ;
[0091] Among them, Indicates the total number of devices involved in order D; Indicates the number of devices jointly involved in order D and order C; If the number of devices jointly involved in the current order D and any order C to be selected is large, the execution of order C will inevitably be affected by order D, and there will be waiting times for multiple devices involved in order C. Therefore, the execution efficiency of order C is low, and the selection probability of order C should be reduced.
[0092] Is the pheromone adjustment factor, and the expression is as follows:
[0093]
[0094] Among them, n represents the current iteration number; Is the maximum iteration number; As the iteration number increases, the pheromone adjustment factor gradually increases , increasing the guiding role of the pheromone;
[0095] S2042: Based on the probability of each ant selecting an order as the next order, determine the selected next order through the roulette wheel algorithm;
[0096] S2043: Update the current order to the selected next order;
[0097] S205: Repeat steps S203 - S204 until each ant has explored a complete production path;
[0098] S3: Update the pheromone matrix based on the production paths explored by each ant in the ant colony and the fitness function;
[0099] The formula of the fitness function is as follows:
[0100] ;
[0101] Among them, H represents the fitness of any production path; , , All are weight coefficients, which are set by those skilled in the art based on actual requirements; represents the completion time of the last order in the production path; represents the number of normal orders in the production path, where the normal order is an order whose completion time is earlier than the delivery deadline; represents the number of overdue orders in the production path, where the overdue order is an order whose completion time is not earlier than the delivery deadline; represents the delivery deadline of the j-th normal order; represents the order completion time of the j-th normal order; represents the delivery deadline of the k-th overdue order; represents the order completion time of the k-th overdue order;
[0102] The first summation term in the fitness function formula is the total time cost of the production path. The earlier the time to complete all orders, the higher the fitness, which encourages the ant colony to explore the production path with the lowest total time cost; the second summation term is the reward term for completing orders in advance. The higher the cumulative sum of the early completion time of each order, the higher the fitness of the production path, which encourages the ant colony to explore the production path where all orders can be delivered in advance; the third summation term is the penalty term for overdue orders. The longer the cumulative overdue time of the orders, the lower the fitness of the production path, which encourages the ant colony to explore the production path without overdue orders.
[0103] The method for updating the pheromone matrix is as follows:
[0104] Calculate the fitness of each production path obtained in this iteration and sort them, and select the m production paths with the highest fitness as reference paths, where m is a positive integer; update each element in the pheromone matrix, and the formula is as follows:
[0105] ;
[0106] Among them, represents any pheromone concentration in the pheromone matrix in this round of iteration; EF is the corresponding directed path; represents the updated value; represents the pheromone concentration left by the ant corresponding to the p-th reference path in this iteration between the directed paths EF. If the p-th reference path does not contain the directed path EF, then takes a value of 0; otherwise, The calculation formula of
[0107] ;
[0108] Among them, Represents the fitness of the p-th reference path in the current iteration; Represents the highest fitness of the m production paths in the current iteration;
[0109] Is the evaporation coefficient of pheromone, and the calculation formula is as follows:
[0110] ;
[0111] Among them, Represents the highest fitness of all production paths up to the current iteration; as the number of iterations increases, the evaporation coefficient of pheromone gradually decreases, enhancing the guiding role of pheromone; and the numerical value of the evaporation coefficient of pheromone is adjusted according to the highest fitness of the production paths explored by the ant colony. The higher the highest fitness in the current iteration, the smaller the evaporation coefficient, increasing the heuristic nature of pheromone in subsequent iteration planning and promoting the rapid convergence of the algorithm.
[0112] S4: Repeat steps S2 - S3 until the maximum number of iterations is reached;
[0113] After each iteration ends, a part of all pheromones will evaporate. This is to simulate the real pheromone evaporation process and prevent the pheromone on certain paths from being too high to cause local optimal solutions; adopt the "elitist retention" strategy in the genetic algorithm, that is, determine which paths' pheromones should be strengthened according to the fitness values. Select a certain number (m) of high - fitness solutions and adjust the pheromone update rule according to them. For each selected solution, increase the pheromone concentration according to the proportion of its fitness value to guide more ants to choose the paths corresponding to these high - quality solutions in future iterations.
[0114] S5: Obtain the production path with the highest fitness in all iterations as the best production path, and output the production schedule and the corresponding Gantt chart of equipment plan based on the best production path.
[0115] The output data of the present invention can be used to draw various production charts, corroborate the advancement and effectiveness of the production scheduling plan, and intuitively display the delivery dates and production paths of new orders; for example, retain the Gantt chart of equipment plan drawn during the exploration process of the best production path to show the expected work plans of each equipment; generate a production schedule, listing the delivery deadlines of each order, the start time, expected completion time, and involved equipment of each process to guide the orderly execution of production orders.
[0116] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0117] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the purpose and scope of the present invention. All of these are within the protection scope of the present invention.
Claims
1. A production order and production path scheduling method based on the ant colony algorithm, characterized in that It includes the following steps: S1: Obtain order data and equipment data, construct and initialize a pheromone matrix, and set the ant colony size and the maximum number of iterations. S2: Conduct one iteration of the ant colony based on the order data and the pheromone matrix. S3: Update the pheromone matrix based on the production paths explored by each ant in the ant colony and the fitness function. The formula of the fitness function is as follows: ; Wherein, H represents the fitness of any production path; , , are all weight coefficients; represents the completion time of the last order in the production path; represents the current time; represents the number of normal orders in the production path, and the normal order is an order whose completion time is earlier than the delivery deadline; represents the number of overdue orders in the production path, and the overdue order is an order whose completion time is not earlier than the delivery deadline; represents the delivery deadline of the j-th normal order; represents the completion time of the j-th normal order; represents the delivery deadline of the k-th overdue order; represents the completion time of the k-th overdue order; The method for updating the pheromone matrix is as follows: Calculate the fitness of each production path obtained in this iteration and sort them, and select the m production paths with the highest fitness as reference paths, where m is a positive integer; update each element in the pheromone matrix, and the formula is as follows: ; Among them, represents any pheromone concentration in the pheromone matrix in this round of iteration; EF is the corresponding directed path; represents the updated value; represents the pheromone concentration left by the ant corresponding to the p - th reference path in this iteration between the directed paths EF. If the p - th reference path does not include the directed path EF, then takes a value of 0; otherwise, the calculation formula of ; Among them, represents the fitness of the p-th reference path in this iteration; represents the highest fitness of the m production paths in this iteration; is the volatility coefficient of the pheromone, and the calculation formula is as follows: ; Among them, represents the highest fitness of all production paths up to this iteration; S4: Repeat steps S2 - S3 until the maximum number of iterations is reached. S5: Obtain the production path with the highest fitness in all iterations as the optimal production path, and output a production schedule and the corresponding equipment plan Gantt chart based on the optimal production path.
2. The production order and production path scheduling method based on the ant colony algorithm according to claim 1, wherein: The order data includes the order number, delivery deadline of each order, all processes included in each order and the execution order of the processes, the equipment corresponding to each process, and the standard working time of each process. The equipment data includes the equipment code of each equipment and the equipment maintenance plan; among them, the equipment code includes the equipment type and the equipment number; the equipment maintenance plan includes the equipment codes to be maintained and the maintenance start time and maintenance duration of each equipment to be maintained; the pheromone matrix is an N - row and N - column matrix, where N represents the number of orders to be completed; the element in the a - th row and b - th column of the pheromone matrix represents the pheromone concentration between the directed path ab; the directed path ab means selecting the b - th order after selecting the a - th order; each element in the initialized pheromone matrix is equal.
3. The production order and production path scheduling method based on the ant colony algorithm according to claim 2, characterized in that: The production path represents an order sequence composed of orders in the execution order; a complete production path is a production path that includes all orders to be executed. The method for conducting one iteration of the ant colony is as follows: S201: Initialize a taboo list and an equipment plan Gantt chart for each ant. S202: Randomly select an order for each ant as the current order and calculate the completion time of the current order. S203: Update the taboo list and the equipment plan Gantt chart for each ant. S204: Select the next order for each ant based on the pheromone matrix. S205: Repeat steps S203 - S204 until each ant has explored a complete production path.
4. The production order and production path scheduling method based on the ant colony algorithm according to claim 3, characterized in that: The taboo list includes a completed area and an occupied area, and the orders in the taboo list cannot be selected during the iteration; the method for initializing the taboo list for any ant is to fill the occupied area, and the method is as follows: Calculate the completion time of each order outside the taboo list, and the formula is as follows: ; Wherein, represents the completion time of any order; represents the equipment waiting time corresponding to the i-th process of the order; represents the standard working time of the i-th process; the value range of i is 1, 2,..., M, where M is the number of processes included in the order; if the completion time of any order A is later than the maintenance start time of the equipment involved in the order, then order A is added to the occupied area; the processes of any order are executed in sequence, that is, the adjacent next process starts after the previous process is completed; The waiting time of the device is the time difference between the start time of the process and the start time when the device becomes available. If the start time when the device becomes available is not later than the corresponding process start time, the device waiting time is 0. If the device is under maintenance, the calculation method for the start time when the device becomes available is the maintenance start time plus the maintenance duration. Otherwise, the calculation method for the start time when the device becomes available is the start time of the previous process executed by the device plus the standard working time of the previous process executed by the device.
5. The production order and production path scheduling method based on the ant colony algorithm according to claim 4, characterized in that: The device planned Gantt chart is used to represent the working time and idle time of each device. The initialization method is as follows: In the device planned Gantt chart, assign a vertical coordinate to all devices, and the horizontal coordinate is time. Plot each ongoing process in the device planned Gantt chart, with the vertical coordinate being the device corresponding to the process, the starting point of the horizontal coordinate being the current time, the ending point of the horizontal coordinate being the current time plus the remaining working time of the process, and mark the process name on the device planned Gantt chart.
6. The production order and production path scheduling method based on the ant colony algorithm according to claim 5, characterized in that The method for updating the taboo list and the device planned Gantt chart for each ant is as follows: S2031: Add each process included in the current order to the device planned Gantt chart. Among them, the starting point of the horizontal coordinate is the start time when the device corresponding to the process becomes available; the ending point of the horizontal coordinate is the starting point plus the standard working time of the process. S2032: Remove the orders in the occupied area of the taboo list from the taboo list. S2033: Add the current order to the completed area of the taboo list. S2034: Fill the occupied area of the taboo list.
7. The production order and production path scheduling method based on the ant colony algorithm according to claim 6, characterized in that The method for each ant to select the next order is as follows: S2041: Calculate the probability that an ant selects any order as the next order. The formula is as follows: ; Among them, D represents the current order, and both B and C represent sets of any order in; among them, the set includes all orders outside the taboo list; represents the probability of selecting order B as the next order; represents the pheromone concentration on the directed path DB, represents the pheromone concentration on the directed path DC, both obtained based on the pheromone matrix; represents the heuristic factor on the directed path DB; represents the heuristic factor on the directed path DC; is the pheromone regulation factor; S2042: Based on the probability that an ant selects each order as the next order, determine the selected next order through the roulette wheel algorithm. S2043: Update the current order to the selected next order.
8. The production order and production path scheduling method based on the ant colony algorithm according to claim 7, characterized in that, The calculation formula for the heuristic factor is as follows: ; Among them, represents the total number of devices involved in order D; represents the number of devices jointly involved in order D and order C; The expression for the pheromone adjustment factor is as follows: ; Where n represents the current iteration number; is the maximum number of iterations.
Citation Information
Patent Citations
Order production scheduling method, device, electronic device and readable medium
CN112966876B