A generalized job-shop scheduling method based on improved whale optimization algorithm
By improving the whale optimization algorithm to construct a mathematical model and encoding/decoding mechanism, the workshop scheduling problem of forced co-operation coupling was solved, the maximum completion time and total energy consumption were optimized, and production efficiency was improved.
Patent Information
- Application Number
- CN202410142719.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-31
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-01-31
AI Technical Summary
Existing technologies lack methods for optimizing workshop scheduling to address forced coupling of operations, resulting in low workshop production efficiency. This is particularly true in scenarios such as electronic product testing and mold assembly processing, where it is difficult to optimize the scheduling of maximum completion time and total energy consumption.
An improved whale optimization algorithm is adopted to construct a low-dimensional multi-objective generalized job shop mathematical model. Combined with mixed integer programming, chromosome double-layer combinatorial encoding and insertion greedy decoding are designed. The individual positions of the population are updated through the whale optimization algorithm, and the scheduling scheme is optimized by non-dominated sorting and reference point selection mechanism.
It achieves efficient scheduling of low-dimensional multi-objective generalized workshops under forced co-operation conditions, optimizes maximum completion time and total energy consumption, and improves production efficiency.
Smart Images

Figure CN118068785B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of production management, specifically relating to a generalized job shop scheduling method based on an improved whale optimization algorithm. Background Technology
[0002] Currently, some workshops require mandatory matching of workpieces with the same machine for certain tasks, such as the combined processing of mold components and the separate assembly and inspection of the same product on different machine units in electronic product testing workshops. This results in a forced coupling of some processes for each workpiece with the same machine.
[0003] Taking electronic product testing as an example, the workshop designs a general process route for the same product prototype and divides the prototype into different groups. Each group of prototypes completes the testing of each process in sequence according to the sub-route specified in the general process route. However, some testing prototypes need to be tested in combination across groups, such as vibration testing, drop impact testing, and dust testing. The combination processing of mold parts and the joint inspection of electronic products bring about the constraint of forced same-machine operation. This breaks the constraint that the workshop scheduling of the same machine cannot process different workpieces at the same time, forming a forced same-machine operation coupling. Considering the actual production of the workshop, how to optimize the multi-objective scheduling with forced same-machine operation is lacking in the existing technology. Summary of the Invention
[0004] In order to overcome one or more defects and deficiencies in the existing technology, the purpose of this invention is to provide a generalized job shop scheduling method based on an improved whale optimization algorithm, which can optimize the scheduling of low-dimensional multi-objective generalized job shops under forced co-operation conditions.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A generalized job shop scheduling method based on an improved whale optimization algorithm includes the following steps:
[0007] S1. Construct a low-dimensional, multi-objective, generalized job shop mathematical model with mandatory same-machine operations;
[0008] S2. Determine the constraints of the constructed mathematical model;
[0009] S3. Design the corresponding encoding and decoding methods for processes and machines based on mandatory same-machine operation constraints;
[0010] S4. Establish a conversion mechanism between the scheduling solution and the individual whale position vector;
[0011] S5. Initialize the population by generating an initial population, and set the population size, the maximum number of iterations for individual updates, and the maximum number of iterations for population iteration;
[0012] S6. Execute the whale optimization algorithm and use the whale individual position update strategy to obtain the offspring population;
[0013] S7. Merge the previous generation population with its newly generated offspring population, perform non-dominated sorting on the merged population, and use the reference point selection mechanism to select individuals of the same population size from the merged population to form a new population.
[0014] S8. Determine whether the number of iterations of the new population after optimization meets the maximum number of iterations set for the population. If it does, decode the process code and machine code corresponding to the new population after individual optimization as the optimal solution set, and then execute step S9. Otherwise, return the new population after individual optimization to step S6.
[0015] S9. Perform a decision evaluation on the optimal solution set using the approximation ideal solution sorting method to obtain an optimal scheduling scheme.
[0016] Preferably, the mathematical model is constructed based on two objectives: maximum completion time and total energy consumption, and using a mixed integer programming method.
[0017] The mathematical symbols in the mathematical model are defined as follows: i, h represent workpiece numbers, i, h ∈ {1, 2, ..., N}; j, g represent process numbers, j, g ∈ {1, 2, ..., N}. i}; k represents the machine number, k∈{1,2,…,M}; N represents the total number of workpieces; M represents the total number of machines; N i Represents the total number of operations for workpiece i; I, H represent the workpiece set indices corresponding to the combined operations; J, G represent the operation set indices corresponding to the combined operations; U represents an infinite real number; O ij O represents the j-th process of workpiece i; IJ Indicates a combination process, O IJ ={O ij O hg O pq ,...,O yz}; JS IJ Indicates the combination process O IJ Corresponding workpiece set; OS IJ Indicates the combination process O IJ Corresponding process set; T IJK (T ijk ) indicates process O IJ (O ij The operation time on machine k; T i Indicates the delivery time of workpiece i; MS k This indicates the boot time of machine k; ME k P represents the boot time of machine k; k This represents the operating power of machine k; P represents the no-load power of machine k; g E represents the fixed power of the workshop. t Indicates the energy consumption transferred in a single process of a workpiece; C i S represents the completion time of workpiece i; IJ (S ij ) indicates process O IJ (O ij The start time of the operation; E IJ (E ij ) indicates process O IJ (O ij The end time of the operation; E busy E represents the total energy consumption during machine operation time. idle E represents the total energy consumption during the machine's idle time. tran E represents the total energy consumption for transferring the workpiece; innate Indicates the inherent energy consumption of the workshop; X IJk (X ijk ) indicates process O IJ (O ij A value of 1 indicates operation on machine k, and 0 indicates operation on machine k. IJHG Indicates process O IJ Prior to O HG The value is 1 for assignments and 0 otherwise; Z i(j-1)k Indicates process O ij The immediate preceding process O i(j-1) A value of 1 indicates a job performed on machine k, while a value of 0 indicates a job performed on machine k.
[0018] Furthermore, the steps for constructing a mathematical model based on mixed-integer programming include:
[0019] S11, Construct a representation that minimizes the maximum completion time C. max The objective function f1 is shown in the following equation:
[0020] f1 = C max ={max C i}, i∈{1,2,…,N};
[0021] S12. Construct the objective function f2 to represent minimizing the total energy consumption TE. Since the total energy consumption TE is mainly determined by the total energy consumption E of the machine's operating state. busy Total energy consumption under no-load conditions E idle Total energy consumption for workpiece transfer E tran and inherent energy consumption of the workshop E innate The objective function f2, which consists of four parts and minimizes the total energy consumption TE, is shown in the following equation:
[0022] f2=TE=min(E busy +E idle +E tran +Einnate ),
[0023] E busy The total energy consumption of all machines performing operations on the workpiece is calculated as follows:
[0024]
[0025]
[0026] E idle The total energy consumption of all machines in standby mode (i.e., no-load operation) is calculated as follows:
[0027]
[0028] E tran The total energy consumption for transferring the workpiece is calculated as follows:
[0029]
[0030] E innate The energy consumption of the workshop is calculated as follows:
[0031] E innate =P g C max .
[0032] Furthermore, the constraints of the mathematical model are shown in the following formulas:
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040] Equation (1) ensures that the operation process is not interrupted; Equation (2) ensures that the completion time of any workpiece does not exceed the maximum completion time; Equation (3) ensures that the start time of the current operation is not less than the end time of the preceding operation (or the set of preceding operations); Equation (4) ensures that the start time of any operation is not greater than its end time; Equation (5) ensures that any operation is performed only once on the machine; Equation (6) ensures that the start time of any operation is non-negative and the operation and end time are greater than 0; Equation (7) ensures that only one operation can be performed on a machine at the same time.
[0041] Furthermore, the coding based on the mandatory co-operation constraint is as follows:
[0042] The chromosome adopts a two-layer combination coding mechanism. One chromosome contains workpiece operation information and machine selection information. The first layer of the chromosome is the process code, which is represented by the process number according to the operation sequence of the process. The second layer of the chromosome is the machine code, which is represented by the machine number selected by the process. When the gene position number of the process code is greater than the total number of workpieces, it indicates a combination process that is forced to be operated on the same machine. The number corresponding to the combination process in the process code is represented by n+c, where n is the total number of workpieces and c is the frequency of the combination process in the process code.
[0043] The decoding based on the mandatory same-machine operation constraint is as follows: an insertion-type greedy decoding that takes into account the mandatory same-machine operation constraint is adopted, and all processes are arranged sequentially in the earliest feasible position. If the mandatory same-machine operation constraint is satisfied, the process is inserted into the idle time period of the machine that can be operated. Otherwise, the process to be operated is arranged after the last process that has been operated by the machine.
[0044] Furthermore, the conversion mechanism between the scheduling solution and the individual whale position vectors includes:
[0045] S41. Establish a mechanism for converting the scheduling solution into individual whale position vectors. The process includes:
[0046] S411. Perform machine selection; convert the selected machine serial numbers in the available machine set of the process into element values of the corresponding whale individual position vectors, as shown in the following formula:
[0047]
[0048] Where x(i) represents the i-th element of the whale's individual position vector, s(i) represents the number of machines that can be selected for the process corresponding to element i, N represents the total number of workpieces, and u(i)∈[1,s(i)] represents the index of the selected machine in the set of available machines; if s(i)=1, then x(i) takes any value in [-N,N].
[0049] S412. Perform process sorting; First, generate a set of random numbers in [-N,N] corresponding to the process sorting scheme, and use the Ranked Order Value (ROV) rule to assign a unique ROV value to each random number, so that each ROV value corresponds to a process. Then, rearrange the ROV values according to the coding order of the processes. The order of the random numbers corresponding to the rearranged ROV values is the value of each element in the whale individual position vector.
[0050] S42. Establish a mechanism for converting individual whale position vectors into scheduling solutions. The process includes:
[0051] S421. Select the machine and calculate the machine number according to the following formula:
[0052]
[0053] Where, round(x) means rounding the value x to the integer with the smallest absolute value after subtracting it from the original value, and when s(i) = 1, u(i) is always equal to 1 regardless of the value of x(i);
[0054] S422. Perform process sorting. First, assign the corresponding ROV value to each element of the position vector of each individual whale in ascending order. Then, use the ROV value as the element number and combine the ROV value with the corresponding process to construct the corresponding scheduling solution.
[0055] Furthermore, the population initialization and generation process includes:
[0056] S51. Generate new, empty set process code sequence OPlan, machine code sequence MPlan, and job time sequence TPlan for different individuals;
[0057] S52. If the length of the process code sequence OPlan is equal to Then proceed to step S55; otherwise, select all processes O that are unrelated to the mandatory same-machine operation process. ij Insert i at any position in the process code sequence OPlan;
[0058] S53, If combined processes requiring simultaneous operation on the same machine are O IJ If there is no preceding combination process, its corresponding code N+c is randomly inserted into the process code sequence OPlan; otherwise, the combination process O is followed. IJ The code corresponding to the precursor assembly process is in the preceding assembly process O. IJ The corresponding codes N+1, N+2, ..., N+c are inserted into any feasible position in the process code sequence OPlan in the order of their respective codes.
[0059] S54. Sequentially determine whether there is a predecessor combined process for the combined process O in the current process coding sequence OPlan IJ , where i ∈ I;
[0060] When there is no predecessor combined process for workpiece i, at this time, find the position L of the combined process O IJ in the process coding sequence OPlan c ;
[0061] If the combined process O IJ ={O pq , O yz} (p and y represent the corresponding workpiece numbers, q and z represent the corresponding process numbers), then randomly insert q - 1 p's and z - 1 y's into the positions before the position L in the process coding sequence OPlan, and randomly insert N c -q + 1 p's and N p -z + 1 y's into the positions after the position L in the process coding sequence OPlan. For the combined process O y with multiple workpieces O c [[ID=2�]]={O IJ , O ij , O hg ,..., O pq ,..., O yz}, sequentially insert each process in the combined process O IJ into the process coding sequence OPlan in the same way as described above according to the corresponding workpiece numbers;
[0062] If there is a workpiece in the combined process O IJ that has a predecessor combined process, directly find the predecessor combined process O IJ of the combined process O I′J′ . For the predecessor combined process O I′J′ ={O ij , O<o000090>}, the combined process O IJ ={O iq , O yz} and j < q, with the predecessor combined process O<00oo094>, the combined process O IJ in their respective positions L c1 , L<Oo00097>In the process coding sequence OPlan and L c1 < L c2 < L c1 , at this time, randomly insert j - 1 i's, g - 1 h's, and z - 1 y's into the positions before the positions L ( c1 , L c2 in the process coding sequence OPlan, randomly insert q - j - 1 i's into the positions between the positions L c1 , L c2 in the process coding sequence OPlan, and insert Nh -g+1 h, N i -q+1 i, N y -z+1 y are randomly inserted into the position L of the process coding sequence OPlan. c1 L c2 Subsequently, for the combination process of multiple workpieces O IJ ={O ij O hg O pq ,...,O yz}, sequentially combine process O IJ Each process step inserts the process code sequence OPlan according to the corresponding workpiece number in the same manner as described above in this section;
[0063] S55, For the combined operations O in the operation coding sequence OPlan IJ The process of determining the corresponding set of available machines is as follows: set a random number r = Rand(0,1). If r < 0.1, select the machine with the minimum current load from the set of available machines. If r < 0.4, select the machine with the minimum operation time from the set of available machines. Otherwise, randomly select from the set of available machines. Then form the machine coding sequence Mplan and determine the operation time of each process to generate the operation time sequence TPlan.
[0064] Furthermore, the content of the whale optimization algorithm is as follows:
[0065] Surrounding the prey: The whale optimization algorithm assumes that the current optimal solution is the position of the whale closest to the target prey. After defining the optimal whale position, other individual whales will move closer to this position to update their positions. Specifically, the following formula is used for calculation:
[0066]
[0067]
[0068] Where t represents the number of iterations. This represents the individual position vector of the currently obtained optimal solution. This represents the individual position vector of other whales. This represents the distance between other whales and the whale in the optimal position, where || and · represent the absolute value and the dot product of vectors, respectively. Let A and C represent the updated individual position vectors of the whales. A and C are both coefficient vectors, and their calculation formulas are shown below:
[0069]
[0070]
[0071] in, This is the convergence factor, whose value decreases linearly from 2 to 0 during the iteration process. It is a random vector whose value range is [0,1];
[0072] Bubble web predation: Calculated according to the following formula:
[0073]
[0074]
[0075] in, Let represent the distance between the individual whale and its prey (the current optimal solution) in the t-th iteration, b be the spiral shape constant, and l be a random number between [-1, 1].
[0076] Since the whale's actions of narrowing its encirclement and spiraling upwards occur simultaneously, the parameter p is set to a random number between [0,1], giving it a 50% probability of choosing how to update between the two behaviors: encircling prey and using a bubble net for hunting. The calculation is shown in the following formula:
[0077]
[0078] Finding prey: To ensure better search and iterative convergence, individual whales can also randomly search for food. When |A|>1, the randomly selected whale will guide other whales to move closer to it. Conversely, the current position of the whale is only a locally optimal position. This method ensures that the whale can perform a global search and obtain a globally optimal solution. The calculation is shown in the following formula:
[0079]
[0080]
[0081] Among them, X rand This represents the position vector of a whale individual randomly selected from the current population.
[0082] Furthermore, the process of using whale individual location update strategies to obtain offspring populations includes:
[0083] S61. Starting from the initial population, according to the established conversion mechanism between the scheduling solution and the individual position vector, the encoding in the population is converted into the whale individual position vector;
[0084] S62. Iterate through the whale individual location update strategy, including the following process:
[0085] S621. Calculate the fitness value of each whale individual based on objective function f1 and objective function f2, and then update the position of the whale individual based on the fitness value;
[0086] S622, Update the convergence factor Coefficient vector A, coefficient vector C;
[0087] S623. Generate a random number p, and determine if p is less than 0.5; if p is not less than 0.5, then proceed according to the formula... Update the location of the individual whales, obtain the offspring population, and then return to step S621; if p is less than 0.5, then check if A is less than 1; if A is less than 1, then apply the formula... Update the location of individual whales, obtain the offspring population, and then proceed to the next step S624; otherwise, follow the formula. Update the location of the individual whale, obtain the offspring population, and then return to step S621;
[0088] S624. Determine whether the maximum number of iterations for individual whale updates has been reached; if the maximum number of iterations for individual whale updates is met, proceed to step S63; otherwise, return to step S622 until the offspring population is obtained.
[0089] S63. Based on the established conversion mechanism between the scheduling solution and the individual position vector, the whale individual position vectors of the offspring population are converted into the encoding in the new generation population, thereby obtaining the current scheduling solution.
[0090] Furthermore, the previous generation population is merged with its newly generated offspring population. A non-dominated ordination is performed on the merged population, and a reference point selection mechanism is used to select individuals of the same population size from the merged population to form a new population. The process includes:
[0091] S71. Based on the insertion greedy decoding method that considers the forced co-operation constraint set in step S3, decode the current scheduling solution obtained in step S63 to obtain a feasible scheduling scheme.
[0092] S72. Based on feasible scheduling schemes and calculating the values of the two objective functions f1 and f2 for each individual in step S1, perform non-dominated sorting of the population according to the values of the two objective functions to classify the individuals into ranks, and output the Pareto front set (F1, F2, F3, ... F) for each rank. l ), where F represents an individual on the Pareto front, and the subscript of F indicates which Pareto front individual it is. The lower-level individuals (F1, F2, ..., F...) are grouped together. l The sets are sequentially stored in R until |R|≥PS. If |R|=PS, then output R and end the initial population selection; otherwise, set R=F1∪F2,...,∪F l-1 Then proceed to the next step, S73;
[0093] S73. Creating Reference Points: Define reference points z = (z1, z2) on a two-dimensional plane, and construct a combination of one-dimensional X values, X ∈ {0 / H, 1 / H, ..., (H+2) / H}, where H is the number of segments on each target. For each coordinate value x... ij Let x ∈X. ij =x ij -(j-1) / H, for each coordinate value z ij ∈Z、x ij ∈X, obtain the (C) of each reference point z in the two target directions. max The coordinates of TE are: z i1 =x i1 -0、z i2 =x i2 -x i1 , where TE represents the minimized total energy consumption;
[0094] S74. Perform adaptive standardization to reduce the influence of different dimensions of each objective: Determine the intercepts of the plane in the two objective coordinate systems, and standardize them accordingly by dividing the values of the two objective functions f1 and f2 for each individual in the population by the intercepts of the plane in the two objective coordinate systems, as shown in the following formula:
[0095]
[0096] Where a represents the intercept;
[0097] S75. Create a mapping relationship between population individuals and reference points: Construct the relationship between each reference point and the origin. For each individual, the cosine distance between the ray and the reference point is calculated using the two standardized objective functions. This yields the reference point π(r), (r∈R) with the smallest distance between each individual in the population, and the distance d(r), (r∈R) between the individual and the reference point π(r) is calculated.
[0098] S76. Using niche conservation operations, select the best individuals from the population: Set k=1; sift through the low-level Pareto front set (F1, F2, ..., F) from the reference point set Z. l From the set of reference points J that appear less frequently in the Pareto front, a reference point j′ is randomly selected from the set of reference points J to obtain the low-level Pareto front F. l The set of individuals Ind closest to the reference point j′ j′ ={r:π(r)=j′,r∈F l};like And the reference point j′ lies in the low-level Pareto front set (F1, F2, ..., F l If the frequency of a reference point appearing in the frontier of ) is 0, then from Ind j′Choose d(r∈R) t The smallest individual ind, R t =R t ∪ind, when the reference point j′ is in the lower-order Pareto front set (F1,F2,...,F... l If the frequency of a reference point appearing in the frontier of ) is not 0, then from Ind j′ Select any individual ind, R t =R t ∪ind, then set k = k + 1, Z = Z / j′, and then return to retrieve the individual set Ind. j′ ={r:π(r)=j′,r∈F l The process of selecting individuals continues until the selection of individuals for the entire population is completed; if... Then set Z = Z / j′, k = k + 1, and then return to retrieve the individual set Ind. j′ ={r:π(r)=j′,r∈F l The process of selecting individuals continues until the selection of individuals for the population is completed, thus forming a new population after individual selection.
[0099] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0100] This invention addresses the problem that existing algorithms cannot be directly applied to solve the low-dimensional multi-objective generalized job shop scheduling problem with forced co-operation, and realizes the function of efficient scheduling of low-dimensional multi-objective generalized job shops under forced co-operation conditions. Attached Figure Description
[0101] Figure 1 This is a flowchart illustrating the generalized job shop scheduling method based on the improved whale optimization algorithm of the present invention.
[0102] Figure 2 This is an example diagram of an encoding method;
[0103] Figure 3 This is a scheduling Gantt chart corresponding to the conventional chromosome decoding method;
[0104] Figure 4 This is a scheduling Gantt chart corresponding to the decoding method of this invention;
[0105] Figure 5 An example diagram illustrating the process of converting work sequence to the location of an individual whale;
[0106] Figure 6 This is an example diagram illustrating the process of converting an individual whale's location into a work sequence. Detailed Implementation
[0107] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0108] It should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the disclosure of this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting the disclosure of this invention.
[0109] Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Similarly, words such as "a," "one," or "the" do not indicate a quantity limitation but rather that at least one exists. Words such as "including" or "comprising" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "electrically connected" or "connected" are not limited to physical or mechanical electrical connections but can include electrical connections, whether direct or indirect.
[0110] Example
[0111] like Figure 1 As shown in the figure. This embodiment provides a generalized job shop scheduling method based on an improved whale optimization algorithm, which includes the following steps:
[0112] S1. Construct a low-dimensional, multi-objective, generalized job shop mathematical model with mandatory same-machine operations;
[0113] The low-dimensional multi-objective generalized job shop scheduling problem with forced co-operation is described as follows: Given N jobs {1,2,...,N} operating on M machines {1,2,...,M}, each job contains multiple operations, each operation has several machines to choose from, and the operation time of each job operation depends on the selected machine. The requirement is that there must be at least one machine that allows multiple operations of different types of jobs to form combined operations and be completed in parallel on that machine. Solving this problem is to determine the order of operations of each operation of all jobs, the machines used, and the operation time under the constraints of machine availability, operation sequence, and forced co-operation, in order to optimize the two scheduling indicators of maximum completion time and total energy consumption.
[0114] The low-dimensional multi-objective generalized job shop scheduling problem with forced co-operation needs to satisfy the following conditions:
[0115] 1. All machines are available at zero time, all workpieces can be operated on at zero time, and different workpieces have the same priority;
[0116] 2. The operation sequence of the same workpiece is determined according to the process route, and only one operation can be processed on a workpiece at a time;
[0117] 3. A single machine can only process one or a combination of processes at a time;
[0118] 4. The time for auxiliary operations such as clamping, disassembly, tool changing, and handling should be considered within the quota of process time;
[0119] 5. The process or combination of processes begins on the selected machine, taking into account only whether the current machine is available and whether the preceding process of the process or combination of processes is completed. All materials and auxiliary tools are prepared before the machine is started.
[0120] 6. Ensure continuous machine operation during the operation of the process or combination of processes, and ensure that the process or combination of processes is not interrupted during the operation;
[0121] The mathematical model is constructed based on two objectives: maximum completion time and total energy consumption;
[0122] The meanings of the mathematical symbols used in the mathematical model are shown in the table below:
[0123] Table 1 Meaning of Mathematical Symbols
[0124]
[0125]
[0126] A combined process can be viewed as a set of processes consisting of multiple regular processes. When a combined process has only one element, it can be regarded as a regular process.
[0127] The steps involved in constructing a mathematical model based on mixed integer programming include:
[0128] S11, Construct a representation that minimizes the maximum completion time C. max The objective function f1 is shown in the following equation:
[0129] f1 = C max ={maxC i}, i∈{1,2,…,N};
[0130] S12. Construct the objective function f2 to represent minimizing the total energy consumption TE. Since the total energy consumption TE is mainly determined by the total energy consumption E of the machine's operating state. busy Total energy consumption under no-load conditions Eidle Total energy consumption for workpiece transfer E tran and inherent energy consumption of the workshop E innate The objective function f2, which consists of four parts and minimizes the total energy consumption TE, is shown in the following equation:
[0131] f2=TE=min(E busy +E idle +E tran +E innate ),
[0132] E busy The total energy consumption of all machines performing operations on the workpiece is calculated as follows:
[0133]
[0134] E idle The total energy consumption of all machines in standby mode (i.e., no-load operation) is calculated as follows:
[0135]
[0136] E tran The total energy consumption for transferring the workpiece is calculated as follows:
[0137]
[0138] E innate The energy consumption of the workshop is calculated as follows:
[0139] E innate =P g C max ;
[0140] S2. Determine the constraints of the mathematical model constructed in step S1.
[0141] The constraints of the mathematical model are shown in the following formulas:
[0142]
[0143]
[0144]
[0145]
[0146]
[0147]
[0148]
[0149] Among them, Equation (1) ensures that the operation process is not interrupted, Equation (2) ensures that the completion time of any workpiece does not exceed the maximum completion time, Equation (3) ensures that the start time of the current operation is not less than the end time of the preceding operation (or the set of preceding operations), Equation (4) ensures that the start time of any operation is not greater than its end time, Equation (5) ensures that any operation is performed only once on the machine, Equation (6) ensures that the start time of any operation is non-negative and the operation and end time are greater than 0, and Equation (7) ensures that only one operation can be performed on a machine at the same time.
[0150] S3. Design the corresponding encoding and decoding methods for processes and machines based on mandatory same-machine operation constraints;
[0151] The encoding method is as follows: the chromosome adopts a two-layer combination encoding mechanism. One chromosome contains workpiece operation information and machine selection information. In the existing conventional encoding, the first layer of the chromosome is the process encoding, which is represented by the sequence number of the process according to the operation order. The second layer of the chromosome is the machine encoding, which is represented by the sequence number of the machine selected by the process. In the combination encoding mechanism of this embodiment, based on the conventional encoding, when the gene position number of the process encoding is greater than the total number of workpieces, it indicates a combination process that is forced to be operated on the same machine. The number corresponding to the combination process in the process encoding is represented by n+c, where n is the total number of workpieces and c is the frequency of the combination process in the process encoding.
[0152] Combination Figure 2 The example shown in this embodiment illustrates an encoding method. Assume there are 3 workpieces and a total of 8 processes (including one combined process). The processing time for each process on a specific machine is known. Process O... 12 O 22 If a mandatory same-machine operation exists and it is the first combined operation, then the fifth position of the combined operation code, represented by the digit "5", can be used to indicate it. Changes in combined operations from regular coding to combined coding, and changes in the corresponding machine number, are indicated by connecting lines and arrows. The position of the digit "5" in the combined operation code can be in operation O. 11 O 21 After that, process O 13 O 23 Before, Figure 2 Let's consider one of the feasible positions; the chromosome length of the combined encoding is 8, the process encoding sequence is "1 3 2 3 5 1 4 2", and the machine encoding sequence is "2 3 1 2 2 3 1 1". Then the operation sequence of the (combined) process corresponding to this chromosome is O. 11 (M2,2)→O 31 (M3,5)→O 21 (M1,2)→O 32 (M2,2)→O12,22 (M2,3)→O 13 (M3,2)→O 41 (M1,2)→O 23 (M1,2), where the numbers in parentheses represent the machine used and the operation time for this process;
[0153] The decoding method is as follows: Chromosome decoding is the process of converting the encoding into a scheduling scheme. This embodiment, based on traditional insertion-based greedy decoding, adopts insertion-based greedy decoding that considers the constraint of forced same-machine operation. Existing conventional decoding arranges the operations on the corresponding machines according to the order of operations in the process chromosome, and the scheduling Gantt chart is as follows. Figure 3 As shown; this embodiment considers the insertion-based greedy decoding under the mandatory co-operation constraint, which arranges all processes sequentially in the earliest feasible position. If insertion is possible while satisfying the mandatory co-operation constraint, then process O is... IJ Insert the task into the idle time period of the available machine; otherwise, schedule the task to be done after the last task already performed by the machine. (Schedule Gantt chart as follows) Figure 4 As shown;
[0154] by Figure 2 The encoding shown is an example of insert-based greedy decoding of chromosomes that takes into account the constraint of forced same-machine operation. Since energy consumption needs to be considered, the priority processing rule is as follows when considering machine idle time priority during the decoding process: consider whether the current process can be inserted into the machine idle time period. If there are multiple machine idle time periods that can be inserted, then select the machine with the least processing energy for processing. If there is only one machine idle time period, then directly select this gap for processing. If there is no machine idle time period that can be inserted, then select the machine with the shortest processing time for processing.
[0155] S4. Establish a conversion mechanism between the scheduling solution and the individual position vector; the scheduling solution of the low-dimensional multi-objective generalized job shop with forced co-operation is a discrete value, while the individual position vector of the whale optimization algorithm is a continuous value. To effectively utilize the whale optimization algorithm to solve the low-dimensional multi-objective generalized job shop scheduling problem with forced co-operation, the process includes:
[0156] S41. Establish a mechanism for converting the scheduling solution into individual whale position vectors. The process includes:
[0157] S411. Perform machine selection; convert the selected machine serial numbers in the available machine set of the process into element values of the corresponding whale individual position vectors, as shown in the following formula:
[0158]
[0159] Where x(i) represents the i-th element of the whale's individual position vector, s(i) represents the number of machines that can be selected for the process corresponding to element i, N represents the total number of workpieces, and u(i)∈[1,s(i)] represents the index of the selected machine in the set of available machines; if s(i)=1, then x(i) takes any value in [-N,N].
[0160] S412. Perform process sorting; First, generate a set of random numbers in [-N,N] corresponding to the process sorting scheme, and use the Ranked Order Value (ROV) rule to assign a unique ROV value to each random number, so that each ROV value corresponds to a process. Then, rearrange the ROV values according to the coding order of the processes. The order of the random numbers corresponding to the rearranged ROV values is the value of each element in the whale individual position vector. Figure 5 An example of this step is given;
[0161] S42. Establish a mechanism for converting individual whale position vectors into scheduling solutions. The process includes:
[0162] S421. Select the machine and calculate the machine number according to the following formula:
[0163]
[0164] Where, round(x) means rounding the value x to the integer with the smallest absolute value after subtracting it from the original value, and when s(i) = 1, u(i) is always equal to 1 regardless of the value of x(i);
[0165] S422. Perform process sequencing. First, assign the corresponding ROV value to each element of the position vector of each individual whale in ascending order. Then, use the ROV value as the element number and combine the ROV value with the corresponding process to construct the corresponding scheduling solution. Figure 6 An example of this step is given;
[0166] S5. Initialize the population by generating an initial population, setting parameters such as population size, maximum number of iterations for individual updates, and maximum number of iterations for population iteration; Since the encoding is divided into process encoding and machine encoding, the initialization of the population needs to be performed separately for the machine allocation part and the process sorting part. The initial population of the machine allocation part is generated by a hybrid search method, of which 60% is generated by global search, 30% by local search, and 10% by random search.
[0167] The process of population initialization and generation includes:
[0168] S51. Generate new, empty set process code sequence OPlan, machine code sequence MPlan, and job time sequence TPlan for different individuals;
[0169] S52. If the length of the process code sequence OPlan is equal to Then proceed to step S55; otherwise, select all processes O that are unrelated to the mandatory same-machine operation process. ij Insert i at any position in the process code sequence OPlan;
[0170] S53, If combined processes requiring simultaneous operation on the same machine are O IJ If there is no preceding combination process, its corresponding code N+c is randomly inserted into the process code sequence OPlan; otherwise, the combination process O is followed. IJ The code corresponding to the precursor assembly process is in the preceding assembly process O. IJ The corresponding codes N+1, N+2, ..., N+c are inserted into any feasible position in the process code sequence OPlan in the order of their respective codes.
[0171] S54. Sequentially determine the combined processes O in the current process code sequence OPlan. IJ Does i∈I have a predecessor combination process?
[0172] When workpiece i has no preceding assembly process, the assembly process O is found. IJ Position L in the process coding sequence OPlan c ;
[0173] If the combined process O IJ ={O pq O yz (p and y represent the corresponding workpiece numbers, and q and z represent the corresponding process numbers), then q-1 p and z-1 y are randomly inserted into position L of the process coding sequence OPlan. c The previous position, N p -q+1 p, N y -z+1 y elements are randomly inserted into the process coding sequence OPlan at position L. c The subsequent position, for combined processes involving multiple workpieces, O IJ ={O ij O hg O pq ,...,O yz}, sequentially combine process O IJ Each process step inserts the process code sequence OPlan according to the corresponding workpiece number in the same manner as described above in this section;
[0174] If the combined process O IJIf there is a combined process with a workpiece predecessor in it, directly find the combined process O IJ of the predecessor combined process O I′J′ For the predecessor combined process O I′J′ ={O ij , O hg}, combined process O IJ ={O iq , O yz} and j < q, there are the positions L I′J′ , L IJ of the predecessor combined process O c1 , L c2 in the process coding sequence OPlan respectively, and L c1 < L c2 . At this time, insert j - 1 i, g - 1 h, z - 1 y into the positions L c1 , L c2 in the process coding sequence OPlan respectively before, insert q - j - 1 i into the positions L c1 , L c2 in the process coding sequence OPlan respectively between, insert N h - g + 1 h, N i - q + 1 i, N y - z + 1 y into the positions L c1 , L c2 in the process coding sequence OPlan respectively after. For the combined process O IJ ={O<00002S6. Execute the whale optimization algorithm and use the whale individual position update strategy to obtain the offspring population, where the convergence factor is selected by a non-linear adjustment strategy.
[0178] The whale optimization algorithm's operation for updating the position of individual whales includes three stages: surrounding prey, using a bubble net to catch prey, and finding prey. The shift between the global search and local optimization iteration methods in the whale optimization algorithm is mainly achieved by controlling the value of the coefficient vector A. The coefficient vector A is linearly related to the convergence factor a. The convergence factor a of the whale algorithm decreases linearly with the number of iterations. This linear change is not conducive to the algorithm's ability to effectively coordinate global and local searches. This embodiment improves the convergence factor a non-linearly, generating a larger parameter A in the early iterations to enhance global exploration capabilities and accelerate the algorithm's convergence speed, and generating a smaller A in later iterations to enhance local optimization capabilities, thereby improving the overall search capability of the algorithm. The specific formula is as follows:
[0179] The content of the whale optimization algorithm is as follows:
[0180] Surrounding the prey: The whale optimization algorithm assumes that the current optimal solution is the position of the whale closest to the target prey. After defining the optimal whale position, other individual whales will move closer to this position to update their positions. Specifically, the following formula is used for calculation:
[0181]
[0182]
[0183] Where t represents the number of iterations. This represents the individual position vector of the currently obtained optimal solution. This represents the individual position vector of other whales. This represents the distance between other whales and the whale in the optimal position, where || and · represent the absolute value and the dot product of vectors, respectively. Let A and C represent the updated individual position vectors of the whales. A and C are both coefficient vectors, and their calculation formulas are shown below:
[0184]
[0185]
[0186] in, This is the convergence factor, whose value decreases linearly from 2 to 0 during the iteration process. It is a random vector whose value range is [0,1];
[0187] Bubble web predation: Calculated according to the following formula:
[0188]
[0189]
[0190] in, Let represent the distance between the individual whale and its prey (the current optimal solution) in the t-th iteration, b be the spiral shape constant, and l be a random number between [-1, 1].
[0191] Since the whale's actions of narrowing its encirclement and spiraling upwards occur simultaneously, the parameter p is set to a random number between [0,1], giving it a 50% probability of choosing how to update between the two behaviors: encircling prey and using a bubble net for hunting. The calculation is shown in the following formula:
[0192]
[0193] Finding prey: To ensure better search and iterative convergence, individual whales can also randomly search for food. When |A|>1, the randomly selected whale will guide other whales to move closer to it. Conversely, the current position of the whale is only a locally optimal position. This method ensures that the whale can perform a global search and obtain a globally optimal solution. The calculation is shown in the following formula:
[0194]
[0195]
[0196] Among them, X rand This represents the position vector of a whale individual randomly selected from the current population;
[0197] The process of using whale individual location update strategies to obtain offspring populations includes:
[0198] S61. Starting from the initial population, according to the established conversion mechanism between the scheduling solution and the individual position vector, the encoding in the population is converted into the whale individual position vector;
[0199] S62. Iterate through the whale individual location update strategy, including the following process:
[0200] S621. Calculate the fitness value of each whale individual based on objective function f1 and objective function f2, and then update the position of the whale individual based on the fitness value;
[0201] S622, Update the convergence factor Coefficient vector A, coefficient vector C;
[0202] S623. Generate a random number p, and determine if p is less than 0.5; if p is not less than 0.5, then proceed according to the formula... Update the location of the individual whales, obtain the offspring population, and then return to step S621; if p is less than 0.5, then check if A is less than 1; if A is less than 1, then apply the formula... Update the location of individual whales, obtain the offspring population, and then proceed to the next step S624; otherwise, follow the formula. Update the location of the individual whale, obtain the offspring population, and then return to step S621;
[0203] S624. Determine whether the maximum number of iterations for individual whale updates has been reached; if the maximum number of iterations for individual whale updates is met, proceed to step S63; otherwise, return to step S622 until the offspring population is obtained.
[0204] S63. Based on the established conversion mechanism between the scheduling solution and the individual position vector, the whale individual position vectors of the offspring population are converted into the encoding in the new generation population, thereby obtaining the current scheduling solution.
[0205] S7. Merge the previous generation population with its newly generated offspring population, perform non-dominated sorting on the merged population, and use the reference point selection mechanism to select individuals of the same population size from the merged population to form a new population. The process includes:
[0206] S71. Based on the insertion greedy decoding method that considers the forced co-operation constraint set in step S3, decode the current scheduling solution obtained in step S63 to obtain a feasible scheduling scheme.
[0207] S72. Based on feasible scheduling schemes and calculating the values of the two objective functions f1 and f2 for each individual in step S1, perform non-dominated sorting of the population according to the values of the two objective functions to classify the individuals into ranks, and output the Pareto front set (F1, F2, F3, ... F) for each rank. l ), where F represents an individual on the Pareto front, and the subscript of F indicates which Pareto front individual it is. The lower-level individuals (F1, F2, ..., F...) are grouped together. l The sets are sequentially stored in R until |R|≥PS. If |R|=PS, then output R and end the initial population selection; otherwise, set R=F1∪F2,...,∪F l-1 Then proceed to the next step, S73;
[0208] S73. Create reference points: Define reference points z = (z1, z2) on a two-dimensional plane, and construct a combination of one-dimensional X, X ∈ {0 / H, 1 / H, ..., (H+2) / H}, where H is the number of segments on each target. In this embodiment, H is preferably set to 4. At this time, the number of reference points z contained in the reference point set Z on the two-dimensional plane is... ( (where x is the number of combinations), for each coordinate value x ij Let x ∈X. ij =x ij -(j-1) / H and H=4, for each coordinate value z ij ∈Z、x ij ∈X, obtain the (C) of each reference point z in the two target directions. max The coordinates of TE are: z i1 =x i1 -0、z i2 =x i2 -x i1 , where TE represents the minimized total energy consumption;
[0209] S74. Perform adaptive standardization to reduce the influence of different dimensions of each objective: Determine the intercepts of the plane in the two objective coordinate systems, and standardize them accordingly by dividing the values of the two objective functions f1 and f2 for each individual in the population by the intercepts of the plane in the two objective coordinate systems, as shown in the following formula:
[0210]
[0211] Where a represents the intercept;
[0212] S75. Create a mapping relationship between population individuals and reference points: Construct the relationship between each reference point and the origin. For each individual, the cosine distance between the ray and the reference point is calculated using the two standardized objective functions. This yields the reference point π(r), (r∈R) with the smallest distance between each individual in the population, and the distance d(r), (r∈R) between the individual and the reference point π(r) is calculated.
[0213] S76. Using niche conservation operations, select the best individuals from the population: Set k=1; sift through the low-level Pareto front set (F1, F2, ..., F) from the reference point set Z. l From the set of reference points J that appear less frequently in the Pareto front, a reference point j′ is randomly selected from the set of reference points J to obtain the low-level Pareto front F. l The set of individuals Ind closest to the reference point j′ j′ ={r:π(r)=j′,r∈F l};like And the reference point j′ lies in the low-level Pareto front set (F1, F2, ..., F l If the frequency of a reference point appearing in the frontier of ) is 0, then from Ind j′ Choose d(r∈R) t The smallest individual ind, R t =R t∪ind, when the reference point j′ is in the lower-order Pareto front set (F1,F2,...,F... l If the frequency of a reference point appearing in the frontier of ) is not 0, then from Ind j′ Select any individual ind, R t =R t ∪ind, then set k = k + 1, Z = Z / j′, and then return to retrieve the individual set Ind. j′ ={r:π(r)=j′,r∈F} The step proceeds to the next individual selection, until the individual selection of the population is completed; if Then set Z = Z / j′, k = k + 1, and then return to retrieve the individual set Ind. j′ ={r:π(r)=j′,r∈F l The process of selecting individuals continues until the selection of individuals for the population is completed, thus forming a new population after individual selection.
[0214] S8. Determine whether the number of iterations of the new population after optimization meets the maximum number of iterations set for the population. If it does, decode the process code and machine code corresponding to the new population after individual optimization as the optimal solution set, and then execute step S9. Otherwise, return the new population after individual optimization to step S6.
[0215] S9. Optimal solution set is evaluated using the Approximation for Ideal Solution Ranking Method (TOPSIS) to obtain an optimal scheduling scheme. TOPSIS, also known as the distance method between superior and inferior solutions, is a commonly used distance-based comprehensive evaluation method in multi-objective decision analysis. This method constructs positive and negative ideal solutions to the decision problem, i.e., the optimal and worst solutions for each index. It ranks the schemes by calculating the degree to which each scheme is close to the positive ideal solution and far from the negative ideal solution, thereby selecting the optimal scheme.
[0216] The decision evaluation process of the Top-Order Solution Approximation Method (TOPSIS) includes:
[0217] S91. Obtain the normalized decision matrix using vector normalization. Let the decision matrix of the multi-attribute decision problem be A = (a ij ) m×n Normalized decision matrix B = (b ij ) m×n When B = (b ij ) m×n When the elements in the matrix are real numbers, then B = (b ij ) m×nThe formula for calculating the elements in the formula is as follows:
[0218]
[0219] Among them, a ij Let m be the value of the j-th objective in the i-th scheme, and m and n be the indices of the scheme and the objective, respectively.
[0220] S92. Construct a weighted normalized decision matrix. Let the weighted normalized decision matrix C = (c ij ) m×n The decision-maker provides a weight vector for each objective as w = {w1, w2, ..., w...}. n}, and satisfy When C = (c ij ) m×n When the elements in the matrix are real numbers, then C = (c ij ) m×n The formula for calculating the elements in the formula is as follows:
[0221] c ij =w j b ij i∈{1,2,...,m},j∈{1,2,...,n};
[0222] S93. Determine the positive and negative ideal solutions; ideal solution attributes can be roughly divided into three types: benefit-type, cost-type, and interval-type. Among them, the larger the value of the benefit-type index, the better; the smaller the value of the cost-type index, the better. When the attribute is interval-type, it is necessary to determine which interval is optimal. The formula for calculating the positive ideal solution is as follows:
[0223]
[0224] The formula for calculating the negative ideal solution is as follows:
[0225]
[0226] The final positive and negative ideal solutions are respectively In this embodiment, the two optimization objectives, minimizing the maximum completion time and total energy consumption, are both cost-related objectives. Therefore, the smaller the value of each objective, the better.
[0227] S94. Calculate the distances from each scheme to the positive and negative ideal solutions; Scheme D i =(a i1 ,a i2 ,...,a in The distance to the ideal solution is:
[0228]
[0229] Option D i =(ai1 ,a i2 ,...,a in The distance to the negative ideal solution is:
[0230]
[0231] S95. Calculate the comprehensive evaluation index of each scheme and rank them to obtain the optimal scheme; comprehensive evaluation index f i The numerator of the formula is the distance from the solution to the negative ideal solution, and the denominator is the sum of the distances from the solution to the negative ideal solution and the distances from the solution to the positive ideal solution. Therefore, the larger the comprehensive evaluation index, the better. The calculation formula is as follows:
[0232]
[0233] Compared with the prior art, the advantages of this embodiment are as follows:
[0234] This invention addresses the problem that existing algorithms cannot be directly applied to solve the low-dimensional multi-objective generalized job shop scheduling problem with forced co-operation, and realizes the function of efficient scheduling of low-dimensional multi-objective generalized job shops under forced co-operation conditions.
[0235] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A generalized job shop scheduling method based on an improved whale optimization algorithm, characterized in that, The steps include the following: S1. Construct a low-dimensional, multi-objective, generalized job shop mathematical model with mandatory same-machine operations; S2. Determine the constraints of the constructed mathematical model; S3. Design the corresponding encoding and decoding methods for processes and machines based on mandatory same-machine operation constraints; S4. Establish a conversion mechanism between the scheduling solution and the individual whale position vector; S5. Initialize the population by generating an initial population, and set the population size, the maximum number of iterations for individual updates, and the maximum number of iterations for population iteration; S6. Execute the whale optimization algorithm and use the whale individual position update strategy to obtain the offspring population; S7. Merge the previous generation population with its newly generated offspring population, perform non-dominated sorting on the merged population, and use the reference point selection mechanism to select individuals of the same population size from the merged population to form a new population. S8. Determine whether the number of iterations of the new population after optimization meets the maximum number of iterations set for the population. If it does, decode the process code and machine code corresponding to the new population after individual optimization as the optimal solution set, and then execute step S9. Otherwise, return the newly selected population to step S6; S9. Perform a decision evaluation on the optimal solution set using the approximation ideal solution sorting method to obtain an optimal scheduling scheme; The mathematical model is constructed based on two objectives: maximum completion time and total energy consumption; The mathematical symbols in the mathematical model are defined as follows: i, h represent workpiece numbers, i, h ∈ {1, 2, ..., N}; j, g represent process numbers, j, g ∈ {1, 2, ..., N}. i }; k represents the machine number, k∈{1,2,…,M}; N represents the total number of workpieces; M represents the total number of machines; N i Represents the total number of operations for workpiece i; I, H represent the workpiece set indices corresponding to the combined operations; J, G represent the operation set indices corresponding to the combined operations; U represents an infinite real number; O ij O represents the j-th process of workpiece i; IJ Indicates a combination process, O IJ ={O ij O hg O pq ,...,O yz }; JS IJ Indicates the combination process O IJ Corresponding workpiece set; OS IJ Indicates the combination process O IJ Corresponding process set; T IJk Indicates the combination process O IJ The operation time on machine k; T ijk Indicates process O ij The operation time on machine k; T i Indicates the delivery time of workpiece i; MS k This indicates the boot time of machine k; ME k P represents the boot time of machine k; k This represents the operating power of machine k; P represents the no-load power of machine k; g E represents the fixed power of the workshop. t Indicates the energy consumption transferred in a single process of a workpiece; C i S represents the completion time of workpiece i; IJ Indicates the combination process O IJ Start time of the operation; S ij Indicates process O ij Start time of work; E IJ Indicates the combination process O IJ End time of the task; E ij Indicates process O ij End time of the task; E busy E represents the total energy consumption during machine operation time. idle E represents the total energy consumption during the machine's idle time. tran E represents the total energy consumption for transferring the workpiece; innate Indicates the inherent energy consumption of the workshop; X IJk Indicates the combination process O IJ A value of 1 indicates operation on machine k, and 0 indicates operation elsewhere; X ijk Indicates process O ij A value of 1 indicates operation on machine k, and 0 indicates operation elsewhere; Y IJHG Indicates process O IJ Prior to O HG The value is 1 for assignments and 0 otherwise; Z i(j-1)k Indicates process O ij The immediate preceding process O i(j-1) A value of 1 indicates a job performed on machine k, and a value of 0 indicates a job performed elsewhere. The steps of constructing the mathematical model based on the mixed integer programming method include: S11, Construct a representation that minimizes the maximum completion time C. max The objective function f1 is shown in the following equation: f1=C max ={maxC i },i∈{1,2,…,N}; S12. Construct the objective function f2 to represent minimizing the total energy consumption TE, since the total energy consumption TE is mainly composed of the total energy consumption E during machine operation time. busy Total energy consumption during machine idle time E idle Total energy consumption for workpiece transfer E tran and inherent energy consumption of the workshop E innate The objective function f2, which consists of four parts and minimizes the total energy consumption TE, is shown in the following equation: f2=TE=min(E busy +E idle +E tran +E innate ), E busy The total energy consumption of all machines performing operations on the workpiece is calculated as follows: E idle The total energy consumption of all machines in standby mode (i.e., no-load operation) is calculated as follows: E tran The total energy consumption for transferring the workpiece is calculated as follows: E innate The inherent energy consumption of the workshop is calculated as follows: E innate =P g C max ; The constraints of the mathematical model are shown in the following formulas: Equation (1) ensures that the operation process is not interrupted; Equation (2) ensures that the completion time of any workpiece does not exceed the maximum completion time; Equation (3) ensures that the start time of the current operation is not less than the end time of the preceding operation; Equation (4) ensures that the start time of any operation is not greater than its end time; Equation (5) ensures that any operation is performed only once on the machine; Equation (6) ensures that the start time of any operation is non-negative and the operation and end times are greater than 0; Equation (7) ensures that only one operation can be performed on a machine at the same time.
2. The generalized job shop scheduling method based on the improved whale optimization algorithm according to claim 1, characterized in that, The coding based on the mandatory co-operation constraint is as follows: The chromosome adopts a two-layer combination coding mechanism. One chromosome contains workpiece operation information and machine selection information. The first layer of the chromosome is the process code, which is represented by the process number according to the operation sequence of the process. The second layer of the chromosome is the machine code, which is represented by the machine number selected by the process. When the gene position number of the process code is greater than the total number of workpieces, it indicates a combination process that is forced to be operated on the same machine. The number corresponding to the combination process in the process code is represented by n+c, where n is the total number of workpieces and c is the frequency of the combination process in the process code. The decoding based on the mandatory same-machine operation constraint is as follows: an insertion-type greedy decoding that takes into account the mandatory same-machine operation constraint is adopted, and all processes are arranged sequentially in the earliest feasible position. If the mandatory same-machine operation constraint is satisfied, the process is inserted into the idle time period of the machine that can be operated. Otherwise, the process to be operated is arranged after the last process that has been operated by the machine.
3. The generalized job shop scheduling method based on the improved whale optimization algorithm according to claim 2, characterized in that, The conversion mechanism between the set scheduling solution and the individual whale position vector includes: S41. Establish a mechanism for converting the scheduling solution into individual whale position vectors. The process includes: S411. Perform machine selection; convert the selected machine serial numbers in the available machine set of the process into element values of the corresponding whale individual position vectors, as shown in the following formula: Where x(i) represents the i-th element of the whale's individual position vector, s(i) represents the number of machines that can be selected for the process corresponding to element i, N represents the total number of workpieces, and u(i)∈[1,s(i)] represents the index of the selected machine in the set of available machines; if s(i)=1, then x(i) takes any value in [-N,N]. S412. Perform process sorting; First, generate a set of random numbers in [-N,N] corresponding to the process sorting scheme, and use the Ranked Order Value (ROV) rule to assign a unique ROV value to each random number, so that each ROV value corresponds to a process. Then, rearrange the ROV values according to the coding order of the processes. The order of the random numbers corresponding to the rearranged ROV values is the value of each element in the whale individual position vector. S42. Establish a mechanism for converting individual whale position vectors into scheduling solutions. The process includes: S421. Select the machine and calculate the machine number according to the following formula: Where, round(x) means rounding the value x to the integer with the smallest absolute value after subtracting it from the original value, and when s(i) = 1, u(i) is always equal to 1 regardless of the value of x(i); S422. Perform process sorting. First, assign the corresponding ROV value to each element of the position vector of each individual whale in ascending order. Then, use the ROV value as the element number and combine the ROV value with the corresponding process to construct the corresponding scheduling solution.
4. The generalized job shop scheduling method based on the improved whale optimization algorithm according to claim 3, characterized in that, The process of population initialization and generation includes: S51. Generate new, empty set process code sequence OPlan, machine code sequence MPlan, and job time sequence TPlan for different individuals; S52. If the length of the process code sequence OPlan is equal to Then proceed to step S55; otherwise, select all processes O that are unrelated to the mandatory same-machine operation process. ij Insert i at any position in the process code sequence OPlan; S53, If combined processes requiring simultaneous operation on the same machine are O IJ If there is no preceding combination process, its corresponding code N+c is randomly inserted into the process code sequence OPlan; otherwise, the combination process O is followed. IJ The code corresponding to the precursor assembly process is in the preceding assembly process O. IJ The corresponding codes N+1, N+2, ..., N+c are inserted into any feasible position in the process code sequence OPlan in the order of their respective codes. S54. Sequentially determine the combined processes O in the current process code sequence OPlan. IJ Does i∈I have a predecessor combination process? When workpiece i has no preceding assembly process, the assembly process O is found. IJ Position L in the process coding sequence OPlan c ; If the combined process O IJ ={O pq O yz (p and y represent the corresponding workpiece numbers, and q and z represent the corresponding process numbers), then q-1 p and z-1 y are randomly inserted into position L of the process coding sequence OPlan. c The previous position, N p -q+1 p, N y -z+1 y elements are randomly inserted into the process coding sequence OPlan at position L. c The subsequent position, for combined processes involving multiple workpieces, O IJ ={O ij O g O pq ,...,O yz }, sequentially combine process O IJ Each process step inserts the process code sequence OPlan according to the corresponding workpiece number in the same manner as described above in this section; If there is a workpiece with a predecessor combination process in the combined process O IJ then directly find the predecessor combination process O IJ of the combined process O I′J′ For the predecessor combination process O I′J′ ={O ij ,O g}, the combined process O IJ ={O iq ,O yz} and j < q, there are the predecessor combination process O I′J′ , the combined process O IJ 's respective positions L c1 , L c2 in the process coding sequence OPlan and L c1 < L c2 . At this time, insert j - 1 i's, g - 1, z - 1 y's respectively randomly before the positions L c1 , L c2 in the process coding sequence OPlan, insert q - j - 1 i's randomly between the positions L c1 , L c2 in the process coding sequence OPlan, insert N h - g + 1 h's, N i - q + 1 i's, N y - z + 1 y's respectively randomly after the positions L c1 , L c2 in the process coding sequence OPlan. For the combined process O IJ ={O ij [[ID= S55, For the combined operations O in the operation coding sequence OPlan IJ The process of determining the corresponding set of available machines is as follows: set a random number r = Rand(0,1). If f < 0.1, select the machine with the minimum current load from the set of available machines. If r < 0.4, select the machine with the minimum operation time from the set of available machines. Otherwise, randomly select from the set of available machines. Then form the machine code sequence MPlan and determine the operation time of each process to generate the operation time sequence TPlan.
5. The generalized job shop scheduling method based on the improved whale optimization algorithm according to claim 4, characterized in that, The content of the whale optimization algorithm is as follows: Surrounding the prey: The whale optimization algorithm assumes that the current optimal solution is the position of the whale closest to the target prey. After defining the optimal whale position, other individual whales will move closer to this position to update their positions. Specifically, the following formula is used for calculation: Where t represents the number of iterations. This represents the individual position vector of the currently obtained optimal solution. This represents the individual position vector of other whales. This represents the distance between other whales and the whale in the optimal position, where || and · represent the absolute value and the dot product of vectors, respectively. Let A and C represent the updated individual position vectors of the whales. A and C are both coefficient vectors, and their calculation formulas are shown below: in, This is the convergence factor, whose value decreases linearly from 2 to 0 during the iteration process. It is a random vector whose value range is [0,1]; Bubble web predation: Calculated according to the following formula: in, Let represent the distance between the individual whale and its prey (the current optimal solution) in the t-th iteration, b be the spiral shape constant, and l be a random number between [-1, 1]. Since the whale's actions of narrowing its encirclement and spiraling upwards occur simultaneously, the parameter p is set to a random number between [0,1], giving it a 50% probability of choosing how to update between the two behaviors: encircling prey and using a bubble net for hunting. The calculation is shown in the following formula: Finding prey: To ensure better search and iterative convergence, individual whales can also randomly search for food. When |A|>1, the randomly selected whale will guide other whales to move closer to it. Conversely, the current position of the whale is only a locally optimal position. This method ensures that the whale can perform a global search and obtain a globally optimal solution. The calculation is shown in the following formula: Among them, X rand This represents the position vector of a whale individual randomly selected from the current population.
6. The generalized job shop scheduling method based on the improved whale optimization algorithm according to claim 5, characterized in that, The process of obtaining the offspring population by updating the individual whale locations includes: S61. Starting from the initial population, according to the set conversion mechanism between the scheduling solution and the individual whale position vector, the encoding in the population is converted into the individual whale position vector. S62. Iterate through the whale individual location update strategy, including the following process: S621. Calculate the fitness value of each whale individual based on objective function f1 and objective function f2, and then update the position of the whale individual based on the fitness value; S622, Update the convergence factor Coefficient vector A, coefficient vector C; S623. Generate a random number p, and determine if p is less than 0.5; if p is not less than 0.5, then proceed according to the formula... Update the location of the individual whales, obtain the offspring population, and then return to step S621; if p is less than 0.5, then check if A is less than 1; if A is less than 1, then apply the formula... Update the location of individual whales, obtain the offspring population, and then proceed to the next step S624; otherwise, follow the formula. Update the location of the individual whale, obtain the offspring population, and then return to step S621; S624. Determine whether the maximum number of iterations for individual whale updates has been reached; if the maximum number of iterations for individual whale updates is met, proceed to step S63; otherwise, return to step S622 until the offspring population is obtained. S63. Based on the established conversion mechanism between the scheduling solution and the individual whale position vector, the individual whale position vector of the offspring population is converted into the encoding in the new generation population, thereby obtaining the current scheduling solution.
7. The generalized job shop scheduling method based on the improved whale optimization algorithm according to claim 6, characterized in that, The process of merging the previous generation population with its newly generated offspring population, performing a non-dominated sort on the merged population, and using a reference point selection mechanism to select individuals of the same population size from the merged population to form a new population includes: S71. Based on the insertion greedy decoding method that considers the forced co-operation constraint set in step S3, decode the current scheduling solution obtained in step S63 to obtain a feasible scheduling scheme. S72. Based on feasible scheduling schemes and calculating the values of the two objective functions f1 and f2 for each individual in step S1, perform non-dominated sorting of the population according to the values of the two objective functions to classify the individuals into ranks, and output the Pareto front set (F1, F2, F3, ... F) for each rank. l ), where F represents an individual on the Pareto front, and the subscript of F indicates which Pareto front individual it is. The lower-level individuals (F1, F2, ..., F...) are grouped together. l The sets are sequentially stored in R until |R|≥PS. If |R|=PS, then output R and end the initial population selection; otherwise, set R=F1∪F2,...,∪F l-1 Then proceed to the next step, S73; S73. Creating Reference Points: Define reference points z = (z1, z2) on a two-dimensional plane, and construct a combination of one-dimensional X values, X ∈ {0 / H, 1 / H, ..., (H+2) / H}, where H is the number of segments on each target. For each coordinate value x... ij Let x ∈X. ij =x ij -(j-1) / H, for each coordinate value z 1j ∈Z、x ij ∈X, obtain the (C) of each reference point z in the two target directions. max The coordinates of TE are: z i1 =x i1 -0、z i2 =x i2 -x i1 , where TE represents the minimized total energy consumption; S74. Perform adaptive standardization to reduce the influence of different dimensions of each objective: Determine the intercepts of the plane in the two objective coordinate systems, and standardize them accordingly by dividing the values of the two objective functions f1 and f2 for each individual in the population by the intercepts of the plane in the two objective coordinate systems, as shown in the following formula: Where a represents the intercept; S75. Create a mapping relationship between population individuals and reference points: Construct the relationship between each reference point and the origin. For each individual, the cosine distance between the ray and the reference point is calculated using the two standardized objective functions. This yields the reference point π(r), (r∈R) with the smallest distance between each individual in the population, and the distance d(r), (r∈R) between the individual and the reference point π(r) is calculated. S76. Using niche conservation operations, select the best individuals from the population: Set k=1; sift through the low-level Pareto front set (F1, F2, ..., F) from the reference point set Z. l The low-level Pareto front F is obtained by randomly selecting a reference point j′ from the reference point set J that appears less frequently in the front. l The set of individuals Ind closest to the reference point j′ j′ ={r:π(r)=j′,r∈F l };like And the reference point j′ lies in the low-level Pareto front set (F1, F2, ..., F l If the frequency of a reference point appearing in the frontier of ) is 0, then from Ind j′ Choose d(r∈R) t The smallest individual ind, R t =R t ∪ind, when the reference point j′ is in the lower-order Pareto front set (F1,F2,...,F... l If the frequency of a reference point appearing in the frontier of ) is not 0, then from Ind j′ Select any individual ind, R t =R t ∪ind, then set k = k + 1, Z = Z / j′, and then return to retrieve the individual set Ind. j′ ={r:π(r)=j′,r∈F l The process of selecting individuals continues until the selection of individuals for the entire population is completed; if... Then set Z = Z / j′, k = k + 1, and then return to retrieve the individual set Ind. j′ ={r:π(r)=j′,r∈F l The process of selecting individuals continues until the selection of individuals for the population is completed, thus forming a new population after individual selection.
Citation Information
Patent Citations
A method for solving flexible job shop scheduling based on an improved whale algorithm
CN109886588A
Whale optimization algorithm-based multi-target semi-automatic assembly line design method
CN111199094A