Distributed manufacturing scheduling method based on empire competition algorithm
By adopting a scheduling method based on the Imperial Competition algorithm in the distributed manufacturing mode, the problems of cross-workshop process transfer and energy consumption are solved, and more efficient production scheduling and energy management are achieved.
Patent Information
- Application Number
- CN202411816978.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-11
AI Technical Summary
The prior art fails to effectively consider cross-workshop process transfers and ignores processing and transportation energy consumption in the distributed manufacturing mode, resulting in complex scheduling schemes and low efficiency.
Using a scheduling method based on the Empire Competition algorithm, variable neighborhood drop searches are performed by establishing an objective function to minimize maximum completion time, minimize maximum machine load and minimize total energy consumption, and using a mixed initialization rule of process sorting vectors and machine selection vectors, combining OX crossing, POX crossing and reinforcement learning algorithms.
It realizes a more effective balance of production efficiency, equipment utilization and energy consumption in the distributed manufacturing mode, and improves the quality and efficiency of the scheduling scheme.
Smart Images

Figure CN119940769A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of workshop scheduling, and in particular to a scheduling method for distributed manufacturing based on an empire competition algorithm. Background Art
[0002] The product manufacturing industry is undergoing a transformation from a centralized manufacturing model to a distributed manufacturing model. In the distributed manufacturing model, product production is no longer limited to a single production unit, but is completed through the collaborative operation of multiple manufacturing units, covering the processing of workpieces and the assembly of products. The advantage of this model is that it can integrate the resources of multiple workshops, thereby significantly improving production capacity, shortening production cycles, and ensuring timely delivery. However, this model also brings challenges: on the one hand, it becomes extremely complicated to manually formulate production plans and conduct workshop scheduling, which can easily lead to scheduling errors, and the traditional manual distribution of work orders is inefficient; on the other hand, there is a close constraint relationship between the parts processing plan and the product assembly plan. Any changes in the processing link may affect the assembly plan, and then affect the stability of the entire production.
[0003] In order to cope with the complexity of distributed assembly workshop scheduling, current manufacturing companies have adopted a variety of technologies, such as heuristic algorithms, scheduling rules and priority methods, and advanced planning and scheduling systems (APS). Heuristic algorithms are based on experience and intuition and provide an effective way to search the solution space; scheduling rules and priority methods assign priorities to jobs and schedule them according to these priorities; APS integrates a variety of algorithms and models to optimize production planning and scheduling.
[0004] These technologies usually simplify the assembly process, assuming that all processes of a workpiece are completed in a single workshop without considering the process transfer across workshops. This simplified processing method has limitations in actual operation, because in the actual production environment, different manufacturing units may be geographically close, such as multiple factories within the same enterprise or cooperative factories between different enterprises, and the transfer and processing of workpieces between them is common and necessary. In addition, the existing optimization objectives are mainly focused on reducing completion time, reducing total cost, and balancing machine load, while ignoring important indicators in the context of green manufacturing and distributed manufacturing, such as processing energy consumption and transportation energy consumption. Therefore, it is difficult for existing technologies to fully adapt to the actual needs of such cross-workshop collaboration and multi-objective optimization. Summary of the invention
[0005] The present invention proposes a distributed manufacturing scheduling method based on the imperial competition algorithm, which solves the problem that the prior art does not consider the process transfer across workshops and ignores the processing and transportation energy consumption.
[0006] In order to solve the above technical problems, the present invention provides a scheduling method for distributed manufacturing based on the Empire Competition Algorithm, comprising the following steps:
[0007] Step S1: Establish an objective function including minimizing the maximum completion time, minimizing the maximum machine load and minimizing the total energy consumption, and set the constraint conditions of the objective function according to the assembly process of the product;
[0008] Step S2: Setting encoding and decoding rules, encoding the process sorting and machine selection, and obtaining the process sorting vector OSV and the machine selection vector MAV, wherein the elements in the process sorting vector are workpiece serial numbers, and the elements in the machine selection vector represent the index of the processing machine selected by the workpiece serial number at the corresponding position in the process sorting vector;
[0009] Step S3: setting the hybrid initialization rules of OSV and MAV to generate the initial solution sets of OSV and MAV;
[0010] Step S4: Calculate the objective function values of all initial solutions in the initial solution set, take the initial solutions whose objective function values are greater than the set objective function threshold as colonial countries, and the remaining initial solutions as colonies, use OX crossover to achieve assimilation between colonial countries, and use POX crossover to achieve assimilation between colonial countries and colonies, and generate a new solution set;
[0011] Step S5: Design the neighborhoods of OSV and MAV, obtain multiple neighborhood search combinations, perform variable neighborhood descent search on the colonized countries, and obtain the optimal production scheduling plan.
[0012] Preferably, the expression of the objective function in step S1 is:
[0013] minf 1 =E n,1 ;
[0014]
[0015]
[0016] In the formula, f 1 、f 2 、f 3 are the completion time of the scheduling scheme, the machine load of the scheduling scheme, and the total energy consumption of the machine of the scheduling scheme; E n,1 is the completion time of the last assembly process; W k is the working time of the kth machine; k is the machine serial number; m f is the total number of machines in workshop f; F is the total number of processing workshops; E p Energy consumption for machine operation; E i E is the idle energy consumption of the machine;t is the energy consumption of the transportation equipment; n is the total number of workpieces; u i is the total number of processes for workpiece i; pe f,k is the working power of the kth machine in workshop f; is the processing time of the jth process of workpiece i on the kth machine in workshop f; is a decision variable, which is 1 when the jth process of workpiece i is processed on the kth machine in workshop f, otherwise it is 0; ie f,k is the idle power of the kth machine in workshop f; S i,j is the start time of the jth process of workpiece i; is the completion time of the first process of the first workpiece; is a decision variable, which is 1 when the first process of the first workpiece on the k-th machine in workshop f is processed before the j-th process of workpiece i, otherwise it is 0; te is the working power of the transportation equipment; is a decision variable. When the jth process of workpiece i is on machine k 1 The j-1st process of workpiece i is processed on machine k. 2 1 when processing, otherwise 0; For workpiece j on machine k 1 With Machine K 2 The transportation time between.
[0017] Preferably, the constraint condition is expressed as:
[0018]
[0019] In the above formula, S i,j is the start time of the jth process of workpiece i; is the processing time of the jth process of workpiece i on the kth machine in workshop f; is a decision variable, which is 1 when the j-th process of workpiece i is processed on the k-th machine in workshop f, otherwise it is 0; is a decision variable. When the jth process of workpiece i is on machine k 1 The j-1st process of workpiece i is processed on machine k. 2 1 when processing, otherwise 0; For workpiece j on machine k 1 With Machine K 2 The transportation time between is a decision variable, which is 1 when the first process of the first workpiece on the k-th machine in workshop f is processed before the j-th process of workpiece i, otherwise it is 0; E i,j is the completion time of the jth process of the ith workpiece; θ is a sufficiently large positive number.
[0020] Preferably, the hybrid initialization rule of OSV layer coding set in step S3 includes:
[0021] a. Prioritize the component with the smallest average sum of remaining processes of all workpieces on its processable machines. If there are multiple components with the smallest time, randomly select one of them, and then randomly select an unfinished workpiece under the component;
[0022] b. Prioritize the component with the least remaining steps of all workpieces under the component. If there are multiple components with the smallest number of steps, randomly select one of them, and then randomly select an unfinished workpiece under the component;
[0023] c. Randomly select a workpiece according to the process constraints;
[0024] The hybrid initialization rules for the MAV layer encoding are:
[0025] a. Assign the current process to the machine with the smallest total processing time among the optional processing machines. If there are multiple machines with the smallest total processing time, randomly assign it to one of them. The total processing time is the sum of the processing time of the current workpiece process and the transportation time between the current workpiece process and its previous process;
[0026] b. Assign the current process to the machine with the lowest total energy consumption in the optional processing machine set. If there are multiple machines with the lowest total energy consumption, randomly assign them to one of them. The total energy consumption is the sum of the processing energy consumption of the current workpiece process and the transportation energy consumption between the current workpiece process and the previous process;
[0027] c. Allocate the current process to the machine with the smallest machine load in the optional processing machine set. If there are multiple machines with the smallest load, randomly select one of them. The machine load is the total processing time of the processing task scheduled on the machine.
[0028] Preferably, the step S4 uses OX crossover to achieve assimilation between colonized countries, and uses POX crossover to achieve assimilation between colonized countries and colonies, and generates a new solution set, including the following steps:
[0029] Step S41: Set the learning probability pLearn of the colonized country, treat a colonized country and its colonies as an empire, and calculate the learning probability pLearn of each colony in the empire. j Assimilate with its colonized country to obtain offspring col s ;
[0030] Step S42: If the child col s is col j The non-dominated solution of col s Update the colony, otherwise execute step S43;
[0031] Step S43: Calculate the individual country costs, the standardized costs of individual countries and the power of individual countries of all colonial countries, and take the colonial country with the greatest power as the strongest colonial country;
[0032] Step S44: Imp other colonized nations i Assimilate with the strongest colonial nation to obtain offspring imp s ;
[0033] Step S45: Generate a random number between 0 and 1. If the child imp s It's imp i If the random number is not greater than pLearn, then use imp s Update the colony country, otherwise execute step S46;
[0034] Step S46: Repeat steps S41 to S45 until only one empire remains or the set algorithm termination condition is reached, then terminate the operation.
[0035] Preferably, the step S41 is to perform the colony j Assimilate with its colonized country to obtain offspring col s The following steps are involved:
[0036] Step S411: For OSV: randomly divide the workpiece set into two subsets J 1 and J 2 , randomly select two solutions from the initial solution set of OSV as the parent P 1 , P 2 , the parent P 1 J 1 The process is copied to the child P s Keeping the positions of all processes unchanged, the parent generation P 2 J 2 The process is based on P 2 The relative order in which they are inserted into the offspring P s vacancy;
[0037] Step S412: For MAV: randomly select the processes less than the total number of processes from all processes as the number set O, and randomly select two solutions from the initial solution set of MAV as the parent generation M 1 、M 2 , the parent M 1 The machine index belonging to O is copied to the child M s And keep the position unchanged, the parent M 2 The machine index that does not belong to O is copied to the child M s And keep the position unchanged.
[0038] Preferably, the expression for calculating the single country cost in step S43 is:
[0039]
[0040] The expression for calculating the normalized cost for a single country is:
[0041]
[0042] The expression for calculating the power of the single country is:
[0043]
[0044] In the above formula, C i is the cost of a single country; n is the number of optimization targets; W d is the weight of the dth optimization objective; f d is the function value of the dth optimization objective; C i ' is the standardized cost of a single country; P i The power of a single country; N imp is the total number of colonial countries.
[0045] Preferably, the imp i Assimilation with the strongest colonial nation includes the following steps:
[0046] Step S441: Randomly select two solutions from the initial solution set as parent P 1 and P 2 , in the parent generation P 1 Randomly select two intersection points to get the intersection segment, and replace the parent P 2 The gene at the crossover position is copied to the progeny P S The corresponding position of the parent P 2 and P 1 The intersection segment genes of the construct mapping set;
[0047] Step S442: Set the parent P 1 The genes in the crossover segment are copied to the offspring P in sequence. S At the corresponding position, each gene is tested during replication, and if the gene is in the mapping set, it is replaced with the mapping value, and the mapping relationship is deleted in the mapping set;
[0048] Step S443: If the mapping set is not empty, then S All genes in are traversed and mapping transformations are performed until the mapping set is empty.
[0049] Preferably, in step S5, a neighborhood is designed based on a critical path and a critical machine, wherein the critical path is a path that takes the longest time from the start of the first process to the completion of the last process, and the critical machine is a machine with the maximum load. The neighborhood includes:
[0050] Neighborhood N 1 : Randomly select two processes on the critical path in the OSV layer and swap the two processes; randomly select two machines on the critical path in the MAV layer and swap the two machines;
[0051] Neighborhood N 2 : In OSV, randomly select two processes on the critical path and insert the later process before the earlier process; in MAV, randomly select two machines on the critical path and insert the later machine before the earlier machine;
[0052] Neighborhood N 3 : Randomly select a process from the process set of the critical path, and assign the selected process to the machine with the least time consumption in the optional machine set;
[0053] Neighborhood N 4 : Randomly select a process from the process set of the critical path, and assign the selected process to the machine with the least energy consumption in the optional machine set;
[0054] Neighborhood N 5 : Randomly select a process from the process set of the key machine and assign the selected process to a random machine outside the key machine.
[0055] Preferably, in step S5, a reinforcement learning algorithm is used to perform variable neighborhood descent search on the colonized countries, comprising the following steps:
[0056] Step S51: Initialize all values in the Q table to 0;
[0057] Step S52: Calculate the average ideal distance MID and the inverse generation distance IGD of all solutions, set the state space S according to the size relationship between MID and IGD before and after the iteration, and record the state of the external environment at the tth iteration as S t ;
[0058] The expression for calculating the average ideal distance MID is:
[0059]
[0060] The expression for calculating the inverse generation distance IGD is:
[0061]
[0062] In the above formula, fji is the jth objective value of the ith solution; is the minimum value of the jth objective value among all solutions; n is the number of non-dominated solutions; d i is the Euclidean distance between the first frontier solution i and the nearest global optimal Pareto first frontier solution; N is the number of global optimal Pareto first frontier solutions;
[0063] Step S53: Neighborhood N 1 、N 2 With neighborhood N 3 、N 4 、N 5 Combining them, we get 6 neighborhood combinations, and use the above-mentioned domain combinations as action set A t , select an action from the action set and execute it, updating the state to S t+1 ;
[0064] Step S54: Calculate the current reward value R, update the Q table, and perform variable neighborhood descent search according to the optimal neighborhood combination in the current iteration;
[0065] The expression for calculating the current reward value R is:
[0066] R=R 1 +R 2 ;
[0067]
[0068] The expression for updating the Q table is:
[0069] Q(S t ,A t )=(1-α)Q(S t ,A t )+α[R t+1 +γ·max(Q(S t+1 ,:))];
[0070] In the above formula, R 1 is the reward value of the average ideal distance; R 2 is the reward value of the inverse generation distance; α is the learning rate; γ is the discount rate.
[0071] The benefits of the present invention include at least:
[0072] 1. By simultaneously considering the three goals of minimizing the maximum completion time, minimizing the maximum machine load, and minimizing the total energy consumption, it can balance production efficiency, equipment utilization, and energy consumption, and more comprehensively meet the needs of production scheduling;
[0073] 2. By setting encoding rules based on process sequencing and machine selection, complex scheduling problems can be accurately represented, and the encoded solutions can be converted into executable scheduling plans through decoding rules, which helps the algorithm to search the solution space more effectively;
[0074] 3. Using OX crossover and POX crossover to implement assimilation operations can effectively combine the advantages of different solutions, promote the exchange of genetic information, increase the diversity of the population, and thus improve the global search ability and convergence speed of the algorithm;
[0075] 4. By designing the neighborhood of OSV and MAV and performing variable neighborhood descent search, the solution space can be explored more carefully, avoiding premature convergence of the algorithm and increasing the probability of finding a better solution, which helps the algorithm to make more precise adjustments when approaching the optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 A schematic diagram of a method flow chart of an embodiment of the present invention;
[0077] Figure 2 A schematic diagram of genetically encoding workpiece information in an embodiment of the present invention;
[0078] Figure 3 It is a Gantt chart after genetic decoding of workpiece information in an embodiment of the present invention;
[0079] Figure 4 A schematic diagram of a POX crossover in an embodiment of the present invention;
[0080] Figure 5 OX cross schematic diagram in an embodiment of the present invention;
[0081] Figure 6 is an example diagram of a critical path and a critical machine in an embodiment of the present invention;
[0082] Figure 7 Schematic diagram of the framework of the reinforcement learning algorithm in the embodiment of the present invention;
[0083] Figure 8 A Gantt chart of the Pareto first front solution of the first calculation example in an embodiment of the present invention;
[0084] Fig. 9 This is a Gantt chart of the Pareto first front solution of the second example in the embodiment of the present invention. DETAILED DESCRIPTION
[0085] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.
[0086] The embodiment of the present invention provides a scheduling method for distributed manufacturing based on the empire competition algorithm, such as Figure 1 As shown, the following steps are included:
[0087] Step S1: Based on the parallelism of the processing and assembly phases in the distributed assembly manufacturing production process and the constraint relationship between the processing phase and the assembly phase, a series of assumptions are made for the distributed assembly manufacturing scheduling environment, including:
[0088] (1) A machine can only process or assemble one process at a time. Once any process starts, it cannot be interrupted.
[0089] (2) A machine can only process one workpiece at a time, and an assembly team can only assemble one product.
[0090] (3) All machines can be processed and assembled at time “0”.
[0091] (4) The parts required for product production, the components assembled from the parts, and the final assembled products are collectively regarded as workpieces. There is only one process for the components and products.
[0092] (5) Workpieces can be transferred across workshops for processing, and each workpiece can be directly transported to the assembly workshop immediately after completion.
[0093] Step S2: Establish an objective function including minimizing the maximum completion time, minimizing the maximum machine load and minimizing the total energy consumption, and set the constraint conditions of the objective function according to the assembly process of the product.
[0094] Specifically, the expression of the constructed objective function is:
[0095] minf 1 =E n,1 ;
[0096]
[0097]
[0098] In the formula, f 1 、f 2 、f 3are the completion time of the scheduling scheme, the machine load of the scheduling scheme, and the total energy consumption of the machine of the scheduling scheme; E n,1 is the completion time of the last assembly process; W k is the working time of the kth machine; k is the machine serial number; m f is the total number of machines in workshop f; F is the total number of processing workshops; E p Energy consumption for machine operation; E i E is the idle energy consumption of the machine; t is the energy consumption of the transportation equipment; n is the total number of workpieces; u i is the total number of processes for workpiece i; pe f,k is the working power of the kth machine in workshop f; is the processing time of the jth process of workpiece i on the kth machine in workshop f; is a decision variable, which is 1 when the jth process of workpiece i is processed on the kth machine in workshop f, otherwise it is 0; ie f,k is the idle power of the kth machine in workshop f; S i,j is the start time of the jth process of workpiece i; is the completion time of the first process of the first workpiece; is a decision variable, which is 1 when the first process of the first workpiece on the k-th machine in workshop f is processed before the j-th process of workpiece i, otherwise it is 0; te is the working power of the transportation equipment; is a decision variable. When the jth process of workpiece i is on machine k 1 The j-1st process of workpiece i is processed on machine k. 2 1 when processing, otherwise 0; For workpiece j on machine k 1 With Machine K 2 The transportation time between.
[0099] Then, according to the actual situation on site, some parameters in the three objective functions are constrained, including:
[0100] (1) Workpiece process constraints: Workpiece processes must be processed according to the process sequence:
[0101]
[0102] (2) Processing machine constraints: a machine can only perform a single processing task or assembly task at the same time:
[0103]
[0104] (3) Start time and completion time constraints: the start time and completion time of all processes of the workpiece must be greater than 0:
[0105]
[0106] (4) Assembly process start time constraint: The assembly process start time must be greater than the maximum value of the sum of the completion time and transportation time of the components required:
[0107]
[0108] (5) Constraints on the value range of decision variables:
[0109]
[0110] In the above formula, S i,j is the start time of the jth process of workpiece i; is the processing time of the jth process of workpiece i on the kth machine in workshop f; is a decision variable, which is 1 when the j-th process of workpiece i is processed on the k-th machine in workshop f, otherwise it is 0; is a decision variable. When the jth process of workpiece i is on machine k 1 The j-1st process of workpiece i is processed on machine k. 2 1 when processing, otherwise 0; For workpiece j on machine k 1 With Machine K 2 The transportation time between is a decision variable, which is 1 when the first process of the first workpiece on the k-th machine in workshop f is processed before the j-th process of workpiece i, otherwise it is 0; E i,j is the completion time of the jth process of the ith workpiece; θ is a sufficiently large positive number.
[0111] Step S3: Set encoding and decoding rules, encode the process sorting and machine selection, and obtain the process sorting vector OSV and the machine selection vector MAV. The elements in the process sorting vector are the workpiece numbers, and the elements in the machine selection vector represent the index of the processing machine selected by the workpiece number at the corresponding position in the process sorting vector.
[0112] Specifically, the process sorting vector OSV and the machine selection vector MAV are actively decoded. The length of the encoded solution OSV and MAV is the total number of processes m×n. Each encoded solution is represented by an integer code of n+2×m×n, which simplifies the encoding and reduces the complexity of the algorithm. During decoding, the workpiece processes of the OSV layer are arranged in sequence on the machines in the corresponding MAV layer, and the processes are allowed to be inserted into idle slots as soon as possible when the process constraints are met. A possible encoding solution is as follows: Figure 2As shown, each element in the OSV vector is the workpiece serial number, and the jth occurrence represents the jth process of the workpiece. Each element in the MAV vector is a machine index, which means that the processing machine selected for the corresponding process in the OSV vector is m, and m represents the mth machine in the set of optional machines for the process of the workpiece. The corresponding decoding Gantt chart diagram is shown as follows Figure 3 shown.
[0113] Step S3: Set the hybrid initialization rules of OSV and MAV to generate the initial solution sets of OSV and MAV.
[0114] Specifically, the hybrid initialization rules for the OSV layer coding are set as follows:
[0115] a. Give priority to selecting the component with the smallest sum of the average time of the remaining processes of all workpieces under it on its processable machines. If there are multiple components with the smallest time, randomly select one of them, and then randomly select an unfinished workpiece under this component.
[0116] b. Prioritize the component with the least remaining steps for all workpieces under the component. If there are multiple components with the smallest number of steps, randomly select one of them, and then randomly select an unfinished workpiece under the component.
[0117] c. Randomly select a workpiece according to the process constraints.
[0118] The hybrid initialization rules for the MAV layer encoding are:
[0119] a. Assign the current process to the machine with the shortest total processing time among the optional processing machines. If there are multiple machines with the shortest total processing time, randomly assign them to one of them. The total processing time is the sum of the processing time of the current workpiece process and the transportation time between the current workpiece process and its previous process.
[0120] b. Allocate the current process to the machine with the lowest total energy consumption among the optional processing machines. If there are multiple machines with the lowest total energy consumption, randomly assign them to one of them. The total energy consumption is the sum of the processing energy consumption of the current workpiece process and the transportation energy consumption between the current workpiece process and the previous process.
[0121] c. Allocate the current process to the machine with the smallest machine load in the optional processing machine set. If there are multiple machines with the smallest load, randomly select one of them. The machine load is the total processing time of the processing task scheduled on the machine.
[0122] The first two rules of OSV layer coding are combined with the first three rules of MAV layer coding to generate initial solutions equal to the set number, and the remaining initial solutions are generated by other mixed rules of OSV layer coding and MAV layer coding.
[0123] Step S4: Calculate the objective function values of all initial solutions in the initial solution set, select solutions with better quality from the initial solutions as colonial countries, and the remaining initial solutions as colonies. Use OX crossover to achieve assimilation between colonial countries, and use POX crossover to achieve assimilation between colonial countries and colonies, and generate a new solution set.
[0124] Specifically, N individuals, i.e., countries, are constructed from the initial population, and N individuals with better quality are imp The first initial solution is used as a colonial country, and the rest of the initial solutions are used as colonies. A colonial country and its colonies form an empire. The assimilation between colonial countries is achieved using OX crossover, and the assimilation between colonial countries and colonies is achieved using POX crossover. The following steps are included:
[0125] Step S41: Set the learning probability pLearn of the colonized country, and for each colony in the empire, j Assimilate with its colonized country to obtain offspring col s , including the following steps:
[0126] Step S411: For the OSV layer: randomly divide the artifact set into two subsets J 1 and J 2 , randomly select two solutions from the initial solution set of OSV as the parent P 1 , P 2 , the parent P 1 J 1 The process is copied to the child P s Keeping the positions of all processes unchanged, the parent generation P 2 J 2 The process is based on P 2 The relative order in which they are inserted into the offspring P s vacancy.
[0127] like Figure 4 The figure shows an example of the POX crossover method, which randomly divides the set of artifacts into two subsets J 1 and J 2 , J 1 ={1,2},J 2 ={3,4,5}, the parent generation P 1 J 1 The process is copied to the child and kept in P 1 The position in remains unchanged, and the parent P 2 J 2 The process is based on P 2 The relative order in which they are inserted into the offspring P s The vacancy of the final offspring P s .
[0128] Step S412: For the MAV layer: randomly select the processes less than the total number of processes from all processes as the number set O, and randomly select two solutions from the initial solution set of MAV as the parent generation M 1 、M 2 , the parent M 1 The machine index belonging to O is copied to the child M s And keep the position unchanged, the parent M 2 The machine index that does not belong to O is copied to the child M s And keep the position unchanged.
[0129] Step S42: If the child col s is col j The non-dominated solution of col s Update the colony, otherwise execute step S43.
[0130] Step S43: Calculate the individual country costs, the standardized costs of individual countries and the power of individual countries for all colonial countries, and take the colonial country with the greatest power as the strongest colonial country.
[0131] The expression for calculating the cost for a single country is:
[0132]
[0133] The expression for calculating the normalized cost for a single country is:
[0134]
[0135] The expression for calculating the power of a single country is:
[0136]
[0137] In the above formula, C i is the cost of a single country; n is the number of optimization objectives; W d is the weight of the dth optimization target, and the initial weight ratio is 1:1; f d is the function value of the dth optimization objective; C i ' is the standardized cost of a single country; P i The power of a single country; N imp is the total number of colonial countries.
[0138] Step S44: Imp other colonized nations i Assimilate with the strongest colonial nation to obtain offspring imp s , including the following steps:
[0139] Step S441: Randomly select two solutions from the initial solution set of OSV layer coding as parent P1 and P 2 , in the parent generation P 1 Randomly select two intersection points to get the intersection segment, and replace the parent P 2 The gene at the crossover position is copied to the progeny P S The corresponding position of the parent P 2 and P 1 The intersection segment genes of the construct mapping set;
[0140] Step S442: Set the parent P 1 The genes in the crossover segment are copied to the offspring P in sequence. S At the corresponding position, each gene is tested during replication, and if the gene is in the mapping set, it is replaced with the mapping value, and the mapping relationship is deleted in the mapping set.
[0141] Step S443: If the mapping set is not empty, then S All genes in are traversed and mapping transformation is performed until the mapping set is empty;
[0142] Step S444: synchronously transform the MAV layer code to obtain M s .
[0143] like Figure 5 The following is an example of the OX crossover method. Two crossover points are selected from the OSV layer code, namely 13 and 17, and the parent P 2 The crossover gene in the progeny P S The corresponding position, and the parent P 2 and P 1 The gene segment of this gene sets {[2,1],[3,4],[4,3][4,2],[2,1}. 1 The genes in the crossover segment are copied to the offspring P in sequence. S Corresponding position, each gene is tested during replication, if the gene is in the mapping set, it is replaced with the mapping value, and the mapping set deletes the mapping relationship. If the mapping set is not empty at this time, the offspring P S Traverse all genes and perform mapping transformation until the mapping set is empty. Transform the MAV layer encoding synchronously to obtain M s Since the OX crossover method may produce infeasible solutions, it is necessary to s Correct the error. Finally, we get the offspring P S and offspring M s .
[0144] Step S45: Generate a random number between 0 and 1. If the child imp s It's imp iIf the random number is not greater than pLearn, then use imp s Update the colony country, otherwise execute step S46;
[0145] Step S46: Repeat steps S41 to S45. As the weaker empire loses all its colonies, the empire will perish. When only one empire remains or the algorithm termination condition is reached, the operation is terminated.
[0146] Step S5: Design the neighborhoods of OSV and MAV, obtain multiple neighborhood search combinations, perform variable neighborhood descent search on the colonized countries, and obtain the optimal production scheduling plan.
[0147] Specifically, five neighborhoods are designed based on the critical path and the key machine, where the critical path is the path that takes the longest time from the start of the first process to the completion of the last process, and the key machine is the machine with the maximum load. The three basic elements of state space, action selection, and reward setting are set, and the reinforcement learning Q-Learning algorithm is used to determine the optimal neighborhood search combination, and the variable neighborhood descent search is performed on the colonial country to finally find the optimal solution, including the following steps:
[0148] Step S51: Based on the critical path and the critical machine, five neighborhoods are designed to enhance the local search capability of the algorithm, including:
[0149] Neighborhood N 1 : Randomly select two processes on the critical path in OSV and swap the two processes; randomly select two machines on the critical path in MAV layer and swap the two machines;
[0150] Neighborhood N 2 : In OSV, randomly select two processes on the critical path and insert the later process before the earlier process; in MAV, randomly select two machines on the critical path and insert the later machine before the earlier machine;
[0151] Neighborhood N 3 : Randomly select a process in the process set of the critical path, and assign the selected process to the machine with the least time consumption in the optional machine set, that is, randomly mutate a gene on the critical path in the MAV layer, and the encoding of the OSV layer remains unchanged;
[0152] Neighborhood N 4 : Randomly select a process in the process set of the critical path, and assign the selected process to the machine with the least energy consumption in the optional machine set, that is, randomly mutate a gene on the critical path in the MAV layer, and the encoding of the OSV layer remains unchanged;
[0153] Neighborhood N 5: Randomly select a process from the process set of the key machine, and assign the selected process to a random machine outside the key machine, that is, randomly mutate a gene on the critical path in the MAV layer, and the encoding of the OSV layer remains unchanged.
[0154] Step S52: Introduce the Q-Learning algorithm and initialize all values in the Q table to 0.
[0155] Step S53: Calculate the average ideal distance MID and the inverse generation distance IGD of all solutions, set the state space S according to the size relationship between MID and IGD before and after the iteration, and record the state of the external environment at the tth iteration as S t ;
[0156] The expression for calculating the average ideal distance MID is:
[0157]
[0158] The expression for calculating the inverse generation distance IGD is:
[0159]
[0160] In the above formula, f ji is the jth objective value of the ith solution; is the minimum value of the jth objective value among all solutions; n is the number of non-dominated solutions; d i is the Euclidean distance between the first frontier solution i and the nearest global optimal Pareto first frontier solution; N is the number of global optimal Pareto first frontier solutions.
[0161] The constructed state space is shown in Table 2, where MID(g) is the MID value of the g-th iteration, and IGD(g) is the IGD value of the g-th iteration.
[0162] Table 1 State space
[0163]
[0164] Step S53: Neighborhood N 1 、N 2 With neighborhood N 3 、N 4 、N 5 Combine them to get 6 neighborhood combinations, and use the domain combination as the action set A t , select actions from the action set and execute them, that is, the colonized country in the neighborhood combination [N 1 , N 3 ] / [N 1 , N 4 ] / [N 1 , N 5 ] / [N2 , N 3 ] / [N 2 , N 4 ] / [N 2 , N 5 ] to perform variable neighborhood descent search and update the current state to S t+1 .
[0165] Step S54: Calculate the current reward value R, update the Q table, and perform variable neighborhood descent search based on the optimal neighborhood combination in the current iteration.
[0166] The expression for calculating the current reward value R is:
[0167] R=R 1 +R 2 ;
[0168]
[0169] The expression for updating the Q table is:
[0170] Q(S t ,A t )=(1-α)Q(S t ,A t )+α[R t+1 +γ·max(Q(S t+1 ,:))];
[0171] In the above formula, R 1 is the reward value of the average ideal distance; R 2 is the reward value of the inverse generation distance; α is the learning rate; γ is the discount rate.
[0172] The present invention designs a mixed initialization population, dual assimilation using OX crossover and POX crossover, and a variable neighborhood search strategy combined with Q-Learning. In order to verify their effectiveness, the algorithms that do not adopt the mixed initialization population strategy, the variable neighborhood search strategy combined with Q-Learning, and the dual assimilation strategy are respectively denoted as EICA1, EICA2, and EICA3, and compared with the EICA algorithm proposed in the present invention.
[0173] The MID values of different strategy algorithms are shown in Table 2, and the IGD values are shown in Table 3. It can be seen from the table that the effectiveness of the three strategies proposed in the present invention.
[0174] Table 2 MID values of different strategy algorithms at fixed reference point number F
[0175]
[0176]
[0177] Table 3 IGD values of different strategy algorithms at fixed reference point number F
[0178]
[0179]
[0180] In order to demonstrate the practical effect of the scheduling results, the present invention takes the larger-scale F2MK08 and F3MK09 examples as examples and gives the scheduling Gantt chart of a non-dominated solution obtained by the EICA algorithm. Figure 8 , Fig. 9 shown.
[0181] The purpose of this invention is to provide a scheduling method for distributed manufacturing based on the Empire Competition Algorithm, which improves the search efficiency of the algorithm through an intelligent scheduling method. At the same time, combined with the existing information system of the case enterprise and actual product cases, a distributed assembly manufacturing scheduling system was developed, which can intelligently schedule the display plan and apply the results to production execution to achieve cost reduction and efficiency improvement.
[0182] The specific steps of intelligent scheduling display are as follows:
[0183] Step S1: Develop a distributed assembly manufacturing scheduling system.
[0184] Step S2: The production manager imports the basic data required for scheduling, such as all material information of the product and process information of each workpiece, and can also adjust the algorithm parameters according to different situations and needs.
[0185] Step S3: Generate a scheduling plan using the above scheduling algorithm, schedule production after determining the scheduling plan, arrange corresponding processing or assembly tasks for the machinery and equipment, and generate a corresponding scheduling plan.
[0186] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. Only the preferred embodiments of the present invention are expressed. The description is more specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. As long as there is no contradiction in the combination of these technical features, they should be considered as the scope recorded in this specification.
[0187] It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these modifications and improvements all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A distributed manufacturing scheduling method based on the imperial competition algorithm, characterized in that: The following steps are involved: Step S1: Establish an objective function including minimizing the maximum completion time, minimizing the maximum machine load and minimizing the total energy consumption, and set the constraint conditions of the objective function according to the assembly process of the product; Step S2: Setting encoding and decoding rules, encoding the process sorting and machine selection, and obtaining the process sorting vector OSV and the machine selection vector MAV, wherein the elements in the process sorting vector are workpiece serial numbers, and the elements in the machine selection vector represent the index of the processing machine selected by the workpiece serial number at the corresponding position in the process sorting vector; Step S3: setting the hybrid initialization rules of OSV and MAV to generate the initial solution sets of OSV and MAV; Step S4: Calculate the objective function values of all initial solutions in the initial solution set, take the initial solutions whose objective function values are greater than the set objective function threshold as colonial countries, and the remaining initial solutions as colonies, use OX crossover to achieve assimilation between colonial countries, and use POX crossover to achieve assimilation between colonial countries and colonies, and generate a new solution set; Step S5: Design the neighborhoods of OSV and MAV, obtain multiple neighborhood search combinations, perform variable neighborhood descent search on the colonized countries, and obtain the optimal production scheduling plan.
2. The distributed manufacturing scheduling method based on the imperial competition algorithm according to claim 1 is characterized in that: The expression of the objective function in step S1 is: minf1=E n,1 ; Where f1, f2, and f3 are the completion time of the scheduling scheme, the machine load of the scheduling scheme, and the total energy consumption of the machine of the scheduling scheme respectively; E n,1 is the completion time of the last assembly process; W k is the working time of the kth machine; k is the machine serial number; m f is the total number of machines in workshop f; F is the total number of processing workshops; E p Energy consumption of the machine; E i E is the idle energy consumption of the machine; t is the energy consumption of the transportation equipment; n is the total number of workpieces; u i is the total number of processes for workpiece i; pe f,k is the working power of the kth machine in workshop f; is the processing time of the jth process of workpiece i on the kth machine in workshop f; is a decision variable, which is 1 when the jth process of workpiece i is processed on the kth machine in workshop f, otherwise it is 0; ie f,k is the idle power of the kth machine in workshop f; S i,j is the start time of the jth process of workpiece i; is the completion time of the first process of the first workpiece; is a decision variable, which is 1 when the first process of the first workpiece on the k-th machine in workshop f is processed before the j-th process of workpiece i, otherwise it is 0; te is the working power of the transportation equipment; is a decision variable, which is 1 when the j-th process of workpiece i is processed on machine k1 and the j-1-th process of workpiece i is processed on machine k2, otherwise it is 0; is the transportation time of workpiece j between machine k1 and machine k2.
3. The distributed manufacturing scheduling method based on the imperial competition algorithm according to claim 1 is characterized in that: The constraint condition is expressed as: In the above formula, S i,j is the start time of the jth process of workpiece i; is the processing time of the jth process of workpiece i on the kth machine in workshop f; is a decision variable, which is 1 when the j-th process of workpiece i is processed on the k-th machine in workshop f, otherwise it is 0; is a decision variable, which is 1 when the j-th process of workpiece i is processed on machine k1 and the j-1-th process of workpiece i is processed on machine k2, otherwise it is 0; is the transportation time of workpiece j between machine k1 and machine k2; is a decision variable, which is 1 when the first process of the first workpiece on the k-th machine in workshop f is processed before the j-th process of workpiece i, otherwise it is 0; E i,j is the completion time of the jth process of the ith workpiece; θ is a sufficiently large positive number.
4. The distributed manufacturing scheduling method based on the imperial competition algorithm according to claim 1 is characterized by: The hybrid initialization rule of OSV layer coding set in step S3 includes: a. Prioritize the component with the smallest average sum of remaining processes of all workpieces on its processable machines. If there are multiple components with the smallest time, randomly select one of them, and then randomly select an unfinished workpiece under the component; b. Prioritize the component with the least remaining steps of all workpieces under the component. If there are multiple components with the smallest number of steps, randomly select one of them, and then randomly select an unfinished workpiece under the component; c. Randomly select a workpiece according to the process constraints; The hybrid initialization rules for the MAV layer encoding are: a. Assign the current process to the machine with the smallest total processing time among the optional processing machines. If there are multiple machines with the smallest total processing time, randomly assign it to one of them. The total processing time is the sum of the processing time of the current workpiece process and the transportation time between the current workpiece process and its previous process; b. Assign the current process to the machine with the lowest total energy consumption in the optional processing machine set. If there are multiple machines with the lowest total energy consumption, randomly assign them to one of them. The total energy consumption is the sum of the processing energy consumption of the current workpiece process and the transportation energy consumption between the current workpiece process and the previous process; c. Allocate the current process to the machine with the smallest machine load in the optional processing machine set. If there are multiple machines with the smallest load, randomly select one of them. The machine load is the total processing time of the processing task scheduled on the machine.
5. The distributed manufacturing scheduling method based on the imperial competition algorithm according to claim 1 is characterized in that: In step S4, OX crossover is used to realize assimilation between colonized countries, and POX crossover is used to realize assimilation between colonized countries and colonies, and a new solution set is generated, including the following steps: Step S41: Set the learning probability pLearn of the colonized country, treat a colonized country and its colonies as an empire, and calculate the learning probability pLearn of each colony in the empire. j Assimilate with its colonized country to obtain offspring col s ; Step S42: If the child col s is col j The non-dominated solution of col s Update the colony, otherwise execute step S43; Step S43: Calculate the individual country costs, the standardized costs of individual countries and the power of individual countries of all colonial countries, and take the colonial country with the greatest power as the strongest colonial country; Step S44: Imp other colonized nations i Assimilate with the strongest colonial nation to obtain offspring imp s ; Step S45: Generate a random number between 0 and 1. If the child imp s It's imp i If the random number is not greater than pLearn, then use imp s Update the colony country, otherwise execute step S46; Step S46: Repeat steps S41 to S45 until only one empire remains or the set algorithm termination condition is reached, then terminate the operation.
6. The distributed manufacturing scheduling method based on the imperial competition algorithm according to claim 5 is characterized by: Step S41 describes the colonies in each empire. j Assimilate with its colonized country to obtain offspring col s The following steps are involved: Step S411: For OSV: randomly divide the workpiece set into two subsets J1 and J2, randomly select two solutions from the initial solution set of OSV as parents P1 and P2, and copy the process belonging to J1 in the parent P1 to the child P2. s Keeping the positions of all processes unchanged, insert the processes belonging to J2 in the parent generation P2 into the child generation P according to the relative order in P2. s vacancy; Step S412: For MAV: randomly select processes less than the total number of processes from all processes as the number set O, randomly select two solutions from the initial solution set of MAV as the parent generations M1 and M2, and copy the machine index belonging to O in the parent generation M1 to the child generation M2. s Keeping the position unchanged, copy the machine index that does not belong to O in the parent generation M2 to the child generation M s And keep the position unchanged.
7. The distributed manufacturing scheduling method based on the imperial competition algorithm according to claim 5 is characterized by: The expression for calculating the single country cost in step S43 is: The expression for calculating the normalized cost for a single country is: The expression for calculating the power of the single country is: In the above formula, C i is the cost of a single country; n represents the number of optimization targets; W d is the weight of the dth optimization objective; f d is the value of the dth optimization objective function; C i ' is the standardized cost of a single country; P i The power of a single country; N imp is the total number of colonial countries.
8. The distributed manufacturing scheduling method based on the imperial competition algorithm according to claim 5 is characterized by: Step S44 describes the imp i Assimilation with the strongest colonial nation includes the following steps: Step S441: Randomly select two solutions from the initial solution set as the parents P1 and P2, randomly select two crossover points in the parent P1 to obtain the crossover segment, and copy the gene at the crossover segment position of the parent P2 to the offspring P S The corresponding positions of the parent generations P2 and P1 are used to establish a mapping set based on the genes of the crossover segments; Step S442: Copy the genes in the parent generation P1 except the crossover segment to the offspring generation P in sequence S At the corresponding position, each gene is tested during replication, and if the gene is in the mapping set, it is replaced with the mapping value, and the mapping relationship is deleted in the mapping set; Step S443: If the mapping set is not empty, then S All genes in are traversed and mapping transformations are performed until the mapping set is empty.
9. The distributed manufacturing scheduling method based on the imperial competition algorithm according to claim 1 is characterized in that: In step S5, a neighborhood is designed based on the critical path and the critical machine. The critical path is the path that takes the longest time from the start of the first process to the completion of the last process. The critical machine is the machine with the maximum load. The neighborhood includes: Neighborhood N1: Randomly select two processes on the critical path in the OSV layer and swap the two processes; randomly select two machines on the critical path in the MAV layer and swap the two machines; Neighborhood N2: Randomly select two processes on the critical path in OSV and insert the later process before the earlier process; randomly select two machines on the critical path in MAV and insert the later machine before the earlier machine; Neighborhood N3: Randomly select a process from the process set of the critical path, and assign the selected process to the machine with the least time consumption in the optional machine set; Neighborhood N4: Randomly select a process from the process set of the critical path and assign the selected process to the machine with the least energy consumption in the optional machine set; Neighborhood N5: Randomly select a process from the process set of the key machine and assign the selected process to a random machine outside the key machine.
10. The distributed manufacturing scheduling method based on the imperial competition algorithm according to claim 9 is characterized in that: In step S5, a reinforcement learning algorithm is used to perform variable neighborhood descent search on the colonized countries, including the following steps: Step S51: Initialize all values in the Q table to 0; Step S52: Calculate the average ideal distance MID and the inverse generation distance IGD of all solutions, set the state space S according to the size relationship between MID and IGD before and after the iteration, and record the state of the external environment at the tth iteration as S t ; The expression for calculating the average ideal distance MID is: The expression for calculating the inverse generation distance IGD is: In the above formula, f ji is the jth objective value of the ith solution; is the minimum value of the jth objective value among all solutions; n is the number of non-dominated solutions; d i is the Euclidean distance between the first frontier solution i and the nearest global optimal Pareto first frontier solution; N is the number of global optimal Pareto first frontier solutions; Step S53: Combine neighborhoods N1 and N2 with neighborhoods N3, N4, and N5 to obtain 6 neighborhood combinations, and use the neighborhood combinations as action set A. t , select an action from the action set and execute it, updating the state to S t+1 ; Step S54: Calculate the current reward value R, update the Q table, and perform variable neighborhood descent search according to the optimal neighborhood combination in the current iteration; The expression for calculating the current reward value R is: R = R1 + R2; The expression for updating the Q table is: Q(S t ,A t )=(1-α)Q(S t ,A t )+α[R t+1 +γ·max(Q(S t+1 ,:))]; In the above formula, R1 is the reward value of the average ideal distance; R2 is the reward value of the reverse generation distance; MID(t) is the MID value of the t-th iteration; IGD(t) is the IGD value of the t-th iteration; α is the learning rate; γ is the discount rate.
Citation Information
Patent Citations
Improved imperialist competitive algorithm for solving job shop scheduling problem
CN106611235A
Distributed manufacturing intelligent scheduling method based on improved grey wolf optimization algorithm
CN115130789A
Flexible job shop scheduling optimization method based on dual-objective empire competition algorithm
CN115526379A
Method for solving fuzzy production scheduling problem based on improved heap optimization algorithm
CN117170318A
Method for solving flexible workshop scheduling of aviation structural member with transportation and setting time
CN118396274A