A workshop scheduling task intelligent planning method and system
Patent Information
- Application Number
- CN202210616094.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-01
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-06-01
AI Technical Summary
显然,传统的车间调度的规划方案不能及时满足用户需求量
[0038] (1) Based on the actual project background, the project categories are divided into projects with the same urgency and projects with different urgency according to the urgency of project production. Different algorithms are designed for different types of projects to optimize the production process while ensuring normal project production, making the production process more intelligent and humanized.
Smart Images

Figure CN115169794B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of task planning, and in particular to an intelligent planning method and system for workshop scheduling tasks. Background Technology
[0002] Military industry production is the backbone of my country's military manufacturing. Intelligent military industry production, based on cyber-physical systems (CPS) intelligent equipment and smart factories, is leading a transformation in manufacturing methods. Shop floor scheduling is a crucial aspect of production management in military manufacturing enterprises. When these enterprises face complex and dynamic environments constrained by production resources, sound scientific decision-making in production scheduling and rapid, dynamic responses to market demands can not only improve equipment utilization and shorten product manufacturing cycles but also enhance product quality and reduce production costs. Therefore, how to utilize computer technology to optimize production scheduling plans, rapidly adjust resource allocation, coordinate production progress, and improve equipment utilization warrants in-depth research. Thus, establishing a universally applicable shop floor scheduling task planning model, designing intelligent algorithms suitable for the characteristics of shop floor scheduling task planning problems, and developing a complete shop floor scheduling task planning system have significant application value and practical implications. Building upon existing research, this paper examines the historical context and current state of workshop scheduling. Starting with theoretical research on workshop scheduling and its algorithms, it investigates the impact of production costs, part processing time in machines, and early / late completion on the production chain. A multi-objective flexible workshop scheduling model is constructed, and a production scheduling scheme is established using a specific processing example as the research object.
[0003] With the continuous development of science and technology, coupled with the significant meaning and value of workshop scheduling task planning for military products, the number of military products put into use will inevitably continue to increase. The number and types of users will also continue to expand, and the task demands put forward by users will increase rapidly. Clearly, traditional workshop scheduling planning schemes cannot meet user demands in a timely manner. Intelligent workshop scheduling task planning algorithms are the core content of workshop scheduling task planning. This invention considers task planning under three scenarios based on the actual workshop scheduling of military products: scheduling production for a single product; scheduling production for multiple products, where the urgency attributes of the products differ; and scheduling production for multiple products, where the urgency attributes of the products are the same.
[0004] Multi-objective optimization problems are those that use mathematical models and various techniques to solve problems under multiple comparison conditions. Since there is no inherent superiority or inferiority among the optimization objectives, finding the relatively optimal solution set is a commonly used approach. Currently, algorithms with intelligent features are the mainstream method for solving these problems.
[0005] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention provides an intelligent planning method for workshop scheduling tasks, comprising:
[0007] S1: Obtain production scheduling data for products to be manufactured, and determine the production scheduling type based on the production scheduling data;
[0008] S2: Obtain the corresponding production scheduling result based on the production scheduling type;
[0009] If the production scheduling type is: production scheduling of multiple products with different urgency levels, then the production scheduling result is obtained through the first greedy algorithm;
[0010] If the production scheduling type is: multiple products with the same urgency, the production scheduling result is obtained through a second greedy algorithm or a genetic algorithm.
[0011] Preferably, obtaining the production scheduling result through the first greedy algorithm specifically involves:
[0012] S21: Obtain the urgency level of all products, and sort the production of all products according to the urgency level;
[0013] S22: View the current production process of the current product according to the production sorting;
[0014] S23: Determine whether the production process of the current product has been traversed. If it has been traversed, proceed to step S24; otherwise, proceed to step S25.
[0015] S24: Output the first-level production scheduling result of the current product's production process; perform second-level production scheduling on the current product's production process based on the first-level production scheduling result to obtain the second-level production scheduling result; adjust the first-level production scheduling result based on the second-level production scheduling result to obtain the adjusted first-level production scheduling result; use the adjusted first-level production scheduling result as the production scheduling result for the current product; select the next product and return to step S22;
[0016] S25: Iterate through the department containers corresponding to the current production process to see if there is an idle period. If there is an idle period, insert the current production process into the idle period of the department container; update the department container, select the next production process for the current product, and return to step S22.
[0017] If the department container does not have an idle period, insert the current production process at the end of the department container, update the department container, select the next production process for the current product, and return to step S22.
[0018] Preferably, obtaining the production scheduling result through the second greedy algorithm specifically involves:
[0019] S21: Obtain all production processes for all products and store them in container C;
[0020] S22: Determine if container C is empty. If it is empty, proceed to step S23; otherwise, proceed to step S24.
[0021] S23: Output the first-level production scheduling results for all production processes of each product; perform second-level production scheduling for all production processes of each product based on the first-level production scheduling results, and obtain the corresponding second-level production scheduling results; adjust the first-level production scheduling results based on the second-level production scheduling results, and obtain the adjusted first-level production scheduling results; use the adjusted first-level production scheduling results as the production scheduling results for each product, output the production scheduling results for each product, and end the process;
[0022] S24: Sort all production processes of all products in container C by number, and select the nth production process in container C, with the initial value of n being 1;
[0023] Get the department container corresponding to the nth production process, and determine whether there are idle time periods between the data of each time period in the department container;
[0024] If it exists, insert the nth production process into the idle period position, update the department container, delete the nth production process from container C; make n = n + 1, and return to step S22;
[0025] If it does not exist, insert the nth production process at the end of the department container, update the department container, delete the nth production process from container C; make n = n + 1, and return to step S22.
[0026] Preferably, obtaining the production scheduling result through a genetic algorithm specifically involves:
[0027] S21: Obtain all products and initialize each product;
[0028] S22: Chromosome-encode the production process of each product to obtain the initial population;
[0029] S23: Determine whether the initial population meets the termination condition. If it does, proceed to step S24; otherwise, proceed to step S25.
[0030] S24: Decode the best individual in the current population, output the production scheduling result, and end the process;
[0031] S25: Calculate the next generation population using the current population, and determine whether the next generation population meets the termination condition. If it does, proceed to step S24; otherwise, repeat step S25.
[0032] A workshop scheduling task intelligent planning system includes:
[0033] The production scheduling type acquisition module is used to acquire production scheduling data of products to be produced and determine the production scheduling type based on the production scheduling data.
[0034] The production scheduling result acquisition module is used to obtain the corresponding production scheduling result according to the production scheduling type;
[0035] If the production scheduling type is: production scheduling of multiple products with different urgency levels, then the production scheduling result is obtained through the first greedy algorithm;
[0036] If the production scheduling type is: multiple products with the same urgency, the production scheduling result is obtained through a second greedy algorithm or a genetic algorithm.
[0037] The present invention has the following beneficial effects:
[0038] (1) Based on the actual project background, the project categories are divided into projects with the same urgency and projects with different urgency according to the urgency of project production. Different algorithms are designed for different types of projects to optimize the production process while ensuring normal project production, making the production process more intelligent and humanized.
[0039] (2) For projects with different urgency attributes, a greedy algorithm is used to schedule production. The production process is divided into first-level and second-level processes. First, the first-level processes of the projects are scheduled according to their urgency. Then, the second-level processes are scheduled based on the first-level process schedule. The results are then fed back to the first-level process schedule. Combining the advantages of the greedy algorithm, the results can be planned faster, so that urgent projects are prioritized for production and the project schedule is guaranteed.
[0040] (3) For projects with the same urgency level, two planning methods are designed: a greedy algorithm and a genetic algorithm. For the greedy algorithm, the granularity of the scheduling object is refined. All first-level processes of all projects are extracted, and the scheduling is carried out sequentially according to the start and end times of the processes, rather than on a project-by-project basis. This scheme ensures the accuracy of the scheduling results while enabling all projects to be produced in parallel on a macro level, making full use of production resources. For the genetic algorithm, the initial population is optimized by combining the greedy algorithm with the original algorithm, thereby improving the convergence and solution quality of the algorithm. By setting the objective function, in addition to ensuring the project completion rate, the workload of production workers can be evaluated, thereby making the entire production process of the project more intelligent and humanized. Attached Figure Description
[0041] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;
[0042] Figure 2 This is a system structure diagram of an embodiment of the present invention;
[0043] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0044] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0045] Reference Figure 1 This invention provides a workshop scheduling task intelligent planning method to solve the problems of complex randomness and dynamic constraints in the current production project. The current production project mainly has three production situations: (1) scheduling production for one product; (2) scheduling production for multiple products with different urgency levels; (3) scheduling production for multiple products with the same urgency level.
[0046] For the first and second cases, due to the constraints of individual products and urgency, intelligent optimization algorithms are not suitable for solving them. Therefore, greedy algorithms are used to schedule production in these two cases. The third case has a large degree of randomness, while genetic algorithms have the advantages of less time to find the optimal solution, faster convergence, and higher performance. Therefore, this method considers using either greedy algorithms or genetic algorithms to solve the problem, and finally selects the corresponding production schedule based on demand.
[0047] Specifically, it includes:
[0048] S1: Obtain production scheduling data for products to be manufactured, and determine the production scheduling type based on the production scheduling data;
[0049] S2: Obtain the corresponding production scheduling result based on the production scheduling type;
[0050] If the production scheduling type is: production scheduling of multiple products with different urgency levels, then the production scheduling result is obtained through the first greedy algorithm;
[0051] If the production scheduling type is: multiple products with the same urgency, the production scheduling result is obtained through a second greedy algorithm or a genetic algorithm.
[0052] In practice, the first-level scheduling result can be seen as assigning production tasks to each department. Therefore, the system first creates a container for each department to store the tasks that the department needs to do. The tasks in the department container are sorted in chronological order. The scheduling result will place the production tasks to the corresponding departments into the corresponding containers. When a department produces a task, it can simply retrieve the task from the container in sequence. For the case of scheduling only a single product, since the product's production process has a corresponding process route, the planned start time and planned end time of the product's process route are allocated sequentially according to the production start time given during scheduling. After allocating the time for each process, it is placed at the end of the corresponding department's container. Finally, the scheduling result is written to the database.
[0053] In this embodiment, obtaining the production scheduling result through the first greedy algorithm specifically means:
[0054] S21: Obtain the urgency level of all products, and sort the production of all products according to the urgency level;
[0055] S22: View the current production process of the current product according to the production sorting;
[0056] S23: Determine whether the production process of the current product has been traversed. If it has been traversed, proceed to step S24; otherwise, proceed to step S25.
[0057] S24: Output the first-level production scheduling result of the current product's production process; perform second-level production scheduling on the current product's production process based on the first-level production scheduling result to obtain the second-level production scheduling result; adjust the first-level production scheduling result based on the second-level production scheduling result to obtain the adjusted first-level production scheduling result; use the adjusted first-level production scheduling result as the production scheduling result for the current product; select the next product and return to step S22;
[0058] S25: Iterate through the department containers corresponding to the current production process to see if there is an idle period. If there is an idle period, insert the current production process into the idle period of the department container; update the department container, select the next production process for the current product, and return to step S22.
[0059] If the department container does not have an idle period, insert the current production process at the end of the department container, update the department container, select the next production process for the current product, and return to step S22.
[0060] In practice, when scheduling production for multiple products simultaneously, and these products have different urgency attributes, the urgency attribute of a product is used to define the priority of product production. The higher the urgency attribute, the higher the priority, and the product is expected to be produced first; conversely, the lower the urgency attribute, the lower the priority. Therefore, due to the different priorities of multiple products, the production scheduling process prioritizes each product based on its urgency attribute value, from highest to lowest. The scheduling process for each product is similar to that in Scenario 1. However, because of the multiple products, following Scenario 1 might result in numerous time fragments (idle periods) for each department, meaning departments wouldn't be working during these times, leading to resource waste. Therefore, instead of directly placing each process at the end of the corresponding department's container after scheduling, the system searches within the department's container for a suitable position for that process (i.e., searching for idle periods where the department has no production tasks and the planned start and end times of the process fall within this timeframe). The process is then inserted into that position. Due to constraints from the product's process route, the planned start and end times of all subsequent processes in the product's process route must be adjusted after insertion. If no suitable position exists in the department's container, the process is simply placed at the end of the container. Finally, the scheduling results are written to the database.
[0061] In this embodiment, obtaining the production scheduling result through the second greedy algorithm specifically means:
[0062] S21: Obtain all production processes for all products and store them in container C;
[0063] S22: Determine if container C is empty. If it is empty, proceed to step S23; otherwise, proceed to step S24.
[0064] S23: Output the first-level production scheduling results for all production processes of each product; perform second-level production scheduling for all production processes of each product based on the first-level production scheduling results, and obtain the corresponding second-level production scheduling results; adjust the first-level production scheduling results based on the second-level production scheduling results, and obtain the adjusted first-level production scheduling results; use the adjusted first-level production scheduling results as the production scheduling results for each product, output the production scheduling results for each product, and end the process;
[0065] S24: Sort all production processes of all products in container C by number, and select the nth production process in container C, with the initial value of n being 1;
[0066] Get the department container corresponding to the nth production process, and determine whether there are idle time periods between the data of each time period in the department container;
[0067] If it exists, insert the nth production process into the idle period position, update the department container, delete the nth production process from container C; make n = n + 1, and return to step S22;
[0068] If it does not exist, insert the nth production process at the end of the department container, update the department container, delete the nth production process from container C; make n = n + 1, and return to step S22.
[0069] In practice, when scheduling production for multiple products with the same urgency level, the system schedules these products simultaneously. First, the first production step for each product is taken out and placed in container C. These steps are then scheduled using a FIFO (First-In, First-Out) algorithm to find the step with the earliest planned start time. This step is then taken out and placed in the corresponding department's container. The planned start and end times of this step are adjusted according to the existing time schedules in the department's container. Next, the planned start and end times of all subsequent steps in the product's production process route are adjusted. Then, this step is removed from container C, and the next step in the product's production process route is taken out and placed in container C. The FIFO algorithm is then used again for scheduling, and this process is repeated until all steps for all products have been scheduled. Finally, the scheduling results are written to the database.
[0070] In this embodiment, obtaining the production scheduling result through a genetic algorithm specifically means:
[0071] S21: Obtain all products and initialize each product;
[0072] S22: Chromosome-encode the production process of each product to obtain the initial population;
[0073] S23: Determine whether the initial population meets the termination condition. If it does, proceed to step S24; otherwise, proceed to step S25.
[0074] S24: Decode the best individual in the current population, output the production scheduling result, and end the process;
[0075] S25: Calculate the next generation population using the current population, and determine whether the next generation population meets the termination condition. If it does, proceed to step S24; otherwise, repeat step S25.
[0076] In its implementation, the genetic algorithm used is a search algorithm based on natural selection and population genetic mechanisms. It simulates the reproduction, hybridization, and mutation phenomena in the natural selection and natural inheritance processes. When using a genetic algorithm to solve a problem, each possible solution is encoded as a "chromosome," i.e., an individual. Several individuals constitute a population (all possible solutions). At the beginning of the genetic algorithm, some individuals (i.e., initial solutions) are always randomly generated. Each individual is evaluated according to a predetermined objective function, and a fitness value is given. Based on this fitness value, some individuals are selected to generate the next generation. The selection operation reflects the principle of "survival of the fittest." "Good" individuals are used to generate the next generation, while "bad" individuals are eliminated. Then, the selected individuals are recombined through crossover and mutation operators to generate a new generation. Individuals in this generation inherit some good traits from the previous generation, so their performance is better than the previous generation. In this way, they gradually evolve towards the optimal solution. Therefore, the genetic algorithm can be regarded as a preliminary evolutionary process of a population composed of feasible solutions.
[0077] The specific steps of the genetic algorithm are as follows:
[0078] 1. Construct the initial population and randomly generate N encoded chromosomes;
[0079] 2. Calculate the fitness value for each chromosome;
[0080] 3. Check if the termination condition is met. If it is, output the result; otherwise, continue to step 4.
[0081] 4. Select from the current population using a roulette wheel selection method;
[0082] 5. Perform crossover operations on the population;
[0083] 6. Perform mutation operations on the population;
[0084] 7. Form the next generation of population and continue the cycle of step 2.
[0085] Here is a specific example of using genetic algorithms for production planning and scheduling:
[0086] I. Mathematical Description
[0087] For a production plan scheduling of N workers, H jobs, P pieces of equipment, and Q time slices, the mathematical description is as follows:
[0088] Worker set G = {g1, g2, ... g} n ,…g N}, where g n Let y1, y2, ..., y be the number of workers. Each worker can perform multiple jobs, and the number of jobs corresponding to each worker is {y1, y2, ..., y3}. n ,…yN}, where y n This represents the number of types of work that the nth worker can complete;
[0089] Working set K = {k1,k2,…k h ,…k H}, where K h This represents the h-th task. Each project may contain multiple tasks that need to be performed, such as parts processing, inspection, testing, etc.
[0090] The set of devices R = {r1, r2, ... r} p ,…r P}, where r p This represents the p-th processing equipment;
[0091] Time slice set T = {t1, t2, ... t q ,…t Q}, where t q This represents the q-th time slice;
[0092] j: The j-th process;
[0093] Work k h Total number of processes;
[0094] Work k h The j-th process;
[0095] Time to complete each task;
[0096] Work k h The j-th process in machine r p Processing time;
[0097] Work k h The number of equipment options available for the j-th process;
[0098] Work k h The completion time of the j-th process;
[0099] Work k h The start time of the j-th process;
[0100] Indicate process In device r p Upward processing, Indicates other.
[0101] II. Constraint Handling
[0102] Hard constraints:
[0103] (a) Within the same time frame, a worker can only be assigned one task;
[0104] (b) Within the same time slice, a device can only perform one task;
[0105] (c) Within the same time slot, a job can only be scheduled once;
[0106] (d) In sequential operations, the timing of subsequent operations must follow that of preceding operations. In parallel operations, the current consideration is to limit the parallel execution of two operations.
[0107] Soft constraints:
[0108] (a) Try to ensure that the time allotted to workers is relatively even;
[0109] (b) The time allocation for different processes in the same work should be appropriate.
[0110] III. Genetic Algorithm Design
[0111] The primary task in researching and solving the production planning and scheduling problem based on genetic algorithms is to map each element of the genetic algorithm to a one-to-one correspondence with the elements of the production planning and scheduling problem. The specifics are as follows:
[0112] a) Genes
[0113] Level 1 plan: Combine projects, departments, and tasks, and then allocate time slices to them to form a gene;
[0114] Second-level planning: Combines projects, equipment, work, and processes to form a project-equipment-work-process pair. Each pair is then associated with a time slice and a worker, which is a method of arranging a work process. This serves as the smallest unit and a gene in the entire production planning and scheduling problem.
[0115] In the secondary plan, each process in each work is combined with all corresponding equipment. Then, redundant combinations are randomly deleted, leaving only one combination, namely the one-to-one correspondence between equipment, work and process.
[0116] For example: If the process a of job X can be performed on equipment 1, 2, 3, and 4, then first list all possible combinations: Xa-1, Xa-2, Xa-3, Xa-4. Then randomly delete 3 of them and keep only one as the gene, i.e., job X - process a - equipment.
[0117] b) Selecting operators
[0118] Based on the calculated fitness values, the roulette wheel method is used for selection;
[0119] c) Chromosomes
[0120] Level 1 Plan: All genes "project-department-task-time" are combined into a chromosome;
[0121] Secondary plan: All genes "project-equipment-work-process-time-worker" are combined into a chromosome;
[0122] d) Fitness function
[0123] 1) Task completion rate: 1 if the project delivery date is before the specified date, otherwise 0. Calculate the proportion of tasks completed within a fixed period to the total number of tasks.
[0124] 2) Evaluation is based on the uniformity of worker performance;
[0125] e) Initial population
[0126] It consists of a certain number of randomly generated chromosome combinations, and the size of the computation space of the genetic algorithm is determined by it;
[0127] f) Crossover operator
[0128] Genes from two chromosomes are exchanged with a certain probability to create a new chromosome. A single-point crossover method can be used.
[0129] g) Mutation operator
[0130] Genes in the selected chromosome are altered according to a certain probability to generate a new chromosome;
[0131] h) Termination conditions
[0132] 1) Set the maximum value for the fitness value;
[0133] 2) Set an upper limit on the number of iterations;
[0134] 3) Set a minimum threshold. If the difference between the average fitness values of individuals across multiple generations is less than the set value, the evolution process will terminate.
[0135] Set a limit threshold; evolution terminates when the variance of the fitness values of all individuals is less than the set value.
[0136] IV. Coding Design
[0137] In the first-level plan, a common coding method is used, in which projects, departments and tasks are paired, and then a time slice is assigned to each pair to form a gene. When all pairs have been assigned a time slice, all genes have been formed, and all genes are combined to form a chromosome, which is a scheduling method in the first-level plan.
[0138] In the secondary planning stage, this system employs a three-dimensional coding method for gene encoding. A three-dimensional spatial structure is established by constructing a Cartesian coordinate system. Projects, tasks, processes, and equipment are mapped to four components on the X-axis; the Y-axis represents time slices, with one day as a time unit; and the Z-axis represents worker numbers, with each worker corresponding to a coordinate value on the Z-axis. After the three-dimensional space is established, the spatial block formed by the X, Y, and Z coordinates constitutes a gene. When all genes in the space are assigned values, a chromosome is formed, which is one scheduling method in the secondary planning stage.
[0139] V. Design of the Fitness Function
[0140] Traditional genetic algorithms have relatively simple fitness function designs. This paper improves the fitness function design based on the actual business needs of production planning and scheduling, focusing on aspects such as production output, number of completed tasks, and work uniformity to meet the constraints of production planning and scheduling. The preliminary design includes the following fitness values:
[0141] 1) Task completion rate
[0142] The value is 1 if the project delivery date is before the specified date, otherwise it is 0.
[0143] The function is as follows:
[0144]
[0145]
[0146] Where: F represents the task completion status, with a value of 1 if completed before the specified date and 0 otherwise. n represents the total number of tasks, F(i) represents the completion status of task i, and P represents the task completion rate; a higher task completion rate indicates greater production output.
[0147] 2) Expected value of worker working hours distribution
[0148] The expected value of worker time distribution reflects the intensity of workers' working hours, as shown in the following formula:
[0149] dij=ε1|ri-rj|+ε2|pi-pj|+ε3min(|sj-s'i|,|si-s'j|)
[0150]
[0151] Where ri and rj represent the working days for processes i and j, respectively.
[0152] pi and pj represent working hours, respectively.
[0153] si, sj — represent the start time points respectively.
[0154] s'i, s'j — represent the end time points respectively.
[0155] ε1, ε2, ε3 — represent the time interval between two processes, and time interval coefficients can be set.
[0156] Q represents the task scheduling intensity. The smaller the intensity, the smaller the value, indicating that the workers are assigned a smaller time intensity.
[0157] The fitness function is designed as a weighted function, with all weights assignable, as shown in the following formula:
[0158] F = αP + βQ
[0159] Where: F represents the weighted result, i.e., the fitness value; α and β represent the weight ratios; P represents the task completion rate; and Q represents the expected value of the worker's working hours distribution. Different weight values can be assigned to the two cases according to actual needs. The initial default weight values are both 0.5, i.e., α = β = 0.5.
[0160] VI. Conflict Detection
[0161] Conflict detection is used to check whether the production planning and scheduling results meet hard constraints.
[0162] a) Worker conflict detection
[0163] Step 1: Locate the Z-axis coordinate of the first worker.
[0164] Step 2: Locate the Y-axis coordinate of the first time slice.
[0165] Step 3: For the Y-axis and Z-axis coordinates, check the values on the X-axis coordinate one by one. If the value of one space block is 1, it means that the worker only has one production task in this time period and there is no scheduling conflict. If the value of two or more space blocks is 1, it means that the worker has multiple production tasks in this time period and there is a scheduling conflict. This chromosome needs to be modified and reassigned.
[0166] Step 4: Locate the second time slice coordinate on the Y-axis, and repeat step 3 until the last time slice.
[0167] Step 5: Locate the second worker's coordinate on the Z-axis, and repeat steps 2, 3, and 4 until the last worker.
[0168] b) Equipment conflict detection
[0169] Step 1: Find the first device in the list of all available devices.
[0170] Step 2: Locate the first time slice on the Y-axis and check if there are 1 or 0 production tasks for the equipment on this time slice. If so, it means there is no conflict in the equipment scheduling, and continue checking; if not, it means that two production tasks have been assigned to the equipment at one time, and there is a scheduling conflict, so the chromosome value needs to be reset.
[0171] Step 3: Locate the next time slice for the Y-axis coordinate, and continue to monitor the equipment scheduling tasks using the same method as in Step 2 until the last time slice.
[0172] Step 4: Find the second device in the device list, and repeat steps 2 and 3 until the last device.
[0173] c) Job conflict detection
[0174] Step 1: Locate the first job in the pending worksheet.
[0175] Step 2: Locate the first time slice on the Y-axis and check if there are 1 or 0 production tasks for this job on this time slice. If so, it means that there is no conflict for this job, and continue checking; if not, it means that two production tasks were assigned to this job at one time, and there is a job conflict, and the chromosome value needs to be reset.
[0176] Step 3: Locate the next time slice for the Y-axis coordinate, and continue detecting the task using the same method as in Step 2 until the last time slice.
[0177] Step 4: Continue with the second task, repeating steps two and three until the last task.
[0178] refer to Figure 2 This invention provides a workshop scheduling task intelligent planning system, comprising:
[0179] The production scheduling type acquisition module is used to acquire production scheduling data of products to be produced and determine the production scheduling type based on the production scheduling data.
[0180] The production scheduling result acquisition module is used to obtain the corresponding production scheduling result according to the production scheduling type;
[0181] If the production scheduling type is: production scheduling of multiple products with different urgency levels, then the production scheduling result is obtained through the first greedy algorithm;
[0182] If the production scheduling type is: multiple products with the same urgency, the production scheduling result is obtained through a second greedy algorithm or a genetic algorithm.
[0183] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0184] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the unit claims listing several devices, several of these devices may be embodied by the same hardware item. The use of the terms first, second, and third, etc., does not indicate any order and can be interpreted as identifiers.
[0185] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for intelligent planning of workshop scheduling tasks, characterized in that, include: S1: Obtain production scheduling data for products to be manufactured, and determine the production scheduling type based on the production scheduling data; S2: Obtain the corresponding production scheduling result based on the production scheduling type; If the production scheduling type is: production scheduling of multiple products with different urgency levels, then the production scheduling result is obtained through a greedy algorithm; If the production scheduling type is: multiple products with the same urgency, the production scheduling result is obtained through a genetic algorithm; The process of obtaining the production scheduling result through a greedy algorithm is as follows: S211: Obtain the urgency level of all products, and sort the production of all products according to the urgency level; S212: View the current production process of the current product according to the production sorting; S213: Determine whether the production process of the current product has been traversed. If it has been traversed, proceed to step S214; otherwise, proceed to step S215. S214: Output the first-level production scheduling result of the current product production process; perform second-level production scheduling for the current product production process based on the first-level production scheduling result, and obtain the second-level production scheduling result; Adjust the primary production schedule based on the secondary production schedule results to obtain the adjusted primary production schedule results; use the adjusted primary production schedule results as the production schedule results for the current product; select the next product and return to step S212; S215: Iterate through the department containers corresponding to the current production process to see if there is an idle period. If there is an idle period, insert the current production process into the idle period of the department container; update the department container, select the next production process for the current product, and return to step S212. If there is no idle period in the department container, insert the current production process at the end of the department container, update the department container, select the next production process for the current product, and return to step S212. The process of obtaining the production scheduling results through a genetic algorithm is as follows: S231: Obtain all products and initialize each product; S232: Chromosome coding is performed on the production process of each product. All genes "project-department-task-time" are combined into one chromosome, and all genes "project-equipment-work-process-time-worker" are combined into one chromosome to obtain the initial population; S233: Determine whether the initial population meets the termination condition. If it does, proceed to step S234; otherwise, proceed to step S235. S234: Decode the best individual in the current population, output the production scheduling result, and end the process; S235: Calculate using the current population, including: ① Constructing the initial population by randomly generating N encoded chromosomes; ② Calculating the fitness value of each chromosome; ③ Determining if the termination condition is met. If met, output the result; otherwise, continue to step ④; ④ Selecting from the current population using a roulette wheel selection method; ⑤ Performing crossover on the population; ⑥ Performing mutation on the population; ⑦ Forming the next generation population and continuing to cycle through step ②; Obtaining the next generation population and determining if it meets the termination condition. If it does, proceed to step S234; otherwise, repeat step S235. The task completion rate function of the genetic algorithm is as follows: Where: F represents the task completion status, with a value of 1 if the task is completed before the specified date and 0 otherwise; where n represents the total number of tasks, F(i) represents the completion status of task i, and P represents the task completion rate, with a higher completion rate indicating greater production output; the value is 1 if the project delivery date is before the specified date and 0 otherwise. The formula for calculating the expected value of worker working hours distribution is: Where ri and rj are the working days for processes i and j, respectively; pi and pj represent the working time periods; si and sj represent the start time points; s'i and s'j represent the end time points; ε1, ε2, and ε3 represent the settable time period coefficients between two processes; Q represents the task scheduling density. The smaller the density, the smaller the value, indicating that the worker is assigned a smaller time density. The fitness function is designed as a weighted function, with all weights assignable, as shown in the following formula: in: The weighted result, i.e., the fitness value, is represented by α and β, which represent the weight ratios, P, which represents the task completion rate, and Q, which represents the expected value of the worker's working hours distribution.
2. A workshop scheduling task intelligent planning system, characterized in that, include: The production scheduling type acquisition module is used to acquire production scheduling data of products to be produced and determine the production scheduling type based on the production scheduling data. The production scheduling result acquisition module is used to obtain the corresponding production scheduling result according to the production scheduling type; If the production scheduling type is: production scheduling of multiple products with different urgency levels, then the production scheduling result is obtained through a greedy algorithm; If the production scheduling type is: multiple products with the same urgency, the production scheduling result is obtained through a genetic algorithm; The process of obtaining the production scheduling result through a greedy algorithm is as follows: S211: Obtain the urgency level of all products, and sort the production of all products according to the urgency level; S212: View the current production process of the current product according to the production sorting; S213: Determine whether the production process of the current product has been traversed. If it has been traversed, proceed to step S214; otherwise, proceed to step S215. S214: Output the first-level production scheduling result of the current product production process; perform second-level production scheduling for the current product production process based on the first-level production scheduling result, and obtain the second-level production scheduling result; Adjust the primary production schedule based on the secondary production schedule results to obtain the adjusted primary production schedule results; use the adjusted primary production schedule results as the production schedule results for the current product; select the next product and return to step S212; S215: Iterate through the department containers corresponding to the current production process to see if there is an idle period. If there is an idle period, insert the current production process into the idle period of the department container; update the department container, select the next production process for the current product, and return to step S212. If there is no idle period in the department container, insert the current production process at the end of the department container, update the department container, select the next production process for the current product, and return to step S212. The process of obtaining the production scheduling results through a genetic algorithm is as follows: S231: Obtain all products and initialize each product; S232: Chromosome coding is performed on the production process of each product. All genes "project-department-task-time" are combined into one chromosome, and all genes "project-equipment-work-process-time-worker" are combined into one chromosome to obtain the initial population; S233: Determine whether the initial population meets the termination condition. If it does, proceed to step S234; otherwise, proceed to step S235. S234: Decode the best individual in the current population, output the production scheduling result, and end the process; S235: Calculate using the current population, including: ① Constructing the initial population by randomly generating N encoded chromosomes; ② Calculating the fitness value of each chromosome; ③ Determining if the termination condition is met. If met, output the result; otherwise, continue to step ④; ④ Selecting from the current population using a roulette wheel selection method; ⑤ Performing crossover on the population; ⑥ Performing mutation on the population; ⑦ Forming the next generation population and continuing to cycle through step ②; Obtaining the next generation population and determining if it meets the termination condition. If it does, proceed to step S234; otherwise, repeat step S235. The task completion rate function of the genetic algorithm is as follows: Where: F represents the task completion status, with a value of 1 if the task is completed before the specified date and 0 otherwise; where n represents the total number of tasks, F(i) represents the completion status of task i, and P represents the task completion rate, with a higher completion rate indicating greater production output; the value is 1 if the project delivery date is before the specified date and 0 otherwise. The formula for calculating the expected value of worker working hours distribution is: Where ri and rj are the working days for processes i and j, respectively; pi and pj represent the working time periods; si and sj represent the start time points; s'i and s'j represent the end time points; ε1, ε2, and ε3 represent the settable time period coefficients between two processes; Q represents the task scheduling density. The smaller the density, the smaller the value, indicating that the worker is assigned a smaller time density. The fitness function is designed as a weighted function, with all weights assignable, as shown in the following formula: in: The weighted result, i.e., the fitness value, is represented by α and β, which represent the weight ratios, P, which represents the task completion rate, and Q, which represents the expected value of the worker's working hours distribution.