Flexible workshop scheduling method and program product based on improved tuna school algorithm
By improving the tuna school algorithm, increasing population diversity and improving position update mechanism, combining Tent chaos mapping and Levy flight strategy, the problems of large calculation volume and unstable quality of heuristic algorithms in the existing technology are solved, and efficient generation of flexible workshop scheduling plans is achieved, which improves production efficiency and economic benefits.
Patent Information
- Application Number
- CN202210695393.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2042-06-17
AI Technical Summary
When solving the scheduling problem of flexible work workshops, the heuristic algorithm has a large amount of calculation and is difficult to ensure the solution quality of each solution, and it is difficult to meet the scheduling needs of the production characteristics of flexible workshops.
The improved tuna school algorithm is adopted to improve the algorithm's global search ability and local exploration ability by increasing population diversity and improving position update mechanisms, combining Tent chaos mapping and Levy flight strategy.
It has achieved rapid and good production scheduling plans, improved the performance of the algorithm, and ensured production efficiency and economic benefits.
Smart Images

Figure CN115062980B_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a flexible workshop production scheduling method and a program product based on an improved tuna school algorithm, belonging to the technical field of new generation information communication. Background Art
[0002] At present, the algorithms for solving the flexible job shop scheduling problem can be divided into two categories: deterministic algorithms and heuristic algorithms. Because this problem is clearly an NP-Hard problem, most researchers use heuristic algorithms. Heuristic algorithms are proposed relative to optimization algorithms. The definition of heuristic algorithms is: an algorithm based on intuition or experience, which gives a feasible solution for each instance of the combinatorial optimization problem to be solved at an acceptable cost (referring to computing time and space), and the degree of deviation between the feasible solution and the optimal solution cannot generally be predicted. At present, heuristic algorithms are mainly based on natural body algorithms, mainly ant colony algorithms, simulated annealing methods, neural networks, etc. The computational complexity of heuristic algorithms is relatively large, so heuristic algorithms have made great achievements with the development of computer technology. Heuristic algorithms have the advantages of low dependence on the initial solution, few parameters, good robustness, and simple and easy implementation. When solving the FJSP problem, they show better performance than the exact algorithm. Heuristic algorithms cannot guarantee that the optimal solution to the problem can be obtained every time, which leads to the uneven quality of solutions obtained by different algorithms.
[0003] To this end, Chinese patent documents disclose the following technical contents:
[0004] Chinese patent document CN110782085A provides a casting production scheduling method and system, which includes: establishing a multi-objective weighted scheduling model according to the processing characteristics of castings in the front section, the objective function of the multi-objective weighted scheduling model is to minimize the average vacancy rate of the sand box and minimize the maximum completion time; solving the multi-objective weighted scheduling model by a hybrid genetic NEH algorithm to obtain a scheduling plan for the front section; establishing a flexible flow shop scheduling model according to the flexible processing characteristics of castings in the back section, the objective function of the flow shop scheduling model is to minimize the maximum completion time; solving the flow shop scheduling model by a whale group algorithm to obtain a scheduling plan for the back section.
[0005] Chinese patent document CN114153187A discloses an optimized production scheduling method, storage medium and device for flexible production. The method is a dynamic production scheduling method based on original production order information, known main line queue, and cache part inventory information in the scenario of flexible production in an automobile workshop. The method includes the control of production rhythm and the scheduling of sub-assembly lines, so as to achieve continuous production of the main line in the presence of unknown disturbances.
[0006] Chinese patent document CN1 14460908A discloses a flexible production workshop scheduling method for a snail noodle production enterprise, comprising the following steps: 1) generating an initial scheduling plan through a genetic algorithm according to the workshop status at the initial moment; 2) executing production tasks according to the initial scheduling plan, and detecting the production status of the workshop in real time. If a disturbance event occurs during the execution of the production task, execute step 3); if no disturbance event occurs, execute step 4); 3) execute a rescheduling trigger mechanism to determine whether the offset coefficient of the production process exceeds the threshold set by the system. If it exceeds, execute a complete rescheduling strategy. If it does not exceed, process it according to the right shift rescheduling strategy, and return to execute step 2) after the processing is completed; 4) execute production tasks until all production tasks are completed.
[0007] Chinese patent document CN114492895A discloses a method for batching and scheduling a flexible production line for automobile engines. The method takes minimizing the penalty for delay as the optimization goal, and solves the original optimization problem in two stages, namely, solving the total number of sub-batches of each workpiece and the processing order of all sub-batches of different workpieces through a genetic taboo hybrid heuristic algorithm. Then, under this processing order, a mixed integer programming model is established by using a sample mean approximation method based on the characteristics of random arrival time, that is, a number of scenarios are generated according to the random characteristics of the workpiece arrival time, and the goal is to minimize the mean of the penalty for delay in all scenarios. Batch optimization is achieved by solving the batch size of each sub-batch. This document combines the genetic algorithm with the taboo search algorithm, takes the minimum penalty for delay as the goal, and for a flexible production line with random arrival of workpieces to be processed and machine mold change time, the total processing volume of each workpiece is batched to form multiple sub-batches, and the processing order of multiple sub-batches is optimized.
[0008] The above patent documents all highlight their application scenarios, but for those skilled in the art, no improvements have been made to the algorithms, and therefore it is difficult to meet the scheduling and production needs of existing factories that meet the production characteristics of flexible workshops. Summary of the invention
[0009] In view of the shortcomings of the prior art, the present invention discloses a flexible workshop production scheduling method based on an improved tuna school algorithm. The technical advantages of the present invention are: a better production scheduling plan can be obtained quickly, and the application performance of the improved algorithm is higher than that of the known production scheduling method.
[0010] The invention also discloses a program product for realizing the above method. The invention increases the diversity of the population during initialization, thereby improving the global search capability; the change of the position update mechanism enhances the convergence of the algorithm, thereby strengthening its local search capability.
[0011] Technical term explanation:
[0012] 1. Production planning is the sequencing of processes;
[0013] 2. The process number is to number the process of the workpiece;
[0014] 3. The position element is the decimal representation of the complete plan;
[0015] 4. The process sequence plus the processing machines corresponding to the processes constitute a complete production plan.
[0016] The detailed technical scheme of the present invention is as follows:
[0017] A flexible workshop production scheduling method based on an improved tuna school algorithm, characterized by comprising:
[0018] (1) Input
[0019] Input the basic information of the scheduling plan according to the international general calculation example; the specific basic information of the scheduling plan includes: the number of workpieces to be processed, the processing procedures of each workpiece, the machines for the processing procedures, and the time each processing procedure occupies the machine; Figure 1 The following is the basic information of a scheduling plan. Figure 1 Just enter the format;
[0020] For ease of understanding, see Table 1 for Figure 1 Explanation: The first two rows of Table 1 and Figure 1 The first two rows correspond to the second row of Table 1, which is not fully displayed; the letters in the third row of Table 1 correspond to the names of the second row shown; Figure 1 Represents a set of data, the first line contains at least two numbers: the first number represents the number of workpieces, the second number represents the number of machines; and the third number is not required, which represents the average number of selectable processing machines for each process. Specifically, see Table 1, the first line: the number 10 represents 10 workpieces; the number 6 represents 6 selectable machines; the number 2 represents an average of two selectable machines for each process.
[0021] The second line represents a certain workpiece: the first number n 1 Indicates the total number of processes for this workpiece. The second number n 2 Indicates the number of optional machines for the first process, followed by a set of data (machine number, processing time) for the number of optional machines; then the number of optional machines for the second process, and so on. For details, see Table 1, the second row: n 1 Indicates that the first workpiece has 6 processes, n 2 Indicates that there are two processing machines to choose from in the first process. 3 The processing time on the 3rd (n 4) The processing time on the machine is 4; and so on; n 5 It means there are 3 processing machines to choose from for the second process.
[0022] Table 1:
[0023] 10 6 2 6 2 1 5 3 4 3 5 3 <![CDATA[n 1 ]]> <![CDATA[n 2 ]]> <![CDATA[n 3 ]]> <![CDATA[n 4 ]]> <![CDATA[n 5 ]]>
[0024] (2) Processing
[0025] The process part is encoded in the form of a unique code: the gene bit in the process sequence represents the workpiece number, and the position element appearing in the process sequence indicates the process number of the current processed workpiece; the process part is the workpiece process, which only indicates the co-constructed process; the gene bit means that each number on the process sequence diagram represents a gene bit; the position element appearing in the process sequence means that the position element on the process sequence diagram is a position described by text;
[0026] For example: Figure 2 As shown in the figure, a process sequence is coded as [3, 3, 2, 3, 2, 1, 1, 2, 1] and is explained as follows:
[0027] The first 3 indicates the first process of the third workpiece;
[0028] The second 3 indicates the second process of the third workpiece;
[0029] The first 2 indicates the first process of the second workpiece;
[0030] The third 3 indicates the third process of the third workpiece;
[0031] The second 2 indicates the second process of the second workpiece;
[0032] The first 1 indicates the first process of the first workpiece;
[0033] The second 1 indicates the second process of the first workpiece;
[0034] The third 2 indicates the third process of the second workpiece;
[0035] The third 1 indicates the third process of the first workpiece;
[0036] O31 is the first process of the third workpiece, O33 is the third process of the third workpiece, and O23 is the third process of the second workpiece. This explains the meaning of the process sorting code and the text "the first 3 represents the first process of the third workpiece, and the third 2 represents the third process of the second workpiece."
[0037] Population initialization: The population generated by initialization is composed of individuals. Each individual is interpreted as a production schedule. The current individuals are composed of decimals within the upper and lower limits. Individuals are represented by decimals, and the components of decimals represent position elements. The decimals are composed because a complete scheduling plan is multidimensional. Since an algorithm is used to update the position elements, this method is used for conversion and representation;
[0038] The individual number is the total number of processes; the random numbers in the individual position elements are assigned a unique ROV value according to the ROV (Ranked order value) rule, and the process code is assigned to each random number according to the corresponding relationship between the ROY value and the process. The generated process ranking is the process plan corresponding to the continuous value within the limit; the limit refers to the upper and lower limits, which defines the meaning of the domain;
[0039] At this time, the individual position elements have decimals and their actual meanings have been decoded, such as Figure 3 As shown, the obtained process sequence is selected from left to right, and the process O is selected in the optional processing machine set. ij Select processing machines;
[0040] A complete scheduling plan has been generated at this moment. Its minimum and maximum completion time are calculated, and all individuals in the population are calculated according to the above constraints (that is, the individuals in the population are composed of decimal position vectors, and then the decimals are decoded into process sorting, and then the machine is selected for the process, and finally the completion time of a workpiece is calculated). The best individual in each population is selected (that is, the individual with the minimum and maximum completion time), and the best individual is updated. At this point, the decoding of a complete position element to a scheduling plan is completed;
[0041] The position elements generated by the above initialization are updated by the improved tuna school algorithm. The improved tuna school algorithm no longer uses random values to control the update method. The improved tuna school algorithm adopts the trial-before-determination method and integrates the Levy flight strategy into the position element update. After the individual position elements adopt the new position element update method, the updated fitness values are compared. The fitness value refers to the completion time of a complete plan; the optimal update method is selected as the update method of the current vector, that is, the best fitness value is selected as the optimal update method. The position element update formula of the improved tuna school algorithm is:
[0042]
[0043]
[0044]
[0045]
[0046]
[0047] β=e bl *cos(2πb) (XI)
[0048]
[0049]
[0050] In formulas (VI)-(XIII), The i-th individual in the t+1-th iteration; L is the Levy flight; The best individual in the tth iteration; is the random individual of the tth iteration; The i-th individual in the t-th iteration; TF is a random number with a value of 1 or -1; α≤0.7; t is the current iteration number; t max is the maximum number of iterations; the number of NP populations;
[0051] Among them, Levy's random step method is as follows:
[0052]
[0053] In formula (XIV), u~N(0,σ 2 ), v~N(0,1),
[0054] u and v follow a normal distribution, Γ is the gamma function, and the parameter β is a random number between the interval [0, 2]. Generally, β = 1.5;
[0055] After the position element is updated, the individual is decoded according to the decoding steps from the position element to the scheduling plan to obtain the minimum and maximum completion time of the individual. The position after the update is equivalent to the individual obtained after formula (I). The decoding step starts from the description after formula (I), but does not include formula (I). After the loop condition is met and the constraint is jumped out, the optimal of each group is compared and the better individual is selected for output. max is the maximum number of iterations, limiting the number of iterations;
[0056] (3) Output
[0057] The output is a complete scheduling plan. Taking the Brandimarte benchmark MK01 example, the scheduling plan output according to the above description is as follows: Figure 4 As shown:
[0058] The overall processing time is short using the method described in this article, which reduces time consumption; Figure 4Here are the details of MK01, according to Figure 5 Manually can also be arranged as left Figure 5 Such a scheduling plan.
[0059] Preferably, the population initialization adopts the Tent chaos mapping method, and the initialization formula is formula (I):
[0060] C i =f(x n )*(ub i -lb i )+lb i (I)
[0061] In formula (I), f(x n ) is the Tent chaos mapping formula; ub i is the upper bound of the i-th dimension, lb i is the lower bound of the i-th dimension.
[0062] According to the preferred embodiment of the present invention, the optional processing machine is concentrated in process O ij The selection methods for selecting processing machines include:
[0063] After obtaining the process sequence, the intermediate step of selecting a processing machine for each process and calculating the completion time is to obtain a machine processing matrix. Whether there are blank continuous blank columns G in the columns before the current time corresponding to the K rows of a machine in the machine processing matrix:
[0064] If there is only one machine in the optional processing machine set that meets the blank column G, then select this machine to process the process;
[0065] If there are more than or equal to 2 machines in the optional processing machine set that have such blank column G, calculate which machine has a higher degree of fit:
[0066] If satisfied: E i(j-1)k′ = = G s ||(G s +H ijk )==G e ||(E i(j-1)k′ +H ijk )==G e , then Fd=1;
[0067] If not satisfied, then Fd=H ijk / (G e -G s ) (II)
[0068] In formula (II), E i(j-1)k′ G represents the completion time of the j-1th process of the i-th workpiece on the k' machine; sThe start time of the blank column; H ijk The processing time of the jth process of the i-th workpiece on machine k; G e End time of blank column; Fd compliance;
[0069] Select the machine with higher fit Fd as the optional machine;
[0070] If there is no blank column that meets the requirements, calculate the overall completion time for each machine in the optional machine set:
[0071] The start time of this process is S ijk =max{E i(j-1)k′ , F k (III)
[0072] In formula (III), S ijk It refers to the start time of the jth process of workpiece i on machine k; E i(j-1)k′ F represents the completion time of the j-1th process of the i-th workpiece on the k' machine; k The column number of the current empty table column of machine K, that is, the idle time of the machine;
[0073] The end time of the process is: E ijk =S ijk +H ijk (III);
[0074] Calculate all the machines in the process machine set according to the above formula, and select the machine with the shortest process end time to process the process.
[0075] Preferably, according to the present invention, the blank column G includes:
[0076] ①The start time of the blank column G s Greater than or equal to the completion time E of the previous process i(j-1)k′ , the length of the blank column is greater than or equal to process O ij The processing time is
[0077] E i(j-1)k′ ≤G s &&(G s +H ijk )≤G e (IV);
[0078] In formula (IV), E i(j-1)k′ G represents the completion time of the j-1th process of the i-th workpiece on the k' machine; s The start time of the blank column; H ijk The processing time of the jth process of the i-th workpiece on machine k; G eEnd time of blank column;
[0079] ②The start time of the blank column G s Less than or equal to the completion time E of the previous process i(j-1)k′ The completion time of the blank column is greater than or equal to the completion time of the previous process plus the completion time of process O. ij The processing time is
[0080] G s ≤E i(j-1)k′ &&(E i(j-1)k′ +H ijk )≤G e (V)
[0081] In formula (V), E i(j-1)k′ G represents the completion time of the j-1th process of the i-th workpiece on the k' machine; s The start time of the blank column; H ijk The processing time of the jth process of the i-th workpiece on machine k; G e End time of blank column.
[0082] A program product for implementing the above method is characterized in that the computer program product is tangibly stored on a non-transitory computer-readable medium and includes machine-executable instructions, wherein the machine-executable instructions are used to execute the above method.
[0083] The technical advantages of the present invention are:
[0084] The present invention uses an improved tuna school algorithm to solve the flexible job shop scheduling problem (FJSP), and establishes a flexible job shop scheduling model with the maximum completion time of the machine as the optimization target. An improved tuna school algorithm is proposed, which improves the position update formula, introduces Tent chaos mapping and Levy flight strategy, realizes an effective balance between global search and local exploration, and finally achieves the technical purpose of being able to output a reasonable scheduling plan based on the input workpiece information. In the present invention, international general examples can be used for description, such as Brandimarte benchmark examples or Kacem examples.
[0085] The improved tuna swarm algorithm has greatly improved its optimization ability and accuracy. Applying the improved tuna swarm algorithm to flexible workshop scheduling to solve the scheduling plan not only ensures the superiority of the scheduling plan but also greatly shortens the time spent on solving a complete scheduling plan. The scheduling plan generated by this method can complete a production plan in the minimum time unit, shorten the idle time of the machine, and ensure production efficiency.
[0086] Compared with the prior art, the present invention has the following effective effects:
[0087] (1) The improved tuna swarm algorithm is applied to the flexible job shop scheduling problem. It has a fast global optimization capability and can quickly jump out of the local extreme value, thereby improving the premature maturity and poor search performance of other algorithms in the flexible job shop scheduling problem. The method of the present invention is used for flexible job shop scheduling, which can improve the diversity of the population and the accuracy of the solution set, while improving the production efficiency of the enterprise and ensuring the economic benefits of the enterprise.
[0088] (2) A multi-fish school solution strategy was designed. A chaotic mapping strategy was introduced during initialization to increase the diversity and richness of the group, laying the foundation for the subsequent search for the optimal value. The update structure of the original algorithm was changed and the Levy flight strategy was added, which helped to improve the population diversity and distribution uniformity.
[0089] (3) The complete optimization scheme can also be transplanted to other single-objective optimization application scenarios. It has certain versatility and is easy to promote. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] Figure 1 is the MK01 example in the Brandimarte benchmark example described in the present invention;
[0091] Figure 2 It is a schematic diagram of the process sequence in the present invention;
[0092] Figure 3 It is a conversion flow chart of the position elements and process sequence described in the present invention;
[0093] Figure 4 The improved tuna school algorithm of the present invention is used to solve the Gantt chart of the MK01 scheduling plan;
[0094] Figure 5 It is the standard Salp algorithm to solve the Gantt chart of MK01 scheduling plan;
[0095] Figure 6 It is a schematic diagram of the process of the method of the present invention. DETAILED DESCRIPTION
[0096] The present invention will be described in detail below with reference to the embodiments and the accompanying drawings, but is not limited thereto.
[0097] like Figure 1-6 shown.
[0098] Embodiment 1,
[0099] A flexible workshop production scheduling method based on an improved tuna school algorithm, comprising:
[0100] (1) Input
[0101] Input the basic information of the scheduling plan according to the international general calculation example; the specific basic information of the scheduling plan includes: the number of workpieces to be processed, the processing procedures of each workpiece, the machines for the processing procedures, and the time each processing procedure occupies the machine; Figure 1 The following is the basic information of a scheduling plan. Figure 1 Just enter the format;
[0102] For ease of understanding, see Table 1 for Figure 1 Explanation: The first two rows of Table 1 and Figure 1 The first two rows correspond to the second row of Table 1, which is not fully displayed; the letters in the third row of Table 1 correspond to the names of the second row shown; Figure 1 Represents a set of data, the first line contains at least two numbers: the first number represents the number of workpieces, the second number represents the number of machines; and the third number is not required, which represents the average number of selectable processing machines for each process. Specifically, see Table 1, the first line: the number 10 represents 10 workpieces; the number 6 represents 6 selectable machines; the number 2 represents an average of two selectable machines for each process.
[0103] The second line represents a certain workpiece: the first number n 1 Indicates the total number of processes for this workpiece. The second number n 2 Indicates the number of optional machines for the first process, followed by a set of data (machine number, processing time) for the number of optional machines; then the number of optional machines for the second process, and so on. For details, see Table 1, the second row: n 1 Indicates that the first workpiece has 6 processes, n 2 Indicates that there are two processing machines to choose from in the first process. 3 The processing time on the 3rd (n 4 ) The processing time on the machine is 4; and so on; n 5 It means there are 3 processing machines to choose from for the second process.
[0104] Table 1:
[0105] 10 6 2 6 2 1 5 3 4 3 5 3 <![CDATA[n 1 ]]> <![CDATA[n 2 ]]> <![CDATA[n 3 > <![CDATA[n 4 ]]> <![CDATA[n 5 ]]>
[0106] (2) Processing
[0107] The process part is encoded in the form of a unique code: the gene bit in the process sequence represents the workpiece number, and the position element appearing in the process sequence indicates the process number of the current processed workpiece; the process part is the workpiece process, which only indicates the co-constructed process; the gene bit means that each number on the process sequence diagram represents a gene bit; the position element appearing in the process sequence means that the position element on the process sequence diagram is a position described by text;
[0108] For example: Figure 2 As shown in the figure, a process sequence is coded as [3, 3, 2, 3, 2, 1, 1, 2, 1] and is explained as follows:
[0109] The first 3 indicates the first process of the third workpiece;
[0110] The second 3 indicates the second process of the third workpiece;
[0111] The first 2 indicates the first process of the second workpiece;
[0112] The third 3 indicates the third process of the third workpiece;
[0113] The second 2 indicates the second process of the second workpiece;
[0114] The first 1 indicates the first process of the first workpiece;
[0115] The second 1 indicates the second process of the first workpiece;
[0116] The third 2 indicates the third process of the second workpiece;
[0117] The third 1 indicates the third process of the first workpiece;
[0118] O 31 is the first process of the third workpiece, O 33 is the third process of the third workpiece, O 23 It is the third process of the second workpiece, which explains the meaning of the process sorting code and the text "the first 3 represents the first process of the third workpiece, and the third 2 represents the third process of the second workpiece".
[0119] Population initialization: The population generated by initialization is composed of individuals. Each individual is interpreted as a production schedule. The current individuals are composed of decimals within the upper and lower limits. The individuals are represented by decimals, and the decimal components represent position elements. The decimal composition is because a complete scheduling plan is multidimensional, and because an algorithm is used to update the position elements, this method is used for conversion and representation;
[0120] The individual number is the total number of processes; the random numbers in the individual position elements are assigned a unique ROV value according to the ROV (Ranked order value) rule, and the process code is assigned to each random number according to the corresponding relationship between the ROV value and the process. The generated process ranking is the process plan corresponding to the continuous values within the limit; the limit refers to the upper and lower limits, which defines the meaning of the domain;
[0121] At this time, the individual position elements have decimals and their actual meanings have been decoded, such as Figure 3 As shown, the obtained process sequence is selected from left to right, and the process O is selected in the optional processing machine set. ij Select processing machines;
[0122] A complete scheduling plan has been generated at this moment. Its minimum and maximum completion time are calculated, and all individuals in the population are calculated according to the above constraints (that is, the individuals in the population are composed of decimal position vectors, and then the decimals are decoded into process sorting, and then the machine is selected for the process, and finally the completion time of a workpiece is calculated). The best individual in each population is selected (that is, the individual with the minimum and maximum completion time), and the best individual is updated. At this point, the decoding of a complete position element to a scheduling plan is completed;
[0123] The position elements generated by the above initialization are updated by the improved tuna school algorithm. The improved tuna school algorithm no longer uses random values to control the update method. The improved tuna school algorithm adopts the trial-before-determination method and integrates the Levy flight strategy into the position element update. After the individual position elements adopt the new position element update method, the updated fitness values are compared. The fitness value refers to the completion time of a complete plan; the optimal update method is selected as the update method of the current vector, that is, the best fitness value is selected as the optimal update method. The position element update formula of the improved tuna school algorithm is:
[0124]
[0125]
[0126]
[0127]
[0128]
[0129] β=e bl *cos(2πb) (XI)
[0130]
[0131]
[0132] In formulas (VI)-(XIII), The i-th individual in the t+1-th iteration; L is the Levy flight; The best individual in the tth iteration; is the random individual of the tth iteration; The i-th individual in the t-th iteration; TF is a random number with a value of 1 or -1; α≤0.7; t is the current iteration number; t max is the maximum number of iterations; the number of NP populations;
[0133] Among them, Levy's random step method is as follows:
[0134]
[0135] In formula (XIV), u~N(0,σ 2 ), v~N(0,1),
[0136] u and v follow a normal distribution, Γ is the gamma function, and the parameter β is a random number between the interval [0, 2]. Generally, β = 1.5;
[0137] After the position element is updated, the individual is decoded according to the decoding steps from the position element to the scheduling plan to obtain the minimum and maximum completion time of the individual. The position after the update is equivalent to the individual obtained after formula (I). The decoding step starts from the description after formula (I), but does not include formula (I). After the loop condition is met and the constraint is jumped out, the optimal of each group is compared and the better individual is selected for output. max is the maximum number of iterations, limiting the number of iterations;
[0138] (3) Output
[0139] The output is a complete scheduling plan. Taking the Brandimarte benchmark MK01 example, the scheduling plan output according to the above description is as follows Figure 4 As shown:
[0140] The overall processing time is short using the method described in this article, which reduces time consumption; Figure 4 Here are the details of MK01, according to Figure 5 Manually can also be arranged as left Figure 5 Such a scheduling plan.
[0141] Embodiment 2,
[0142] As described in Example 1, the population initialization adopts the Tent chaos mapping method, and the initialization formula is formula (I):
[0143] C i =f(x n )*(ub i -lb i )+lb i (I)
[0144] In formula (I), f(x n ) is the Tent chaos mapping formula; ub i is the upper bound of the i-th dimension, lb i is the lower bound of the i-th dimension.
[0145] Specifically: Compared with the random initialization method of the original algorithm, the Tent chaotic mapping method is used to initialize the flexible workshop scheduling plan within the search space. Assume that the upper and lower limits of the search space are [lb, ub], and there are F groups. The number of center points of the initialization group is F, and the Tent formula is:
[0146] Where 0<α<1.
[0147] Multiple fish swarms within the search space are used to find the optimal flexible workshop scheduling plan. After initializing the center points of various swarms, the upper and lower limits of the search space of each swarm are limited according to the position of the center point. The upper and lower limits of each new swarm are the coordinates of the center point ± That is, the upper and lower limits are After determining the upper and lower limits of each population, the initialization of each fish population is the same as the initialization of the center point.
[0148] Embodiment 3,
[0149] As described in Example 1, in the optional processing machine set for process O ij The selection methods for selecting processing machines include:
[0150] After obtaining the process sequence, the intermediate step of selecting a processing machine for each process and calculating the completion time is to obtain a machine processing matrix. Whether there are blank continuous blank columns G in the columns before the current time corresponding to the K rows of a machine in the machine processing matrix:
[0151] If there is only one machine in the optional processing machine set that meets the blank column G, then select this machine to process the process;
[0152] If there are more than or equal to 2 machines in the optional processing machine set that have such blank column G, calculate which machine has a higher degree of fit:
[0153] If satisfied: E i(j-1)k′ = = G s ||(G s +H ijk)==G e ||(E i(j-1)k′ +H ijk )==G e , then Fd=1:
[0154] If not satisfied, then Fd=H ijk / (G e -G s ) (II)
[0155] In formula (II), E i(j-1)k′ G represents the completion time of the j-1th process of the i-th workpiece on the k' machine; s The start time of the blank column; H ijk The processing time of the jth process of the i-th workpiece on machine k; G e End time of blank column; Fd compliance;
[0156] Select the machine with higher fit Fd as the optional machine;
[0157] If there is no blank column that meets the requirements, calculate the overall completion time for each machine in the optional machine set:
[0158] The start time of this process is S ijk =max{E i(j-1)k′ , F k (III)
[0159] In formula (III), S ijk It refers to the start time of the jth process of workpiece i on machine k; E i(j-1)k′ F represents the completion time of the j-1th process of the i-th workpiece on the k' machine; k The column number of the current empty table column of machine K, that is, the idle time of the machine;
[0160] The end time of the process is: E ijk =S ijk +H ijk (III);
[0161] Calculate all the machines in the process machine set according to the above formula, and select the machine with the shortest process end time to process the process.
[0162] The blank column G includes:
[0163] ①The start time of the blank column G s Greater than or equal to the completion time E of the previous process i(j-1)k′ , the length of the blank column is greater than or equal to process O ij The processing time is
[0164] E i(j-1)k′ ≤G s &&(G s +H ijk )≤G e (IV);
[0165] In formula (IV), E i(j-1)k′ G represents the completion time of the j-1th process of the i-th workpiece on the k' machine; s The start time of the blank column; H ijk The processing time of the jth process of the i-th workpiece on machine k; G e End time of blank column;
[0166] ②The start time of the blank column G s Less than or equal to the completion time E of the previous process i(j-1)k′ The completion time of the blank column is greater than or equal to the completion time of the previous process plus the completion time of process O. ij The processing time is
[0167] G s ≤E i(j-1)k′ &&(E i(j-1)k′ +H ijk )≤G e (V)
[0168] In formula (V), E i(j-1)k′ G represents the completion time of the j-1th process of the i-th workpiece on the k' machine; s The start time of the blank column; H ijk The processing time of the jth process of the i-th workpiece on machine k; G e End time of blank column.
[0169] Embodiment 4,
[0170] A program product for implementing the method described in embodiments 1-3, wherein the computer program product is tangibly stored on a non-transitory computer-readable medium and includes machine executable instructions, wherein the machine executable instructions are used to execute the above method.
Claims
1. A flexible workshop scheduling method based on improved tuna school algorithm, It is characterized in that include: (1) Input Input basic information of the scheduling plan according to international general examples; The basic information of the scheduling plan includes: the number of workpieces to be processed, the processing steps of each workpiece, the machines for the processing steps, and the time each processing step occupies the machine; (2) Processing The process part is encoded in the form of a unique code: the gene bit in the process sequence represents the workpiece number, and the position element that appears in the process sequence indicates the process number of the current processing workpiece; Population initialization: The population generated by initialization is composed of individuals. Each individual is interpreted as a production schedule. The current individuals are composed of decimals within the upper and lower limits. Individuals are represented by decimals, and the decimal components represent position elements. The individual number is the total number of processes; the random numbers in the individual position elements are assigned a unique ROV value according to the ROV rule, and a process code is assigned to each random number according to the corresponding relationship between the ROV value and the process. The generated process sequence is the process plan corresponding to the continuous values within the limit; The obtained process is sorted from left to right and the machine is selected in sequence. The process O is selected from the optional processing machine set. ij Select processing machines; The position elements generated by the above initialization are updated using the improved tuna school algorithm. The position element update formula of the improved tuna school algorithm is: β=e bl *cos(2πb)(XI) In formulas (VI)-(XIII), The i-th individual in the t+1-th iteration; L is the Levy flight; The best individual in the tth iteration; is the random individual of the tth iteration; The i-th individual in the t-th iteration; TF is a random number with a value of 1 or -1; α≤0.7; t is the current iteration number; t max is the maximum number of iterations; the number of NP populations; Among them, Levy's random step method is as follows: In formula (XIV), u~N(0,σ 2 ), u and v follow a normal distribution, Γ is the gamma function, and the parameter β is a random number between the interval [0,2]; After the position element is updated, the individual is decoded according to the decoding steps from the position element to the scheduling plan to obtain the minimum and maximum completion time of the individual. The position after the update is equivalent to the individual obtained after formula (I). The decoding step starts from the description after formula (I), but does not include formula (I). After the loop condition is met, the constraints are jumped out and the optimal of each group is compared and the better individual is selected for output. max is the maximum number of iterations, limiting the number of iterations; (3) Output The output is a complete scheduling plan.
2. A flexible workshop production scheduling method based on an improved tuna school algorithm according to claim 1, It is characterized in that The population initialization adopts the Tent chaos mapping method, and the initialization formula is formula (I): C i =f(x n )*(ub i -lb i )+lb i (I) In formula (I), f(x n ) is the Tent chaos mapping formula; ub i is the upper bound of the i-th dimension, lb i is the lower bound of the i-th dimension.
3. A flexible workshop production scheduling method based on an improved tuna school algorithm according to claim 1, It is characterized in that In the optional processing machine set, it is process O ij The selection method of selecting processing machines includes: After obtaining the process sequence, the intermediate step of selecting a processing machine for each process and calculating the completion time is to obtain a machine processing matrix. Whether there are blank continuous blank columns G in the columns before the current time corresponding to the K rows of a machine in the machine processing matrix: If there is only one machine in the optional processing machine set that meets the blank column G, then select this machine to process the process; If there are more than or equal to 2 machines in the optional processing machine set that have such blank column G, calculate which machine has a higher degree of fit: If satisfied: E i(j-1)k′ = = G s ||(G s +H ijk )==G e ||(E i(j-1)k′ +H ijk )==G e , then Fd=1; If not satisfied, then Fd=H ijk / (G e -G s )(II) In formula (II), E i(j-1)k′ G represents the completion time of the j-1th process of the i-th workpiece on the k' machine; s The start time of the blank column; H ijk The processing time of the jth process of the i-th workpiece on machine k; G e End time of blank column; Fd compliance; If there is no blank column that meets the requirements, calculate the overall completion time for each machine in the optional machine set: The start time of this process is S ijk =max{E i(j-1)k′ ,F k (III) In formula (III), S ijk It refers to the start time of the jth process of workpiece i on machine k; E i(j-1)k′ F represents the completion time of the j-1th process of the i-th workpiece on the k' machine; k The column number of the current empty table column of machine K, that is, the idle time of the machine; The end time of the process is: E ijk =S ijk +H ijk (III); Calculate all the machines in the process machine set according to the above formula, and select the machine with the shortest process end time to process the process.
4. A flexible workshop production scheduling method based on improved tuna school algorithm according to claim 3, It is characterized in that The blank column G includes: ①The start time of the blank column G s Greater than or equal to the completion time E of the previous process i(j-1)k′ , the length of the blank column is greater than or equal to process O ij The processing time is HAVE BEEN i(j-1)k′ ≤G s &&(G s +H ijk )≤G e (IV); In formula (IV), E i(j-1)k′ G represents the completion time of the j-1th process of the i-th workpiece on the k' machine; s The start time of the blank column; H ijk The processing time of the jth process of the i-th workpiece on machine k; G e End time of blank column; ②The start time of the blank column G s Less than or equal to the completion time E of the previous process i(j-1)k′ The completion time of the blank column is greater than or equal to the completion time of the previous process plus the completion time of process O. ij The processing time is G s ≤E i(j-1)k′ &&(E i(j-1)k′ +H ijk 0≤G e (V) In formula (V), E i(k-1)k′ G represents the completion time of the j-1th process of the i-th workpiece on the k' machine; s The start time of the blank column; H ijk The processing time of the jth process of the i-th workpiece on machine k; G e End time of blank column.
5. A computer program product for implementing the method according to any one of claims 1 to 4, It is characterized in that The computer program product is tangibly stored on a non-transitory computer readable medium and includes machine executable instructions for performing the above-described method.
Citation Information
Patent Citations
Casting production scheduling method and system
CN110782085A
Optimized production scheduling method for flexible production, storage medium and equipment
CN114153187A
Flexible production workshop scheduling method for snail powder production enterprise
CN114460908A
Automobile engine flexible production line batching and scheduling method
CN114492895A
Model algorithm of fish movement states
CN106204652A