A workshop integrated scheduling system based on order management and rolling optimization scheduling
By separating the order management system from the production scheduling optimization system, and combining the analytic hierarchy process (AHP) and genetic algorithm, the problems of long algorithm time and the influence of dynamic factors in medium-to-large-scale workshop scheduling problems are solved. This achieves efficient and dynamic scheduling optimization, improving production efficiency and the adaptability of scheduling schemes.
Patent Information
- Application Number
- CN202211301557.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-24
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-10-24
AI Technical Summary
Existing technologies for medium- to large-scale workshop scheduling problems suffer from issues such as long algorithm execution time, low efficiency, difficulty in handling dynamic factors, and discrepancies between static order priority settings and actual conditions. This results in significant differences between the scheduling scheme and actual production, making it difficult to meet production demands.
By separating the order management system from the production scheduling optimization system, the order priority is evaluated using the analytic hierarchy process (AHP) and static scheduling optimization is performed using a genetic algorithm. A scheduling window is set for rolling optimization, and the priority is dynamically adjusted. The influence of dynamic factors is separated from the static scheduling planning, thereby reducing the complexity of the problem.
It improves the efficiency of solving medium-to-large-scale workshop scheduling problems, reduces algorithm time, enables dynamic adjustment of order priorities, and ensures the practicality and production efficiency of the scheduling scheme.
Smart Images

Figure CN115471133B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent production scheduling technology, and relates to a workshop operation scheduling platform that separates the order management system and the production scheduling optimization system. It uses the analytic hierarchy process to evaluate the priority of the order system and uses a genetic algorithm to achieve the final operation scheduling. Background Technology
[0002] With the widespread application of computer and automation technologies, intelligent manufacturing has developed rapidly. Production scheduling, as the core foundation for the intelligent transformation and upgrading of manufacturing, directly impacts the advancement of management techniques and the efficiency of manufacturing processes. The essence of production scheduling optimization is a resource allocation problem, namely, allocating limited resources to several tasks while simultaneously satisfying constraints such as processing sequence and delivery time, in order to optimize a specific objective.
[0003] However, in actual production processes, many traditional manufacturing enterprises in my country still rely on production experience for manual workshop scheduling. This method is slow, inefficient, increases operating costs and time, cannot guarantee the accuracy of scheduling data, and makes it difficult to obtain a good scheduling solution. Therefore, in-depth research on the Job-Shop Scheduling Problem (JSP) is of great significance and value.
[0004] The Job Shop Scheduling (JSP) problem is characterized by its discrete nature, complexity, dynamic randomness, multi-objective nature, and multiple constraints, making it a typical NP-hard problem. Currently, solutions to the JSP problem mainly fall into two categories: exact algorithms and approximate algorithms. Exact algorithms include branch and bound, mixed integer programming, and Lagrange relaxation methods. While these algorithms can guarantee a globally optimal solution, they are time-consuming and costly, and can only solve small-scale job shop scheduling problems, falling short of practical application requirements. Approximate algorithms include constructive methods, artificial intelligence methods, and metaheuristic algorithms, including genetic algorithms and particle swarm optimization. Constructive methods tend to be coarse in their approach, often yielding solutions of insufficient quality. Heuristic algorithms, such as genetic algorithms, are simple in structure, versatile, and possess excellent global search capabilities and high optimization performance, making them the mainstream methods for solving the job shop scheduling problem. However, they still have the following limitations:
[0005] 1. When the problem size is small, the genetic algorithm can quickly and well provide the optimal scheduling scheme; however, for medium and large-scale workshop scheduling problems, due to the increase in the dimension of the solution space, the genetic algorithm takes longer and is prone to premature convergence, which eventually leads to a decrease in solution efficiency and the phenomenon of suspension.
[0006] 2. The process of scheduling production is a static scheduling solution process. However, in actual production, due to dynamic factors such as changes in order quantity, order insertion, cancellation and other events, the actual results may differ significantly from the theoretical model. If only quantitative static problems are considered, the algorithm will be limited to the theoretical level, thereby reducing the practical value of the algorithm.
[0007] 3. Currently, when describing workshop scheduling problems, the priority of orders is given as a fixed value. However, in actual production, due to the approaching delivery date and other factors, the order priority should change dynamically, which does not match the actual situation.
[0008] In Chinese patent CN114926033A (A Flexible Workshop Dynamic Event Scheduling Method Based on Improved NSGAII), for order insertion events, the current state of already scheduled jobs is distinguished, and the insertion jobs are rescheduled along with unprocessed jobs. In Chinese patent CN107831745B (A Flexible Workshop Order Insertion Dynamic Scheduling Optimization Method), the processes of batch workpieces are divided into sub-batches, and each sub-batch is scheduled. However, Chinese patent CN114926033A handles order insertion events by rescheduling all remaining orders. When dealing with large-scale job scheduling problems, the algorithm is time-consuming, inefficient, and costly. Chinese patent CN107831745B merely batches workpieces without considering priority. If a new order enters the order system, assuming its initial priority is not high, its priority (urgency) will naturally increase as production progresses and the delivery date approaches. Simply batching cannot guarantee on-time order completion. Furthermore, this patent does not perform dynamic batching optimization in the context of continuously adding new orders. Summary of the Invention
[0009] The purpose of this invention is to provide a workshop integrated scheduling system based on order management and rolling optimization scheduling to meet the dynamic scheduling needs of medium-to-large-scale workshops (e.g., with a scale of more than 1000 dimensions) that take into account job preparation time, reduce algorithm time consumption, obtain the scheduling solution that minimizes the maximum completion time, improve production efficiency, and solve the shortcomings of the existing technology.
[0010] The workshop integrated scheduling system of this invention comprises two parts: an order management system and a production scheduling optimization system. Orders flow unidirectionally within both systems. The order management system generates priorities for orders and re-priorsifies orders not yet submitted to the production scheduling optimization system in response to new orders, order insertions, and the passage of time. This separates order insertion events from the order scheduling optimization process of the production scheduling optimization system, allowing the system to implement order scheduling using static scheduling optimization strategies (without requiring dynamic scheduling optimization strategies). This reduces the complexity of order scheduling, decreases algorithm latency, and improves production efficiency.
[0011] Orders entering the production scheduling optimization system from the order management system are scheduled and executed. The production scheduling optimization system's order processing is not interrupted by order insertion events. Order insertion only affects the order's ranking in the order management system and has no impact on the production scheduling optimization system. Although this may cause delays in processing order insertions, the production scheduling optimization system of this invention uses a smaller scheduling window, thus minimizing the delay caused by each scheduling and processing of orders within the scheduling window. Since the workpiece processing time is much longer than the scheduling program's running time, the former is the main reason for the processing delay of order insertions. Generally, for workpieces with long processing times (tens of minutes or hours), the window length is no more than 20; for workpieces with short processing times (hundreds of seconds or minutes), the window length can be set to 50 or longer, depending on the specific situation. Furthermore, the order management system sorts (schedules) order insertions according to priority, ensuring that high-priority order insertions enter the scheduling window and are scheduled and processed in the next scheduling, thereby keeping the overall processing delay of order insertions at a low level and avoiding timeout events, while significantly reducing the overall complexity of order scheduling.
[0012] Correspondingly, the scheduling window should not be too small. An excessively small scheduling window leads to a decrease in the efficiency of the locally optimal solution found for the scheduling problem in terms of the global picture (a large gap with the global optimal solution). Therefore, this invention seeks a reasonable balance between scheduling complexity, order insertion delay, and the effectiveness of the scheduling solution by setting a scheduling window that unidirectionally transmits orders to be scheduled between the order management system and the production scheduling optimization system.
[0013] To achieve the above objectives, the present invention is implemented through the following technical solution:
[0014] A workshop integrated scheduling system based on order management and rolling production optimization. The platform includes two parts: an order management system and a production optimization system. The specific operation steps are as follows:
[0015] Step 1: The order management system collects new orders and organizes all orders in real time.
[0016] Step 2: Prioritize orders in the order management system based on the analytic hierarchy process.
[0017] Step 3: Sort the orders according to their priority.
[0018] Step 4: Determine the optimization window length. The scheduling optimization system retrieves a series of high-priority orders from the order system based on the window length, and performs static scheduling optimization on these orders using a genetic algorithm. The specific steps of the scheduling optimization are as follows:
[0019] Step 4.1: Initialize relevant parameters.
[0020] Step 4.2: Determine the chromosome encoding method and generate the initial population.
[0021] Step 4.3: Generate scheduling schemes and evaluate the fitness values of individuals.
[0022] Step 4.4: Perform selection, crossover, and mutation operations.
[0023] Step 4.5: Terminate the loop.
[0024] Step 5: Display the optimal scheduling scheme for the orders to be optimized in the optimization window and draw a Gantt chart.
[0025] Step 6: Update the order management system and correct the priority of orders in the order management system. Repeat steps 2-5.
[0026] The invention is further characterized by:
[0027] Step 1: The order management system operates independently of the production scheduling optimization system. It stores all order information and receives new orders in real time. Orders already in the production scheduling optimization system do not need to be rolled back to the order management system. During the scheduling and processing of orders in the production scheduling optimization system, orders in the current scheduling window will not be interrupted or interfered with by other orders (including inserted orders) until they are completed.
[0028] Step 2, prioritizing orders in the order management system based on the analytic hierarchy process (AHP), consists of two parts: scoring new orders and adjusting the scores of existing orders. Before the evaluation, the following must be done:
[0029] 1. Determine the evaluation indicators. Select order delivery time (T), material cost (C), order revenue (P), and customer creditworthiness (Q) as priority evaluation indicators. Here, order delivery time refers to the length of time between the current date and the delivery date; material cost includes raw materials, machine wear and tear, etc.; order revenue refers to the profit obtained from completing the order; and customer creditworthiness mainly refers to the customer's credit level.
[0030] 2. Quantitative Evaluation Scale. Material cost, order revenue, and customer qualification are discretized and divided into 5 levels, with each level corresponding to a score of 1, 3, 5, 7, and 9. The order revenue and customer qualification scores, from low to high, correspond to the following levels: low, relatively low, average, relatively high, and high. The material cost scores, from low to high, correspond to the following levels: high, relatively high, average, relatively low, and low.
[0031] 3. Weight Vector Calculation. The weight vector ω for each part is determined by scoring from multiple experienced experts in the field. T ω C ,ωP,ω Q .
[0032] Use SC S P S Q Let S represent the scores for material cost, order revenue, and customer qualifications, respectively. The final score for a new order is then expressed as: Score = S C *ω C +S P *ω P +S Q *ω Q -T*ω T For an order with a delivery time of 10 days, and C, P, and Q are {lower, average, higher} respectively, then the corresponding scores are {7, 5, 9}. Let ω T ω C ω P ω Q The values are 0.3, 0.2, 0.3, and 0.2 respectively. Therefore, the final score for this order is 7*0.2+5*0.3+9*0.2-10*0.3=1.7.
[0033] The score adjustment for existing orders is New_Score = Score + ΔT * ω T Where ΔT is the time the order stays in the order management system. Taking the above order as an example, if it stays in the system for 5 days, its score will be adjusted to 1.7 + 5 * 0.3 = 3.2.
[0034] Step 3 sorts orders in descending order based on their scores. Higher scores indicate higher priority or urgency, and these orders are prioritized for optimization and scheduling within the production scheduling system. For order insertion events, those with the highest scores are automatically placed at the top of the system to minimize processing delays.
[0035] In step 4, the optimization window length can be adjusted in real time based on order size and workpiece status. Generally, for workpieces with long processing times (tens of minutes or hours), the window length should not exceed 20. For workpieces with short processing times (hundreds of seconds or minutes), the window length can be set to 50 or longer, depending on the actual situation. The frequency at which the scheduling optimization system retrieves orders from the order management system and performs scheduling optimization can be adjusted in real time according to different order statuses. For example, when no urgent orders appear, the scheduling optimization system retrieves a batch of orders to be optimized every 5 minutes. When a new urgent order is added, it has the highest score and is placed at the top of the order management system. After the scheduling system completes the preceding scheduling tasks, it immediately performs scheduling optimization on the orders in the new window. During production, the optimization window size is determined based on the actual situation, and the scheduling optimization system retrieves the corresponding orders from the optimization window for scheduling optimization.
[0036] Step 4.1 The relevant parameters include the population size S, which is generally 10 to 50; the crossover probability Pc, which is generally 0.4 to 0.99; the mutation probability Pm, which is generally 0.001 to 0.1; and the termination condition gen, which is 10 to 50 iterations.
[0037] Step 4.2 The encoding method is specifically implemented as follows: For n workpieces, each workpiece contains m... i If there are (i = 1, 2, ..., n) processes, then let the code length be L = A chromosome is represented by a randomized sequence of 1, 2, ..., L integers, written as a one-dimensional vector. For example, for 3 workpieces, each with operations 2, 3, and 4, the chromosome length is 2 + 3 + 4 = 9. Integers 1 and 2 represent the 2 operations of the first workpiece; 3, 4, and 5 represent the 3 operations of the second workpiece; and 6, 7, 8, and 9 represent the 4 operations of the third workpiece. Therefore, [7, 6, 9, 3, 1, 5, 2, 8, 4] can represent a chromosome individual for a workpiece. The values in the value sequence of chromosome individuals in the population represent the operations of the workpiece, and the value sequence has an order, thus the chromosome individual also represents the processing scheduling order (execution order of each operation) of the order to be optimized.
[0038] Step 4.3 The fitness of an individual is evaluated using the maximum completion time. The optimization objective is defined as minimizing the maximum completion time of all orders in the entire window. The optimization process also needs to satisfy the following constraints:
[0039] a. A machine can only process one workpiece at a time, meaning that the preparation time for a subsequent task on the machine must not be earlier than the completion time of the preceding task.
[0040] b. The same process for the same workpiece can only be processed by one machine at the same time.
[0041] c. Once each process for a workpiece begins, it must not be interrupted.
[0042] d. Interruptions are allowed between each process step of each workpiece.
[0043] e. There is no sequential constraint between the processes of different workpieces, but there is a sequential constraint between the processes of the same workpiece.
[0044] The methods for generating scheduling schemes and calculating individual fitness are as follows:
[0045] a. Read the order information in the optimization window and convert it into a task table task_set. Each task corresponds to a certain process of a certain workpiece. The task table includes: sequence number, workpiece, process, allowed machine type number, preparation time, and processing time.
[0046] b. Read the machine_set table, including the sequence number, machine type, start time, and end time. The start time is always 0, and the end time is set to a large number, such as 20000.
[0047] c. Initialize an array processor to record the preceding tasks. The array has a dimension of n×2, where n is the number of jobs in the scheduling window (window size) and is initialized to 0. The first column is used to record the processing progress j of the i-th job, and the second column is used to record the time required to complete the processing of the i-th job at progress j (and its preceding processes).
[0048] d. Initialize an array temp_result to temporarily store the scheduling results. The array has a dimension of 1×7, and each column represents: sequence number, workpiece, operation, allowed machine type, start time, end time, and the machine where the processing is performed.
[0049] e. Initialize a three-dimensional array f_result to record the final scheduling results, with dimensions of population size S × encoding length L × 7.
[0050] f. Read each row (individual) and each column (value sequence of the individual) of the population in sequence. According to the principle of transferring the previous task record to the corresponding subsequent task, arrange the job and store the scheduling result in temp_result. At the same time, update the processor array. Taking the individual [7,6,9,3,1,5,2,8,4] in step 4.2 as an example, the first digit of the value sequence is 7 (representing a task). From the task_set table, we obtain the second process of the third workpiece corresponding to "7". Since the record in the first column of the third row (the third workpiece) of the processor array (dimension 3×2) is 0, indicating no preceding task record, we need to search the task_set table for the first process of the third workpiece (the preceding task): 6 (task number 6), and schedule production (to obtain the production time of this process). Then, we update the number in the first column of the third row of the processor to 6 (task number 6), and update the second column to the processing time of task number 6. Finally, we store the relevant information of task number 6 into temp_result, thus completing the processing of the first digit "7" of the individual's value sequence. Next, we continue processing the second digit "6" of the individual's value sequence, updating the processor array according to the task_set table in a similar manner. Similarly, if the value in the first column of the i-th row of the processor is not 0, let's call it 'a', indicating that process a of part i has been completed. In this case, we should find the (a+1)-th process that part i has not yet been executed and schedule it. We then use functions like `vstack` in Python (which stacks arrays vertically (rows) sequentially) to stack the scheduling results (temp_result) each time, accumulating the processing time of the workpiece. After traversing one chromosome, we obtain a 9×7 two-dimensional array (9 is the chromosome encoding length L, and each row of this array has the same structure as temp_result). The largest number in the sixth column of the array is the maximum completion time of that individual, which is also its fitness.
[0051] g. Store the two-dimensional array obtained in f into f_result, which represents the scheduling result of the first individual in the population. After iterating through the population size S times, the final dimension of f_result is S×L×7.
[0052] Step 4.4 The selection operation uses the roulette wheel selection method, where the selection probability is proportional to the fitness. Since fitness is the maximum completion time, individuals selected in this way are considered to be of poor performance. Therefore, crossover and mutation operations are performed on the selected individuals.
[0053] Step 4.4 Crossover and mutation operations are performed asexually, meaning that the offspring chromosome is generated from a parent chromosome. Specifically, for the crossover operation, two gene segments of length C (L / 2>C>1) are randomly selected from the parent chromosome and then these two gene segments are exchanged. For the mutation operation, two gene points are randomly selected from the parent chromosome and these two gene points are exchanged.
[0054] Step 4.5 terminates the loop when the maximum number of iterations gen is reached.
[0055] Step 5: In each iteration, the minimum fitness value of each of the S chromosomes in that generation and the corresponding scheduling scheme are recorded. When the termination condition is met, the final recorded result is the optimal scheduling result, and the final scheduling scheme is displayed in the form of a Gantt chart.
[0056] Step 6: After completing the scheduling optimization within a window, the order management system updates the orders to be processed (e.g., adding inserted or newly introduced orders to the pending orders), corrects the order scores in the order management system, and repeats steps 2-5 until there are no more orders in the order system.
[0057] The present invention has the following beneficial effects:
[0058] 1. By adopting an order management system and a production scheduling optimization system, the influence of dynamic factors and static scheduling planning are separated, which reduces the complexity of the problem and improves the efficiency of algorithm solution.
[0059] 2. Simplify a medium-to-large-scale production scheduling problem into a small-scale production scheduling problem within a rolling optimization window, making it easier to find the optimal solution.
[0060] 3. Introducing a score correction mechanism into the priority evaluation process, so that the priority of orders changes dynamically as the delivery date approaches, is more practical. Attached Figure Description
[0061] Figure 1 This is the algorithm flowchart of the present invention.
[0062] Figure 2 yes Figure 1 The flowchart for the scheduling optimization section of the flowchart.
[0063] Figure 3 This is a diagram illustrating cross-operation.
[0064] Figure 4 This is a diagram illustrating the mutation operation.
[0065] Figure 5 This is a schematic diagram of the original order information in Example 1.
[0066] Figure 6 This is a schematic diagram illustrating the quantification of evaluation indicators in Example 1.
[0067] Figure 7 This is a schematic diagram of the priority scores for each order in Example 1.
[0068] Figure 8 This is a schematic diagram of the processing machine used in Example 1.
[0069] Figure 9 This is a schematic diagram of the order details in the first round of optimization window of Example 1.
[0070] Figure 10 This is a schematic diagram of the convergence curve of the first round of optimization in Example 1.
[0071] Figure 11 This is a Gantt chart of the optimal scheduling results from the first round of optimization in Example 1.
[0072] Figure 12 This is a schematic diagram of the priority scores of each order after the order management system is updated in Implementation Example 1.
[0073] Figure 13 This is a schematic diagram of the order details in the second round of optimization window of Example 1.
[0074] Figure 14 This is a schematic diagram of the convergence curve for the second round of optimization in Example 1.
[0075] Figure 15 This is a Gantt chart of the optimal scheduling results from the first round of optimization in Example 1. Detailed Implementation
[0076] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0077] To overcome the problems of dynamic factors, large problem scale, and low solution efficiency in current workshop scheduling, this invention proposes a comprehensive workshop scheduling system based on order management and rolling optimization scheduling. The system consists of two parts: an order management system and a scheduling optimization system. The order management system collects and prioritizes orders in real time, while the scheduling optimization system periodically acquires orders from the order system and performs scheduling optimization according to a defined optimization window. This system separates the dynamic factors, such as order insertion, from static scheduling planning, while reducing the problem scale and improving the algorithm's solution efficiency. Figure 1 , Figure 2 As shown, please follow these steps:
[0078] Step 1: The order management system collects new orders and organizes all orders in real time.
[0079] Step 2: Prioritize orders in the order management system using the analytic hierarchy process (AHP). Prioritization evaluation consists of two parts: scoring new orders and adjusting the scores of existing orders. Before evaluation, the following steps must be taken: 1. Determine the evaluation indicators: Select order delivery time T, material cost C, order revenue P, and customer qualification Q as priority evaluation indicators. 2. Quantify the evaluation scale: Divide the evaluation indicators into 5 levels, corresponding to scores of 1, 3, 5, 7, and 9. 3. Calculate the weight vector: Determine the weight vector ω for each part using methods such as expert scoring. T ω C ω P ω Q If S is used C S P S Q Let S represent the scores for material cost, order revenue, and customer qualifications, respectively. The final score for a new order is then expressed as: Score = S C *ω C +S P *ω P +S Q *ω Q -T*ω T The formula for adjusting the score of existing orders is: New_Score = Score + ΔT * ω T Where ΔT is the time the order remains in the order system after it enters the system.
[0080] Step 3: Sort orders in descending order based on their scores. Higher scores indicate higher priority or urgency, and these orders will be prioritized for optimization. Orders introduced due to interrupted order events are assigned the highest score by default and are placed at the top of the system.
[0081] Step 4: Determine the optimization window length. Based on the window length, the production scheduling optimization system retrieves a series of high-priority orders from the order management system and performs static scheduling optimization on these orders using a genetic algorithm. The specific steps of the scheduling optimization are as follows:
[0082] Step 4.1: Initialize relevant parameters. This includes population size, crossover probability, mutation probability, termination conditions, etc.
[0083] Step 4.2: Determine the chromosome encoding method and generate the initial population. To facilitate subsequent scheduling and solving, an integer encoding method is used, with an encoding length of [value missing]. Where n is the number of workpieces, m i (i = 1, 2, ..., n) represents the number of operations contained in each workpiece.
[0084] Step 4.3: Generate scheduling schemes and evaluate the fitness values of individuals. The maximum completion time is used as the fitness function for each individual. Each individual in the population is traversed sequentially. During the generation of the scheduling scheme, constraints such as the order of workpiece operations, the uniqueness of machine processing, and the continuity of process operations are considered. Simultaneously, the maximum completion time and scheduling result for each individual are recorded.
[0085] Step 4.4: Perform selection, crossover, and mutation operations. Selection adopts a "select the fittest, modify the fittest" approach, performing crossover and mutation operations on individuals with high fitness, while retaining individuals with low fitness. Crossover and mutation are performed asexually, meaning offspring originate from a single parent, avoiding duplicate integers after crossover of two chromosomes and ensuring the stability of the encoding. A diagram illustrating asexual crossover and mutation is shown below. Figure 3 , Figure 4 As shown.
[0086] Step 4.5: Terminate the loop. The loop terminates when the maximum number of iterations is reached; the number of iterations is typically 10 to 100.
[0087] Step 5: Display the optimal scheduling scheme for the orders to be optimized in the optimization window and draw a Gantt chart.
[0088] Step 6: Update the order management system and correct the priority of orders in the order management system. Repeat steps 2-5.
[0089] Example 1, characterized by containing 13 orders, selects order delivery time T, material cost C, order revenue P, and customer qualification Q as priority evaluation indicators. The original order information is as follows: Figure 5 As shown, the scheduling optimization steps are as follows:
[0090] Step 1: The order management system collects all orders and quantifies them, dividing them into 5 levels with scores of 1, 3, 5, 7, and 9 for each level. Order revenue and customer qualification scores, from lowest to highest, correspond to the following levels: Low, Lower-middle, Average, Higher-middle, High. Material cost scores, from lowest to highest, correspond to the following levels: High, Higher-middle, Average, Lower-middle, Low. The quantification results are as follows: Figure 6 As shown.
[0091] Step 2: Prioritize the evaluation, setting the weights of the four indicators to 0.3, 0.2, 0.3, and 0.2, according to the formula Score = S C *ω C +S P *ω P +S Q *ω Q -T*ω T Rate each order.
[0092] Step 3: Sort the 13 orders in descending order based on their scores. The results are as follows: Figure 7 As shown.
[0093] Step 4: Set the optimization window length to 4. The scheduling optimization system will then obtain detailed information for orders 4, 6, 10, and 8 and perform scheduling optimization. Each order represents one workpiece to be processed. According to the task table, there are a total of 4 workpieces. Each workpiece has, for example, 4 processes. The second process of workpiece 1 has a 60-second preparation time (other workpieces and processes do not require preparation time). The processing machines used are as follows: Figure 8 As shown, the task_set table is as follows: Figure 9 As shown. Figure 9 In the diagram, workpieces 1-4 correspond to orders 4, 6, 10, and 8, respectively.
[0094] The scheduling optimization steps are as follows:
[0095] 1. Set the population size to 10, the number of iterations to 10, the crossover probability to 0.9, and the mutation probability to 0.1.
[0096] 2. Randomly generate 10 individuals, each with a length of 16 (corresponding to 4 workpieces, each workpiece has 4 processes), consisting of randomized integers from 1 to 16, with each number appearing only once. For example, [7 2 6 11 10 8 4 1 5 12 14 3 16 1315 9] represents one of the individuals, where each number uniquely represents one of the processes of the workpiece.
[0097] 3. Using the maximum completion time as the fitness function, a scheduling scheme is generated for the individual [7 2 6 11 10 8 4 1 5 12 14 3 16 13 15 9] as an example:
[0098] 3.1. Initialize an array processor (indexed by workpiece) to record preceding tasks. The array has a dimension of 4×2 and is initialized to 0. The first column is used to record the preceding tasks of each workpiece, and the second column is used to record the time required to complete the preceding task corresponding to the first column.
[0099] 3.2. Initialize an array temp_result to temporarily store the scheduling results. The array has a dimension of 1×7, and each column represents: sequence number, workpiece, operation, allowed machine type, start time, end time, and the machine where the processing is performed.
[0100] 3.3. Initialize a three-dimensional array f_result to record the final scheduling results, with dimensions of 10×16×7.
[0101] 3.4. Read each row and column of the population (recording 10 individuals) sequentially, transfer to the corresponding subsequent task according to the previous task record, arrange the job, and store the scheduling result in temp_result, while updating the processor. The first digit is 7, corresponding to the 3rd process of the 2nd job. At this time, since the value of the 1st column of the 2nd row (from the 2nd job, the size of the processor array is the number of jobs × 2, the i-th row represents the i-th job) in the processor array is 0, it means there is no previous task. Therefore, we need to find the 1st process of the 2nd job, i.e., sequence number 5, in the task_set table, schedule production, and then update the number in the 1st column of the 2nd row of the processor to 5 (id = 5 in task_set), and update the 2nd column to the processing time of task 5, 50. Finally, store the relevant information of task 5 in task-set [5 2 1 1 0 50 1] in temp_result. Next, iterate through the subsequent values of the value sequence in the individual. When traversing to task number 6 (corresponding to the second step of the second task), since the processor's second row and first column is 5, it means that the first step of the second task has been completed. At this time, we should find the second step of the task that has not yet been completed and process it, i.e., task 6. And so on, stacking the scheduling results temp_result each time. After traversing all the above individuals, we will get a 16×7 two-dimensional array. The largest number in the sixth column of the array is the maximum completion time of the individual, which is also the fitness.
[0102] 3.5 Store temp_result into f_result, which represents the scheduling result of the first individual in the population. After looping 10 times based on the number of individuals in the population, the scheduling result of the initial population is obtained.
[0103] 4. Based on the initial population scheduling results and fitness, perform selection, crossover, and mutation operations, repeating step 3. The process is repeated 10 times according to the specified number of iterations before ending. The total program execution time is 0.16 seconds.
[0104] Step 5: Solve for the convergence curve of orders within the optimization window, as shown below. Figure 10 As shown, by Figure 10 It can be seen that the maximum completion time has converged to 410 in the third generation, which is the optimal solution for this optimization window. The final scheduling result Gantt chart is as follows. Figure 11 As shown.
[0105] Step 6: Update the order management system and remove orders 4, 6, 10, and 8 that have already been scheduled and executed. At this point, the order management system is not empty and there are still orders to be processed, requiring further scheduling optimization. If a new order 14 enters the order system, first score order 14: let its C, P, Q, and T be {average, high, high, 16} respectively, then the corresponding scores are {5, 7, 7, 16}, and the score is 5*0.2 + 7*0.3 + 7*0.2 - 16*0.3 = -0.3; then adjust the scores of the remaining 9 orders: assuming the time required for the previous round of optimization (and production) is ΔT = 3, then the new score for the 9 orders is New_Score = Score + ΔT*ω T =Score + 0.9, and finally sort the 10 orders in descending order based on the score, as shown in the following figure. Figure 12 As shown. Optionally, if an order insertion event occurs, the insertion order is also scored in this step and also participates in the ranking of the scores.
[0106] To better illustrate the scheduling process and simplify the steps, the optimization window is set to 10, meaning the remaining orders will be optimized all at once. The task list shows 10 workpieces, each with a varying number of operations, and some operations have a certain preparation time. The processing machines are the same as in the previous round. The task list is as follows: Figure 13 As shown. The scheduling optimization steps are as follows:
[0107] 1. Set the population size to 10, the number of iterations to 30, the crossover probability to 0.9, and the mutation probability to 0.1.
[0108] 2. Randomly generate 10 individuals, each with a length of 35, consisting of randomized integers from 1 to 35, with each number appearing only once. For example, [19,21,17,34,27,35,26,33,13,18,3,23,9,11,2,25,29,14,28,1,10,20,31,5,15,6,4,7,16,24,12,22,30,32,8] represents one of the individuals.
[0109] 3. Using the maximum completion time as the fitness function, generate a scheduling scheme for the above individual as an example:
[0110] 3.1. Initialize an array processor (the number of rows in the array comes from the number of scheduled jobs) to record the preceding tasks. The array has a dimension of 10×2 and the values are initialized to 0. The first column is used to record the processing progress j of the i-th job and the second column is used to record the time required to complete the preceding task corresponding to the first column.
[0111] 3.2. Initialize an array temp_result to temporarily store the scheduling results. The array has a dimension of 1×7, and each column represents: sequence number, workpiece, operation, allowed machine type, start time, end time, and the machine where the processing is performed.
[0112] 3.3. Initialize a three-dimensional array f_result to record the final scheduling results, with dimensions of 10×35×7.
[0113] 3.4. Read each row and column of the population sequentially, transfer to the corresponding subsequent task according to the previous task record, arrange the job, and store the scheduling result in temp_result, while updating the processor. The first digit of the randomly generated first individual is 19, corresponding to the second process of the 5th job. At this time, since the value in the 5th row and 1st column of the processor array is 0, it means there is no previous task (the 5th job has not been scheduled). Therefore, we need to look for the first process of the 5th job, i.e., sequence number 18, in the task_set table to schedule the first process of job 5 (instead of actual production, to obtain the production time required). Then, update the number in the 5th row and 1st column of the processor to 18, and update the 2nd column to the processing time of task 18, 50. Finally, store the relevant information of task 18 [18 5 1 1 0 50 1] in temp_result. Next, continue to traverse the sequence values of the chromosome individuals and process the second value "21". And so on. When iterating to task number 18, since the processor's 5th row, 1st column is 18, it indicates that the first process of the 5th job has been completed. At this point, we should find the 5th job's 2nd process, i.e., task 19, and schedule it. Then, we continue iterating through the chromosome's individual value sequence (next being value 3). This process continues, stacking the scheduling results. After iterating through all the individuals, we obtain a 35×7 two-dimensional array (used to record each temp_result, where 35 is the number of tasks). The largest number in the 6th column of the array is the maximum completion time, or fitness, for that individual.
[0114] 3.5 Store temp_result into f_result, which represents the scheduling result of the first individual in the population. After looping 10 times, the scheduling result of the initial population is obtained.
[0115] 4. Based on the initial population scheduling results and fitness, perform selection, crossover, and mutation operations, repeating step 3 for 30 iterations. The total program execution time is 0.64 seconds.
[0116] Solving for the convergence curve of orders within this optimization window is as follows: Figure 14 As shown, by Figure 14It can be seen that the maximum completion time has converged to 570 in the 9th generation, which is the optimal solution for this optimization window. The final scheduling result Gantt chart is as follows. Figure 15 As shown.
[0117] Solving Embodiment 1 using this invention yields a maximum completion time of 410 + 570 = 980, where 980 is the optimal solution for this embodiment. This demonstrates that when solving large-scale workshop scheduling problems, this invention improves algorithm efficiency and achieves rapid convergence by separating the order management system from the production scheduling optimization system and setting a rolling optimization window.
Claims
1. A workshop integrated scheduling method based on two-stage scheduling of order management and production scheduling optimization, characterized in that, The order management stage comprises the following steps 1 to 3 and step 6, and the production scheduling optimization stage comprises steps 4 and 5; the method comprises: Step 1, obtaining orders to be processed; Step 2, evaluating the priority of all orders to be processed; the priority evaluation of the order in step 2 comprises two parts: scoring new orders and score correction of original orders; Wherein the evaluation indexes for priority evaluation include order delivery time T, material cost C, order income P and / or customer credit Q, wherein the order delivery time T refers to the length of the current date to the delivery date, the material cost C includes the cost of raw materials and / or the depreciation cost of machines, the order income P refers to the profit obtained by completing the order, and the customer credit Q refers to the credit level of the customer; Wherein the evaluation indexes for priority evaluation are discretely processed; wherein each of the evaluation indexes for the priority evaluation has a weight for scoring; ω T , ω C , ω P , ω Q Let SC, SP, SQ represent the discretization scores of material cost C, order revenue P, and customer quality Q, respectively. The score of a new order is represented as: Score = S C * ω C + S P * ω P + S Q * ω Q - T* ω T ; wherein ω T , ω C , ω P , ω Q are the weights of order delivery time T, material cost C, order revenue P, and customer quality Q, respectively, and Score is the score of the order. The formula for correcting the score of the original order is New_Score = Score + ΔT * ω T where ΔT is the time from the start of receiving the order to the present, and New_Score is the score of the order after the score is corrected. Step 3, sorting all orders according to the order priority; in step 3, the higher the score, the higher the order priority or urgency, and the orders are added to the priority scheduling window in the order of score from high to low; In response to the occurrence of an inserted order event, the order provided by the inserted order event has the highest score; the determination of the optimization window length can be adjusted in real time according to the order scale, and the frequency of obtaining orders from the optimization window and scheduling optimization can be adjusted in real time according to the different states of the orders; When there is no inserted order, a batch of orders to be scheduled is obtained from the optimization window at a specified time interval; in response to the existence of an inserted order event, a batch of orders including the order corresponding to the inserted order event is obtained from the optimization window and scheduled immediately after the scheduling of the current batch of orders is completed; Step 4, determining the optimization window length, obtaining a plurality of orders corresponding to the optimization window length from the optimization window, and obtaining the optimal scheduling scheme for scheduling and processing the plurality of orders based on a genetic algorithm; Step 5, displaying the optimal scheduling scheme of the plurality of orders in the form of a Gantt chart; Step 6, obtaining orders to be processed, and returning to step 2; Wherein the order management stage is independent of the production scheduling optimization stage, and the acquisition of new orders in the order management stage will not interrupt the execution of the production scheduling optimization stage.
2. The method of claim 1, wherein, The step 4 of obtaining the optimal scheduling scheme for scheduling and processing the plurality of orders based on a genetic algorithm comprises: Step 4.1, parameter initialization: including population size S of 10-50, crossover probability Pc of 0.4-0.99, mutation probability Pm of 0.001-0.1, and termination condition gen of 10-50 iterations; Step 4.2, determine the chromosome coding mode, generate initial population: in the form of integer coding, for n workpieces, each workpiece contains m i (i=1, 2, …, n) processes, then the coding length is and a sequence of 1, 2, …, L integers is used to represent an individual of a chromosome; Step 4.3: generating a scheduling scheme and evaluating the fitness value of an individual: using the maximum completion time as the fitness function of an individual, sequentially traversing each chromosome individual in the population, considering the sequence constraint of workpieces, the uniqueness constraint of machine processing and the continuity constraint of process processing in the process of generating a scheduling scheme, and recording the maximum completion time and scheduling result of each individual; Step 4.4: Selection, crossover and mutation operation: the selection operation uses roulette selection method, adopts "survival of the fittest" mode, eliminates individuals with high fitness, and retains individuals with low fitness; the crossover and mutation are in the form of asexual; for the crossover operation, two gene segments with a length of C are randomly selected on the parent chromosome, wherein L / 2>C>1, and then the two gene segments are exchanged; for the mutation operation, two gene points are randomly selected on the parent chromosome, and the two gene points are exchanged; Step 4.5: Termination of the cycle: repeat steps 4.3 and 4.4, and terminate the cycle when the number of iterations reaches the maximum; The method further comprises producing the workpieces corresponding to the orders according to the optimal scheduling scheme.
3. The method of claim 2, wherein, The step 4 records the minimum value of the fitness value of each individual of the generation and the corresponding scheduling scheme every time the iteration is performed, and the individual with the minimum fitness value and the corresponding scheduling scheme recorded after the termination of the cycle are the optimal scheduling scheme.
4. The method of claim 1, wherein, The step 6 updates the orders to be processed with the newly received orders and / or the orders corresponding to the insertion event after the scheduling optimization in a window is performed, corrects the scores of the orders to be processed, and repeats steps 2-5 until there is no order to be processed.
5. The method according to any one of claims 1-4, characterized in that, in response to the occurrence of the insertion event, obtaining the order corresponding to the insertion event; waiting for the execution of the production scheduling optimization stage to be completed, and taking the order corresponding to the insertion event as one of the orders to be processed in step 6 of the subsequent order management stage; the waiting for the execution of the production scheduling optimization stage to be completed further comprises waiting for the production of the workpieces according to the optimal scheduling scheme generated in the production scheduling optimization stage to be completed.
6. An information processing apparatus comprising a storage, a processor, and a program stored on the storage and executable on the processor, characterized by The processor implements the method according to any one of claims 1-5 when executing the program.
Citation Information
Patent Citations
A method for dynamic scheduling optimization of flexible workshop order insertion
CN107831745B
Flexible job shop dynamic event scheduling method based on improved NSGAII
CN114926033A
Production scheduling system and method using genetic algorithm based on elite solution pool
CN101271543A
SMT workshop intelligent scheduling method based on hybrid scheduling algorithm
CN111275356A