A job-shop production scheduling method based on constraint programming

By combining constraint programming and an improved constraint propagation algorithm, the problems of long solution time and poor quality in job shop production scheduling are solved, achieving efficient production scheduling and reducing management costs and production time.

CN117313329BActive Publication Date: 2026-08-25NINGBO ARTIFICIAL INTELLIGENCE RES INST OF SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311139902.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-05
Publication Date
2026-08-25
Estimated Expiration
2043-09-05

AI Technical Summary

Technical Problem

Existing technologies have long solution times and poor solution quality in production scheduling in workshops, making them difficult to adapt to specific production site problems.

Method used

By employing a constraint programming algorithm, combined with backtracking and an improved constraint propagation algorithm, the range of the target value of the optimal solution is estimated, and the improved constraint propagation algorithm is used to select branches that meet the requirements, thereby improving the efficiency and quality of the solution.

Benefits of technology

While ensuring the quality of the solution, the solution speed of production scheduling in the workshop was improved, management costs were reduced, order production time was shortened, and production efficiency was increased.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117313329B_ABST
    Figure CN117313329B_ABST
Patent Text Reader

Abstract

The application discloses a job shop production scheduling method based on constraint programming, relates to the technical field of job shop production scheduling, and comprises the following steps: S100, estimating the range of the optimal solution target value; S200, interval initialization; S300, updating the interval; S400, updating the interval midpoint; and S500, outputting the solution.The constraint propagation algorithm is improved for the job shop production scheduling problem, the improved constraint propagation algorithm is applied to constraint programming, the solving speed of the constraint programming is improved under the premise of guaranteeing the solving quality, the solving quality and the solving efficiency are considered, the management cost of the job shop production scheduling is reduced, the production time of orders is reduced, and the method has high practicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of production scheduling technology in job shops, and in particular to a job shop production scheduling method based on constraint programming. Background Technology

[0002] Currently, with the increasing diversification of user demands, smaller order batches, and shorter delivery times in the manufacturing industry, production scheduling in workshops has received growing attention. Effective production scheduling can not only reduce order processing time but also save companies' human and material resources, thereby improving production efficiency.

[0003] The existing methods and characteristics for solving scheduling problems are as follows:

[0004] 1. Evolutionary algorithms, such as genetic algorithms, ant colony algorithms, and imperial competition algorithms, are the most widely used and are relatively easy to program and implement. However, operations like crossover and mutation require specific chromosome structures, which can lead to infeasible solutions from mutations in complex problems, wasting significant computational resources and increasing computation time. Achieving a balance between global and local search capabilities is difficult. For example, genetic algorithms have strong global search capabilities but relatively weak local search capabilities; ant colony algorithms have strong local search capabilities but weak global search capabilities, often leading to getting trapped in local optima. In conclusion, the quality of solutions obtained by evolutionary algorithms is often difficult to guarantee.

[0005] 2. Priority scheduling rules, such as SPT (processing the workpiece with the shortest processing time in the next process) and SRSR (processing the workpiece with the shortest remaining processing time), are simple in principle and easy to implement; however, the algorithms lack iterative learning capabilities, which can easily lead to low machine utilization, order delivery delays, and other problems. Furthermore, the scheduling rules are difficult to adapt to changes in scheduling objectives. These characteristics result in rigid and inflexible priority scheduling rules that cannot help enterprises reduce costs and increase efficiency.

[0006] 3. Mixed integer programming models are characterized by a relatively complete theoretical system and a series of solution algorithms such as branch and bound method and cutting plane method; however, the disadvantage is that users need to have a certain foundation in mathematical programming, and the solution time is generally long. They are generally used for theoretical research on scheduling problems.

[0007] Patent CN112598309A designs a job shop scheduling method based on Keras. This method uses deep reinforcement learning, requiring extensive training on a training set to learn network parameters before solving the problem. However, the training process relies heavily on the training set and computing resources such as GPUs, and is time-consuming, which cannot meet the needs of actual production. Therefore, the practicality of this patent is limited. Furthermore, deep reinforcement learning is a heuristic algorithm, and the difference between the obtained better solution and the optimal solution is often impossible to estimate, thus the reliability of the algorithm cannot be guaranteed.

[0008] Therefore, those skilled in the art are dedicated to developing a production scheduling method for job shops based on constraint programming. Summary of the Invention

[0009] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is that the existing scheduling problem solving methods have long solution time, poor solution quality, and are difficult to adapt to specific production site problems.

[0010] The inventors analyzed the scheduling process in a job shop, where multiple workpieces are processed on multiple machines. Each workpiece is completed by a series of operations, which must be executed in a given order, and each workpiece must be processed on a specific machine. Solving the job shop scheduling problem involves arranging the operations on the machines to minimize the scheduling length, i.e., obtaining the shortest time required to complete all tasks.

[0011] The job shop scheduling problem is a type of combinatorial optimization problem, a classic NP-hard problem. Unless P=NP is proven, it's difficult to find the global optimum in polynomial time. The inventors, through research, transformed the mathematical model into a constraint programming algorithm, combining backtracking and constraint propagation for the solution. The basic idea of ​​constraint programming is to traverse all branches using backtracking, while simultaneously using constraint propagation to filter out branches that do not meet the requirements. By improving constraint propagation, the efficiency of constraint programming is enhanced.

[0012] The following constraints exist regarding the scheduling problem of the workshop:

[0013] 1. Processing time constraint: The start time of each processing step minus the end time of that processing step must not be less than the processing time of that step, i.e., the following condition must be met:

[0014]

[0015] Where i and j represent the workpiece number and process number respectively, J represents the set of all workpieces, and O i S represents the set of all processes for workpiece i, where S ij and C ij They are respectively process Oij (O ij Let t represent the start and end times of the j-th machining operation for workpiece i. ij For process O ij Processing time;

[0016] 2. Process time constraints: The start time of each process must be later than the end time of the previous process.

[0017]

[0018] Among them, O if(i) This indicates the first process of workpiece i;

[0019] 3. The machine can only process one workpiece at a time:

[0020]

[0021]

[0022] Where Y iji′j′k For 0-1 variables, process O ij Prior to process O i′j′ If the processing is done on machine k, the value is 1; otherwise, it is 0. L is more than 100,000 times the sum of the processing times of all processes for all workpieces.

[0023] The objective of the job shop scheduling problem is to minimize the maximum completion time, i.e.:

[0024]

[0025] The inventors analyzed the traditional constraint propagation algorithm. The traditional constraint propagation algorithm focuses on two workpieces and does not consider the influence of other workpieces on their processing order. The idea behind the traditional constraint propagation algorithm is that for two single-operation workpieces, workpiece 1 and workpiece 2, denoted as J1 and J2 respectively, if the earliest end time of J2 is later than the latest start time of J1, it is inferred that J1 is processed before J2. This can be expressed by the following formula:

[0026]

[0027] The inventors proposed an improved constraint propagation method. Compared with the traditional constraint propagation method, although the focus is on two workpieces, it takes into account the influence of other workpieces on the processing sequence of these two workpieces.

[0028] In one embodiment of the present invention, a production scheduling method for job shops based on constraint programming is provided, comprising:

[0029] S100, Estimate the range of the target value of the optimal solution, estimate the upper and lower bounds of the target value of the optimal solution of the scheduling problem, denoted by ub0 and lb0 respectively, and set the solution accuracy gap;

[0030] S200. Initialize the interval by setting ub = ub0, lb = lb0, and the midpoint of the interval D = (ub + lb) / 2.

[0031] S300, Update the interval, determine whether all workpieces on all machines have been processed, and let the maximum completion time be between lb and D. If completed, let ub = D; otherwise, let lb = D.

[0032] S400, Update the midpoint of the interval, let D = (ub + lb) / 2;

[0033] S500: Output the solution and determine whether the solution accuracy is met, i.e., whether (ub-lb) / ub≤gap is true. If true, output the solution; otherwise, return to S300 until (ub-lb) / ub≤gap is true.

[0034] Optionally, in the constraint programming-based production scheduling method for job shops in the above embodiments, the upper bound of the target value of the optimal solution is the processing time of all processes, and the lower bound is 0.

[0035] Optionally, in the constraint programming-based production scheduling method for job shops in any of the above embodiments, step S300 includes:

[0036] S310. Number the machines and workpieces separately. The machine numbers are 1 to M and the workpiece numbers are 1 to W. M and W are positive integers. The initial state is that no workpieces are assigned to any machine for processing and no workpieces are selected.

[0037] S320. Select a machine. Select the machine with the smallest number that is not fully booked for processing. Let the number of workpieces to be processed on this machine be T.

[0038] S330. Assign an initial value to k, where k represents the processing sequence of the next workpiece selected on the machine. Let k = 1.

[0039] S340. Select a workpiece. Select the kth workpiece on the machine that has not been selected before and has the smallest number.

[0040] S350, Determine the solution: Use the improved constraint propagation to determine whether the maximum completion time of S340 is between lb and D in S300. If it is between the two, execute S360; otherwise, execute S340.

[0041] S360. Modify the workpiece status, so that all workpieces except the first k processed workpieces are in an unselected state;

[0042] S370, k is increasing, let k = k + 1;

[0043] S380. Determine whether all workpieces on the machine have been processed. When k = T+1, it means that all workpieces on the machine have been processed. Execute S390; otherwise, execute S340.

[0044] S390. Determine whether all workpieces on all machines have been processed. If the machine number is M, it means that all workpieces on all machines have been processed and the algorithm terminates. Otherwise, execute S320.

[0045] Optionally, in the constraint programming-based job shop production scheduling method in any of the above embodiments, the improved constraint propagation in step S350 includes:

[0046] S1000. Calculate the minimum processing time. Let c be the workpiece in a single operation, and r be the earliest start time for processing. c The latest end time is d c The processing time is p c Then the processing time occupied on [t1,t2] is for:

[0047]

[0048] When the processing time period is close to r c Or near d c hour, Minimum;

[0049] S2000. From the set of workpieces in a single operation, randomly select two workpieces, designated as workpiece 1 and workpiece 2. If workpiece 1 and workpiece 2 cannot be processed within the interval [r1, d2] while satisfying the minimum processing time requirement for other workpieces during this time interval, then it is deduced that workpiece 2 should be processed before workpiece 1. This can be expressed by the following formula:

[0050]

[0051] in, In this context, j represents the workpiece number. This refers to workpieces whose workpiece number is neither 1 nor 2. The overall meaning is the processing time occupied by all workpieces whose workpiece number is neither 1 nor 2 on the [r1,d2] axis. Summation, This is inferred that J1 >> J2 means that workpiece 2 should be processed before workpiece 1.

[0052] Furthermore, in the constraint programming-based production scheduling method for job shops in the above embodiments, step S350 includes:

[0053] S351, Workpiece Numbering: Number the workpieces on the machine that are to be processed in sequence from 1 to n, where n is a positive integer;

[0054] S352, i is assigned a value, where i represents the workpiece number selected by the outer loop, and i = 1 is set;

[0055] S353, j is assigned a value, where j represents the workpiece number selected by the inner loop, and j = i + 1 is set;

[0056] S354. Reason about the processing order of workpiece i and workpiece j. Substitute workpiece i and workpiece j into the formula in S2000 to reason about the processing order of workpiece i and workpiece j.

[0057] S355. Increment j, let j = j + 1, and check if j > n is true. If it is true, jump to S356; otherwise, jump to S354.

[0058] S356. Increment i, let i = i + 1, and check if i = n is true. If it is true, it means that the traversal has been completed and the algorithm is exited; otherwise, jump to S353.

[0059] This invention improves the constraint propagation algorithm for the production scheduling problem in the job shop and applies the improved constraint propagation algorithm to constraint programming. While ensuring the quality of the solution, it improves the solution speed of constraint programming, balances the solution quality and efficiency, reduces the management cost of production scheduling in the job shop, and reduces the production time of orders. It is highly practical.

[0060] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Attached Figure Description

[0061] Figure 1 This is a flowchart illustrating a constraint programming-based production scheduling method for a job shop according to an exemplary embodiment;

[0062] Figure 2 This is a flowchart illustrating an improved constraint propagation algorithm according to an exemplary embodiment. Detailed Implementation

[0063] The following description, with reference to the accompanying drawings, illustrates several preferred embodiments of the present invention to make its technical content clearer and easier to understand. The present invention can be embodied in many different forms, and the scope of protection of the present invention is not limited to the embodiments mentioned herein.

[0064] In the accompanying drawings, components with the same structure are indicated by the same numerical designation, and components with similar structures or functions are indicated by similar numerical designations. The dimensions and thicknesses of each component shown in the drawings are arbitrary, and the present invention does not limit the dimensions and thicknesses of each component. To make the illustrations clearer, the thickness of components is schematically exaggerated in some places in the drawings.

[0065] The inventors designed a production scheduling method for job shops based on constraint programming, such as... Figure 1 As shown, it includes the following steps:

[0066] S100. Estimate the range of the target value of the optimal solution. Estimate the upper and lower bounds of the target value of the optimal solution to the scheduling problem, denoted by ub0 and lb0 respectively. Set the solution accuracy gap. The upper bound of the target value of the optimal solution is the processing time of all processes, and the lower bound is 0.

[0067] S200. Initialize the interval by setting ub = ub0, lb = lb0, and the midpoint of the interval D = (ub + lb) / 2.

[0068] S300, Update the interval, determine whether all workpieces on all machines have been processed, and let the maximum completion time be between lb and D. If completed, set ub = D; otherwise, set lb = D. Specifically, this includes:

[0069] S310. Number the machines and workpieces separately. The machine numbers are 1 to M and the workpiece numbers are 1 to W. M and W are positive integers. The initial state is that no workpieces are assigned to any machine for processing and no workpieces are selected.

[0070] S320. Select a machine. Select the machine with the smallest number that is not fully booked for processing. Let the number of workpieces to be processed on this machine be T.

[0071] S330. Assign an initial value to k, where k represents the processing sequence of the next workpiece selected on the machine. Let k = 1.

[0072] S340. Select a workpiece. Select the kth workpiece on the machine that has not been selected before and has the smallest number.

[0073] S350: Determine the solution. Using improved constraint propagation, determine whether the maximum completion time of S340 is between lb and D in S300. If it is between the two, execute S360; otherwise, execute S340. The improved constraint propagation includes:

[0074] S1000. Calculate the minimum processing time. Let c be the workpiece in a single operation, and r be the earliest start time for processing. c The latest end time is d c The processing time is p cThen the processing time occupied on [t1,t2] is for:

[0075]

[0076] When the processing time period is close to r c Or near d c hour, Minimum;

[0077] S2000. From the set of workpieces in a single operation, randomly select two workpieces, designated as workpiece 1 and workpiece 2. If workpiece 1 and workpiece 2 cannot be processed within the interval [r1, d2] while satisfying the minimum processing time requirement for other workpieces during this time interval, then it is deduced that workpiece 2 should be processed before workpiece 1. This can be expressed by the following formula:

[0078]

[0079] in, In this context, j represents the workpiece number. This refers to workpieces whose workpiece number is neither 1 nor 2. The overall meaning is the processing time occupied by all workpieces whose workpiece number is neither 1 nor 2 on the [r1,d2] axis. Summation, This is inferred that J1 >> J2 means that workpiece 2 should be processed before workpiece 1.

[0080] like Figure 2 As shown, S350 specifically includes:

[0081] S351, Workpiece Numbering: Number the workpieces on the machine that are to be processed in sequence from 1 to N, where N is a positive integer;

[0082] S352, i is assigned a value, where i represents the workpiece number selected by the outer loop, and i = 1 is set;

[0083] S353, j is assigned a value, where j represents the workpiece number selected by the inner loop, and j = i + 1 is set;

[0084] S354. Reason about the processing order of workpiece i and workpiece j. Substitute workpiece i and workpiece j into the formula in S2000 to reason about the processing order of workpiece i and workpiece j.

[0085] S355. Increment j, let j = j + 1, and check if j > n is true. If it is true, jump to S356; otherwise, jump to S354.

[0086] S356. Increment i, let i = i + 1, and check if i = n is true. If it is true, it means that the traversal has been completed and the algorithm is exited; otherwise, jump to S353.

[0087] S360. Modify the workpiece status, so that all workpieces except the first k processed workpieces are in an unselected state;

[0088] S370, k is increasing, let k = k + 1;

[0089] S380. Determine whether all workpieces on the machine have been processed. When k = T+1, it means that all workpieces on the machine have been processed. Execute S390; otherwise, execute S340.

[0090] S390. Determine whether all workpieces on all machines have been processed. If the machine number is M, it means that all workpieces on all machines have been processed and the algorithm terminates. Otherwise, execute S320.

[0091] S400, Update the midpoint of the interval, let D = (ub + lb) / 2;

[0092] S500: Output the solution and determine whether the solution accuracy is met, i.e., whether (ub-lb) / ub≤gap is true. If true, output the solution; otherwise, return to S300 until (ub-lb) / ub≤gap is true.

[0093] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. A production scheduling method for job shops based on constraint programming, characterized in that, include: S100. Estimate the range of the objective value of the optimal solution, and estimate the upper and lower bounds of the objective value of the optimal solution to the scheduling problem, respectively using... and This indicates that the solution precision is set. ; S200, interval initialization, let , Midpoint of the interval ; S300, Update Range: Determine if all workpieces on all machines have been processed, and set the maximum completion time between [a certain range]. and If completed in between, then... = Otherwise =D; specifically including: S310. Number the machines and workpieces separately. The machine numbers are 1 to M and the workpiece numbers are 1 to W. M and W are positive integers. The initial state is that no workpieces are assigned to any machine for processing and no workpieces are selected. S320. Select a machine. Select the machine with the smallest number that is not fully booked for processing. Let the number of workpieces to be processed on the machine be T. S330. Assign an initial value to k, where k represents the processing sequence of the next workpiece selected on the machine. Let k=1. S340. Select a workpiece. Select the kth workpiece on the machine that has not been selected before and has the smallest number. S350: Determine the solution, using improved constraint propagation to determine if the maximum completion time of S340 is within the range of S300. and If the constraint falls between the two, execute S360; otherwise, execute S340. Improved constraint propagation includes: S1000, Calculate the minimum processing time, assuming a single operation for each workpiece. The earliest processing time is The latest end time is Processing time is Then in The processing time occupied by the upper part for: ; When the processing time period is close to Or get close hour, Minimum; S2000. From the set of workpieces in a single operation, randomly select two workpieces, denoted as workpiece 1 and workpiece 2. If within the interval... If workpiece 1 and workpiece 2 cannot be processed within the specified time period, while still meeting the minimum processing time requirement for other workpieces within this time period, then it is inferred that workpiece 2 should be processed before workpiece 1, as expressed by the following formula: ; S360. Modify the workpiece status, so that all workpieces except the first k processed workpieces are in an unselected state; S370, k increases, let k = k + 1; S380. Determine whether all workpieces on the machine have been processed. When k=T+1, it means that all workpieces on the machine have been processed. Execute S390; otherwise, execute S340. S390. Determine whether all workpieces on all machines have been processed. If the machine number is M, it means that all workpieces on all machines have been processed and the algorithm terminates. Otherwise, execute S320. S400, Update the midpoint of the interval, Let ; S500 outputs the solution and determines whether it meets the solution accuracy requirements, i.e., it determines... If the condition is true, output the solution; otherwise, return S300, until... Established.

2. The production scheduling method for job shops based on constraint programming as described in claim 1, characterized in that, The upper bound of the target value of the optimal solution is the processing time of all processes, and the lower bound is 0.

3. The production scheduling method for job shops based on constraint programming as described in claim 1, characterized in that, Step S350 includes: S351, Workpiece Numbering: Number the workpieces on the machine that are to be processed in sequence from 1 to n, where n is a positive integer; S352, i is assigned a value, where i represents the workpiece number selected by the outer loop, and i=1 is set; S353, j is assigned a value, j represents the workpiece number selected by the inner loop, and j=i+1 is set; S354. Reason about the processing order of workpiece i and workpiece j. Substitute workpiece i and workpiece j into the formula in S2000 to reason about the processing order of workpiece i and workpiece j. S355. Increment j, let j = j + 1, and check if j > n is true. If it is true, jump to S356; otherwise, jump to S354. S356. Increment i, let i = i + 1, and check if i = n is true. If it is true, it means that the traversal has been completed and the algorithm is exited; otherwise, jump to S353.