Method for solving distributed flow shop scheduling problem based on IG algorithm
By optimizing the distributed flow shop scheduling with an improved greedy iterative algorithm (IG algorithm), the complexity of workpiece sorting, factory selection, and worker allocation is resolved, production efficiency and the feasibility of the scheduling plan are improved, and the stability and efficiency of the production line are improved.
Patent Information
- Application Number
- CN202510973787.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-10-17
AI Technical Summary
Existing technologies are unable to effectively solve the complexity of workpiece sorting, factory selection and worker allocation in distributed flow shop scheduling problems, especially when considering preparation time and worker operations, resulting in insufficient production efficiency and feasibility of scheduling solutions.
The improved greedy iterative algorithm (IG algorithm) is adopted to generate high-quality initial populations by initializing the population and using multiple heuristic methods. Roulette wheel selection, local search and adaptive strategies are combined to dynamically adjust the destruction operation, optimize the target value of the solution, and improve production efficiency.
It improves the stability and overall efficiency of the production line, enhances the adaptability and feasibility of the scheduling plan, and optimizes production efficiency.
Smart Images

Figure CN120806522A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of distributed flow shop scheduling, and specifically belongs to a method for solving a distributed flow shop scheduling problem based on an IG algorithm. BACKGROUND
[0002] With the continuous development of manufacturing industry, more and more enterprises begin to adopt multi-factory distributed flow shop scheduling to improve production efficiency and timeliness of product delivery. Although the degree of automation of the production process is continuously improved, manual operation is still required at some key links, especially in complex manufacturing tasks, the skills and experience of workers are crucial to ensure production quality and efficiency. In addition, in order to ensure the smooth progress of production, each machine needs a certain preparation time before processing any workpiece, which further increases the complexity of the scheduling problem.
[0003] Under this background, it is of great practical significance to study the distributed permutation flow shop scheduling problem. This problem involves multiple factories, multiple stages, multiple machines, multiple operation processes, worker allocation and preparation time, etc. Due to the complexity of workpiece sequencing, factory selection and worker allocation, traditional scheduling methods are difficult to meet the actual production needs, and efficient optimization strategies are urgently needed to enhance the feasibility and adaptability of the scheduling scheme and optimize the overall production performance. Therefore, researchers have begun to explore new optimization strategies, among which the optimization method based on the improved greedy iterative algorithm (IG algorithm) has attracted widespread attention due to its efficiency and flexibility in solving complex problems. SUMMARY
[0004] The purpose of the present application is to provide a method for solving the distributed flow shop scheduling problem based on the IG algorithm, which solves the problem that the current research on the distributed permutation flow shop scheduling problem does not match the actual production scene and does not consider the preparation time and worker operation, so as to make the production scheduling more reasonable and effectively improve the production efficiency and stability of the production line.
[0005] The method for solving the distributed flow shop scheduling problem based on the IG algorithm provided by the present application is characterized by the following steps, Step 1, in the PCB production and manufacturing, for the distributed permutation flow shop scheduling problem with preparation time and worker operation, analyze the problem characteristics, establish the target of minimizing the total weighted completion time, the product of the weight of each workpiece and the corresponding completion time of each workpiece as the target value of the solution, initialize the algorithm parameters, set the population size PSize , the time parameter in the iteration process t , the ratio of the number of workpieces to the number of machines r and the number of removed workpieces in the destruction process d; Step 2, initialize a population containing PSize solutions, assign workers to each factory by randomization method, generate the first 5 solutions by using multiple heuristic methods, generate the remaining PSize 5 solutions by using random method, form a population containing PSize solutions, traverse the population, find the solution with the minimum target value, and take it as the global best solution; Step 3, perform solution optimization on the global best solution, randomly select to execute the local job block exchange method or the random worker exchange method, if the quality of the solution is improved after the solution optimization operation, replace the solution with the minimum target value in the population with the new solution after the solution optimization operation, and update the population; Step 4, select an individual from the population by roulette method, perform destruction and reconstruction operation on the selected individual, use adaptive strategy for destruction operation, dynamically adjust the destruction degree according to the ratio of different job quantity to factory quantity r , after determining the number of removed jobs d , randomly remove d jobs from the current individual, the removed d jobs form a partial job sequence, through reconstruction operation, the jobs in the partial job sequence are re-executed greedy insertion strategy and re-assigned to the factory to generate a new solution; Step 5, perform local search optimization on the reconstructed solution, randomly select to execute the key factory job exchange method or the maximum target value job reset method, if the solution after local search optimization is better than the global best solution, replace the global best solution with the solution after local search optimization, if the solution after local search optimization is not better than the global best solution but better than the worst solution in the current population, replace the worst solution in the current population with the solution after local search optimization, and update the population; Step 6, perform solution space disturbance operation, randomly select 30%-50% of the solutions in the population for disturbance, for each selected solution, randomly select a disturbance operator, including local job block insertion operator, worker optimization operator, destruction and reconstruction operator and random new solution generation operator, if the solution after executing the disturbance operation is better than the current global best solution, replace the global best solution with the solution after executing the disturbance operation, and update the population; Step 7, iteratively execute step 4, step 5 and step 6, continue the next round of search until the maximum time limit is reached, output the global best solution, i.e. the solution with the minimum target value, and terminate execution.
[0006] Further, in step 2, the randomization method includes the following process: assigning workers to each factory, creating a list containing all worker numbers, randomly shuffling the list, and sequentially assigning each worker to the corresponding factory according to the shuffled worker number order; the random method is to randomly sort all workpieces, and then sequentially insert the sorted workpieces into all factory sequences to the position with the minimum target value of the solution; The various heuristic methods include a maximum weight method combined with greedy insertion, a maximum weight and preparation time method combined with greedy insertion, a maximum weight and worker processing time method combined with greedy insertion, an improved heuristic method based on weight rules, and a two-stage heuristic method based on weight rules, wherein, The maximum weight method combined with greedy insertion is to sort the workpieces according to their weights, with higher priority for workpieces with higher weights, and sequentially insert the workpieces into each factory according to the workpiece order, with selection of the position that minimizes the target value of the solution each time; The maximum weight and preparation time method combined with greedy insertion is to sort the workpieces according to their weights, with higher priority for workpieces with higher weights, and for workpieces with the same weight, re-sort them according to preparation time from small to large, and sequentially insert the workpieces into each factory according to the workpiece order, with selection of the position that minimizes the target value of the solution each time; The maximum weight and worker processing time method combined with greedy insertion is to sort the workpieces according to their weights, with higher priority for workpieces with higher weights, and then for workpieces with the same weight, re-sort them according to worker processing time from small to large, and sequentially insert the workpieces into each factory according to the workpiece order, with selection of the position that minimizes the target value of the solution each time; The improved heuristic method based on weight rules is to first sort all workpieces according to the maximum weight rule to obtain an initial workpiece sequence, sequentially assign the first f workpieces in the initial workpiece sequence to the f factories, and sequentially insert the remaining workpieces into each factory, with selection of the position that minimizes the target value of the solution each time, and after inserting a workpiece into each factory, remove the first and last workpieces from the current factory and re-insert them into each factory to optimize the target value of the solution; The two-stage heuristic method based on weight rules is to generate an initial solution using the improved heuristic method based on weight rules, re-sort the workpiece sequence in each factory according to the maximum weight rule, re-insert each workpiece in the re-sorted workpiece sequence into the factory, and optimize the target value, and if the target value of the new solution is better than that of the initial solution, update the initial solution.
[0007] Further, in step 3, the operation process of the local job block exchange method is that two different factories are randomly selected, a position in each factory is randomly selected, and a job block is formed by extracting continuous jobs from the position, the number of jobs in the job block is randomly determined, and the number of jobs in the job block ranges from 1 to 3; the job block in the first factory is exchanged with the job block in the second factory, that is, the job block in the first factory is inserted into the position of the job block in the second factory, and the job block in the second factory is inserted into the position of the job block in the first factory; after the exchange, the target value of the new solution is calculated, if the target value of the new solution is better than the target value of the current solution, the new solution is accepted and the current solution is updated; otherwise, the original solution is restored; The operation process of the random worker exchange method is that two different workers are randomly selected, and the allocation of the two workers in the factory is exchanged; after the exchange, the target value of the new solution is calculated, if the target value of the new solution is better than the target value of the current solution, the new solution is accepted and the current solution is updated; otherwise, the original solution is restored.
[0008] Further, in step 4, the operation process of the roulette method is that the target value of the worst solution in the population is calculated, the target value of each solution in the population is converted into the fitness of each solution, the conversion process is that the target value of the worst solution is added by a constant 1, and then the target value of the current solution is subtracted, the total sum of the fitness of all solutions is calculated, a random number between 0 and the total sum of the fitness is generated, the random number simulates the current position of the pointer in the roulette, and then the fitness of each solution is sequentially added, when the sum of the fitness reaches or exceeds the random number, the solution corresponding to the fitness that reaches or exceeds the random number is selected; The process of the destruction operation using the adaptive strategy includes that according to the ratio of the number of different jobs to the number of machines r The degree of destruction is dynamically adjusted by calculating the ratio of the number of jobs to the number of machines r According to the size of the ratio of the number of different jobs to the number of machines r The number of jobs to be removed is dynamically determined d , The number of jobs to be removed is ; The number of jobs to be removed is ; The number of jobs to be removed is After the number of removed jobs is determined d , the removed d jobs form a partial job sequence; In the reconstruction operation, the greedy insertion strategy is adopted to reassign the workpieces in the partial workpiece sequence to generate a new solution. Specifically, each workpiece to be inserted in the partial workpiece sequence is considered in turn. For each workpiece to be inserted, all the insertable positions in all the factories are traversed, the objective value of the solution after inserting the workpiece to be inserted into each position is calculated, the workpiece to be inserted is inserted into the position that minimizes the objective value of the solution, and the above process is repeated until all the workpieces in the partial workpiece sequence are inserted into the factories to generate a new solution.
[0009] Further, in step 5, the operation process of the key factory workpiece exchange method is as follows: all the factories are traversed to find a key factory, which is the factory with the maximum objective value of the solution of the factory among all the factories. If there are multiple factories with the same objective value of the solution of the factory, the factory with the smallest factory number is selected. The objective value of the solution of the factory is obtained by adding the product of the weight of each workpiece assigned to the factory and the corresponding completion time of each workpiece. A workpiece is randomly selected from the key factory, and is exchanged with each workpiece in all the other factories one by one. For each exchange, the objective value of the solution after the exchange is calculated, and the workpiece that minimizes the objective value of the solution is selected for exchange. If a solution with a smaller objective value of the solution is found through the exchange, the solution with the smaller objective value of the solution is used to update the current solution; otherwise, the original solution is kept unchanged. The operation process of the maximum objective value workpiece resetting method is as follows: each factory is traversed to find the workpiece with the maximum objective value of the workpiece in each factory. The objective value of the workpiece is the product of the weight of the workpiece and the corresponding completion time of the workpiece. For the workpiece with the maximum objective value of the workpiece found in each factory, the workpiece with the maximum objective value of the workpiece is inserted into each position of the other factories. The objective value of the new solution after each insertion is calculated, and the insertion position that minimizes the objective value of the solution is selected. If a solution with a smaller objective value of the solution is found, the solution with the smaller objective value of the solution is used to update the current solution; otherwise, the original solution is kept unchanged.
[0010] Further, in step 6, the operation process of the solution space disturbance is as follows: 30%-50% of the solutions in the new population obtained in step 5 are randomly selected for disturbance. A dynamic index filtering mechanism is used to record the indices of the selected solutions. The dynamic index filtering mechanism uses a set to record the indices of the solutions that have been selected for disturbance. Before each selection of a solution for disturbance, an index of a solution is randomly selected from the new population. If the randomly selected index of the solution is not in the recorded set, the corresponding solution is selected for disturbance, and the randomly selected index of the solution is added to the set. If the randomly selected index of the solution is already in the set, the selected index of the solution is skipped, and the next index of the solution is randomly selected until 30%-50% of the solutions are selected.
[0011] Further, the perturbation operators include a local job block insertion operator, a worker optimization operator, a destroy-reconstruct operator and a random new solution generator operator, the local job block insertion operator, the worker optimization operator and the destroy-reconstruct operator each has a probability of 28.6% to be selected, and the random new solution generator operator has a probability of 14.3% to be selected, wherein, The operation process of the local job block insertion operator is as follows: a factory is randomly selected, a job block is randomly extracted from the factory, the job block is inserted into all feasible positions of other factories, an insertion position that minimizes the target value is selected, and if the target value of the new solution is better than that of the current solution, the new solution is accepted; otherwise, the current solution remains unchanged. The operation process of the worker optimization operator is as follows: the current target value and the factory number assigned to each worker are recorded, all workers are traversed, each pair of workers is exchanged in turn, and the target value of the solution after each exchange is calculated; if the target value of the solution after the exchange is smaller than the best solution target value recorded at present, the best solution target value is updated to the new target value, and the current worker assignment, i.e., the factory number assigned to each worker, is recorded; after all the worker exchanges are completed, the worker assignment is updated to the best worker assignment recorded. The operation process of the destroy-reconstruct operator is as follows: the number of jobs to be removed is determined according to 10% of the total number of jobs, a factory is randomly selected and jobs are randomly removed from the factory until the number of removed jobs reaches 10% of the total number of jobs, the removed jobs are sequentially inserted into the job sequence of all factories to find an insertion position that minimizes the target value, and the current solution is updated; this process is repeated ten times, and after each iteration, the target value of the new solution is compared with that of the best solution at present; if the new solution is better, the best solution is updated; otherwise, the last best solution is restored; if the best solution after ten iterations is better than the solution before the destroy-reconstruct operator is executed, the current solution is updated to the best solution; otherwise, the solution is restored to that before the destroy-reconstruct operator is executed. The operation process of the random new solution generator operator is as follows: all jobs are randomly sorted to generate a new job sequence, and then the sorted jobs are sequentially inserted into all factories by using a greedy insertion strategy to minimize the target value of the solution.
[0012] Further, the defined maximum time is t × n × m , n is the total number of jobs, m is the total number of production stages of each factory.
[0013] The present invention provides a method for solving distributed flow shop scheduling problems based on the IG algorithm. According to the characteristics and scale of the problem, the present invention proposes a population-based greedy iterative algorithm. And for the distributed permutation flow shop scheduling problem with preparation time and worker operations, an efficient initialization population strategy is designed. Through a variety of heuristic methods based on problem characteristics, an initial population with both high quality and diversity is generated, and the initial population is optimized. The roulette method is used to ensure the diversity of the selected solutions and further improve the quality of the selected solutions. By combining a variety of different local search methods and destruction operations under adaptive strategies, the optimal local search operator is dynamically selected to perform the destruction and reconstruction operation, thereby enhancing the search ability and convergence performance of the method. In summary, the present invention fully considers the actual situation of preparation time and worker operations in the production process, and achieves an improvement in production efficiency by continuously optimizing the target value of the solution, which has the positive effect of enhancing the overall efficiency of the production line. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 Flowchart for the implementation of the present invention; Figure 2 A Gantt chart according to an embodiment of the present invention; Figure 3 This is a mean graph of the present invention and the existing comparison algorithm; Figure 4 It is an interactive diagram of the present invention and the existing comparative algorithm at the factory scale; Figure 5 It is an interactive diagram of the present invention and the existing comparative algorithm at the scale of production stage of each factory; Figure 6 This is an interaction diagram of the present invention and the existing comparison algorithm on the workpiece scale. DETAILED DESCRIPTION
[0015] like Figure 1 As shown, the method for solving the distributed flow shop scheduling problem based on the IG algorithm provided by the present invention is mainly implemented through the following steps.
[0016] Step 1: In PCB manufacturing, for the distributed permutation flow shop scheduling problem with preparation time and worker operation, analyze the problem characteristics, establish the goal of minimizing the total weighted completion time, and the product of the weight of each workpiece and the completion time corresponding to each workpiece as the target value of the solution, initialize the algorithm parameters, and set the population size. PSize , the time parameter in the iterative process t , the ratio of the number of workpieces to the number of factories r and the number of artifacts removed during destruction d .
[0017] Step 2, initialize thePSize A population of solutions is generated, and workers are assigned to each factory by randomization. The randomization method includes the following processes: assigning workers to each factory, creating a list containing all worker numbers, randomly shuffling the list to ensure the randomness of the assignment, and assigning each worker to the corresponding factory in the order of the randomly shuffled worker numbers; using a variety of heuristic methods to generate the first 5 solutions, including the maximum weight method combined with greedy insertion, the maximum weight and preparation time method combined with greedy insertion, the maximum weight and worker processing time method combined with greedy insertion, the improved heuristic method based on weight rules, and the two-stage heuristic method based on weight rules. Use random methods to generate the remaining PSize -5 solutions, the random method is to randomly sort all the workpieces, and then insert the sorted workpieces into the position of all factory sequences that minimizes the target value of the solution, forming a PSize The solution population is traversed, and the solution with the smallest target value is found as the global best solution. The maximum weight method combined with greedy insertion is to sort the workpieces according to their weights. The workpieces with higher weights have higher priorities. The workpieces are inserted into each factory in the order of the workpieces. Each time the workpieces are inserted, the position that minimizes the target value of the solution is selected. The maximum weight and preparation time method combined with greedy insertion is to sort the workpieces according to their weights. The workpieces with higher weights have higher priorities. For workpieces with the same weight, they are reordered from smallest to largest preparation time. The workpieces are inserted into each factory in the order of the workpieces. Each time the workpiece is inserted, the position that minimizes the target value of the solution is selected. The maximum weight and worker processing time method of greedy insertion is to sort the workpieces according to their weights. The workpieces with higher weights have higher priority. Then, for workpieces with the same weight, they are re-sorted according to the worker processing time from small to large. The workpieces are inserted into each factory in the order of the workpieces. Each time the workpiece is inserted, the position that minimizes the target value of the solution is selected. The improved heuristic method based on weight rule is to first sort all the workpieces according to the maximum weight rule to obtain the initial workpiece sequence, and then sort the first workpieces in the initial workpiece sequence. f The workpieces are assigned to f The remaining workpieces are inserted into each factory in turn. Each time a workpiece is inserted, the position that minimizes the target value of the solution is selected. After inserting a workpiece into each factory, the previous and next workpieces in the current factory are removed from the current factory and reinserted into each factory to optimize the target value of the solution. The two-stage heuristic method based on weight rules is that an initial solution is generated using an improved heuristic method based on weight rules, for the workpiece sequence in each factory, reordering is performed according to the maximum weight rule, each workpiece in the reordered workpiece sequence is reinserted into the factory, and the optimization target value is optimized, if the target value of the new solution is better than that of the initial solution, the initial solution is updated.
[0018] Step 3, performing a solution optimization operation on the global best solution, randomly selecting to perform a local workpiece block exchange method or a random worker exchange method, if the quality of the solution is improved after the solution optimization operation, replacing the solution with the minimum target value in the population with the new solution after the solution optimization operation, and updating the population. Wherein: The operation process of the local workpiece block exchange method is that two different factories are randomly selected, a position in each factory is randomly selected, and continuous workpieces are extracted from the position to form a workpiece block, the number of workpieces in the workpiece block is randomly determined, and the number of workpieces in the workpiece block ranges from 1 to 3 workpieces; the workpiece block in the first factory is exchanged with the workpiece block in the second factory, that is, the workpiece block in the first factory is inserted into the position of the workpiece block in the second factory, and the workpiece block in the second factory is inserted into the position of the workpiece block in the first factory; after the exchange, the target value of the new solution is calculated, if the target value of the new solution is better than that of the current solution, the new solution is accepted and the current solution is updated; otherwise, the original solution is restored; The operation process of the random worker exchange method is that two different workers are randomly selected, and the assignment of the two workers in the factory is exchanged; after the exchange, the target value of the new solution is calculated, if the target value of the new solution is better than that of the current solution, the new solution is accepted and the current solution is updated; otherwise, the original solution is restored.
[0019] Step 4, selecting an individual from the population by a roulette method, performing a destruction and reconstruction operation on the selected individual, the operation process of the roulette method is that the target value of the worst solution in the population is calculated, the target value of each solution in the population is converted into the fitness of each solution, the conversion process is that the target value of the worst solution is added by a constant 1, and then the target value of the current solution is subtracted, the total sum of the fitness of all solutions is calculated, a random number between 0 and the total sum of the fitness is generated, the random number simulates the current position of the pointer in the roulette, and then the fitness of each solution is added in turn, when the sum of the fitness reaches or exceeds the random number, the solution corresponding to the fitness that reaches or exceeds the random number is selected; an adaptive strategy is used for the destruction operation, the ratio of the number of workpieces to the number of factories r is calculated to dynamically adjust the degree of destruction r , the number of workpieces to be removed is dynamically determined according to the size of r , the number of workpieces to be removed is d , the number of workpieces to be removed is , the number of workpieces to be removed is ; , the number of workpieces to be removed ; , the number of workpieces to be removed , after determining the number of removed workpieces d , the removed d workpieces form a partial workpiece sequence, the workpieces in the partial workpiece sequence are re-executed by a greedy insertion strategy through a reconstruction operation, and are re-assigned to the factory to generate a new solution, the specific operation of the greedy insertion strategy is to consider each workpiece to be inserted in the partial workpiece sequence in turn, for each workpiece to be inserted, all insertable positions of all factories are traversed, the objective value of the solution after inserting the workpiece to be inserted into each position is calculated, the workpiece to be inserted is inserted into the position that minimizes the objective value of the solution, the above process is repeated until all workpieces in the partial workpiece sequence are inserted into the factory to generate a new solution.
[0020] Step 5, local search optimization is performed on the reconstructed solution, and the key factory workpiece exchange method or the maximum objective value workpiece reset method is randomly selected, if the solution after local search optimization is better than the global best solution, the solution after local search optimization is used to replace the global best solution, if the solution after local search optimization is not better than the global best solution but better than the worst solution in the current population, the solution after local search optimization is used to replace the worst solution in the current population, and the population is updated. Wherein: The operation process of the key factory workpiece exchange method is to traverse all factories to find a key factory, the key factory refers to the factory with the maximum objective value of the solution of the factory among all factories, if there are multiple factories with the same objective value of the solution of the factory, the factory with the smallest factory number is selected, the objective value of the solution of the factory is obtained by adding the product of the weight of each workpiece assigned to the factory and the corresponding completion time of each workpiece, a workpiece is randomly selected from the key factory, and each workpiece in all other factories is exchanged one by one, for each exchange, the objective value of the solution after exchange is calculated, and the workpiece that minimizes the objective value of the solution is selected for exchange, if a solution with a smaller objective value of the solution is found through exchange, the solution with a smaller objective value of the solution is used to update the current solution; otherwise, the original solution is kept unchanged; The operation process of the maximum objective value workpiece reset method is to traverse each factory to find the workpiece with the maximum objective value of the workpiece in each factory, and the objective value of the workpiece is the product of the weight of the workpiece and the corresponding completion time of the workpiece; for the workpiece with the maximum objective value of the workpiece found in each factory, the workpiece with the maximum objective value of the workpiece is inserted into each position of other factories, the objective value of the new solution after each insertion is calculated, and the insertion position that minimizes the objective value of the solution is selected, if a solution with a smaller objective value of the solution is found, the solution with a smaller objective value of the solution is used to update the current solution; otherwise, the original solution is kept unchanged.
[0021] Step 6, a solution space disturbance operation is performed to further explore the solution space and avoid the algorithm falling into a local optimum, specifically, 30%-50% of the solutions in the new population obtained from step 5 are randomly selected for disturbance, in order to ensure that the selected solutions are not repeated, a dynamic index filtering mechanism is used to record the index of the selected solutions, the dynamic index filtering mechanism uses a set to record the index of the solutions that have been selected for disturbance, before selecting a solution for disturbance each time, a solution index is randomly selected from the new population, if the randomly selected solution index is not in the recorded set, the corresponding solution is selected for disturbance, and the randomly selected solution index is added to the set, if the randomly selected solution index is already in the set, the selected solution index is skipped, and the next solution index is randomly selected, until 30%-50% of the solutions are selected. For each selected solution, a disturbance operator is randomly selected, the disturbance operator includes a local workpiece block insertion operator, a worker optimization operator, a destruction reconstruction operator, and a random new solution generation operator, the local workpiece block insertion operator, the worker optimization operator, and the destruction reconstruction operator each have a probability of 28.6% of being selected, and the random new solution generation operator has a probability of 14.3% of being selected, if the solution after the disturbance operation is better than the current global best solution, the solution after the disturbance operation is used to replace the global best solution, and the population is updated. Wherein: The operation process of the local workpiece block insertion operator is to randomly select a factory, randomly extract a workpiece block from the factory, insert the workpiece block into all feasible positions of other factories, select the insertion position that minimizes the target value, and if the target value of the new solution is better than the current solution, accept the new solution; otherwise, keep the current solution unchanged; The operation process of the worker optimization operator is to record the current target value and the factory number assigned to each worker, traverse all workers, and sequentially exchange each pair of workers and calculate the target value of the solution after each exchange; if the target value of the solution after the exchange is less than the best solution target value recorded, update the best solution target value to the new target value, and record the current worker allocation, i.e. the factory number assigned to the current worker; after completing all worker exchanges, update the worker allocation to the best worker allocation recorded; The operation process of the destruction reconstruction operator is to determine the number of workpieces to be removed according to 10% of the total number of workpieces, randomly select a factory and randomly remove workpieces from it until the number of removed workpieces reaches 10% of the total number of workpieces, sequentially reinsert the removed workpieces into the workpiece sequence of all factories, find the insertion position that minimizes the target value, and update the current solution; repeat this process ten times, compare the target value of the new solution with the best solution after each iteration, if the new solution is better, update the best solution, otherwise restore to the last best solution; if the best solution after ten iterations is better than the solution before the destruction reconstruction operator is executed, update the current solution to the best solution, otherwise restore to the solution before the destruction reconstruction operator is executed; The operation process of the random generation of new solution operator is to randomly sort all the workpieces to generate a new workpiece sequence, and then insert the sorted workpieces into all factories in sequence through the greedy insertion strategy to minimize the target value of the solution.
[0022] Step 7: Iterate steps 4, 5, and 6 and continue the next round of search until the maximum time is reached. t × n × m , output the global best solution, that is, the solution with the smallest target value, and terminate the execution, where, n is the total number of workpieces, m is the total number of production stages in each plant.
[0023] In order to better verify the effectiveness of the present invention, the present invention will be further described below through experimental analysis of a series of examples of the present invention.
[0024] The test data consists of 405 instances, which are based on the total number of factories f The total number of production stages in each factory m Total number of workpieces n Specifically, f ∈{2, 3, 4}, n ∈{20, 40, 60, 80,100}, m ∈{3, 5, 7}, each parameter combination { f , n , m There are three different test cases. In order to study the influence of preparation time on the objective function value, three levels of preparation time are considered in the test, which are set to 25%, 50% and 100% of the total preparation time respectively. When generating test data, the machine processing time and preparation time of each workpiece are randomly generated in the range of [1, 99], and the unit is unit time, while the manual processing time of the workpiece is randomly generated in the range of [300, 500], and the unit is unit time. CPU time is used as the termination criterion of the comparison algorithm, and the termination criterion is set to t × n × m (milliseconds), where t Is a multiple, set to 60, in order to better solve the distributed flow shop scheduling problem based on the IG algorithm to optimize the solution, in terms of parameter settings, set PSize =20 pieces.
[0025] To verify the effectiveness of the proposed theoretical results, an example from the simulation data is selected, the manufacturer consists of two factories, each factory has four production stages, the current order has 7 workpieces to be processed, among them, workpiece 3 and workpiece 6 are completed by two workers at 423 units of time and 450 units of time, 323 units of time and 350 units of time, respectively, and the specific information of machine processing time and weight is shown in Table 1: Table 1 Specific information of machine processing time and weight
[0026] The specific information of each workpiece on each machine is shown in Table 2: Table 2 Specific information of each workpiece on each machine
[0027] In Table 1, represents the processing time of workpiece j on machine i , j is the workpiece number, j =1, 2,..., n , i is the machine number, i =1,2,..., m -1, is the weight of workpiece j ; in Table 2, is the preparation time of workpiece j (if workpiece j is the first workpiece on the machine, at this time q = j ; in other cases, workpiece q is the workpiece just finished before workpiece j ), i is the machine number, i =1,2,..., m -1, q and j are workpiece numbers, q =1, 2,..., n , j =1, 2,..., n .
[0028] Figure 2 is the Gantt chart of the embodiment of the present application, which is used to show the workpiece arrangement of different machines in two factories, the vertical axis of the chart represents the stage in different factories, and the horizontal axis represents the processing time, each workpiece task is represented in the form of a horizontal bar chart, and the left end point and the right end point of the horizontal bar represent the start time and the finish time of the workpiece, Workpiece j In the factory k The machine i The completion time of the workpiece 1 to workpiece 7 is 388 units of time, 278 units of time, 939 units of time, 364 units of time, 176 units of time, 788 units of time, 205 units of time, respectively, and the workpiece processing sequence of factory 1 is 5, 2, 6, and the workpiece processing sequence of factory 2 is 7, 4, 1, 3.
[0029] In order to calculate the target value of the solution, we need to multiply the weight of each workpiece with the corresponding completion time of each workpiece, and add all the products, the specific calculation process is as follows, which can be calculated from Figure 2 The completion time of the workpiece in the middle factory and the weight of the workpiece in table 1: The completion time of workpiece 1 is 388 units of time, the weight is 4, and the product is 4×388=1552; The completion time of workpiece 2 is 278 units of time, the weight is 9, and the product is 9×278=2502; The completion time of workpiece 3 is 939 units of time, the weight is 2, and the product is 2×939=1878; The completion time of workpiece 4 is 364 units of time, the weight is 6, and the product is 6×364=2184; The completion time of workpiece 5 is 176 units of time, the weight is 3, and the product is 3×176=528; The completion time of workpiece 6 is 788 units of time, the weight is 5, and the product is 5×788=3940; The completion time of workpiece 7 is 205 units of time, the weight is 7, and the product is 7×205=1435; Add these products together, we get the target value of the solution: 1552+2502+1878+2184+528+3940+1435=14019.
[0030] The following is the analysis of the experimental results of the examples of the present application, and the improved greedy iterative algorithm (IEIG) of the present application for solving the distributed permutation flow shop scheduling problem with setup time and worker operation is compared with a discrete fruit fly optimization algorithm (DFFO), an improved greedy iterative algorithm (IIG), a greedy iterative algorithm accelerated based on workpiece allocation probability (IGP), a collaborative multi-swap greedy iterative algorithm (CMSIG), and a non-dominated evolutionary algorithm (NEA) after the parameter settings are completed. In order to ensure that the existing five comparison algorithms of the present application can effectively adapt to the specific problem solved by the present application, the necessary modifications and adjustments are made to the existing five comparison algorithms, which specifically include the following aspects: using a unified instance, adopting the same solution target value, allocating workers, and following the details of the original algorithm, selecting the algorithm type, f 、 n and m as analysis factors, and comparing the instance results. In order to evaluate the performance of the algorithm, the relative percentage increase value (RPI) is calculated as the evaluation standard for each instance running independently for 5 times. The calculation formula of RPI value is , T is the target value of the solution obtained by a certain algorithm, is the target value of the smallest solution obtained by the six comparison algorithms. Obviously, the smaller the RPI value, the better the performance of the algorithm. At the same time, the average RPI (ARPI) is also used as an evaluation standard. The comparison results of the ARPI values of the present application and the existing five comparison algorithms are shown in Table 3: Table 3 Comparison of ARPI values of the present application and the existing five comparison algorithms
[0031] From the data in Table 3, it can be seen that for all sizes of data, the performance of the IEIG algorithm of the present application on all problems is better than that of the existing five comparison algorithms, showing good performance. For example, when the factory scale is 2, the ARPI value of the IEIG algorithm is 2.883, which is smaller than the ARPI values of the existing five comparison algorithms. Since the smaller the ARPI value, the better the performance of the algorithm, the performance of the IEIG algorithm of the present application is obviously better than that of the existing five comparison algorithms, which indicates that the IEIG algorithm of the present application can effectively deal with the scheduling problem of distributed factories.
[0032] Figure 3 is the mean plot of the present application and the existing five comparison algorithms. From Figure 3 it can be seen that the IEIG algorithm of the present application is statistically significantly better than the existing five comparison algorithms, and the performance from good to bad is IEIG, DFFO, IGP, CMSIG, IIG, and NEA. From Figure 4 ,5 As can be seen from Table 6, the IEIG algorithm of the present application is statistically superior to the five comparative algorithms in the scale application of the factory, production stage and workpiece. The IEIG algorithm of the present application exhibits better adaptability and optimization ability, and overall, the IEIG algorithm of the present application exhibits better performance in data analysis.
[0033] In summary, the IEIG algorithm of the present application exhibits excellent performance, successfully solves a distributed permutation flow shop scheduling problem considering preparation time and worker operation, provides an innovative solution, provides strong support for optimization scheduling in actual production scenes, and provides a feasible method for improving production efficiency and reducing cost.
Claims
1. A method for solving distributed flow shop scheduling problems based on the IG algorithm, characterized in that: The following steps are included: Step 1: In PCB manufacturing, for the distributed permutation flow shop scheduling problem with preparation time and worker operation, analyze the problem characteristics, establish the goal of minimizing the total weighted completion time, and the product of the weight of each workpiece and the completion time corresponding to each workpiece as the target value of the solution, initialize the algorithm parameters, and set the population size. PSize , the time parameter in the iterative process t , the ratio of the number of workpieces to the number of factories r and the number of artifacts removed during destruction d ; Step 2, initialize the PSize A population of solutions is generated, workers are assigned to each factory by randomization, the first 5 solutions are generated using multiple heuristic methods, and the remaining solutions are generated using random methods. PSize -5 solutions, forming a PSize A population of solutions, traverse the population, find the solution with the smallest target value, and take it as the global best solution; Step 3: Perform a solution optimization operation on the global best solution, randomly select and execute the local workpiece block exchange method or the random worker exchange method. If the quality of the solution is improved after the solution optimization operation, the solution with the smallest objective value in the population is replaced with the new solution after the solution optimization operation, and the population is updated; Step 4: Select an individual from the population through the roulette wheel method, perform a destruction and reconstruction operation on the selected individual, and use an adaptive strategy to perform the destruction operation according to the ratio of the number of workpieces to the number of factories. r Dynamically adjust the degree of destruction to determine the number of artifacts to be removed d After that, randomly remove from the current individual d artifacts, removed d The workpieces form a partial workpiece sequence. Through the reconstruction operation, the workpieces in the partial workpiece sequence are re-executed with the greedy insertion strategy and redistributed to the factory to generate a new solution. Step 5: Perform local search optimization on the reconstructed solution and randomly select the key factory workpiece exchange method or the maximum target value workpiece reset method. If the solution after local search optimization is better than the global best solution, the global best solution is replaced with the solution after local search optimization. If the solution after local search optimization is not better than the global best solution but better than the worst solution in the current population, the worst solution in the current population is replaced with the solution after local search optimization, and the population is updated. Step 6: Perform a perturbation operation on the solution space. Randomly select 30%-50% of the solutions in the population for perturbation. For each selected solution, randomly select a perturbation operator, including a local workpiece block insertion operator, a worker optimization operator, a destruction and reconstruction operator, and a random generation of new solutions operator. If the solution after the perturbation operation is better than the current global best solution, the solution after the perturbation operation replaces the global best solution and the population is updated. Step 7, iteratively execute steps 4, 5, and 6, and continue the next round of search until the maximum time limit is reached, output the global best solution, that is, the solution with the smallest target value, and terminate the execution. The maximum time limit is t × n × m , n is the total number of workpieces, m is the total number of production stages in each plant.
2. The method for solving distributed flow shop scheduling problems based on the IG algorithm according to claim 1 is characterized in that: The randomization method involves assigning workers to each factory by creating a list of all worker numbers, randomly shuffling the list, and then assigning each worker to the corresponding factory in the order of the randomly shuffled worker numbers. The randomization method involves randomly sorting all workpieces and then inserting the sorted workpieces into the position in the factory sequence that minimizes the target value of the solution. Various heuristic methods include the maximum weight method combined with greedy insertion, the maximum weight and preparation time method combined with greedy insertion, the maximum weight and worker processing time method combined with greedy insertion, an improved heuristic method based on weight rules, and a two-stage heuristic method based on weight rules, among which, The maximum weight method combined with greedy insertion is to sort the workpieces according to their weights. The workpieces with higher weights have higher priorities. The workpieces are inserted into each factory in the order of the workpieces. Each time the workpieces are inserted, the position that minimizes the target value of the solution is selected. The maximum weight and preparation time method combined with greedy insertion is to sort the workpieces according to their weights. The workpieces with higher weights have higher priorities. For workpieces with the same weight, they are reordered from smallest to largest preparation time. The workpieces are inserted into each factory in the order of the workpieces. Each time the workpiece is inserted, the position that minimizes the target value of the solution is selected. The maximum weight and worker processing time method of greedy insertion is to sort the workpieces according to their weights. The workpieces with higher weights have higher priority. Then, for workpieces with the same weight, they are re-sorted according to the worker processing time from small to large. The workpieces are inserted into each factory in the order of the workpieces. Each time the workpiece is inserted, the position that minimizes the target value of the solution is selected. The improved heuristic method based on weight rule is to first sort all the workpieces according to the maximum weight rule to obtain the initial workpiece sequence, and then sort the first workpieces in the initial workpiece sequence. f The workpieces are assigned to f The remaining workpieces are inserted into each factory in turn. Each time a workpiece is inserted, the position that minimizes the target value of the solution is selected. After inserting a workpiece into each factory, the previous and next workpieces in the current factory are removed from the current factory and reinserted into each factory to optimize the target value of the solution. The two-stage heuristic method based on weighted rules is to generate an initial solution using an improved heuristic method based on weighted rules, reorder the workpiece sequence in each factory according to the maximum weight rule, reinsert each workpiece in the reordered workpiece sequence into the factory, optimize the objective value, and update the initial solution if the objective value of the new solution is better than the initial solution.
3. The method for solving distributed flow shop scheduling problems based on the IG algorithm according to claim 1 is characterized in that: The operation process of the local workpiece block exchange method is as follows: randomly select two different factories, randomly select a position from each factory, and extract consecutive workpieces from this position to form a workpiece block. The number of workpieces in the workpiece block is randomly determined, and the number of workpieces in the workpiece block ranges from 1 to 3 workpieces; the workpiece block in the first factory is exchanged with the workpiece block in the second factory, that is, the workpiece block of the first factory is inserted into the position of the workpiece block in the second factory, and the workpiece block of the second factory is inserted into the position of the workpiece block in the first factory; after the exchange, the target value of the new solution is calculated. If the target value of the new solution is better than the target value of the current solution, the new solution is accepted and the current solution is updated; otherwise, the original solution is restored; The operation process of the random worker exchange method is to randomly select two different workers and exchange the allocation of the two workers in the factory; After the exchange, the target value of the new solution is calculated. If the target value of the new solution is better than that of the current solution, the new solution is accepted and the current solution is updated; otherwise, the original solution is restored.
4. The method for solving distributed flow shop scheduling problems based on the IG algorithm according to claim 1, characterized in that: The operation process of the roulette method is to calculate the target value of the worst solution in the population, convert the target value of each solution in the population into the fitness of each solution. The conversion process is to add a constant 1 to the target value of the worst solution, and then subtract the target value of the current solution. The sum of the fitness of all solutions is calculated, and a random number between 0 and the sum of fitness is generated. The random number simulates the current position of the pointer in the roulette wheel, and then the fitness of each solution is accumulated in turn. When the sum of the fitness reaches or exceeds the random number, the solution corresponding to the fitness when the random number is reached or exceeded is selected.
5. The method for solving distributed flow shop scheduling problems based on the IG algorithm according to claim 1, characterized in that: The process of using adaptive strategy to perform destruction operation includes: r Dynamically adjust the degree of destruction by calculating the ratio of the number of workpieces to the number of factories r ,according to r The size of the workpieces dynamically determines the number of workpieces that need to be removed d indivual, , the number of artifacts that need to be removed ; , the number of artifacts that need to be removed ; , the number of artifacts that need to be removed , in determining the number of artifacts to be removed d After that, the removed d Workpieces form a partial workpiece sequence.
6. The method for solving the distributed flow shop scheduling problem based on the IG algorithm according to claim 5 is characterized in that: In the reconstruction operation, a greedy insertion strategy is used to redistribute the artifacts in the partial artifact sequence to generate a new solution. The specific operation is to consider each artifact to be inserted in the partial artifact sequence in turn. For each artifact to be inserted, all insertable positions in all factories are traversed, and the target value of the solution after the artifact to be inserted is calculated. The artifact to be inserted is inserted into the position that minimizes the target value of the solution. The above process is repeated until all artifacts in the partial artifact sequence are inserted into the factory, generating a new solution.
7. The method for solving distributed flow shop scheduling problems based on the IG algorithm according to claim 1, characterized in that: The operation process of the key factory artifact exchange method is to traverse all factories to find the key factory. The key factory refers to the factory with the largest target value of its solution among all factories. If there are multiple factories with the same target value of the solution, the factory with the smallest factory number is selected. The target value of the factory solution is obtained by adding the weight of each artifact assigned to the factory and the product of the completion time corresponding to each artifact. A artifact is randomly selected from the key factory and exchanged one by one with each artifact in all other factories. For each exchange, the target value of the solution after exchange is calculated, and the artifact that minimizes the target value of the solution is selected for exchange. If a solution with a smaller target value is found through exchange, the current solution is updated with the solution with a smaller target value; otherwise, the original solution is kept unchanged.
8. The method for solving distributed flow shop scheduling problems based on the IG algorithm according to claim 1, characterized in that: The operation process of the maximum target value workpiece reset method is to traverse each factory and find the workpiece with the largest target value in each factory. The target value of the workpiece is the product of the weight of the workpiece and the completion time corresponding to the workpiece; for the workpiece with the largest target value found in each factory, the workpiece with the largest target value is inserted into various positions of other factories, and by calculating the target value of the new solution after each insertion, the insertion position that minimizes the target value of the solution is selected. If a solution with a smaller target value is found, the current solution is updated with the solution with the smaller target value found; otherwise, the original solution is kept unchanged.
9. The method for solving distributed flow shop scheduling problems based on the IG algorithm according to claim 1, characterized in that: The process of performing the solution space perturbation operation is to randomly select 30%-50% of the solutions from the new population obtained in step 5 for perturbation, and use a dynamic index filtering mechanism to record the index of the selected solutions. The dynamic index filtering mechanism uses a set to record the index of the solutions that have been selected for perturbation. Before each solution is selected for perturbation, a solution index is randomly selected from the new population. If the index of the randomly selected solution is not in the recorded set, the corresponding solution is selected for perturbation, and the index of the randomly selected solution is added to the set. If the index of the randomly selected solution is already in the set, the index of the selected solution is skipped, and the index of the next solution is randomly selected until 30%-50% of the solutions are selected.
10. The method for solving distributed flow shop scheduling problems based on the IG algorithm according to claim 6, characterized in that: The perturbation operators include the local workpiece block insertion operator, the worker optimization operator, the destruction and reconstruction operator, and the random generation of new solutions operator. The local workpiece block insertion operator, the worker optimization operator, and the destruction and reconstruction operator each have a 28.6% probability of being selected, and the random generation of new solutions operator has a 14.3% probability of being selected. The operation process of the local workpiece block insertion operator is to randomly select a factory, randomly extract workpiece blocks from it, insert the workpiece blocks into all feasible positions of other factories, and select the insertion position that minimizes the objective value. If the objective value of the new solution is better than the current solution, the new solution is accepted; otherwise, the current solution is kept unchanged. The worker optimization operator operates by recording the current target value and the factory number currently assigned to each worker, iterating through all workers, swapping each pair of workers in turn, and calculating the target value of the solution after each swap. If the target value of the swapped solution is less than the currently recorded best solution target value, the best solution target value is updated to the new target value, and the current worker assignment, that is, the factory number assigned to the current worker, is recorded. After all worker swaps are completed, the worker assignment is updated to the recorded best worker assignment. The operation process of the destructive reconstruction operator is as follows: the number of workpieces to be removed is determined based on 10% of the total number of workpieces, factories are randomly selected and workpieces are randomly removed from them until the number of removed workpieces reaches 10% of the total number of workpieces, the removed workpieces are reinserted into the workpiece sequences of all factories in turn, the insertion position that minimizes the target value is found, and the current solution is updated; this process is repeated ten times, and after each iteration, the target value of the new solution is compared with the current best solution. If the new solution is better, the best solution is updated; otherwise, the previous best solution is restored; if the best solution after ten iterations is better than the solution before the destructive reconstruction operator is executed, the current solution is updated to the best solution; otherwise, the solution before the destructive reconstruction operator is executed is restored; The operation process of the random generation of new solution operator is to randomly sort all the workpieces to generate a new workpiece sequence, and then insert the sorted workpieces into all factories in sequence through the greedy insertion strategy to minimize the target value of the solution.