Optimization method for early-stage workpiece number in single machine scheduling in consideration of constraint of release and deadlineTechnical Field
The invention relates to the technical field of intelligent optimization and production scheduling optimization, in particular to an optimization method for a delayed workpiece number in single machine scheduling with release and deadline constraint.
Background
In modern manufacturing, production scheduling problems are an important class of optimization problems, the core goal of which is to reasonably allocate production resources to accomplish production tasks in an optimal manner. The single machine scheduling problem is widely focused as one of the basic problems of production scheduling. Particularly in practical production, the release time and the cut-off time of the workpiece are important constraints that cannot be ignored. The technical scheme aims at solving the single machine scheduling problem with release and deadline constraint, optimizing the number of the delayed work pieces and has important theoretical and practical values. In a single machine scheduling problem with release and deadline constraints, each workpiece has not only processing time, but also release time and deadline. The release time specifies when the workpiece can begin processing, and the expiration time specifies when the workpiece should complete processing before. If the work piece fails to complete before the expiration time, a pull-out period will occur, which may lead to bad consequences in actual production, such as fines, customer complaints, etc.
In the existing scheduling methods, many researches focus on the use of accurate algorithms to process simplified small-scale problem examples, the solving methods of the problems are relatively mature, mainly branch delimitation and only can process problems of at most 300 workpieces, but the problems of long solving time, high requirement on computer performance, incapability of processing larger-scale problems and the like exist in the methods, and the problems are difficult to apply in practical industry. Furthermore, when considering the release time and deadline constraints, the complexity of the problem increases significantly, making it more difficult for existing scheduling algorithms to be applied directly. The existing scheduling method mainly focuses on minimizing the total deadline or the maximum deadline, and ignores the problem of optimizing the deadline work piece. In actual production, reducing the number of work pieces in the pull-out period is often of more direct economic and management significance than minimizing the pull-out period. Therefore, the invention provides improvement for the problems of long solving time, high computer performance requirement, small scale of the processable problem and the like of the existing algorithm.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides the optimization method and the system for the number of the delayed workpieces in the single machine scheduling with release and deadline constraint, which have the advantages of reduced search space, high solving efficiency, good solving quality and the like, and solve the technical problems.
In order to achieve the above purpose, the invention provides a method for considering the number of the delayed workpieces in the single machine scheduling with release and deadline constraint, comprising the following steps:
S1, constructing a mathematical model considering a single machine scheduling problem with release and deadline constraints, and setting constraints on the model, wherein the specific expression is as follows:
s.t.
Where N represents the number of workpieces to be processed, pi represents the sequence of workpieces to be processed, piN represents the set of all possible sequences of workpieces, i e N,Respectively represents the release time, the processing time and the cut-off time of the workpiece pii,Indicating the finishing time of the workpiece pii,Indicating the completion time of the workpiece pii-1,Indicating whether the workpiece pii is in a pulling period, wherein the pulling period is 1, and the normal delivery is 0;
S2, constructing a modular factor replacement group algorithm based on a replacement group theory, and solving the scheduling problem in the step S1;
S2.1, reading the optimal sequence of the model in the step S1 as a sub-solution sequence;
s2.2, initializing an algorithm search area flag Sflag and letting Sflag =0 or 1, i.e. deciding that the algorithm searches on either the odd side or the even side in the parity search space, searching on the even side when Sflag =0, searching on the odd side when Sflag =1;
The permutation group theory specifically comprises a given symmetry group, wherein the symmetry group consists of two sets, all elements which are possibly permuted in the symmetry group can be divided into an odd part and an even part, each set consists of the order multiplication of each element on one side of the symmetry group, and the one-to-one mapping from one set to the other set is called the permutation group theory;
Based on the theory, the search space of the algorithm can be divided into two sequences with the same number;
S2.3, optimizing data generated by S1 in each population by using a local search algorithm according to the population on the same side obtained in the step S2.2, wherein the local search algorithm is an algorithm for solving the optimization problem;
s2.4, generating a new sub-subsequence by using a position-based crossing method for the data after the optimization of S2.3;
S2.5, restoring the child subsequence positioned at the odd side of the search space in the new child subsequence generated in the S2.4 to the search space at the even side, and if the child subsequence positioned at the odd side is not available, skipping the step, wherein the specific steps are as follows:
S2.5.1 setting betaN=interchange(πnew, k, j) (k, j epsilon N, k not equal to j), wherein betaN is to exchange the kth workpiece and the jth workpiece of pinew, pinew is a new sub-subsequence, and N represents the number of workpieces to be processed;
S2.5.2, βN set according to S2.5.1 and the permutation parity result pinew and βN satisfy the following equation:
Then
In the formula,Is the set of all even permutations in piN,Is a set of all odd permutations, i.e. if the child subsequence falls into the search space on the odd side of the search mark, the parity of pinew can be repaired to the even side of the search area mark by only exchanging the positions of any two workpieces in pinew;
s2.6, checking the neighbor solution of the individual obtained by substituting the S1 model with the S2.5 child solution sequence by using a simulated annealing program based on a pseudo-symmetrical breaking method, wherein the specific expression based on the pseudo-symmetrical breaking method is as follows:
ηN=Insert(πnew,k,j)(k,j∈N,k≠j)
Where ηN is pinew, where the kth workpiece is inserted into the jth workpiece, the relationship between k and j only needs to satisfy the following formula to ensure that the insertion operation does not affect the parity of the solution, where the specific expression is as follows:
ηN=Insert(πnew,k,j),(k,j∈N,k≠j)∧(|k-j|mod2≠0)
Where mod represents the remainder of the remainder.
S2.7, updating the population according to a population updating mechanism based on distance and quality, so that the number of the pull-period work pieces of the solution generated in S2.6 is smaller than one solution with the largest number of the work pieces of the original pull-period work pieces in S1, adding the generated new solution into the population, otherwise, discarding the generated new solution, and skipping the step, wherein the specific steps are as follows:
S2.7.1, judging whether the target value of the child solution sequence of the population to be inserted is better than the worst solution in S1, namely, whether the situation of the stall in S1 occurs or not, if so, executing a step S2.7.2, otherwise, jumping to a step S2.7.4;
s2.7.2, judging whether the sequence of the child solution sequence to be inserted into the population is the same as any sequence in the population, wherein the calculation mode is as follows:
In the formula,Is the relative position of the ith workpiece of pi1 in pi2, if simi (pi1,π2) noteq0, then executing step S2.7.3, otherwise jumping to step S2.7.4, pi1 representing the sub-subsequence de-sequence after S2.6 is checked, pi2 representing either sequence;
S2.7.3, replacing the child subsequence with the worst target value in the population with a child subsequence of S2.7.2;
s2.7.4, discarding the worst child solution sequence;
S2.8, judging whether a termination condition of the algorithm is reached, wherein the termination condition is that the algorithm runs for one hour, if so, executing the step S2.9, and if not, jumping to execute the step S2.4;
s2.9, outputting a solution found in the algorithm searching process, substituting the solution into the S1 model, and obtaining the solution with the best minimum effect;
s3, verifying the effectiveness of the method, wherein the method comprises the following steps:
In order to verify the effectiveness of the modular factor substitution group algorithm based on the substitution group theory, the algorithm is compared with three currently mainstream advanced algorithms VBIH, HDHHO and IGwS and a general mixed integer programming solver CPLEX aiming at different scale calculation examples;
The scale of the examples is 50, 300 and 700 respectively, each scale has 16 different examples, 48 examples are total, due to the limitation of memory and time, the solver CPLEX can only calculate a feasible solution (two examples can obtain an optimal solution) in 16 examples under 50 scales, and to ensure the fairness of comparison, all algorithms are independently and repeatedly operated for 20 times on each example, and the operation time 3600 seconds is used as the termination condition of all algorithms including the solver;
all algorithms adopt Intel E3-1220 v5 processor (3.0 GHz), 8GB memory, linux operating system and C++ programming environment, and different random number seeds are used for each iteration;
in order to verify the comprehensive quality of the approximate optimal solution finally obtained by the algorithm so as to evaluate the performance of the algorithm, three evaluation indexes are adopted, wherein the three evaluation indexes are respectively as follows:
1. Each algorithm was run with 20 independent iterations of the found historical BEST solution (BEST)
2. Average Value (AVG) of the found optimal solution was run in 20 independent iterations of each algorithm
3. Each algorithm was run in 20 independent iterations with Standard Deviation (SD) of the found optimal solution.
The beneficial effects of the invention are that
1. The invention discloses a method for optimizing the number of delayed workpieces in single-machine scheduling with release and deadline constraint by using a modular-cause substitution group algorithm, which particularly considers a special pseudo-symmetrical breaking method based on the substitution group theory so as to reduce the search space and the calculation workload of the proposed algorithm. Based on the symmetric group permutation parity of the original search space, a problem-specific pseudo-symmetric property in terms of target value is introduced. The algorithm then explores promising search areas within a reduced search space, relies on location-based crossover to generate meaningful child solutions, simulated annealing based on pseudo-symmetry breaking to check in depth for neighborhood solutions, and distance and quality based population update mechanisms to ensure healthy populations. Through experimental comparison, the method provided by the invention is excellent in all the examples with different scales, can provide higher-quality solutions for a decision maker in a shorter time, and provides important management guidance for actual production scheduling of enterprises.
2. Compared with the prior art, the method can obtain better solutions in reasonable time for practical industrial application, has stable algorithm performance, can treat large-scale problems, and has very remarkable help for practical application.
Drawings
FIG. 1 is an overall flow chart of an algorithm of the present invention;
FIG. 2 is a schematic view of the present invention based on position crossing;
FIG. 3 is a schematic diagram of the parity interchange scheme of the present invention;
FIG. 4 is a schematic diagram of an insertion operation of the present invention to ensure parity invariance.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides a method for considering the number of the delayed workpieces in single machine scheduling with release and deadline constraint, which is shown in figure 1 and comprises the following steps:
S1, constructing a mathematical model considering a single machine scheduling problem with release and deadline constraints, and setting constraints on the model, wherein the specific expression is as follows:
s.t.
Where N represents the number of workpieces to be processed, pi represents the sequence of workpieces to be processed, piN represents the set of all possible sequences of workpieces, i e N,Respectively represents the release time, the processing time and the cut-off time of the workpiece pii,Indicating the finishing time of the workpiece pii,Indicating the completion time of the workpiece pii-1,Indicating whether the workpiece pii is in a pulling period, wherein the pulling period is 1, and the normal delivery is 0;
S2, constructing a modular factor replacement group algorithm based on a replacement group theory, and solving the scheduling problem in the step S1;
S2.1, reading the optimal sequence of the model in the step S1 as a sub-solution sequence;
s2.2, initializing an algorithm search area flag Sflag and letting Sflag =0 or 1, i.e. deciding that the algorithm searches on either the odd side or the even side in the parity search space, searching on the even side when Sflag =0, searching on the odd side when Sflag =1;
The permutation group theory specifically comprises a given symmetry group, wherein the symmetry group consists of two sets, all elements which are possibly permuted in the symmetry group can be divided into an odd part and an even part, each set consists of the order multiplication of each element on one side of the symmetry group, and the one-to-one mapping from one set to the other set is called the permutation group theory;
Based on the theory, the search space of the algorithm can be divided into two sequences with the same number;
S2.3, optimizing data generated by S1 in each population by using a local search algorithm according to the population on the same side obtained in the step S2.2, wherein the local search algorithm is an algorithm for solving the optimization problem;
S2.4, generating new offspring solutions by using a position-based crossing method, wherein as shown in FIG. 2, a plurality of genes are randomly selected in one parent solution with independent probability, the positions can be discontinuous, the genes at the positions of the parent 1 are copied to the same positions of the offspring 1, then the genes which are absent in the offspring 1 are filled in the blank positions of the offspring 1 according to the sequence of the parent 2 to obtain offspring 1, and the other offspring is obtained in the same manner after exchanging the parent identities;
s2.5, repairing the child solution sequence on the odd side of the search space in the new child solution sequence generated in S2.4 to the search space on the even side, wherein as shown in FIG. 3, two different genes are randomly selected in the child solution, the replacement parity of the solution can be changed after the positions of the two different genes are exchanged, and if the child solution sequence on the odd side is not found, the step is skipped, and the specific steps are as follows:
S2.5.1 setting betaN=interchange(πnew, k, j) (k, j epsilon N, k not equal to j), wherein betaN is to exchange the kth workpiece and the jth workpiece of pinew, pinew is a new sub-subsequence, and N represents the number of workpieces to be processed;
S2.5.2, βN set according to S2.5.1 and the permutation parity result pinew and βN satisfy the following equation:
Then
In the formula,Is the set of all even permutations in piN,Is a set of all odd permutations, i.e. if the child subsequence falls into the search space on the odd side of the search mark, the parity of pinew can be repaired to the even side of the search area mark by only exchanging the positions of any two workpieces in pinew;
S2.6, checking the neighbor solution of the individual obtained by substituting the S1 model with the S2.5 child solution sequence by using a simulated annealing program based on a pseudo-symmetrical fracture method, wherein the inserting operation is shown in the figure 4, selecting two genes with odd number of positions apart from each other from the child solution, inserting one gene into the other position, and not changing the replacement parity of the solution, wherein the specific expression based on the pseudo-symmetrical fracture method is as follows:
ηN=Insert(πnew,k,j)(k,j∈N,k≠j)
Where ηN is pinew, where the kth workpiece is inserted into the jth workpiece, the relationship between k and j only needs to satisfy the following formula to ensure that the insertion operation does not affect the parity of the solution, where the specific expression is as follows:
ηN=Insert(πnew,k,j),(k,j∈N,k≠j)∧(k-j|mod2≠0)
Where mod represents the remainder of the remainder.
S2.7, updating the population according to a population updating mechanism based on distance and quality, so that the number of the pull-period work pieces of the solution generated in S2.6 is smaller than one solution with the largest number of the work pieces of the original pull-period work pieces in S1, adding the generated new solution into the population, otherwise, discarding the generated new solution, and skipping the step, wherein the specific steps are as follows:
S2.7.1, judging whether the target value of the child solution sequence of the population to be inserted is better than the worst solution in S1, namely, whether the situation of the stall in S1 occurs or not, if so, executing a step S2.7.2, otherwise, jumping to a step S2.7.4;
s2.7.2, judging whether the sequence of the child solution sequence to be inserted into the population is the same as any sequence in the population, wherein the calculation mode is as follows:
In the formula,Is the relative position of the ith workpiece of pi1 in pi2, if simi (pi1,π2) noteq0, then executing step S2.7.3, otherwise jumping to step S2.7.4, pi1 representing the sub-subsequence de-sequence after S2.6 is checked, pi2 representing either sequence;
S2.7.3, replacing the child subsequence with the worst target value in the population with a child subsequence of S2.7.2;
S2.7.4, discard the worst child solution sequence.
S2.8, judging whether a termination condition of the algorithm is reached, wherein the termination condition is that the algorithm runs for one hour, if so, executing the step S2.9, and if not, jumping to execute the step S2.4;
s2.9, outputting a solution found in the algorithm searching process, substituting the solution into the S1 model, and obtaining the solution with the best minimum effect;
s3, verifying the effectiveness of the method, wherein the method comprises the following steps:
In order to verify the effectiveness of the modular factor substitution group algorithm based on the substitution group theory, the algorithm is compared with three currently mainstream advanced algorithms VBIH, HDHHO and IGwS and a general mixed integer programming solver CPLEX aiming at different scale calculation examples;
The scale of the examples is 50, 300 and 700 respectively, each scale has 16 different examples, 48 examples are total, due to the limitation of memory and time, the solver CPLEX can only calculate a feasible solution (two examples can obtain an optimal solution) in 16 examples under 50 scales, and to ensure the fairness of comparison, all algorithms are independently and repeatedly operated for 20 times on each example, and the operation time 3600 seconds is used as the termination condition of all algorithms including the solver;
all algorithms adopt Intel E3-1220 v5 processor (3.0 GHz), 8GB memory, linux operating system and C++ programming environment, and different random number seeds are used for each iteration;
in order to verify the comprehensive quality of the approximate optimal solution finally obtained by the algorithm so as to evaluate the performance of the algorithm, three evaluation indexes are adopted, wherein the three evaluation indexes are respectively as follows:
1. Each algorithm was run with 20 independent iterations of the found historical BEST solution (BEST)
2. Average Value (AVG) of the found optimal solution was run in 20 independent iterations of each algorithm
3. Each algorithm was run in 20 independent iterations with Standard Deviation (SD) of the found optimal solution;
Shown in table 1 are comparison results of CPLEX, VBIH, HDHHO, IGwS and MPGA (algorithm proposed by the present invention) at a scale of 50 workpieces, with the bold representing the optimum value for each example. It can be seen from table 1 that for all examples at this scale, the algorithm of the invention is better than the comparison algorithm at BEST, AVG and SD, and that for two examples where CPLEX obtained the optimal solution, the algorithm of the invention also obtained the optimal solution, and for examples where CPLEX obtained only the feasible solution, the algorithm of the invention reached even better than the feasible solution obtained by CPLEX.
Table 1CPLEX, VBIH, HDHHO, IGwS and MPGA results of the comparison of examples at 50 scale
In the table, the optimal solution is the rest of the solutions.
Table 2 shows the comparison results of the algorithm of the present invention and the comparison algorithm at the 300 scale, and from the results, it is apparent that the algorithm of the present invention has better stability than the comparison algorithm in that the best solution of 15 examples among the 16 examples at the scale is obtained by the algorithm of the present invention, and the difference between the result obtained by the algorithm of the present invention and the best solution obtained by the comparison algorithm is very small for the example where only one best solution is not obtained by the algorithm of the present invention.
Table 2VBIH, HDHHO, IGwS and MPGA results of example comparisons at 300 scale
Table 3 shows the comparison results of the algorithm of the present invention and the comparison algorithm at the 700 scale, from which it is apparent that all the best solutions of the 16 examples at the scale are obtained by the algorithm of the present invention, and the best solutions obtained by the present invention are significantly better than the best solutions obtained by the comparison algorithm from the best solution gaps obtained by the respective algorithms, and furthermore, from AVG and SD indexes, the algorithm of the present invention has very good stability compared to the comparison algorithm. This also demonstrates that the proposed algorithm has significant advantages in handling larger scale problems, which can significantly increase the efficiency of the scheduling decision maker in practical use and can provide a better solution in a shorter time.
Table 3VBIH, HDHHO, IGwS and MPGA results of example comparisons at 700 Scale
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.