Resource constraint item scheduling method, system, equipment and medium

By applying the resource constraint project scheduling method of genetic simulation annealing algorithm in aircraft assembly production, the problem of long time and poor results in the existing technology is solved, and the balance of workers' scheduling utilization rate and improvement of production efficiency is achieved.

CN119476857AActive Publication Date: 2025-02-18HUAZHONG UNIV OF SCI & TECH

Patent Information

Application Number
CN202411645890.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-18
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

The existing resource constraint project scheduling methods have problems such as long planning time, poor results and inability to adjust in time in aircraft assembly and production, resulting in an imbalance in production time of workstations.

Method used

The genetic simulation annealing algorithm is used to generate a sequential set of process sorting, encoding and decoding sequences, and the start processing time and end processing time of each process are determined, the number of workers and attendance are optimized, and the process is performed in sequence.

Benefits of technology

It achieves a relative balance of worker scheduling utilization, reduces maximum completion time, and improves production efficiency and planning flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476857A_ABST
    Figure CN119476857A_ABST
Patent Text Reader

Abstract

The invention discloses a resource constraint project scheduling method, system, equipment and medium, and belongs to the technical field of workshop intelligent scheduling, the method comprises the following steps: based on a generated process sorting code, by creating a decoding sequence set and a waiting process group, updating the decoding sequence set, determining the decoding sequence set corresponding to the updated process sorting code, and updating the waiting process group; determining the machining starting time, the machining ending time and the total time for completing all the working procedures of each working procedure; and taking the minimum maximum completion time of the worker as an optimization target, obtaining an individual with the highest fitness value through a genetic simulated annealing algorithm, and obtaining the maximum completion time of the worker according to the machining starting time, the machining ending time and the total time for completing all the processes of each process corresponding to the individual with the highest fitness value. And determining the total processing duration coefficient and the latest processing duration coefficient of each worker, and performing shift arrangement on each worker. The method can improve the utilization rate of human resource scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent workshop scheduling, and more specifically to a resource-constrained project scheduling method, system, equipment and medium. Background Art

[0002] With the success of the C919 commercial test flight, demand orders are pouring in, and its production line has gradually shifted from single-machine production in the development stage to small and medium-sized batch production. There are many aircraft assembly stations and a long assembly cycle. The assembly process is cumbersome and complex, involving multiple levels of planning, from annual summary to daily work plans, so it needs to be analyzed step by step, forming a long cycle. In such a multi-level configuration process, relevant personnel need to monitor the entire engineering process in an all-round, multi-granular (including flights, processes and stations), and multi-perspective manner.

[0003] In order to meet the demand for increased production capacity and improve the production efficiency of each workstation, the company has formulated a series of production plans to improve the rhythm. Production factors are one of the main factors that restrict the production efficiency of aircraft assembly, which are mainly divided into personnel, materials, tooling, etc., and personnel allocation is one of the key points. Reasonable personnel allocation can not only save production costs, but also improve production efficiency. Each workstation has strict requirements for the production rhythm. Otherwise, it will affect the production progress of the aircraft at the least, and delay the production plan for the whole year at the worst, making it difficult to deliver the aircraft within the delivery period.

[0004] At present, in the aircraft mobile assembly work, human resources are used to carry out assembly production activities in the form of shift scheduling. The available quantity will be affected by the shift scheduling during the production process. Therefore, there is a big gap between the scheduling plan made in advance and the actual production progress. At the same time, in the process of production execution plan, abnormal situations often occur, resulting in rework or suspension of the processing process. Therefore, after each beat adjustment or abnormal situation occurs, each workstation needs to re-formulate personnel needs and shift scheduling plans.

[0005] In summary, in actual production, the existing methods for solving resource-constrained project scheduling mainly rely on manual work according to empirical formulas. The empirical scheduling takes a long time and the results are not satisfactory. When abnormal situations occur during the production execution process, the production plan cannot be adjusted in time, affecting the balance of workers' production time. Summary of the invention

[0006] In response to the problems existing in the above-mentioned fields, the present invention proposes a resource-constrained project scheduling method, system, equipment and medium, which takes minimizing the maximum completion time of workers as the optimization goal, determines the constraints on the number of workers and attendance when workers execute the process, and the constraints on the sequential execution of the processes, and obtains the individual with the highest fitness value through the genetic simulated annealing algorithm, schedules each worker, and ensures that the utilization rate of human resource scheduling is relatively balanced.

[0007] In order to solve the above technical problems, the present invention discloses a resource-constrained project scheduling method, comprising the following steps:

[0008] A population is randomly generated, each individual in the population is a process sequence code based on the process sequence; based on the generated process sequence code, a decoding sequence set and a waiting process group are created, and the gene code values ​​corresponding to all processes in the current waiting process group are compared, and the process with the largest gene code value is placed at the end of the created decoding sequence set, and the decoding sequence set is updated to determine the decoding sequence set corresponding to the updated process sequence code;

[0009] According to the decoding sequence set corresponding to the updated process sorting code, find the earliest time after all the previous processes are completed for the currently decoded process, which satisfies the remaining available number of people to meet the number of people required for the current process, and takes it as the start processing time of the process. Similarly, determine the start processing time of each process; according to the start processing time and processing time of each process, determine the end processing time and the total time to complete all processes;

[0010] Taking the worker's minimization of the maximum completion time as the optimization goal, determine the constraints on the number of workers and attendance when the workers execute the process and the constraints on the sequential execution of the process, and obtain the individual with the highest fitness value through the genetic simulated annealing algorithm;

[0011] According to the start processing time, end processing time and total time to complete all processes of each process corresponding to the individual with the highest fitness value, the total processing time coefficient and the most recent processing time coefficient of each worker are determined, and each worker is scheduled.

[0012] Preferably, each individual in the population is a process sequence code based on the process sequence, specifically including:

[0013] In the population initialization stage, the gene sequence in each chromosome is encoded in a random decimal format based on 0-1 encoding. The sequence of each gene is a decimal with a value of 0-1. The gene sequence of the generated process sorting code is as follows:

[0014] O={(p,a p )|i=1, 2,...,N, a∈[0~1)}

[0015] Among them, p is the process number, N is the total number of processes, and a p is the gene encoding value corresponding to the process, and O represents the process sorting chromosome.

[0016] Preferably, determining the decoding order set corresponding to the updated process sequence code comprises the following steps:

[0017] Traverse all the processes that are not currently placed in the decoding order set, find all the processes that have no preceding processes and place them in the waiting process group, and record the number of times each process enters the waiting process group;

[0018] Compare the gene coding values ​​in the gene sequences corresponding to all processes in the current waiting process group. When the sum of the gene coding values ​​corresponding to the process to be processed in the current waiting process group and the gene coding values ​​corresponding to the processes that have been in the waiting process for more than 3 consecutive times is greater than 1, place the processes that have been in the waiting process for more than 3 consecutive times at the end of the created decoding order set for processing, and update the decoding order set.

[0019] When the gene encoding value of the decoding order set is equal to the total number of processes, all processes are placed in the waiting process group and the updated decoding order is output; otherwise, all current unprocessed processes are traversed again to find all processes without preceding processes.

[0020] Preferably, the process of determining the start processing time of each process by analogy specifically includes:

[0021] According to the decoding sequence set corresponding to the updated process sorting code, the process is decoded accordingly to determine the completion time of all the predecessor processes of the process;

[0022] Take the maximum value of the completion time as the planned start time of the process. Starting from the planned start time, determine whether the remaining number of available workers in the team at the current moment meets the number of workers required for the current process.

[0023] When the number of people required for the current process is met, the current planned start processing time is taken as the start processing time of the process; if it is not met, the planned start processing time of the process is increased by 1 and re-judged.

[0024] Preferably, the determining of the end processing time and the total time to complete all processes specifically includes:

[0025] Traverse all processes in sequence, and take the end processing time of the process as the start processing time of the process plus the processing time of the process;

[0026] After the traversal is completed, the end processing time of all processes is determined, and the maximum value is taken as the total time to complete all processes.

[0027] Preferably, obtaining the individual with the highest fitness value comprises the following steps:

[0028] Determine the preconditions including:

[0029] All production factors except personnel are complete, and there will be no shortage of materials and tools;

[0030] When the processing logic relationship between processes is a serial logic relationship, it is fixed and cannot be modified;

[0031] Workers are divided into different types of work. There is only one specific type of work in a team, and workers of a certain type of work can only complete the work of the corresponding type of work.

[0032] Hiring workers has attendance requirements. The attendance rate of workers must be higher than the set value. At the same time, the working hours of all workers must be consistent, that is, the attendance rate variance must be lower than the set value.

[0033] The workers employed are all skilled workers, and different combinations of workers in the same trade take the same amount of time to complete any process.

[0034] After the unfinished processes of the day are suspended, the unfinished processes will be continued the next day;

[0035] The optimization objective expression is:

[0036] Makespan=minimize(max(E j )), j = 1, 2, ..., n

[0037] Among them, E j It refers to the time to complete the process, and n is the number of processes;

[0038] The constraints include:

[0039] At any time, the total number of workers in all processes involved in the processing cannot exceed the number of workers in that process:

[0040]

[0041] Among them, P i is the number of people limited by team i, σ jt is a 0-1 variable; when process j is being processed at time t, σ jt =1, otherwise 0; A ij S is the number of people required to complete process j by team i, min is the earliest time for the process to start processing, E max The time when all processes have been completed;

[0042] Any process must wait for the previous process to be completed before it can be processed:

[0043] E j ≥S j′ -τ jj′ *Ωj,j′=1,...,n

[0044] Among them, S j is the start processing time of process j, E j is the end processing time of process j; τ jj’ is a 0-1 variable. When the processing time of process j is earlier than that of process j', then τ jj’ =1, otherwise 0; Ω is an infinite number;

[0045] At any time, any worker can only participate in the processing of one process at most:

[0046]

[0047] Among them, q is an arbitrary worker, and the total number of workers is Q; is a 0-1 variable. When worker q participates in the processing of process j, Otherwise, 0;

[0048] The total attendance rate of workers should be higher than the set value:

[0049]

[0050] r q ≥K q=0,...,Q

[0051] Among them, r q is the attendance rate of each worker, K is the minimum attendance rate requirement, T j is the assembly time of process j.

[0052] Preferably, scheduling each worker includes the following steps:

[0053] For each worker currently processing, the working time coefficient T is calculated and sorted from large to small. The working time coefficient is calculated as follows:

[0054] T q =N qo *N qt *(T qa +T qs )

[0055] Among them, T q is the working time coefficient, N q0 The ability of the worker to process this process. When the worker processes this process, N q0 =1, otherwise N q0 =0;

[0056] Nqt is the worker's occupation from time t to the time when the process is completed. When this time is occupied, N qt =0, otherwise N qt =1;

[0057] T qa is the total processing time coefficient of the worker, T qs is the processing time coefficient of the worker in the most recent working day;

[0058] T qa and T qs The calculations are as follows:

[0059]

[0060] Among them, θ a and θ s They are the total processing coefficient and the nearest processing coefficient respectively.

[0061] Preferably, a resource-constrained project scheduling system is also included, comprising:

[0062] The process order coding and decoding module is used to randomly generate a population, each individual in the population is a process order coding based on the process sequence; based on the generated process order coding, by creating a decoding order set and a waiting process group, and comparing the gene coding values ​​corresponding to all processes in the current waiting process group, taking the process with the largest gene coding value and placing it at the end of the created decoding order set, the decoding order set is updated, and the decoding order set corresponding to the updated process order coding is determined;

[0063] The process time determination module is used to find the earliest time after all the previous processes are completed for the currently decoded process according to the decoding sequence set corresponding to the updated process sorting code, and this time satisfies the remaining available number of people to meet the number of people required for the current process, and serves as the start processing time of the process, and determines the start processing time of each process in this way; according to the start processing time and processing time of each process, determine the end processing time and the total time to complete all processes;

[0064] The process sequencing optimization module is used to minimize the maximum completion time of workers as the optimization goal, determine the constraints on the number of workers and attendance when workers execute the process, and the constraints on the sequential execution of the processes, and obtain the individual with the highest fitness value through the genetic simulated annealing algorithm;

[0065] The optimization scheduling module is used to determine the total processing time coefficient and the most recent processing time coefficient of each worker according to the start processing time, end processing time and total time to complete all processes of each process corresponding to the individual with the highest fitness value, and schedule each worker.

[0066] Preferably, a computer device is also included, the computer device comprising a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor executes the following steps:

[0067] A population is randomly generated, each individual in the population is a process sequence code based on the process sequence; based on the generated process sequence code, a decoding sequence set and a waiting process group are created, and the gene code values ​​corresponding to all processes in the current waiting process group are compared, and the process with the largest gene code value is placed at the end of the created decoding sequence set, and the decoding sequence set is updated to determine the decoding sequence set corresponding to the updated process sequence code;

[0068] According to the decoding sequence set corresponding to the updated process sorting code, find the earliest time after all the previous processes are completed for the currently decoded process, which satisfies the remaining available number of people to meet the number of people required for the current process, and takes it as the start processing time of the process. Similarly, determine the start processing time of each process; according to the start processing time and processing time of each process, determine the end processing time and the total time to complete all processes;

[0069] Taking the worker's minimization of the maximum completion time as the optimization goal, determine the constraints on the number of workers and attendance when the workers execute the process and the constraints on the sequential execution of the process, and obtain the individual with the highest fitness value through the genetic simulated annealing algorithm;

[0070] According to the start processing time, end processing time and total time to complete all processes of each process corresponding to the individual with the highest fitness value, the total processing time coefficient and the most recent processing time coefficient of each worker are determined, and each worker is scheduled.

[0071] Preferably, it further comprises a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps:

[0072] A population is randomly generated, each individual in the population is a process sequence code based on the process sequence; based on the generated process sequence code, a decoding sequence set and a waiting process group are created, and the gene code values ​​corresponding to all processes in the current waiting process group are compared, and the process with the largest gene code value is placed at the end of the created decoding sequence set, and the decoding sequence set is updated to determine the decoding sequence set corresponding to the updated process sequence code;

[0073] According to the decoding sequence set corresponding to the updated process sorting code, find the earliest time after all the previous processes are completed for the currently decoded process, which satisfies the remaining available number of people to meet the number of people required for the current process, and takes it as the start processing time of the process. Similarly, determine the start processing time of each process; according to the start processing time and processing time of each process, determine the end processing time and the total time to complete all processes;

[0074] Taking the worker's minimization of the maximum completion time as the optimization goal, determine the constraints on the number of workers and attendance when the workers execute the process and the constraints on the sequential execution of the process, and obtain the individual with the highest fitness value through the genetic simulated annealing algorithm;

[0075] According to the start processing time, end processing time and total time to complete all processes of each process corresponding to the individual with the highest fitness value, the total processing time coefficient and the most recent processing time coefficient of each worker are determined, and each worker is scheduled.

[0076] Compared with the prior art, the present invention has the following beneficial effects:

[0077] The resource constraint project scheduling method proposed by the present invention can avoid infeasible solutions while ensuring decoding efficiency based on the decoding order set generated by process sorting coding. By determining the start processing time, end processing time and total time to complete all processes of each process as an active decoding process, a better solution can be explored when the decoding order is determined. By considering the process sorting constraints, human resource allocation constraints, human resource utilization rate constraints and completion time judgment constraints of the scheduling problem, the worker minimizes the maximum completion time as the optimization goal, determines the constraints of the number of workers and attendance when the worker executes the process and the constraints of the process in sequence, and uses the genetic simulated annealing algorithm to obtain the individual with the highest fitness value. The individual with less total time has a higher corresponding fitness value, and the iteration of the algorithm ensures the generation of high-quality solutions. The designed decoding method of balanced human resource utilization, according to the completion time information of each process corresponding to the individual with the highest fitness value, by calculating the working time coefficient of each worker in the current processing, using the total time coefficient and the recent processing coefficient as two indicators to jointly allocate the processing workers of the process, can ensure that the utilization rate of human resource scheduling is relatively balanced, better considers the actual utilization of each worker, and is more in line with production practice and ergonomics. In summary, this method can combine the traditional resource-constrained project scheduling problem with human resource balance, and has practical guiding significance for production activities. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 A flow chart of the resource-constrained project scheduling method proposed by the present invention;

[0079] Figure 2A method flow chart of a genetic algorithm provided by an embodiment of the present invention;

[0080] Figure 3 A flow chart of a method for embedding a simulated annealing algorithm in a genetic algorithm provided by an embodiment of the present invention;

[0081] Figure 4 An excellent example of production scheduling Gantt chart provided for an embodiment of the present invention;

[0082] Figure 5 A schematic diagram of the crossover process of a genetic algorithm provided by an embodiment of the present invention;

[0083] Figure 6 A schematic diagram of the mutation process of the genetic algorithm provided by an embodiment of the present invention;

[0084] Figure 7 A schematic diagram of obtaining a decoding sequence provided by an embodiment of the present invention;

[0085] Figure 8 A schematic diagram of heuristic decoding rules provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0086] The following will be combined with the attached embodiment of the present invention Figure 1-Figure 8 , the technical solutions in the embodiments of the present invention are clearly and completely described. It should be understood that the terms described in the present invention are only used to describe specific implementation methods and are not used to limit the present invention.

[0087] like Figure 1 As shown, the present invention proposes a resource-constrained project scheduling method, comprising the following steps:

[0088] A population is randomly generated, each individual in the population is a process sequence code based on the process sequence; based on the generated process sequence code, a decoding sequence set and a waiting process group are created, and the gene code values ​​corresponding to all processes in the current waiting process group are compared, and the process with the largest gene code value is placed at the end of the created decoding sequence set, and the decoding sequence set is updated to determine the decoding sequence set corresponding to the updated process sequence code;

[0089] According to the decoding sequence set corresponding to the updated process sorting code, find the earliest time after all the previous processes are completed for the currently decoded process, which satisfies the remaining available number of people to meet the number of people required for the current process, and takes it as the start processing time of the process. Similarly, determine the start processing time of each process; according to the start processing time and processing time of each process, determine the end processing time and the total time to complete all processes;

[0090] Taking the worker's minimization of the maximum completion time as the optimization goal, determine the constraints on the number of workers and attendance when the workers execute the process and the constraints on the sequential execution of the process, and obtain the individual with the highest fitness value through the genetic simulated annealing algorithm;

[0091] According to the start processing time, end processing time and total time to complete all processes of each process corresponding to the individual with the highest fitness value, the total processing time coefficient and the most recent processing time coefficient of each worker are determined, and each worker is scheduled.

[0092] The optimization scheduling process of the genetic simulated annealing algorithm includes two stages: global search and local search. The global search process uses the genetic algorithm, and the local search uses the simulated annealing algorithm. Figure 2 shown.

[0093] S1: In the population initialization stage, a certain number of randomly initialized populations are generated. Each individual in the population contains a code, namely the process sorting code, and the population is generated in this way.

[0094] S2: Calculate the fitness value of each individual in the population, and select the population based on the fitness value, including elite selection and tournament selection.

[0095] S3: Perform a crossover operation on the population. During the crossover process, any two or more pairs of chromosome individuals that are not currently selected in the parent population are crossed with a certain probability and rule to form a descendant population.

[0096] S4: For each chromosome in the population, determine whether the mutation condition is met. If so, perform mutation operations on the chromosome individual according to certain rules.

[0097] S5: Determine whether the conditions for running the simulated annealing algorithm SA are met. If so, jump to S6; if not, jump to S7.

[0098] S6: After a certain number of generations, simulated annealing local search operations are performed on each individual to generate a population.

[0099] S7: Determine whether the algorithm has reached the termination condition. If so, output the currently known optimal solution; if not, jump to S2.

[0100] Specifically, obtaining the individual with the highest fitness value includes the following steps:

[0101] Determine the preconditions including:

[0102] All production factors except personnel are complete, and there will be no shortage of materials and tools;

[0103] When the processing logic relationship between processes is a serial logic relationship, it is fixed and cannot be modified;

[0104] Workers are divided into different types of work. There is only one specific type of work in a team, and workers of a certain type of work can only complete the work of the corresponding type of work.

[0105] Hiring workers has attendance requirements. The attendance rate of workers must be higher than the set value. At the same time, the working hours of all workers must be consistent, that is, the attendance rate variance must be lower than the set value.

[0106] The workers employed are all skilled workers, and different combinations of workers in the same trade take the same amount of time to complete any process.

[0107] After the unfinished processes of the day are suspended, the unfinished processes will be continued the next day;

[0108] The optimization objective expression is:

[0109] Makespan=minimize(max(E j )), j = 1, 2, ..., n

[0110] Among them, E j It refers to the time to complete the process, and n is the number of processes;

[0111] The constraints include:

[0112] At any time, the total number of workers in all processes involved in the processing cannot exceed the number of workers in that process:

[0113]

[0114] Among them, P i is the number of people limited by team i, σ jt is a 0-1 variable; when process j is being processed at time t, σ jt =1, otherwise 0; A ij S is the number of people required to complete process j by team i, min is the earliest time for the process to start processing, E max The time when all processes have been completed;

[0115] Any process must wait for the previous process to be completed before it can be processed:

[0116] E j ≥S j′ -τ jj’ *Ωj,j′=1,...,n

[0117] Among them, S j is the start processing time of process j, E jis the end processing time of process j; τ jj’ is a 0-1 variable. When the processing time of process j is earlier than that of process j', then τ jj’ =1, otherwise 0; Ω is an infinite number;

[0118] At any time, any worker can only participate in the processing of one process at most:

[0119]

[0120] Among them, q is an arbitrary worker, and the total number of workers is Q; is a 0-1 variable. When worker q participates in the processing of process j, Otherwise, 0;

[0121] The total attendance rate of workers should be higher than the set value:

[0122]

[0123] r q ≥K q=(0,...,Q

[0124] Among them, r q is the attendance rate of each worker, K is the minimum attendance rate requirement, T j is the assembly time of process j.

[0125] A population is randomly generated, and each individual in the population is coded for the process sequence based on the process order, including:

[0126] In the population initialization stage, the gene sequence in each chromosome is encoded in a random decimal format based on 0-1 encoding. The sequence of each gene is a decimal with a value of 0-1. The gene sequence of the generated process sorting code is as follows:

[0127] O={(p,a p )|i=1,2,...,N,a∈[0~1)}

[0128] Among them, p is the process number, N is the total number of processes, and a p is the gene encoding value corresponding to the process, and O represents the process sorting chromosome.

[0129] Determining a decoding order set corresponding to the updated process sorting code includes the following steps:

[0130] Traverse all the processes that are not currently placed in the decoding order set, find all the processes that have no preceding processes and place them in the waiting process group, and record the number of times each process enters the waiting process group;

[0131] Compare the gene coding values ​​in the gene sequences corresponding to all processes in the current waiting process group. When the sum of the gene coding values ​​corresponding to the process to be processed in the current waiting process group and the gene coding values ​​corresponding to the processes that have been in the waiting process for more than 3 consecutive times is greater than 1, place the processes that have been in the waiting process for more than 3 consecutive times at the end of the created decoding order set for processing, and update the decoding order set.

[0132] When the gene encoding value of the decoding order set is equal to the total number of processes, all processes are placed in the waiting process group and the updated decoding order is output; otherwise, all current unprocessed processes are traversed again to find all processes without preceding processes.

[0133] The start time of each process is determined by analogy, including:

[0134] According to the decoding sequence set corresponding to the updated process sorting code, the process is decoded accordingly to determine the completion time of all the predecessor processes of the process;

[0135] Take the maximum value of the completion time as the planned start time of the process. Starting from the planned start time, determine whether the remaining number of available workers in the team at the current moment meets the number of workers required for the current process.

[0136] When the number of people required for the current process is met, the current planned start processing time is taken as the start processing time of the process; if it is not met, the planned start processing time of the process is increased by 1 and re-judged.

[0137] Determine the end-of-processing time and the total time to complete all operations, including:

[0138] Traverse all processes in sequence, and take the end processing time of the process as the start processing time of the process plus the processing time of the process;

[0139] After the traversal is completed, the end processing time of all processes is determined, and the maximum value is taken as the total time to complete all processes.

[0140] like Figure 7 As shown in FIG. 1 , an example of obtaining the decoding order of a chromosome gene in a certain example is shown. OS is the process sequence code of the example. Figure 7 There are two processes to be processed, 4 and 9. The corresponding gene value of process 4 is 0.49, and the gene value of process 9 is 0.07. By comparing the sizes of their corresponding gene values, the decoding order of the process with the larger gene value is put in front. Taking this figure as an example, the gene value of 4 is larger, so the decoding order of 4 is before 9.

[0141] like Figure 8As shown in the figure, the heuristic decoding rule is applied. If process 9 is in the process to be processed for more than three consecutive times, the gene value of process 8, which is now added to the processing process sequence, will be added. The sum of the gene values ​​of process 9 and process 8 is greater than 1, so process 9 is placed after process 8 and enters the decoding order set.

[0142] When the gene encoding value of the decoding order set is equal to the total number of processes, the updated decoding order is output; otherwise, all currently unprocessed processes are traversed again to find all processes without preceding processes.

[0143] Through the genetic simulated annealing algorithm, the individual with the highest fitness value is obtained, including:

[0144] According to the output decoding order, find the moment after the previous process in the logical relationship when the remaining number of workers in the team meets the number of workers required for the current process. The obtained Gantt chart is as follows Figure 4 shown.

[0145] By analyzing the Gantt chart, we can determine the start processing time, end processing time, processing time of each process, processing time of each worker, which types of work are used in each process, which workers are needed to complete the process, and the total time to complete all processes, so as to determine the fitness value corresponding to the genetic simulated annealing algorithm.

[0146] Determining the total processing time coefficient and the most recent processing time coefficient of each worker includes the following steps:

[0147] For each worker currently processing, the working time coefficient T is calculated and sorted from large to small. The working time coefficient is calculated as follows:

[0148] T q =N qo *N qt *(T qa +T qs )

[0149] Among them, T q is the working time coefficient, N q0 The ability of the worker to process this process. When the worker processes this process, N q0 =1, otherwise N q0 =0.

[0150] N qt is the worker's occupation from time t to the time when the process is completed. When this time is occupied, N qt =0, otherwise N qt =1.

[0151] T qa is the total processing time coefficient of the worker, T qsIt is the processing duration coefficient of the worker in the most recent l working days.

[0152] T qa and T qs The calculations are as follows:

[0153]

[0154] where θ a and θ s are the total processing coefficient and the most recent processing coefficient respectively.

[0155] The simulated annealing local search operation is performed for each individual respectively, including the following steps:

[0156] Determine the starting temperature t, the ending temperature t’, the cooling rate v, the number of iterations mar-len at each temperature, and the acceptance probability p;

[0157] For each individual, the following operations are performed:

[0158] Starting from the starting temperature, at each temperature T, mar-len iterations are performed. Each iteration has a certain probability of randomly mutating the individual in three encodings. The specific rules of the random mutation are the same as those of the random decimal encoding of 0-1 encoding;

[0159] Compare the fitness values of the individual after each mutation with those before the mutation, and use the Metropolis criterion to decide whether to accept the new solution, and cool down T at the cooling rate t until T < t’, and output the local optimal solution of the simulated annealing algorithm.

[0160] The present invention also proposes a resource-constrained project scheduling system, including:

[0161] The operation sequence encoding and decoding module is used to randomly generate a population. Each individual in the population is an operation sequence encoding based on the operation order; based on the generated operation sequence encoding, by creating a decoding order set and a waiting operation group, and comparing the gene encoding values corresponding to all operations in the current waiting operation group, the operation with the largest gene encoding value is placed at the end of the created decoding order set, and the decoding order set is updated to determine the decoding order set corresponding to the updated operation sequence encoding;

[0162] The operation time determination module is used to find the earliest time after all the previous operations of the current operation being decoded are completed according to the decoding order set corresponding to the updated operation sequence encoding. This time satisfies that the remaining available number of people meets the number requirement of the current operation, and is used as the start processing time of this operation. And so on to determine the start processing time of each operation; according to the start processing time and the processing duration of each operation, determine the end processing time and the total time to complete all operations;

[0163] The process sequencing optimization module is used to minimize the maximum completion time of workers as the optimization goal, determine the constraints on the number of workers and attendance when workers execute the process, and the constraints on the sequential execution of the processes, and obtain the individual with the highest fitness value through the genetic simulated annealing algorithm;

[0164] The optimization scheduling module is used to determine the total processing time coefficient and the most recent processing time coefficient of each worker according to the start processing time, end processing time and total time to complete all processes of each process corresponding to the individual with the highest fitness value, and schedule each worker.

[0165] The resource-constrained project scheduling method proposed in the present invention designs constraints such as process number limit, process sequence constraint, worker processing constraint, attendance rate constraint, etc., which can improve the utilization rate of human resources.

[0166] Example

[0167] In order to verify the feasibility of the method proposed in the present invention, the embodiment of the present invention takes a multi-factory flexible job shop scheduling method considering order allocation based on genetic algorithm and taboo search algorithm as an example. Figure 3 As shown, the specific implementation steps of the scheduling method are as follows:

[0168] Parameter initialization:

[0169] Before using the genetic simulated annealing algorithm to solve a resource-constrained project scheduling problem that takes into account human resource allocation, it is necessary to initialize the parameters, including the following parameters:

[0170] (1) Job type information: number of jobs and number of workers in each job type.

[0171] (2) Process information: the type of work required for the process, the time required for the process, and the logical relationship between processes.

[0172] (3) Parameters of the genetic algorithm: population size popsize, order allocation crossover probability pc f , machine selection crossover probability pc m , process sorting crossover probability pc o , order allocation probability pm f 、Machine selection probability pm m , process sequence variation probability pm o .

[0173] (4) Parameters of the simulated annealing algorithm SA: starting temperature t, ending temperature t', cooling rate v, number of iterations per temperature mar-len, acceptance probability p, order assignment probability pmsa f 、Machine selection probability pmsa m, process sequence variation probability pmsa o .

[0174] (5) Condition parameters: parameter k required to run the simulated annealing algorithm and termination condition parameter n.

[0175] In the present invention, as an illustrative example, k and n are both 60, and popsize is 80.

[0176] Coding process:

[0177] The encoding method of this embodiment adopts a random decimal encoding form based on 0-1 encoding, that is, the sequence of each gene is a decimal with a value of 0-1.

[0178] Based on the above settings, the specific steps of this embodiment are designed as follows, wherein the flowchart of the genetic simulated annealing algorithm is as follows: Figure 3 As shown:

[0179] S1: In the population initialization stage, a certain number of randomly initialized populations are generated. Each individual in the population contains a code, namely the process sorting code, and the population is generated in this way.

[0180] S2: Calculate the fitness value of each individual in the population, and select the population based on the fitness value, including elite selection and tournament selection.

[0181] The elite selection in the first stage means that in each iteration, the first n% individuals whose decoding values ​​are closest to the optimization target are selected from the population and placed into the new population.

[0182] The tournament selection in the second stage means that in each iteration, two individuals are randomly selected from the population, and the individuals whose decoding values ​​are closer to the optimization target are selected and placed in the new population until the number of individuals in the new population is equal to the number of individuals in the generated population.

[0183] S3: Perform a crossover operation on the population. During the crossover process, any two or more pairs of chromosome individuals that are not currently selected in the parent population are crossovered with a certain probability and rule to form a child population. The crossover operation diagram is shown in the figure below: Figure 5 shown.

[0184] Crossover is the process by which a parent chromosome generates an equal number of daughter chromosomes. It is divided into two types: multi-point crossover and discrete recombination.

[0185] Multi-point crossover means that during crossover, the two parent chromosomes are cut into a certain number of segments according to the same gene position, and one of the offspring inherits the gene value of the parent chromosome with equal probability for each segment, and the other offspring inherits the gene value of the other parent.

[0186] Discrete recombination means that, at the time of crossover, for each gene on each chromosome of the offspring, there is an equal probability of inheriting the gene value of two parents and one offspring.

[0187] S4: For each chromosome in the population, determine whether the mutation condition is met. If so, perform mutation operations on the chromosome individual according to certain rules. The mutation operation diagram is shown in the figure below. Figure 6 shown.

[0188] Mutations are divided into single-point mutations and multi-point mutations, among which:

[0189] Single-point mutation refers to randomly selecting one or more genes in the parent chromosome and reinitializing them to form the daughter chromosome.

[0190] Multi-point mutation refers to selecting two or more genes in different positions in the parent chromosome, rearranging their gene values ​​in a random order, and then filling them into the original genes to form the daughter chromosomes.

[0191] S5: Determine whether the conditions for running the simulated annealing algorithm are met. If so, jump to S6; if not, jump to S7.

[0192] S6: Execute the simulated annealing algorithm for the individuals that have undergone factory selection coding mutation, perform local search operations, and generate a new population.

[0193] The condition for running the simulated annealing algorithm is to record the best solution in each generation of the population. If the value of the best solution has not changed in k generations, the simulated annealing algorithm is executed.

[0194] Specifically, the simulated annealing algorithm includes determining the starting temperature t, the ending temperature t', the cooling rate v, the number of iterations for each temperature mar-len, and the acceptance probability p. For each individual, the following operations need to be performed:

[0195] Starting from the starting temperature, perform mar-len iterations at each temperature T. Each iteration has a certain probability of encoding a mutation of the individual, such as Figure 6 As shown, the specific rules are the same as the above encoding rules.

[0196] Compare the fitness values ​​of the individuals after each mutation with those before the mutation, use the Metropolis criterion to decide whether to accept the new solution, and cool T at a cooling rate v until T <t’。

[0197] S7: Determine whether the algorithm has reached the termination condition. If so, output the currently known optimal solution; if not, jump to S2.

[0198] Set preset conditions, relevant parameters and constraints for the resource constraint scheduling project scenario, and construct the above-mentioned optimization scheduling model considering resource constraints.

[0199] According to the above steps, in order to verify the performance of the algorithm provided by this embodiment, this embodiment conducted experiments and obtained 10 groups of example results RC01-RC10 as shown in Table 1, each type of work, number of people in the type of work and process are different.

[0200] Table 1. Calculation results obtained in this embodiment

[0201]

[0202] In this example set, the optimal solution obtained by solving the problem through the genetic simulated annealing algorithm is relatively stable, and the worker utilization rate of the optimal solution is stable at more than 65%, which shows the effectiveness and stability of the genetic simulated annealing algorithm provided by the embodiment of the present invention. Figure 4 As shown, we can see that the utilization rate of workers is relatively balanced and the completion time is 79 standard hours.

[0203] The method proposed in the present invention can combine the traditional resource-constrained project scheduling problem with resource balance, and can be used as a reference for multi-shift resource-constrained project scheduling problems. In order to further improve the search efficiency and combine it with industrial practical factors, the present invention takes the maximum completion time as the optimization target. At the same time, the core concept is to sort the process sequence and optimize the resource attendance time, and is not limited to the specific design of the termination condition or constraint target, so it is widely applicable to different design targets and constraints.

[0204] The genetic simulated annealing algorithm is used to solve the problem, wherein the genetic algorithm can expand the search range of the solution and generate a better solution; the simulated annealing algorithm can explore the solution near an individual, improve the search efficiency, and avoid falling into the local optimum. Therefore, the solution method adopted by the present invention can take into account both the search range and the search efficiency, and achieve global optimization with higher efficiency.

[0205] In a specific application scenario, the present invention further designs constraints such as job type number restrictions, process sequence constraints, worker processing constraints, and attendance rate constraints, which can improve the system's computing efficiency while meeting the above constraints.

[0206] Through the decimal coding initialization scheme, a random decimal is obtained from 0-1 for each chromosome and filled into the chromosome. Compared with the traditional sorting based on the process number as the processing order, this coding method can avoid infeasible solutions in this problem and prevent the logical sequence of process processing from conflicting, which in turn leads to infeasible solutions. At the same time, the unified coding scheme allows the chromosome value to change at will. The change of each chromosome value may change the processing order of the process, which is conducive to the algorithm's exploration of the solution space.

[0207] In view of the limitation of resource processing utilization, a decoding method based on working time coefficient is designed. The total working time coefficient and the recent processing coefficient are used to jointly allocate processing workers to the working process, which is more in line with production reality and ergonomics.

[0208] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

[0209] In addition, unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as commonly understood by those skilled in the art to which the present invention belongs. All documents mentioned in this specification are incorporated by reference to disclose and describe the methods related to the documents. In the event of any conflict with any incorporated document, the content of this specification shall prevail.

Claims

1. A resource-constrained project scheduling method, characterized in that: The following steps are involved: A population is randomly generated, each individual in the population is a process sequence code based on the process sequence; based on the generated process sequence code, a decoding sequence set and a waiting process group are created, and the gene code values ​​corresponding to all processes in the current waiting process group are compared, and the process with the largest gene code value is placed at the end of the created decoding sequence set, and the decoding sequence set is updated to determine the decoding sequence set corresponding to the updated process sequence code; According to the decoding sequence set corresponding to the updated process sorting code, find the earliest time after all the previous processes are completed for the currently decoded process, which satisfies the remaining available number of people to meet the number of people required for the current process, and takes it as the start processing time of the process. Similarly, determine the start processing time of each process; according to the start processing time and processing time of each process, determine the end processing time and the total time to complete all processes; Taking the worker's minimization of the maximum completion time as the optimization goal, determine the constraints on the number of workers and attendance when the workers execute the process and the constraints on the sequential execution of the process, and obtain the individual with the highest fitness value through the genetic simulated annealing algorithm; According to the start processing time, end processing time and total time to complete all processes of each process corresponding to the individual with the highest fitness value, the total processing time coefficient and the most recent processing time coefficient of each worker are determined, and each worker is scheduled.

2. The resource-constrained project scheduling method according to claim 1, characterized in that: Each individual in the population is a process sequence code based on the process sequence, specifically including: In the population initialization stage, the gene sequence in each chromosome is encoded in a random decimal format based on 0-1 encoding. The sequence of each gene is a decimal with a value of 0-1. The gene sequence of the generated process sorting code is as follows: O={(p,a p )|i=1,2,...,N,a∈[0~1)} Among them, p is the process number, N is the total number of processes, and a p is the gene encoding value corresponding to the process, and O represents the process sorting chromosome.

3. The resource-constrained project scheduling method according to claim 2, characterized in that: The step of determining a decoding order set corresponding to the updated process sequence code comprises the following steps: Traverse all the processes that are not currently placed in the decoding order set, find all the processes that have no preceding processes and place them in the waiting process group, and record the number of times each process enters the waiting process group; Compare the gene coding values ​​in the gene sequences corresponding to all processes in the current waiting process group. When the sum of the gene coding values ​​corresponding to the process to be processed in the current waiting process group and the gene coding values ​​corresponding to the processes that have been in the waiting process for more than 3 consecutive times is greater than 1, place the processes that have been in the waiting process for more than 3 consecutive times at the end of the created decoding order set for processing, and update the decoding order set. When the gene encoding value of the decoding order set is equal to the total number of processes, all processes are placed in the waiting process group and the updated decoding order is output; otherwise, all current unprocessed processes are traversed again to find all processes without preceding processes.

4. The resource-constrained project scheduling method according to claim 3, characterized in that: The start processing time of each process is determined by analogy, specifically including: According to the decoding sequence set corresponding to the updated process sorting code, the process is decoded accordingly to determine the completion time of all the predecessor processes of the process; Take the maximum value of the completion time as the planned start time of the process. Starting from the planned start time, determine whether the remaining number of available workers in the team at the current moment meets the number of workers required for the current process. When the number of people required for the current process is met, the current planned start processing time is taken as the start processing time of the process; if it is not met, the planned start processing time of the process is increased by 1 and re-judged.

5. The resource-constrained project scheduling method according to claim 4, characterized in that: Determining the end processing time and the total time to complete all processes specifically includes: Traverse all processes in sequence, and take the end processing time of the process as the start processing time of the process plus the processing time of the process; After the traversal is completed, the end processing time of all processes is determined, and the maximum value is taken as the total time to complete all processes.

6. The resource-constrained project scheduling method according to claim 5, characterized in that: The step of obtaining the individual with the highest fitness value comprises the following steps: Determine the preconditions including: All production factors except personnel are complete, and there will be no shortage of materials and tools; When the processing logic relationship between processes is a serial logic relationship, it is fixed and cannot be modified; Workers are divided into different types of work. There is only one specific type of work in a team, and workers of a certain type of work can only complete the work of the corresponding type of work. Hiring workers has attendance requirements. The attendance rate of workers must be higher than the set value. At the same time, the working hours of all workers must be consistent, that is, the attendance rate variance must be lower than the set value. The workers employed are all skilled workers, and different combinations of workers in the same trade take the same amount of time to complete any process. After the unfinished processes of the day are suspended, the unfinished processes will be continued the next day; The optimization objective expression is: Makespan=minimize(max(E j )),j=1,2,…,b Among them, E j It refers to the time to complete the process, and n is the number of processes; The constraints include: At any time, the total number of workers in all processes involved in the processing cannot exceed the number of workers in that process: Among them, P i is the number of people limited by team i, σ jt is a 0-1 variable; when process j is being processed at time t, σ jt =1, otherwise 0; A ij S is the number of people required to complete process j by team i, min is the earliest time for the process to start processing, E max The time when all processes have been completed; Any process must wait for the previous process to be completed before it can be processed: From j ≥S j' -τ jj’ *Ωj,j'=1,…,n Among them, S j is the start processing time of process j, E j is the end processing time of process j; τ jj’ is a 0-1 variable. When the processing time of process j is earlier than that of process j', then τ jj’ =1, otherwise 0; Ω is an infinite number; At any time, any worker can only participate in the processing of one process at most: Among them, q is an arbitrary worker, and the total number of workers is Q; is a 0-1 variable. When worker q participates in the processing of process j, Otherwise, 0; The total attendance rate of workers should be higher than the set value: Among them, r q is the attendance rate of each worker, K is the minimum attendance rate requirement, T j is the assembly time of process j.

7. The resource-constrained project scheduling method according to claim 6, characterized in that: The process of scheduling each worker includes the following steps: For each worker currently processing, the working time coefficient T is calculated and sorted from large to small. The working time coefficient is calculated as follows: T q =N qo *X qt *(T qa +T qs ) Among them, T q is the working time coefficient, N q0 The ability of the worker to process this process. When the worker processes this process, N q0 =1, otherwise N q0 =0; N qt is the worker's occupation from time t to the time when the process is completed. When this time is occupied, N qt =0, otherwise N qt =1; T qa is the total processing time coefficient of the worker, T qs is the processing time coefficient of the worker in the most recent working day; T qa and T qs The calculations are as follows: Among them, θ a and θ s They are the total processing coefficient and the nearest processing coefficient respectively.

8. A resource-constrained project scheduling system, characterized in that: include: A process sequence encoding and decoding module, used for randomly generating a population, each individual in the population is a process sequence encoding based on the process sequence; Based on the generated process sorting code, by creating a decoding order set and a waiting process group, and comparing the gene code values ​​corresponding to all processes in the current waiting process group, taking the process with the largest gene code value and placing it at the end of the created decoding order set, the decoding order set is updated, and the decoding order set corresponding to the updated process sorting code is determined; The process time determination module is used to find the earliest time after all the previous processes are completed for the currently decoded process according to the decoding sequence set corresponding to the updated process sorting code, and this time satisfies the remaining available number of people to meet the number of people required for the current process, and serves as the start processing time of the process, and determines the start processing time of each process in this way; according to the start processing time and processing time of each process, determine the end processing time and the total time to complete all processes; The process sequencing optimization module is used to minimize the maximum completion time of workers as the optimization goal, determine the constraints on the number of workers and attendance when workers execute the process, and the constraints on the sequential execution of the processes, and obtain the individual with the highest fitness value through the genetic simulated annealing algorithm; The optimization scheduling module is used to determine the total processing time coefficient and the most recent processing time coefficient of each worker according to the start processing time, end processing time and total time to complete all processes of each process corresponding to the individual with the highest fitness value, and schedule each worker.

9. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps: A population is randomly generated, each individual in the population is a process sequence code based on the process sequence; based on the generated process sequence code, a decoding sequence set and a waiting process group are created, and the gene code values ​​corresponding to all processes in the current waiting process group are compared, and the process with the largest gene code value is placed at the end of the created decoding sequence set, and the decoding sequence set is updated to determine the decoding sequence set corresponding to the updated process sequence code; According to the decoding sequence set corresponding to the updated process sorting code, find the earliest time after all the previous processes are completed for the currently decoded process, which satisfies the remaining available number of people to meet the number of people required for the current process, and takes it as the start processing time of the process. Similarly, determine the start processing time of each process; according to the start processing time and processing time of each process, determine the end processing time and the total time to complete all processes; Taking the worker's minimization of the maximum completion time as the optimization goal, determine the constraints on the number of workers and attendance when the workers execute the process and the constraints on the sequential execution of the process, and obtain the individual with the highest fitness value through the genetic simulated annealing algorithm; According to the start processing time, end processing time and total time to complete all processes of each process corresponding to the individual with the highest fitness value, the total processing time coefficient and the most recent processing time coefficient of each worker are determined, and each worker is scheduled.

10. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor performs the following steps: A population is randomly generated, each individual in the population is a process sequence code based on the process sequence; based on the generated process sequence code, a decoding sequence set and a waiting process group are created, and the gene code values ​​corresponding to all processes in the current waiting process group are compared, and the process with the largest gene code value is placed at the end of the created decoding sequence set, and the decoding sequence set is updated to determine the decoding sequence set corresponding to the updated process sequence code; According to the decoding sequence set corresponding to the updated process sorting code, find the earliest time after all the previous processes are completed for the currently decoded process, which satisfies the remaining available number of people to meet the number of people required for the current process, and takes it as the start processing time of the process. Similarly, determine the start processing time of each process; according to the start processing time and processing time of each process, determine the end processing time and the total time to complete all processes; Taking the worker's minimization of the maximum completion time as the optimization goal, determine the constraints on the number of workers and attendance when the workers execute the process and the constraints on the sequential execution of the process, and obtain the individual with the highest fitness value through the genetic simulated annealing algorithm; According to the start processing time, end processing time and total time to complete all processes of each process corresponding to the individual with the highest fitness value, the total processing time coefficient and the most recent processing time coefficient of each worker are determined, and each worker is scheduled.

Citation Information

Patent Citations

  • Single-instruction-set heterogeneous multi-core system static task scheduling method

    CN102866912A

  • A flexible job shop scheduling method adopting an improved immune genetic algorithm

    CN109816262A

  • Dual-resource constraint flexible workshop scheduling and layout integrated optimization method and system

    CN112990716A

  • Production scheduling optimization method based on ALNS improved simulated annealing

    CN113408818A

  • Skill planning configuration and workshop scheduling integrated optimization method based on learning ability

    CN114912346A

Cited By

  • Human resource allocation method, device and equipment for complex manufacturing process

    CN120087718A