Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a production scheduling method, so as to solve the problem in the prior art that the scheduling scheme is inaccurate due to the fact that the learning effect and the personnel processing interruption are not considered for the production scheduling of a single working group.
In order to achieve the purpose, the technical scheme provided by the invention is as follows: an examination production scheduling method comprises the following steps:
1) researching a production scheduling scene, firstly acquiring basic information of workers and basic information of tasks, then grading workers of a working group, initializing and generating a problem object;
2) problem parameters and variables are defined and established to minimize the maximum completion time (minC)max) A mathematical model that is a scheduling objective;
3) realizing the mathematical model by using an elite genetic algorithm, coding a task processing sequence to generate an initial scheduling scheme population, and randomly generating an initial population with N individuals in a coding specified range;
4) calculating the fitness through personnel allocation and personnel processing break point identification, and reserving the individual with the best fitness;
5) generating a new population, carrying out selection, crossing and variation through elite reservation to generate a progeny population, and calculating the fitness value of individuals of the progeny population;
6) updating the elite individual, if the optimal individual of the filial generation is better than the elite individual, proving that the filial generation population finishes the evolution, and at the moment, replacing the worst individual of the filial generation with the elite individual of the parent generation, wherein the optimal individual of the filial generation becomes a new elite individual;
7) if the genetic algebra is larger than the initial evolution algebra, the iteration is terminated, the optimization is quitted, and the elite individuals and the scheduling information are output; otherwise, continuing to execute the step 4).
Further, the parameters and variables in step 2) specifically include: a group of workers M machine a group of workpieces J, h represents a worker serial number, h is 1,2, … …, l, k represents a workpiece serial number, k is 1,2, … …, n, and workers with high skill level have a learning rate alpha
h,h=1,2,……,m
HWorkers with low skill level have a learning rate beta
h,h=m
H+1,m
H+2, … …, l; workpiece J
kNumber of persons processed according to basic demand JM
k,[P
k]For average population, P
kIn order to achieve an actual processing time,
for the complete processing time after consideration of the learning effect at any time, S
kTo start the working time, C
kIn order to complete the time-out,
in order to distribute a high level of workers,
to a low number of workers assigned, a
eh、b
ehFor worker M
hE-th start interruption time and e-th end interruption time, e being 1,2, …, θ
hT represents the time of change of the state of the production staff, F represents the rank after rearrangement of the interruption time,
a
[F]means for producing all of the workpiecesA of the worker
eh、b
ehIn a non-decreasing order, a
[0]For the start of the machining of the workpiece, a
[f]The time when the personnel state change occurs for the last time before the workpiece is finished. The single workgroup scheduling model is constructed with the following three decision variables:
worker M
hMachining workpiece J
kTotal time of (1), wherein
f=max{e|aeh·[ykh]≤Ck};
Further, the mathematical model established in step 2) is:
the single workgroup scheduling mixed integer programming model is as follows:
(21) an objective function: minimizing maximum completion time
min Cmax
(22) Constraint 1: limiting each worker to process only one workpiece at the same time:
(23) constraint 2: restraining worker MhIs distributed to the workpiece JkIn the work JkThe worker may not be assigned to other workpieces before completion:
(24) constraint 3: each workpiece is limited to be processed only once, and the number of processed workpieces is equal to the number of required workpieces:
(25) constraint 4: limiting workpiece JkThe number of workers in the processing state at the same time t cannot exceed the distributed high-level total number of workers:
(26) constraint 5: limiting workpiece JkThe number of workers in the processing state at the same time t cannot exceed the total number of distributed workers at a low level:
(27) constraint 6: defining a workpiece JkMachining time PkThe calculation formula of (2):
(28) constraint 7: limiting the completion time to be equal to the sum of the starting time and the actual processing time of the workpiece:
Ck=Sk+Pk,k=1,2,…,n
(29) constraint condition 8: workpiece J processed by limiting workerskThe total time of (a) is not more than the actual machining time of the workpiece:
xkh≤Pk,k=1,2,…,n;h=1,2,…,l
(210) constraint 9: limiting workpiece JkThe time for starting to process is longer than that of the previous workpiece Jk-1Completion time:
Ck-1≤Sk,k=1,2,…,n
(211) constraint 10: limiting the same worker to be allocated to other workpieces for processing, wherein the starting time of the worker for processing the workpiece is not less than the ending time of the original workpiece:
Si[yih]+Pi[yih]+Pi+1[yi+1,h]+…+Pj[yj-1,h]≤Sj[yjh],i=1,2,…,n;j=1,2,…,n;i<j;h=1,2,…,l
compared with the traditional scheduling model considering the learning effect, the model has the following characteristics. Firstly, the human interaction learning effect representation model proposed based on the Jiang learning effect representation model based on the standard processing time and the workers is the worker M
hIndependently process workpiece J
kBasic human being [ P
kh]Constraint 6-constraint 10 is a non-linear constraint; secondly, due to the existence of the interruption interval, the machining time P defined based on the constraint condition 6
kCalculating the moment a at which the personnel state change occurs last time before the workpiece is finished and can be found only by judging and iterating for multiple times
[f]Where f is max { e | a ═ m
eh·[y
kh]≤C
k}; finally, the invention needs personnel allocation to calculate the workpiece processing time before the group processing of a plurality of people and the interruption of the personnel processing process, and adds a decision variable x for identifying the workpiece processing information at the interruption point
khAnd y
khtBoth decision variables are related to the processing staff to which the work piece is actually assigned, where x
khIs equal to max { e | a
eh·[y
kh]≤C
kI.e. f, y
khtIs equal to
The total number of constraints is equal to:
therefore, the mathematical model is not easy to solve, and the invention provides an e-GA solving method based on heuristic rules.
Further, the encoding method in step 3) is as follows: the method adopts permutation coding to code generation processing workpieces in sequence, all the generation processing workpieces are arranged in a row to be used as a chromosome, and each workpiece corresponds to a gene on the chromosome.
Further, the process of calculating the individual fitness through personnel allocation and personnel processing break point identification in the step 4) is as follows:
(41) updating the total learning duration of staff of a working group, and grouping the workers according to the learning level;
(42) according to the basic demand number JM of the workpieces
kDetermining
And
and calculating that no processing by personnel occurs
Ideal processing time for time interruption;
(43) judgment of a
eh[y
kh]Or b
eh[y
kh]And
in which
(44) Searching for workers who interrupt the machining according to the interrupt interval, updating the interrupt point set, and recalculating the ideal machining
Time, repeating step (42);
(45)count=f=max{e|aeh·[ykh]≤Ckand when the interruption interval list is updated, updating the processing time of workers and updating the interruption interval list.
(46) At the beginning of the processing time of a
[0]=S
k=C
k-1During the actual machining of the workpiece, a
[0]Is equal to workpiece J
kIs equal to the finish machining time of the (k-1) th workpiece, a
[f]Indicating the time of last occurrence of personnel state change before completion of the workpiece, and deducing the total processing time of the workpieceIs formed by
(47) Repeating the step (41) -the step (46), and calculating the completion time of the workpiece in each individual scheme to further obtain individual fitness;
in step (44)
Computing to characterize a model based on standard processing time and worker learning effects
Based on this, the workpiece J is derived
kThe complete processing time after considering the learning effect at any time:
further, the step 5) specifically includes: selecting operation is carried out by adopting an elite selection strategy method; performing cross operation by adopting a partial matching cross method; performing mutation operation by inverse mutation method
Further, the selecting operation in the step 5) is as follows:
(51) when the generation t is reached, a (t) in the population is the optimal individual;
(52) setting A (t +1) as a new generation group, and selecting the optimal individual in A (t + 1);
(53) if there are no individuals in A (t +1) that are superior to a (t), then a (t) is added to A (t +1) as the n +1 th individual of A (t +1) (n is the population size).
Further, the interleaving operation in step 5) is as follows:
(54) determining a parent initial population;
(55) randomly generating a number less than the length of the parent chromosome;
(56) interchanging segments in the chromosome corresponding to the length and position;
(57) keeping the exchanged segments still, finding the repeated value in the segments which are not exchanged, and then finding the element of the corresponding position in the replaced part of the parent to replace.
Further, the mutation operation in the step 5) is as follows: randomly selecting two points on the parent chromosome code as reversal points, and reversely ordering the genes between the two reversal points to obtain the chromosome after mutation.
The invention has the beneficial effects that: the invention considers the learning effect phenomenon and the processing interruptible phenomenon existing in the actual production. The invention provides a single workgroup scheduling problem considering the human interactive learning effect, a single workgroup scheduling model considering the human interactive learning effect and processing interruptible is constructed facing the problem, an e-GA model solving method based on heuristic rules is provided, and finally, the effectiveness of the constructed model and algorithm is demonstrated through different-scale example simulation. Firstly, analyzing and representing the human interactive learning effect in a workgroup unit, considering the processing interruptible phenomenon in the practical problem, and realizing the reduction of relevant data errors such as the working hour and the like of a single workgroup scheduling problem and the optimal matching of key resources of the workgroup; secondly, a single working group scheduling model and an algorithm which consider the interactive learning effect of personnel and can be interrupted in processing are constructed, the organic combination of the personnel allocation of the single working group and the workpiece scheduling is realized, the processing efficiency of the production system taking the working group as a processing unit is improved, and the problem that the learning level difference between people is ignored when the working group is taken as a whole in the past is solved; and finally, implementing e-GA-based computational simulation by utilizing python, analyzing the influence of the staff structure of a working group on a scheduling result in detail, and providing guidance for determining the replacement ratio in actual production.
Detailed Description
In order to facilitate understanding of those skilled in the art, the present invention will be further described with reference to the following examples and drawings, which are not intended to limit the scope of the present invention.
Referring to fig. 1, a single workgroup production scheduling method considering human interactive learning effect and processing interruptible is described by constructing a factory task processing procedure example, which includes the following steps:
(1) in the background of enterprise production, a factory task processing process takes a 10-person work group as a scheduling unit, and the basic person of workers independently processing workpieces is [30,80 ]]Randomly distributed, the high-level learning rate is 30% (learning factor is-0.3), the low-level learning rate is 10% (learning factor is-0.1), each worker has 3 interruption intervals, and the interruption intervals are [0,41 ]]The internal fixed step length is 0.5 distribution, the processing number is 1-10 parts, and 10 workpieces J of the same part family existk,JMkAnd [ Pk]See table 1.
TABLE 1 number of basic demands for work and basic man-hours
(2) Problem parameters and variables are defined and established to minimize the maximum completion time (minC)
max) For the mathematical model of the scheduling objective, the parameters and variables in the corresponding example specifically include: a group of workersM processes a group of workpieces J, h represents a worker serial number, h is 1,2, … …, l, k represents a workpiece serial number, k is 1,2, … …, n, and the workers with high skill level have learning rate alpha
h,h=1,2,……,m
HWorkers with low skill level have a learning rate beta
h,h=m
H+1,m
H+2, … …, l; workpiece J
kNumber of persons processed according to basic demand JM
k,[P
k]For average population, P
kIn order to achieve an actual processing time,
for the complete processing time after consideration of the learning effect at any time, S
kTo start the working time, C
kIn order to complete the time-out,
in order to distribute a high level of workers,
to a low number of workers assigned, a
eh、b
ehFor worker M
hE-th start interruption time and e-th end interruption time, e being 1,2, …, θ
hT represents the time of change of the state of the production staff, F represents the rank after rearrangement of the interruption time,
a
[F]a representing all workers producing the workpiece
eh、b
ehIn a non-decreasing order, a
[0]For the start of the machining of the workpiece, a
[f]The time when the personnel state change occurs for the last time before the workpiece is finished. The single-working-group scheduling model is constructed by the following three decision variables:
worker M
hMachining workpiece J
kTotal time of (1), wherein
f=max{e|aeh·[ykh]≤Ck};
The single workgroup scheduling mixed integer programming model is as follows:
(21) an objective function: minimizing maximum completion time
min Cmax
(22) Constraint 1: limiting each worker to process only one workpiece at the same time:
(23) constraint 2: restraining worker MhIs distributed to the workpiece JkIn the work JkThe worker may not be assigned to other workpieces before completion:
(24) constraint 3: each workpiece is limited to be processed only once, and the number of processed workpieces is equal to the number of required workpieces:
(25) constraint 4: limiting workpiece JkThe number of workers in the processing state at the same time t cannot exceed the distributed high-level total number of workers:
(26) constraint 5: limiting workpiece JkAt the same time t at additionThe number of workers in the low-level worker state cannot exceed the total number of the distributed workers in the low-level worker state:
(27) constraint 6: defining a workpiece JkMachining time PkThe calculation formula of (2):
(28) constraint 7: limiting the completion time to be equal to the sum of the starting time and the actual processing time of the workpiece:
Ck=Sk+Pk,k=1,2,…,n
(29) constraint condition 8: workpiece J processed by limiting workerskThe total time of (a) is not more than the actual machining time of the workpiece:
xkh≤Pk,k=1,2,…,n;h=1,2,…,l
(210) constraint 9: limiting workpiece JkThe time for starting to process is longer than that of the previous workpiece Jk-1Completion time:
Ck-1≤Sk,k=1,2,…,n
(211) constraint 10: the same worker is restricted from being assigned to other workpieces to be processed, and the worker processes the workpieces
The starting time of the workpiece is not less than the ending time of the original workpiece:
Si[yih]+Pi[yih]+Pi+1[yi+1,h]+…+Pj[yj-1,h]≤Sj[yjh],i=1,2,…,n;j=1,2,…,n;i<j;h=1,2,…,l
(3) and (4) numbering the processing sequence of the workpieces by natural numbers, and arranging the working procedures into a row as a chromosome according to the sequence relation of the processing of the workpieces. Taking chromosome [10, 2, 1, 6, 9, 5, 7, 3, 4, 8] as an example, this chromosome shows that workpiece 10 is machined for the first time,workpiece 2 is machined afterworkpiece 1 is machined,workpiece 1 … is machined afterworkpiece 2 is machined, andworkpiece 8 is machined for the last time.
(31) Producing chromosomes according to the rule, achieving the preset population scale, and finishing initialization.
(32) Calculating the fitness through personnel allocation and personnel processing break point identification: taking an initial population of a chromosome [1, 2, 10, 6, 9, 3, 7, 5, 4, 8] as an example, theworkpiece 1 is first processed, and the fitness value is calculated according to the following steps:
a) updating the total learning duration of the personnel, and grouping the processing workers needed by theworkpiece 1 according to the learning level;
b) number JM of basic demand persons according to
workpiece 1
kDetermining
And
and calculating the ideal processing time when the processing of the personnel is not interrupted;
c) judgment of a
eh[y
kh]Or b
eh[y
kh]And
in which
d) Searching for workers for interrupted processing according to the interruption interval, updating the interruption point set, recalculating the ideal processing time, and repeating the step (42);
e)count=f=max{e|aeh·[ykh]≤Ckand when the interruption interval list is updated, updating the processing time of workers and updating the interruption interval list.
f) At the beginning of the processing time of a
[0]=S
k=C
k-1During the actual machining of the workpiece, a
[0]Is equal to workpiece J
kIs equal to the finish machining time of the (k-1) th workpiece, a
[f]Indicating the last change in personnel status before completion of the workFrom FIG. 2, it is derived that the total processing time of the workpiece is
g) Repeating the step (41) -the step (46), and calculating the completion time of the workpiece in each individual scheme to further obtain individual fitness;
(33) selecting: the selection of population individuals according to the elite retention strategy is performed as follows:
a) when the generation t is reached, a (t) in the population is the optimal individual;
b) setting A (t +1) as a new generation group, and selecting the optimal individual in A (t + 1);
c) if there are no individuals in A (t +1) that are superior to a (t), then a (t) is added to A (t +1) as the n +1 th individual of A (t +1) (n is the population size).
(34) And (3) crossing: the operation of performing cross operation on population individuals according to a partial matching cross method is as follows:
a) parentinitial populations parent 1 andparent 2 are determined as in tables 2 and 3, as follows:
TABLE 2
TABLE 3
b) If the randomly generated number smaller than the length of the chromosome of the parents is 4, the two parents mutually exchange the gene sequences on the 3 rd to 6 th gene positions;
c) by interchanging the fragments corresponding to the length and position in the chromosome, the sequence of the genes in the gene segments [1, 6, 9, 5] in theparent 1 in theparent 2 is [6, 5, 7, 2], which replaces the original gene segment in theparent 1. Theunrerevised child 1 is obtained as in table 4, as follows:
TABLE 4
Similarly, gene segments [6, 5, 7, 2] inparent 2 were recombined in the order ofparent 1 to obtainunrefined offspring 2 as shown in Table 5, as follows:
TABLE 5
d) Revising repeated elements, wherein [7, 2] in theunrerevised child 1 has repeated elements with the exchanged [6, 5, 7, 2], keeping the exchanged segments still, finding repeated values in the segments without exchange, and then finding the elements in the corresponding positions in the exchanged parts of the parent to replace to obtain thechild 1 as shown in table 6, as follows:
TABLE 6
Operating onunrerevised child 2 in the same manner results inchild 2 as in Table 7, as follows:
TABLE 7
And only when the sub-generation fitness is higher than that of the parent generation, the parent generation is replaced, and otherwise, the intersection is carried out again.
(35) Mutation: randomly selecting two points on the parent chromosome code as reversal points, and reversely ordering the genes between the two reversal points to obtain the chromosome after mutation. And replacing the original process operation sequence according to the mutation probability, replacing if the fitness of the new individual is higher than that of the original individual, and if not, mutating again.
(36) Termination criteria: and when the maximum iteration times of the genetic algorithm is reached, the algorithm is ended, and the workpiece scheduling scheme and the personnel allocation scheme with the highest current fitness value are output.
It should be noted that in this embodiment, an algorithm solver is written by python, and in the context of 10 workpieces and 10 workers, 11 groups of examples of different personnel structures are set, and the personnel ratios are 0:10, 1:9, 2:8, 3:7, 4:6, 5:5, 6:4, 7:3, 8:2, 9:1, and 10:0, respectively. In order to improve the solving efficiency, an e-GA algorithm (the population size is 20, the iteration number is 200, the XOVR is 0.9, and Pm is 0.2) is designed for solving. All of the 11 examples converged within the set number of iterations. The processing sequence and the processing time of each optimal scheduling scheme are shown in fig. 3, wherein the proportion of high-level workers from scheme1 to scheme11 is gradually increased, and the maximum completion time of the optimal scheme is gradually shortened along with the increase of the proportion of the high-level workers. The proportion of analysts is 0:10, 2:8, 5:5, 8:2 and 10:0, the iteration times of the optimal solution obtained by the algorithm can be converged in 100 generations under the conditions of different staff structures as shown in the graphs in FIGS. 4-8, and the method can be used for solving the small and medium-scale problems, realizing the convergence fast and achieving the stable solution result and being applicable to the production scheduling problem of actual enterprises.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium may store a program, and when the program is executed, the program includes some or all of the steps of any production scheduling method described in the above method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
An exemplary flow chart of a method for implementing a service chain according to an embodiment of the present invention is described above with reference to the accompanying drawings. It should be noted that the numerous details included in the above description are merely exemplary of the invention and are not limiting of the invention. In other embodiments of the invention, the method may have more, fewer, or different steps, and the order, inclusion, function, etc. of the steps may be different from that described and illustrated.