Multi-shift team collaborative job scheduling method and system based on improved whale optimization algorithm
By improving the whale optimization algorithm, a multi-shift collaborative operation scheduling model was constructed. By adopting double-layer coding and multi-strategy operation, the scheduling problem of multi-shift collaborative operation in large and complex equipment production workshops was solved, and the effects of task load balancing and minimizing the maximum completion time were achieved.
Patent Information
- Application Number
- CN202511269768.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-09-08
AI Technical Summary
Existing technologies are insufficient to effectively solve the scheduling problem of multi-shift collaborative operations in large and complex equipment production workshops, especially when considering shift rest time and task load balancing. Traditional methods have high computational complexity or are prone to getting trapped in local optima.
An improved whale optimization algorithm is adopted. By constructing a scheduling model based on shift index, a two-layer encoding is used to represent the order of task workpieces and shift numbers. Combined with multi-strategy whale pod initialization, search and predation operations, the search capability is improved, local optima are avoided, and the best scheduling scheme is selected by normalization of ideal point and worst point.
It improves the scheduling efficiency of multi-shift collaborative operations, enables the balancing of shift task load and minimizes the maximum completion time in the manufacturing of complex workpieces, is suitable for scheduling flexible workshops with multiple production resources, and has good scalability.
Smart Images

Figure CN120746247B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of production operation workshop scheduling, in particular to a multi-shift team collaborative operation scheduling method and system based on an improved whale optimization algorithm. BACKGROUND
[0002] With the continuous popularization of industrial internet technology, modern manufacturing enterprises are developing towards automation and intelligence, and many manufacturing processes have been completely completed by equipment automation. However, in the production workshop of large and complex equipment (such as spacecraft, high-speed rail, ships, etc.), due to the high complexity and great technical difficulty of the product process, full automation production cannot be realized, and manual processing by shift workers is still needed. At the same time, the processing period of large and complex workpieces is long, and a single shift team cannot complete the processing within one shift, so multiple shift teams need to process the same workpiece in consecutive shifts. Therefore, when arranging such production tasks, the manufacturing workshop not only needs to consider multi-shift team collaborative processing, but also needs to consider shift rest time to ensure that all tasks are completed as soon as possible and the load balance of shift teams is achieved.
[0003] Current research on production operation workshop scheduling problems mainly focuses on flow shop or flexible job shop considering task equipment arrangement, and less on task shift arrangement and complex multi-shift team collaborative processing of the same workpiece scheduling problem. At the same time, in the face of large-scale task scheduling, traditional exact solution methods have high computational complexity and are difficult to give high-quality solutions within an acceptable time; while evolutionary algorithms represented by genetic algorithms can handle large-scale problems, but there are still bottlenecks in improving the search ability of global excellent solutions and avoiding falling into local optimum.
[0004] CN118068785A discloses using an improved whale optimization algorithm for job shop scheduling, considering two objectives of completion time and machine energy consumption, and designing coding based on forced same-machine job constraints, but this scheme only considers processing machines and does not involve the case of multi-shift team collaborative processing of the same workpiece. The workshop scheduling method disclosed in CN118551977A considers the proficiency of the skills possessed by assembly workers, but each assembly stage can only be processed by one shift team, which is difficult to adapt to the case of multi-shift team collaborative processing of large and complex equipment. Therefore, it is urgent to construct a special model for the multi-shift team continuous collaborative scheduling problem in large and complex task manufacturing, and to design an efficient evolutionary algorithm framework to improve the search ability of high-quality scheduling solutions. SUMMARY
[0005] Purpose of the invention: The purpose of this invention is to provide a multi-shift collaborative operation scheduling method and system based on an improved whale optimization algorithm. Addressing the technical challenges of continuous collaborative processing across multiple shifts, a scheduling model based on shift indexes is constructed. This improves upon the limitations of the whale optimization algorithm in adapting to tasks such as discretization and multi-shift collaboration, which are subject to whale initialization, searching, and predation operations. It also solves the technical dilemma of low scheduling efficiency and susceptibility to local optima caused by complex shift constraints in continuous collaborative operations across multiple shifts.
[0006] Technical solution: The multi-shift collaborative operation scheduling method based on the improved whale optimization algorithm described in this invention includes the following steps:
[0007] Step 1: Obtain task and shift information for the production workshop, including dividing the day into several shifts, processing time for each workpiece in one or more shifts, each workpiece being processed by at least one shift, each shift not working two or more consecutive shifts, and the interval between two shifts not less than several shifts.
[0008] Step 2: Establish a workshop scheduling model for continuous collaborative operations of multiple shifts, with the objective function being to minimize the maximum completion time and the maximum shift task load.
[0009] Step 3: The improved whale optimization algorithm is used to solve the workshop scheduling model to obtain candidate scheduling schemes. The improved whale optimization algorithm adopts a two-layer encoding, which is a task layer representing the order of task workpiece numbers and a team layer representing the order of processing team numbers of task workpieces.
[0010] Step 4: Select the best scheduling scheme from the candidate scheduling schemes, including the workpiece processing sequence and the shift scheduling results.
[0011] Furthermore, the production workshop in Processing can be arranged within 1 day One workpiece. Each workpiece The processing time is Hours, i.e., workpiece exist Processing is completed within a shift, and each day is divided into... There are [number] shifts. The production workshop has [number] shifts. Each work group If the work group Unable to complete the workpiece within one shift The workpiece can be processed by other work groups, meaning the workpiece... This process can be completed collaboratively by multiple work teams. Simultaneously, the interval between two work sessions for each work team should be no less than [amount missing]. One shift.
[0012] In step 2, the constraints of the workshop scheduling model include:
[0013] Each job must be scheduled to start processing at the beginning of a shift, i.e.
[0014] ;
[0015] Each job once started processing must be processed continuously for several shifts until the processing is completed, i.e.
[0016] ;
[0017] Each shift can process only one job at the same time, i.e.
[0018] ;
[0019] The interval between two jobs processed by each shift must be no less than a pre-defined threshold, i.e.
[0020] ;
[0021] The end time of each job must be no greater than the maximum completion time, i.e.
[0022] ;
[0023] The task load of each shift must be no greater than the maximum shift task load, i.e.
[0024] ;
[0025] The value range of the variables is defined, i.e.
[0026] ;
[0027] ;
[0028] ;
[0029] ;
[0030] wherein, is a 0-1 decision variable, if it is 1, it means that the task is processed by the shift at the shift ; otherwise, it is not processed. is a 0-1 decision variable, if it is 1, it means that the task starts processing at the shift ; otherwise, it does not start processing. is a continuous variable, which represents the maximum completion time. is a continuous variable, which represents the maximum shift task load.
[0031] Further, in step 3, the improved whale optimization algorithm comprises the following steps:
[0032] Step 3.1: Whale population initialization is performed according to whale individual coding to generate an initial whale population containing whales, perform whale repair operation and whale individual decoding;
[0033] Step 3.2: Sort the whales to obtain a leader whale population and a follower whale population;
[0034] Step 3.3: randomly select one individual from the leader whale population, and select one individual from the follower whale population using binary tournament selection to form a pair of parents, repeat the step to obtain pairs of parent whales;
[0035] Step 3.4: calculate the individual similarity of each pair of parent whales, if less than the similarity threshold, perform whale search operation, otherwise perform whale predation operation; thus obtain two offspring whales, perform whale repair operation and whale individual decoding;
[0036] Step 3.5: if the offspring is better than the parent, replace the parent, otherwise keep it, to obtain a new generation of whale population;
[0037] Step 3.6: repeat steps 3.2 to 3.5 until a preset number of iterations is reached, and output the Pareto optimal whale population, i.e. the candidate scheduling scheme.
[0038] Further, in the improved whale optimization algorithm, the whale population initialization operation is: randomly selecting one strategy from the random allocation strategy, uniform allocation strategy and proportional allocation strategy according to a preset probability to generate whale individuals.
[0039] Further, in the improved whale optimization algorithm, the whale repair operation is: performing legality test on whale coding, for a processing shift sequence, if a shift does not satisfy the constraint that the interval between two works is not less than its preset threshold, randomly select a shift from other shifts that satisfy the constraint to replace, until the processing shift sequence satisfies the constraint.
[0040] Further, in the improved whale optimization algorithm, the individual similarity of two whales is , wherein is the coding similarity, i.e. the average of the processing order similarity and the task shift allocation similarity, the processing order similarity is calculated by calculating the Kendall tau correlation coefficient of the task layer coding of two individuals and normalizing it to 0-1; the task shift allocation similarity is the ratio of the number of same shift in the same task to the total number of shifts required by all workpieces; For decoding similarity, the ratio of the total number of shifts of the same task arranged by the same shift team at the same time in two individual scheduling schemes to the total number of shifts that can be arranged by all shift teams is calculated. The total number of shifts that can be arranged by all shift teams is the product of the number of shifts that can be arranged by a single shift team and the number of shift teams .
[0041] Further, in the improved whale optimization algorithm, the whale searching operation is: for two parent whale individuals, task exchange operation and shift team exchange operation are sequentially performed to obtain two offspring; the whale predation operation is: for any one of the two parent whales, task replacement operation and shift team replacement operation are sequentially performed to finally obtain two offspring, respectively;
[0042] Wherein, the task exchange operation randomly selects one of the task position strategy and the task order strategy, the task position strategy is: randomly select 40%-60% of the task coding layer position to keep, the other positions of the parent A task coding layer are sequentially filled with the parent B task coding which is not kept in the parent A, the task coding corresponding shift team sequence remains unchanged, and the parent B performs the same operation; the task order strategy is: randomly select a task coding layer segment to keep; for the task coding outside the parent A segment, sequentially select the task in the parent B task coding layer which is not in the parent A segment, the task coding corresponding shift team sequence remains unchanged; the parent B performs the same operation;
[0043] Wherein, the shift team exchange operation randomly selects one of the shift team segment strategy and the random selection strategy, the shift team segment strategy is: randomly select a task coding layer segment; if there are task coding with the same but different shift team arrangements in the segment, exchange the corresponding shift team arrangement; the random selection strategy is: traverse the task workpiece coding; for the task workpiece , randomly generate a value between 0 and 1, if the value is less than 0.5, exchange the shift team sequence corresponding to the task workpiece of the two parents;
[0044] Wherein, the task replacement operation is: randomly select two positions in the coding, exchange the task coding and shift team sequence corresponding to the two positions;
[0045] Wherein, the shift team replacement operation is: randomly select a position in the coding, for the workpiece corresponding to the position, randomly select shift teams from the processing shift teams, if is shift team repeated sampling, otherwise it is shift team non-repeated sampling, randomly shuffle the order of the newly selected shift teams; is the number of shift teams needed by workpiece i, and m is the total number of shift teams in the workshop.
[0046] Further, the improved whale optimization algorithm sorts the whales according to the maximum completion time and the maximum team task load of the whale individuals, adopts the fast non-dominated sorting method in the NSGA-II algorithm to sort, and selects the first several whales according to the order according to the set number as the leading whale group, and the rest as the following whale group.
[0047] Further, the method for selecting the best scheduling scheme from the candidate scheduling scheme in step 4 comprises:
[0048] Obtaining the maximum completion time and the maximum team task load of all candidate scheduling scheme individuals;
[0049] Calculating the minimum value of the maximum completion time and the minimum value of the maximum team task load to form an ideal point, and calculating the maximum value of the maximum completion time and the maximum value of the maximum team task load to form a worst point;
[0050] According to the ideal point and the worst point, the two target values corresponding to all candidate scheduling schemes are normalized by the minimum maximum method;
[0051] The index of the minimum value is obtained by taking the average value of the normalized target values, and the candidate scheduling scheme corresponding to the index is the best scheduling scheme.
[0052] The multi-team collaborative job scheduling system based on the improved whale optimization algorithm comprises:
[0053] An information acquisition unit is configured to acquire task and team information of a production job workshop, including dividing a day into several shifts, the processing time of each workpiece being one or more shifts, each workpiece being processed by at least one team, each team being unable to work continuously for two or more shifts, and the interval between two working times being no less than several shifts;
[0054] A workshop scheduling model modeling unit is configured to establish a workshop scheduling model for multi-team continuous collaborative job, and the objective function is to minimize the maximum completion time and minimize the maximum team task load;
[0055] A candidate scheduling scheme generation unit is configured to solve the workshop scheduling model by using an improved whale optimization algorithm to obtain a candidate scheduling scheme, wherein the improved whale optimization algorithm adopts double-layer coding, including a task layer representing the task workpiece number sequence and a team layer representing the processing team number sequence of the task workpiece;
[0056] A best scheduling scheme generation unit is configured to select a best scheduling scheme from the candidate scheduling scheme, including a workpiece processing sequence and a team scheduling result.
[0057] Beneficial effects: compared with the prior art, the advantages of the present application are that (1) the present application is aimed at considering the multi-shift continuous collaborative production scheduling problem, a mathematical model is constructed based on shift index, and the model considers the constraints of workpiece continuous shift processing limit, shift team work shift interval limit, shift team single shift workpiece processing limit and other realistic scene constraints of the workshop. (2) the present application adopts an improved whale optimization algorithm framework to solve the production scheduling problem considering multi-shift continuous collaborative operation. The algorithm adds whale coding and decoding based on task and shift double coding, multi-strategy whale group initialization operation, multi-strategy whale search operation, multi-strategy whale predation operation, multi-dimensional similarity calculation operation and other operators, so that the algorithm can effectively find the Pareto optimal solution set and avoid falling into the local optimal dilemma, and improve the search ability of the optimal scheduling scheme of the algorithm. (3) the present application normalizes the double target values of the excellent scheduling scheme obtained by the algorithm by introducing ideal points and worst points, so as to obtain the best scheduling scheme and visual gantt chart. The selection of the optimal scheduling scheme removes the dimensional influence of the maximum completion time and the maximum shift task load, selects the best scheduling scheme from the Pareto optimal solution set, and avoids the problem that it is difficult to select multiple results obtained by the multi-objective algorithm. (4) the present application not only can improve the multi-shift scheduling efficiency of complex workpiece manufacturing, but also has good generalizability and can be applied to other similar multi-production resource (such as equipment, workers, shifts, etc.) continuous collaborative processing flexible job shop scheduling environment. BRIEF DESCRIPTION OF DRAWINGS
[0058] Figure 1 The flow chart of the multi-shift collaborative operation scheduling method of the embodiment of the present application.
[0059] Figure 2 The schematic diagram of the multi-shift collaborative production workshop of the embodiment of the present application.
[0060] Figure 3 The flow chart of the improved whale optimization algorithm of the embodiment of the present application.
[0061] Figure 4 The whale coding and decoding schematic diagram of the improved whale optimization algorithm of the embodiment of the present application.
[0062] Figure 5 The gantt chart of the multi-shift scheduling result of the embodiment of the present application. DETAILED DESCRIPTION
[0063] First, the meanings of the data involved in the present application are introduced.
[0064] Shift team: the shift team of the production operation workshop is a production group containing one or more workers, and the workshop arranges production in units of groups.
[0065] Shifts: The shifts in the production workshop are the work arrangements divided into time periods within the workshop. They are generally two or three shifts, meaning there are two or three shifts per day.
[0066] Task: The production workshop needs to complete the processing of several workpieces within a certain time. In the production workshop of large and complex equipment (such as spacecraft, high-speed rail, ships, etc.), the total processing time of each workpiece is different and there is no restriction on the processing sequence.
[0067] Task load: The total number of shifts in which the work group needs to perform processing tasks within the planned scope.
[0068] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0069] like Figure 1 As shown, the multi-shift collaborative operation scheduling method based on the improved whale optimization algorithm includes the following steps.
[0070] S1, obtain the task information and work group information of the production workshop. In this example, it is a production workshop for large spacecraft cabin structural components, which mainly involves information such as the number of tasks, task processing time, and number of work groups.
[0071] The specific description of the mission information is: The production workshop for large spacecraft cabin structural components is in... Processing can be arranged within 1 day This example involves a single workpiece. The task duration is 15 days, and the number of workpieces is 20. This embodiment uses a three-shift work system as an example, with three shifts per day. Each shift is 8 hours, and each workpiece The processing time is Hours, this embodiment also sets That is, the corresponding workpiece exist The processing is completed within each shift. Specific task information is shown in Table 1.
[0072] Table 1 Task Information Table
[0073]
[0074] The specific description of the work group information is as follows: The cabin structure component production workshop has... Each work group Each shift can only be worked within one shift, and the interval between two shifts must be no less than two shifts. , If the work group Unable to complete the workpiece within one shift The workpiece can be processed by other work groups, meaning the workpiece... The multi-shift team can be cooperatively processed. Specifically, the number of teams in the present example is 5, and a multi-shift team collaborative production workshop schematic diagram is shown in Figure 2 . Figure 2 The production state of the workshop is for a shift, and only tasks 20, 7 and 11 are being processed in the current workshop. At this time, team 2, team 3 and team 5 are processing tasks 20, tasks 7 and tasks 11 in their respective team work areas. At the same time, team 1 and team 5 are idle and in a rest state.
[0075] S2, based on task information and team information, a workshop scheduling model for multi-shift team continuous collaborative operation is constructed. Traditional mathematical models mostly use sequential indexing and start-stop time variables for modeling, and fail to fully integrate shift indexing-based optimization of completion time and team load balancing. The workshop scheduling model proposed by the present application includes an objective function and constraint conditions, and the model is specifically:
[0076] ; (1)
[0077] ; (2)
[0078] ; (3)
[0079] ; (4)
[0080] ; (5)
[0081] ; (6)
[0082] ; (7)
[0083] ; (8)
[0084] ; (9)
[0085] ; (10)
[0086] ; (11)
[0087] ; (12)
[0088] In the formula (1), the maximum completion time of the target task is minimized; the formula (2) represents the minimum maximum team task load; the formula (3) represents that each workpiece must be arranged to start processing at a shift; the formula (4) represents that once a workpiece starts processing, it must be continuously processed A shift cannot be interrupted; formula (5) indicates that each team can only process one workpiece at the same time; formula (6) indicates that the interval between two working times of each team must be greater than or equal to A shift; formula (7) indicates that the end time of each workpiece is less than or equal to the maximum completion time; formula (8) indicates that the task load of each team is less than or equal to the maximum team task load; formula (9) to formula (12) indicate the value range of the variable, is a 0-1 decision variable, if it is 1, it indicates that the task is processed by the team at the shift ; otherwise, it is not processed. is a 0-1 decision variable, if it is 1, it indicates that the task is processed at the shift ; otherwise, it is not processed. is a continuous variable, indicating the maximum completion time. is a continuous variable, indicating the maximum team task load. is a task scheduling time range, used to enumerate each shift time, in this example is 15 days.
[0089] S3, the improved whale optimization algorithm is used to solve the multi-team continuous collaborative job-oriented workshop scheduling model to obtain a candidate scheduling scheme.
[0090] The classical whale optimization algorithm mainly faces continuous optimization problems, uses continuous mathematical formula search, the whale group initialization strategy is simple, the cross variation strategy is single, and cannot directly process the scheduling problem of process-team discrete coding; at the same time, there is no coding mechanism and corresponding search, predation, similarity calculation and other operations for the sequence constraint of multiple teams processing the same workpiece, which leads to low search efficiency of the solution space. Therefore, the whale optimization algorithm is mainly improved. The algorithm introduces multi-strategy whale group initialization operation, multi-strategy whale search operation, multi-strategy whale predation operation, multi-dimensional similarity calculation operation and other operators for the multi-team collaborative problem, to enhance the exploration performance of the algorithm excellent solution, while improving the global excellent solution search ability and avoiding the algorithm falling into the local optimal problem.
[0091] As Figure 3 shown, the specific steps of the improved whale optimization algorithm are:
[0092] Step 3.1: According to the whale individual coding, perform the whale group initialization operation to generate an initial whale group containing whales, perform the whale repair operation and decode the whale individual solution;
[0093] Step 3.2: Perform the whale group sorting operation to sort the whales to obtain the leader whale group and the following whale group;
[0094] Step 3.3: Randomly select one individual from the leading whale group, and select one individual from the following whale group using binary tournament selection, to form a pair of parents, repeat to get a pair of parents whales;
[0095] Step 3.4: Calculate the similarity of each pair of parent whale individuals according to the similarity calculation operation , if less than the similarity threshold , execute the whale search operation, otherwise execute the whale predation operation, thereby obtaining two offspring whales, execute the whale repair operation and decode the whale individual;
[0096] Step 3.5: If the offspring is better than the parent, replace the parent, otherwise keep, get a new generation of whale group;
[0097] Step 3.6: Repeat steps 3.2 to 3.5 until generations are executed, and output the Pareto optimal whale group.
[0098] Specifically, the key operations in the above steps are:
[0099] Whale individual encoding: For the large spacecraft cabin structure production scheduling problem considering multi-team cooperation, a double-layer encoding with a length of is adopted, the first layer is the task layer, which represents the task workpiece number order; the second layer is the team layer, which represents the task workpiece processing team number order. As shown in the 5 task 3 team example: Figure 3 , the task layer encoding is , which represents the priority arrangement order of the task workpiece as 3, 2, 5, 1, 4; the team layer encoding is , which represents the corresponding team combination for executing the task. That is , which represents that team 2 and team 1 process workpiece 3 in turn; , which represents that team 1, 3, 2 process workpiece 2 in turn; , which represents that team 2, 3, 1, 2 process workpiece 5 in turn, and the team 2 working interval is not less than 2 shifts; , which represents that team 1, 2 process workpiece 1 in turn; , which represents that team 3 processes workpiece 4 alone.
[0100] Whale individual decoding: Arrange the task workpieces and the corresponding team combination in turn according to the whale individual encoding order. When arranging task workpiece , the When assigning tasks to shifts, starting with shift 1, check if tasks can be assigned. If tasks can be assigned sequentially from that shift onwards (meaning the shift is idle at that time and has no other tasks assigned within two shift intervals), then the task can be assigned. Otherwise, check the next shift until the task can be assigned. Once all tasks for the individual whale have been assigned, obtain the processing shift time and corresponding processing shifts for all tasks, and calculate the corresponding target values: maximum completion time and maximum shift task load. Figure 4 The decoding results show that task 3 is processed sequentially by shifts 2 and 1, ensuring continuous and uninterrupted production. After shift 2 completes task 5 in shift 7, it cannot immediately process task 5 due to the constraint that the shift interval must be no less than 2, so it is scheduled for processing in shift 10. When shift 3 schedules task 4, since shift 1 is idle and the shift scheduling constraint is met, it can be scheduled for production in shift 1 ahead of schedule. From the Gantt chart obtained by decoding the whale individual encoding in the figure, it can be seen that the maximum completion time of this scheduling scheme is 16 (the completion time of task 1 by shift 2), and the maximum load of the shifts is 5 (the total task load of shift 2).
[0101] Whale pod initialization operation: based on probability , , From three initialization strategies—random allocation, uniform allocation, and proportional allocation—one operation is randomly selected to generate individual whale codes. This selection process is repeated until a whale code is generated. One whale. Among them The three initialization strategies are as follows:
[0102] (1) Random allocation strategy: 1) Randomly shuffle the task workpiece numbers to obtain the task layer code; 2) For each task number Randomly selected from processing teams If a work group 3) Randomly shuffle the order of work groups.
[0103] (2) Uniform distribution strategy: 1) Randomly generate a length of 1) Obtain the work group number sequence, ensuring that the frequency of each work group number is as even as possible; 2) Randomly shuffle the task work item numbers to obtain the task layer code; 3) Traverse the task layer code, for each task number... Select work groups sequentially from the work group number sequence until an assignment is made. Each class group.
[0104] (3) Load distribution strategy: 1) Sort tasks in descending order of processing time, with tasks of the same time being randomly sorted to obtain task layer codes; 2) Traverse the task layer codes, for each task workpiece , find the list of teams with the minimum current load, randomly select a team from the list, and update the load of the team; 3) repeat 2) until all task jobs are assigned scheduling teams.
[0105] Dolphin repair operation: legality verification is performed on the dolphin code, and the processing team sequence of each task job is specifically verified. For a processing team sequence, the teams in the sequence are traversed in turn, and if the team does not satisfy the constraint that the interval between two jobs is not less than two shifts in the sequence, a team is randomly selected from other teams that satisfy the constraint to replace it, until the processing team sequence satisfies the constraint.
[0106] Dolphin sorting operation: based on the double-objective value of the dolphin individual, fast non-dominated sorting is performed based on the NSGA-II algorithm, and the corresponding crowding degree is calculated. The first are marked as lead dolphins, and the last dolphins are marked as following dolphins.
[0107] Similarity calculation operation: the similarity between two dolphin individuals is , where is the coding similarity, specifically the average of the processing order similarity and the task team assignment similarity. The processing order similarity calculates the Kendall tau correlation coefficient according to the task layer coding of the two individuals, and is normalized to 0-1. The task team assignment similarity is the ratio of the number of same teams for the same task jobs to . is the decoding similarity, which is the ratio of the total number of shifts for the same task in the same team at the same time in the scheduling schemes of the two individuals to .
[0108] Dolphin search operation: for the coding of two parent dolphin individuals, task exchange operation and team exchange operation are performed in turn to obtain two offspring. The task exchange operation and the team exchange operation are as follows:
[0109] (1) The task exchange operation randomly selects one of the task position strategy and the task order strategy. The task position strategy is as follows: 1) randomly select 40%-60% of the task coding layer positions to retain; 2) fill the other positions of the parent 1 task coding layer with the parent 2 task coding in the order of the parent 1 task coding that is not retained, and keep the team sequence corresponding to the task coding unchanged. 3) the parent 2 performs the same operation. The task order strategy is as follows: 1) randomly select a task coding layer segment to retain; 2) for the task coding outside the segment of the parent 1, select the task coding in the parent 2 task coding layer that is not in the segment of the parent 1 in turn, and keep the team sequence corresponding to the task coding unchanged. 3) the parent 2 performs the same operation.
[0110] (2) Team exchange operation randomly selects one strategy from team fragment strategy and random selection strategy. Team fragment strategy is specifically: 1) randomly select a task coding layer fragment; 2) if there is a task coding same but team arrangement different situation in the fragment, then exchange the corresponding team arrangement. Random selection strategy is specifically: 1) traverse the task workpiece coding; 2) for task workpiece , randomly generate a value of 0 to 1, if the value is less than 0.5, then exchange the corresponding team sequence of the two parents.
[0111] Whale predation operation: for any one individual in the two parent whales, task replacement operation and team replacement operation are executed in turn, and finally two offspring are obtained. Task replacement operation is specifically: 1) randomly select two positions in the coding; 2) exchange the task coding and team sequence corresponding to the two positions. Team replacement operation is specifically: 1) randomly select a position in the coding; 2) for the workpiece corresponding to the position, randomly select teams from the processing team, if is team repeated sampling, otherwise it is team non-repeated sampling. 3) randomly shuffle the order of the newly selected teams.
[0112] The related parameter settings of the whale optimization algorithm in this example are shown in Table 2:
[0113] Table 2 Whale optimization algorithm parameters
[0114]
[0115] S4, select the best scheduling scheme from the candidate schemes and output the team scheduling result. The specific process is: first, obtain the two target values corresponding to all candidate scheme individuals, which are the maximum completion time and the maximum team task load respectively; then in all target values, calculate the minimum value of the maximum completion time and the minimum value of the maximum team task load to form the ideal point, and calculate the maximum value of the maximum completion time and the maximum value of the maximum team task load to form the worst point; secondly, according to the ideal point and the worst point, the minimum maximum normalization is carried out on the two target values corresponding to all candidate schemes; thirdly, the average value of the normalized target is obtained to obtain the index of the minimum value, and the corresponding best scheduling scheme is obtained; finally, the scheduling scheme is generated according to the scheme decoding, and the Gantt chart is drawn for visual output. Table 3 is the final scheduling scheme result of this example. In Table 3, the "processing team and order" list represents the team and processing order required for processing the corresponding task, such as processing task 2 which requires 4 teams of team 1, 5, 2 and 4 to process in turn, the first team's processing shift is 9, and the last team's processing shift is 12. Figure 5 The scheduling Gantt chart result is scheduled. The abscissa is the shift number, the ordinate is the team number, the rectangle in the figure is the task processed by the corresponding shift and corresponding team, the rectangle number is the task number, and the same task rectangle has the same color. For example, the processing task 2 is a light blue rectangle, which is processed by team 1, 5, 2 and 4 in turn from shift 9, and a total of 4 shift time is processed. According to the scheduling result, the maximum completion time of the present example is 27 shifts, and the maximum team task load is 9 shifts.
[0116] Table 3 scheduling scheme result
[0117]
[0118] In summary, the multi-team collaborative job scheduling method based on the improved whale optimization algorithm of the application takes minimizing the maximum completion time and minimizing the maximum team task load as double objectives, and constructs a specific job shop scheduling model for multi-team continuous collaborative work. The core of the application is to design a whale optimization algorithm framework based on task order and team collaboration double-layer discrete coding, and integrate various improved operators in it, including multi-strategy whale group initialization, multi-strategy whale search, multi-strategy whale predation and multi-dimensional similarity calculation operations. The following aspects can be explained in detail:
[0119] 1) The mathematical model of the application adopts shift index modeling: the constraint conditions and objective function are constructed based on team shift, instead of using traditional start and end time and task order, which reduces the model complexity;
[0120] 2) The whale algorithm of the application uses multi-strategy improved operators to adapt to the multi-team collaborative job scheduling problem:
[0121] a) Process-team double-layer discrete coding mechanism: the second layer coding limits the team processing order (such as team 1→2→3 continuous processing of workpieces), which directly maps the continuous shift constraint;
[0122] b) Whale initialization stage adopts random allocation, uniform allocation and proportional allocation strategies, which takes into account task balance and team load;
[0123] c) Whale repair operator is based on double-layer discrete coding structure to repair the work interval constraint in the processing team sequence, avoiding illegal solutions;
[0124] d) The search and predation operators are integrated with multi-strategy for double objectives and multi-team collaborative job scheduling problem, including task exchange, team exchange, task replacement and team replacement;
[0125] e) Since the second layer coding is multi-team, it cannot be applied to the traditional coding matrix similarity calculation method, so the "coding + decoding" double dimension and "task + team" double level similarity calculation method is adopted.
[0126] These improved operators fully match the characteristics and actual needs of multi-shift continuous collaborative job scheduling in complex task production workshops, can effectively improve the search efficiency of the optimal scheduling scheme, significantly improve the multi-shift scheduling performance, and have good generality and applicability, which can be expanded to long-period multi-shift collaborative manufacturing scenarios such as large spacecraft cabin structures, high-speed train carriages, ships, heavy machinery, etc.
Claims
1. A multi-shift collaborative job scheduling method based on an improved whale optimization algorithm, characterized in that, The method comprises the following steps: Step 1, obtaining task and team information of a production workshop, including dividing a day into several shifts, the processing time of each workpiece being one or more shifts, each workpiece being processed by at least one team, each team being unable to work continuously for two or more shifts, and the interval between two times of work being no less than several shifts; Step 2, establishing a workshop scheduling model of multi-team continuous collaborative work, with a target function of minimizing the maximum completion time and minimizing the maximum team task load; Step 3, solving the workshop scheduling model to obtain a candidate scheduling scheme by using an improved whale optimization algorithm, wherein the improved whale optimization algorithm adopts double-layer coding, including a task layer for representing the task workpiece number sequence and a team layer for representing the processing team number sequence of the task workpiece; Step 4, selecting an optimal scheduling scheme from the candidate scheduling schemes, including the workpiece processing sequence and the team scheduling result; In step 3, the improved whale optimization algorithm comprises the following steps: Step 3.1: Whale population initialization according to the whale individual encoding, generating an initial whale population containing whales, performing a whale repair operation and carrying out whale individual decoding; Step 3.2, sorting the whales to obtain a leader whale group and a follower whale group; Step 3.3: Randomly select one individual from the lead whale group, select one individual from the follower whale group using binary tournament selection, form a pair of parents, repeat the step to get pairs of parents whales; Step 3.4, calculating the individual similarity of each pair of parent whales, if the similarity is less than a similarity threshold, performing a whale searching operation, otherwise performing a whale predation operation; thus obtaining two offspring whales, performing a whale repair operation and decoding the whale individual; Step 3.5, if the offspring is better than the parent, replacing the parent, otherwise keeping the parent, to obtain a new generation of whale group; Step 3.6, repeating steps 3.2 to 3.5 until a preset iteration number is reached, and outputting a Pareto optimal whale group, i.e. a candidate scheduling scheme; In the improved whale optimization algorithm, the whale searching operation is: for the two parent whale individual encodings, performing a task exchange operation and a team exchange operation in turn to obtain two offspring; the whale predation operation is: for any one of the two parent whales, performing a task replacement operation and a team replacement operation in turn to finally obtain two offspring; Wherein, the task exchange operation randomly selects one of a task position strategy and a task sequence strategy, the task position strategy is: randomly selecting 40%-60% of the task coding layer positions to keep, filling the other positions of the parent A task coding layer with the parent B task coding in the parent A non-kept task coding in order, keeping the team sequence corresponding to the task coding unchanged, and the parent B performing the same operation; the task sequence strategy is: randomly selecting a task coding layer segment to keep; for the parent A segment outside task coding, sequentially selecting the task coding in the parent B task coding layer that is not in the parent A segment, keeping the team sequence corresponding to the task coding unchanged; the parent B performs the same operation; wherein the team exchange operation randomly selects one strategy from a team segment strategy and a random selection strategy, the team segment strategy is: randomly selecting a task coding layer segment; if there is a same task coding but different team arrangement in the segment, then exchanging the corresponding team arrangement; the random selection strategy is: randomly selecting two parent teams from 1 to traversing task workpiece coding; for task workpiece , randomly generating a value from 0 to 1, if the value is less than 0.5, then exchanging the corresponding team sequence of the two parent teams; task workpiece Wherein, the task replacement operation is: randomly selecting two positions in the coding to exchange the task coding and team sequence corresponding to the two positions; Wherein, the team replacement operation is: randomly selecting a position in the encoding, and randomly selecting a team for the workpiece corresponding to the position , randomly selecting a team from the processing teams , if , the new selected team order is randomly shuffled if the team is repeatable sampling, otherwise the team is non-repeatable sampling; is the number of teams needed by the workpiece i , and m is the total number of teams in the workshop.
2. The multi-shift collaborative job scheduling method based on improved whale optimization algorithm according to claim 1, characterized in that, In step 2, the constraint conditions of the workshop scheduling model include: Each workpiece must be arranged to start processing at a shift; Once a workpiece starts processing, it must be continuously processed for several shifts until processing is completed, and cannot be interrupted; Each team can only process one workpiece at the same time; The interval between two times of work of each team is no less than a preset threshold; The end time of each workpiece is no greater than the maximum completion time; The task load of each team is not greater than the maximum team task load.
3. The multi-shift collaborative job scheduling method based on improved whale optimization algorithm according to claim 1, characterized in that, In the improved whale optimization algorithm, the whale population initialization operation is: a strategy is randomly selected from three initialization strategies of random allocation strategy, uniform allocation strategy and proportional allocation strategy to generate a whale individual according to a preset probability.
4. The multi-shift collaborative job scheduling method based on improved whale optimization algorithm according to claim 1, characterized in that, In the improved whale optimization algorithm, the whale repair operation is: legality inspection is performed on the whale code, for a processing team sequence, if a team does not satisfy the constraint that the interval between two times of work is not less than a preset threshold in the sequence, a team is randomly selected from other teams satisfying the constraint to replace, until the processing team sequence satisfies the constraint.
5. The multi-shift collaborative job scheduling method based on improved whale optimization algorithm according to claim 1, characterized in that, The individual similarity of two whales in the improved whale optimization algorithm wherein is the encoding similarity, i.e., the average of the processing sequence similarity and the task team assignment similarity, the processing sequence similarity is calculated according to the Kendall tau correlation coefficient of the task layer encoding of two individuals, and is normalized to 0-1; the task team assignment similarity is the ratio of the number of the same team in the same processing team of the same task workpiece to the total number of teams required by all workpieces; is the decoding similarity, which is the ratio of the total number of teams arranged for the same task in the same team at the same time in the scheduling scheme of two individuals to the total number of teams that can be arranged by all teams.
6. The multi-shift collaborative job scheduling method based on improved whale optimization algorithm according to claim 1, characterized in that, In the improved whale optimization algorithm, the sorting of the whale is performed according to the two target values of the maximum completion time and the maximum team task load of the whale individual, the fast non-dominated sorting method in the NSGA-II algorithm is used for sorting, and the first several whales are selected according to the order according to a set number as the leading whale group, and the rest as the following whale group.
7. The multi-shift collaborative job scheduling method based on improved whale optimization algorithm according to claim 1, characterized in that, The method for selecting the best scheduling scheme from the candidate scheduling schemes in step 4 includes: Obtaining the two target values of the maximum completion time and the maximum team task load corresponding to all candidate scheduling scheme individuals; Calculating the minimum value of the maximum completion time and the minimum value of the maximum team task load to form an ideal point, and calculating the maximum value of the maximum completion time and the maximum value of the maximum team task load to form a worst point; According to the ideal point and the worst point, the two target values corresponding to all candidate scheduling schemes are normalized by minimum and maximum; The average value of the normalized target values is taken to obtain the index of the minimum value, and the candidate scheduling scheme corresponding to the index is the best scheduling scheme.
8. A multi-shift collaborative job scheduling system based on the improved whale optimization algorithm based on the method of claim 1, characterized in that, It includes: An information acquisition unit is configured to acquire task and team information of a production job shop, including dividing a day into a plurality of shifts, the processing time of each workpiece being one or more shifts, each workpiece being processed by at least one team, each team being unable to work continuously for two or more shifts, and the interval between two times of work being not less than a plurality of shifts; A job shop scheduling model modeling unit is configured to establish a job shop scheduling model for continuous and collaborative work of multiple teams, with the objective function being to minimize the maximum completion time and minimize the maximum team task load; A candidate scheduling scheme generation unit is configured to use an improved whale optimization algorithm to solve the job shop scheduling model to obtain a candidate scheduling scheme, wherein the improved whale optimization algorithm uses double-layer coding, including a task layer representing the order of task workpiece numbers and a team layer representing the order of processing team numbers of task workpieces; A best scheduling scheme generation unit is configured to select a best scheduling scheme from the candidate scheduling schemes, including workpiece processing order and team scheduling results.
Citation Information
Patent Citations
Distributed assembly shop scheduling method considering multi-skill worker distribution and transportation time
CN118551977A
Casting production scheduling method and system
CN110782085A
Task scheduling method for four-way shuttle vehicle type intensive warehousing system
CN118907720A