A high-dimensional multi-objective flexible job shop scheduling method based on cosine similarity

CN122613902APending Publication Date: 2026-08-21WUHAN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610563554.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-27
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

然而,这类方法依然存在以下不足:①NSGA-III仍依赖Pareto支配关系来推动种群收敛,在高维空间中收敛压力不足;②RVEA的APD指标在进化前期主要依赖径向距离,在后期逐渐增大角度惩罚权重,这种时变策略的适应性参数在不同问题上难以统一调节;③两者的参考点或参考向量通常在目标空间中均匀生成,当Pareto前沿偏离规则单纯形时,大量参考方向可能落在无解区域,造成计算资源浪费,同时边界区域的极值解容易丢失

Benefits of technology

1、本发明以余弦相似度为统一核心度量,提出了一种两阶段环境选择机制,实现了高维多目标优化中多样性与收敛性的解耦优化。两个阶段均基于余弦相似度(余弦距离)进行判断:第一阶段通过基于余弦相似度的最大最小距离选择,确保解集在高维目标空间中的方向多样性;第二阶段通过基于余弦相似度的互为最近邻分类与类内竞争,确保解的收敛性。由于余弦相似度仅关注方向信息,在五目标及以上的高维空间中不会出现维度灾难,选择压力不随目标维度增加而退化。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122613902A_ABST
    Figure CN122613902A_ABST
Patent Text Reader

Abstract

The application discloses a high-dimensional multi-objective flexible job shop scheduling method based on cosine similarity. The application proposes a two-stage environment selection mechanism with cosine similarity as the unified core measurement for the high-dimensional multi-objective flexible job shop scheduling problem with five or more objectives. In the first stage, the maximum minimum distance greedy selection strategy based on cosine similarity is adopted to realize the optimal coverage of direction diversity in the high-dimensional target space. In the second stage, the iterative nearest neighbor classification and intra-class competition mechanism based on cosine similarity is adopted to improve the population convergence by normalizing the origin distance measurement while maintaining the direction diversity. The application does not need to perform non-dominated sorting, nor does it need to preset reference vectors or reference points, and has high calculation efficiency and strong adaptability to irregular Pareto frontiers. Through example verification, the application can obtain a well-converged Pareto optimal solution set with uniform distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of production scheduling and combinatorial optimization technology, specifically to a high-dimensional multi-objective flexible job shop scheduling method based on cosine similarity. Background Technology

[0002] The Flexible Job-shop Scheduling Problem (FJSP) is an important extension of the classic Job-shop Scheduling Problem (JSP), in which each job operation can be performed on any one of a number of candidate machines. FJSP has been proven to be a strongly NP-hard problem, consisting of two parts: a routing subproblem (selecting a machine for each job operation) and a scheduling subproblem (determining the order of operations on each machine). Its solution difficulty is significantly higher than that of the classic JSP.

[0003] In real-world production environments, such as semiconductor manufacturing, printed circuit board (PCB) processing, and aerospace component manufacturing, scheduling decisions often require simultaneous consideration of multiple conflicting optimization objectives, such as maximum completion time, total delay time, machine load balancing, total workload, and energy consumption. When the number of optimization objectives exceeds three, the problem is classified as a high-dimensional multi-objective optimization problem (MaOP), which presents significant challenges in solving.

[0004] Currently, the main methods for solving multi-objective FJSP problems can be categorized as follows: The first category is Pareto-dominant methods, represented by NSGA-II. NSGA-II performs well in bi- and tri-objective problems due to its fast non-dominated sorting and crowding distance mechanism for environment selection, and is widely used in solving MO-FJSP problems. However, when the number of objectives increases to four or more, the selection pressure of non-dominated sorting decreases sharply because most solutions in the high-dimensional objective space are not mutually dominant, making it difficult for the algorithm to distinguish between good and bad solutions and easily leading to search stagnation. Furthermore, the effectiveness of crowding distance as a metric in high-dimensional spaces also degrades significantly. The second category is decomposition-based methods, represented by MOEA / D. This type of method decomposes the multi-objective problem into multiple single-objective subproblems using a set of uniformly distributed weight vectors. Each subproblem is optimized independently and information is shared through neighborhood cooperation. MOEA / D performs well in problems with regular objective space structures, but when the Pareto front is irregular in shape (e.g., non-convex, degenerate, or discontinuous), the pre-defined uniform weight vectors cannot effectively cover the true front, leading to gaps or clustering in the solution distribution. The third category is based on reference vectors or reference points, represented by NSGA-III and RVEA. NSGA-III, building upon NSGA-II, introduces a structured reference point mechanism to replace the crowding distance, maintaining diversity by associating solutions with reference points, showing significant improvement over NSGA-II when dealing with high-dimensional targets. RVEA further proposes an angle-penalized distance (APD) selection strategy based on reference vectors and introduces an adaptive adjustment mechanism for reference vectors. However, these methods still have the following shortcomings: ① NSGA-III still relies on Pareto dominance to drive population convergence, resulting in insufficient convergence pressure in high-dimensional spaces; ② RVEA's APD index mainly relies on radial distance in the early stages of evolution, gradually increasing the angle penalty weight in the later stages, making it difficult to uniformly adjust the adaptive parameters of this time-varying strategy across different problems; ③ The reference points or reference vectors of both are usually uniformly generated in the target space. When the Pareto front deviates from the regular simplex, a large number of reference directions may fall into unsolvable regions, wasting computational resources, and extreme solutions in boundary regions are easily lost. The fourth category is methods based on deep reinforcement learning that have emerged in recent years. These methods utilize deep learning models such as graph attention networks to extract process and machine features, and generate scheduling decisions in real time through reinforcement learning agents, giving them an advantage in response speed. However, these methods typically employ simple weighted summation decomposition strategies in multi-objective optimization, making it difficult to obtain a uniformly distributed Pareto front; furthermore, model training relies on large amounts of data and computing power, and generalization ability is limited by the problem size and structure of the training set.

[0005] In summary, existing methods generally face the following common challenges when solving high-dimensional multi-objective FJSP problems: ① Difficulty in maintaining diversity: how to ensure that the solution set uniformly covers all directions of the Pareto front in high-dimensional space, especially the boundary extremum directions; ② Difficulty in guaranteeing convergence: how to effectively promote the population to converge toward the Pareto front without relying on computationally expensive non-dominated sorting; ③ Difficulty in balancing diversity and convergence: how to improve convergence without destroying existing diversity.

[0006] Therefore, there is an urgent need for a new environmental selection mechanism specifically designed for high-dimensional target spaces that can effectively coordinate diversity and convergence. Summary of the Invention

[0007] To address the aforementioned technical challenges, this invention proposes a high-dimensional multi-objective flexible job shop scheduling method based on cosine similarity. This method, targeting high-dimensional multi-objective optimization scenarios with five or more objectives, innovatively proposes a two-stage environment selection mechanism with cosine similarity as the core metric: The first stage utilizes a greedy maximum-minimum distance selection strategy based on cosine similarity to achieve optimal diversity coverage in the directional dimension of the high-dimensional objective space, effectively overcoming the problem of easily losing boundary solutions in high-dimensional spaces; the second stage employs an iterative nearest-neighbor classification and intra-class competition mechanism based on cosine similarity to gradually improve population convergence while maintaining directional diversity through a lightweight origin distance metric. This method constructs selection pressure entirely based on cosine similarity, eliminating the need for non-dominated sorting, exhibiting high computational efficiency in high-dimensional objective spaces, and demonstrating good adaptability to irregular Pareto fronts.

[0008] A high-dimensional multi-objective flexible job shop scheduling method based on cosine similarity generates scheduling schemes using M machines to process N workpieces according to the optimization objective. The method defines the scheduling scheme for each workpiece as follows: Each workpiece contains The number of processes is [number], and the total number of processes is [number]. In each scheduling scheme, the machine allocation scheme for each process and the processing sequence and processing time of each process on each machine satisfy the following constraints: Each process In its optional machine set The process is assigned to only one machine at a time; the processes for the same workpiece are processed sequentially; each machine can only process one process at a time; for any given process... The completion time of a process on the assigned machine is equal to the sum of its start time and the corresponding processing time; the start time and completion time of each process are non-negative. The scheduling scheme is generated using the following steps: Step 1: Generate an initial population. Each individual in the initial population represents a scheduling scheme, and each scheduling scheme is coded as follows: , The process sequence vector is composed of workpiece numbers arranged in sequence, with processes for the same workpiece in... The number of times a word appears in a process is equal to the number of its operations (e.g., workpiece 3 has 3 operations). The second time the number of workpiece 3 appears in the text, it represents the second process of workpiece 3. Used to determine the global scheduling order of all processes, that is, which process of which workpiece is done first, and which one is done later; Assign a vector to the machine, each element being The index of the machine assigned to the corresponding process; and The length is the total number of processes ; Step 2: Iterative optimization, performing crossover and mutation operations on the current population to generate offspring populations, and merging the parent population with the offspring populations to form a merged population; Step 3: Perform a two-stage environment selection based on cosine similarity on the merged population to select the next generation population. The two-stage environment selection includes: In the first stage, normalize the target values ​​of all individuals in the merged population, calculate the unit direction vector of each individual and the cosine distance between individuals, select the pair of individuals with the largest directional difference as the initial endpoint, add them to the selected set, and use a greedy strategy to iteratively select the individual with the largest minimum cosine distance from the remaining individuals to all individuals in the selected set and add it to the selected set until the size of the selected set reaches a preset value, forming the intermediate solution set; In the second stage, calculate the cosine distance relationship between the intermediate solution set and the unselected set of the remaining solutions in the merged population, identify the nearest neighbor pairs of individuals, and retain individuals with better convergence among pairs of individuals with similar directions based on the convergence index, and iteratively update the intermediate solution set; Step 4: Determine if the maximum number of iterations has been reached. If yes, output the Pareto optimal solution set; otherwise, return to step 2 to continue iterating.

[0009] Furthermore, in step 1, when generating the initial population, a strategy combining randomness and heuristics is used to initialize and obtain the machine allocation scheme for each process in each scheduling scheme: some individuals are obtained by randomly arranging the process sequence and randomly assigning machines; the remaining individuals are generated according to heuristic rules, following the principle of prioritizing scheduling the process with the shortest average processing time and selecting the machine that can make the process complete the earliest for each process.

[0010] Furthermore, in step 1, before generating the offspring population, an activity scheduling generation method is used to decode and form the process sequence and processing time on each machine; For each individual, decode each process sequentially according to the process sequence vector, and determine the processing machine based on its machine allocation vector; Obtain a list of scheduled processing intervals on the processing machine, the list being sorted in ascending order of start time. Determine the current candidate start time, which is the larger of the allowed start time of the process and the current available time of the machine, where the allowed start time of the process is the completion time of the previous process. Iterate through the list of processing intervals and attempt to insert the process into an idle time window. If an idle time window that meets the processing time of the process is found, the current candidate start time is determined as the earliest start time; otherwise, the process is arranged at the end of the list of processing intervals. The completion time of the process is calculated based on the earliest start time, and the processing interval of the process is added to the scheduled interval list of the processing machine.

[0011] Furthermore, the crossover operation in step 2 includes: for the process sequence vector, a priority-based crossover POX operator is used for the crossover operation; for the machine allocation vector, a single-point crossover SPX operator is used for the crossover operation. The mutation operation includes: for the process sequence vector, a swap mutation operator is used for the mutation operation; for the machine allocation vector, a random replacement mutation operator is used for the mutation operation.

[0012] Furthermore, the optimization objectives in step 1 include: minimizing the maximum completion time, minimizing the total delay time, minimizing the maximum machine load, minimizing the total workload, and minimizing the total energy consumption; The goal of minimizing the maximum completion time is to minimize the maximum completion time among all N jobs; The objective of minimizing the total delay time is to minimize the sum of the delay times of all workpieces whose completion time exceeds their delivery deadline, where the delay time of an individual workpiece is defined as the larger of the difference between its completion time and delivery deadline and zero. The goal of minimizing the maximum machine load is to minimize the maximum value among all machine loads, where the machine load is the sum of the processing times of each workpiece and each operation assigned to that machine; The goal of minimizing the total workload is to minimize the sum of the load on all machines, that is, the sum of the processing time of each process of all workpieces on the selected machines; The goal of minimizing total energy consumption is to minimize the total energy consumption during the workshop production process. The total energy consumption includes energy consumption during machine operation, energy consumption during machine standby, and inherent power consumption of the workshop.

[0013] Furthermore, the specific process of the first stage in step 3 is as follows: (1) Normalize the target value of each individual in the merged population. In the formula Each row represents an individual's performance across all targets, i.e., an individual's vector; each column represents the performance across all targets. The value that an individual can take on a specific goal. and They are respectively The maximum and minimum values ​​for each target in each column are used to perform independent normalization for each target. Let M be a very small positive number, and let M be the number of optimization targets. (2) Calculate the normalized individual unit direction vector for all individuals. ; (3) Obtain the cosine distance between the unit direction vectors of every two individuals: ; (4) Find the pair of solutions with the largest global cosine distance as the initial selected set; (5) A greedy strategy is adopted for iterative selection. For each candidate solution, the minimum cosine distance between it and all solutions in the selected set is calculated. The candidate solution with the maximum minimum cosine distance is selected and added to the selected set until the preset number is reached.

[0014] Furthermore, in step 3, the second stage takes the selected set and the unselected set output from the first stage as input, and the specific process is as follows: (1) Calculate the cosine distance matrix between the selected set and the unselected set; (2) Identify nearest neighbor pairs: If no solution is selected The nearest neighbor in the selected set is the selected solution. And a solution has already been selected. The nearest neighbor in the unselected set is the unselected solution. ,but They form nearest neighbor pairs; (3) For each pair of nearest neighbors, calculate and compare their normalized origin distance. Individuals with smaller distances from the origin are retained, while those with larger distances are removed. This is the normalized target value vector; (4) If there are no nearest neighbor pairs, the fallback mechanism is triggered. The pair with the smallest global cosine distance is found from the selected set and the unselected set. The origin distance is forcibly compared, and the individual with the larger origin distance is removed. (5) Update the selected set and the unselected set, and repeat the above steps until the unselected set is empty; The fallback mechanism ensures that at least one unselected solution is consumed in each iteration, guaranteeing that the algorithm can operate normally under any degenerate condition.

[0015] Furthermore, the cosine similarity is used to measure the directional consistency of two solutions in the high-dimensional target space. The closer the cosine similarity value is to 1, the closer the directions are. The smaller the cosine distance value is, the closer the directions are. The normalized origin distance is used to measure the convergence of the solution. The smaller the distance is, the smaller the comprehensive target value is, and the better the convergence is.

[0016] Furthermore, the convergence criterion only uses the normalized origin distance, without the need for non-dominated sorting.

[0017] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention proposes a two-stage environment selection mechanism using cosine similarity as a unified core metric, achieving decoupled optimization of diversity and convergence in high-dimensional multi-objective optimization. Both stages are based on cosine similarity (cosine distance): the first stage ensures directional diversity of the solution set in the high-dimensional objective space through maximum-minimum distance selection based on cosine similarity; the second stage ensures convergence of the solution through nearest-neighbor classification and intra-class competition based on cosine similarity. Since cosine similarity only focuses on directional information, the curse of dimensionality will not occur in high-dimensional spaces with five or more objectives, and the selection pressure does not degrade with the increase of objective dimension.

[0018] 2. Convergence determination only requires calculating the normalized origin distance, with a time complexity of O(NM), which is much lower than the O(MN2) of non-dominated sorting, significantly improving the algorithm efficiency.

[0019] 3. The Flexible Job Shop Scheduling Problem (FJSP) is expanded from the traditional 2-3 objectives to 5 conflicting objectives, which is closer to the multi-objective optimization needs in the actual production environment.

[0020] 4. A fallback mechanism is introduced to ensure that the algorithm can still operate normally under any degradation conditions, thus enhancing the robustness of the algorithm.

[0021] 5. The cosine similarity-based selection mechanism does not require pre-setting reference vectors or reference points. Cosine similarity naturally captures the directional features of the solution in the high-dimensional target space, can adaptively cover Pareto fronts of various shapes, and has strong adaptability to irregular fronts in high-dimensional space, thus overcoming the limitations of methods such as NSGA-III and RVEA in pre-setting reference vectors or reference points. Attached Figure Description

[0022] Figure 1 This is an overall flowchart of the present invention; Figure 2 A diagram illustrating the selection of a two-stage strategy for the environment; Figure 3 This is a schematic diagram of a two-layer coding structure; Figure 4A diagram illustrating the POX intersection; Figure 5 This is a diagram illustrating the SPX crossover. Figure 6 A schematic diagram of the exchange mutation operator; Figure 7 A schematic diagram of the random replacement mutation operator; Figure 8 A schematic diagram illustrating the selection process for the maximum and minimum cosine distances; Figure 9 This is a diagram illustrating the nearest neighbor classification and intra-class PK. Figure 10 The initial random solution Gantt chart for Experiment 1 is (F1=305h, F2=1690h). Figure 11 The heuristic initial solution Gantt chart for Experiment 1 (F1=179h, F2=165h). Figure 12 The Gantt chart for the optimal solution after optimization of the algorithm of this invention in Experiment 1 (F1=118h, F2=34h) Figure 13 The initial random solution Gantt chart for Experiment 2 is (F1=309h, F2=1456h). Figure 14 The heuristic initial solution Gantt chart for Experiment 2 (F1=179h, F2=165h). Figure 15 The optimal solution Gantt chart after optimization of the algorithm of this invention in Experiment 2 (F1=131h, F2=63h). Figure 16 Gantt chart of the optimal solution for F1 (maximum completion time) (F1=118h); Figure 17 Gantt chart of the optimal solution for F2 (total delay time) (F2=11h); Figure 18 The Gantt chart for the optimal solution of F3 (maximum machine load) (F3=102h); Figure 19 Gantt chart for the optimal solution of F4 (total workload) (F4=822h); Figure 20 The optimal solution Gantt chart for F5 (total energy consumption) is (F5 = 7115.15 kWh). Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0024] Example This embodiment uses a printed circuit board (PCB) manufacturing workshop as an application scenario to verify in detail the high-dimensional multi-objective flexible job workshop scheduling method based on cosine similarity proposed in this invention. The workshop contains 13 workpieces (J1~J13), 10 processing machines (M1~M10), and a total of 64 processes, exhibiting partial flexibility (flexibility coefficient β=0.42). Each workpiece contains 3 to 7 processes, with workpiece J10 being an urgent order with a delivery time of only 70 hours. The processing time of each process on different machines is shown in Table 1 (blank spaces indicate that the process cannot be processed on that machine), the delivery time of each workpiece is shown in Table 2, and the power parameters of each machine are shown in Table 3. The inherent power consumption of the workshop is E3=10kW.

[0025] Table 1 Processing Schedule Table 2 Delivery Time of Workpieces Table 3 Machine Power Parameters Step 1: Problem Modeling The flexible job shop scheduling problem is divided into two subproblems: one is the routing subproblem, which is for each process. (indicating the first) The first workpiece (step process) from its optional set of machines The problem involves two subproblems: one assigning a processing machine to a workpiece, and the other a scheduling subproblem. The first subproblem involves determining the processing order of all operations on each machine, ensuring the scheduling satisfies constraints such as operation priority (subsequent operations on the same workpiece must wait for preceding operations to complete) and machine uniqueness (each machine can only process one operation at a time). The second subproblem optimizes five objective functions. The flexible job shop scheduling problem comprises N workpieces, M machines, and a total of [number of operations]. ,in It is a workpiece The total number of processes.

[0026] Step 2: Establish the objective function This invention simultaneously optimizes the following five conflicting objectives: (Minimize maximum completion time): In the formula This represents the maximum value among the completion times of all N workpieces.

[0027] (Minimize total delay time): (Minimize maximum machine load): (Minimize total workload): (Minimize total energy consumption): in, For the first Completion time of each workpiece Let be the delivery deadline for the i-th workpiece. For machines The workload, Used to indicate the first The first workpiece Is the process assigned to the first... Taiwanese machine processing, =1 indicates a process Selected machine Processing, =0 indicates a process No machine selected To process, that is, when the machine Not in process optional machine set At the middle of the hour, the order , Indicates the first The first workpiece The first process is in the The processing time on the machine, when machine k is not in the process. optional machine set At the middle of the hour, the order = 0, to ensure that unselectable machines do not participate in load calculation. Energy consumption during machine operation. For standby power consumption, This is the inherent power consumption of the workshop.

[0028] Step 3: Determine the constraints Scheduling must meet the following constraints: (1) Machine allocation constraints: Each process can only be assigned to one optional machine; (2) Process priority constraint: The processes for the same workpiece are processed in sequence. (3) Machine uniqueness constraint: Each machine can only process one operation at a time; (4) Processing time constraints: That is, for any process Its completion time on the assigned machine is equal to the sum of its start time and the corresponding processing time; (5) Nonnegativity constraint: This means that the start and end times of each process are non-negative.

[0029] For the current process (workpiece) The The start time of each process step. For the previous process (workpiece) The The completion time of each process step. Indicates the first The first workpiece The first process is in the Completion time on the machine For this process (workpiece) The (steps) in the machine The start time.

[0030] Step 4: Population Initialization A two-layer coding structure is adopted, with each individual consisting of a process sequence vector. and machine-assigned vectors Composition, such as Figure 3 As shown. That is . Length is the total number of processes It consists of workpiece numbers arranged in sequence, and the processes for the same workpiece are in... The number of times a word appears in a process is equal to the number of its operations (e.g., workpiece 3 has 3 operations). The second time the number of workpiece 3 appears in the text, it represents the second process of workpiece 3. Used to determine the global scheduling order of all processes, that is, which process of which workpiece is done first, and which one is done later; The length is the same Each element is The index of the machine assigned to the corresponding process.

[0031] In this embodiment, the initial population size is set. The initialization strategy combines randomness and heuristics. 50 individuals are obtained by randomly arranging the process sequence and randomly assigning machines; the remaining 50 individuals are generated according to heuristic rules, prioritizing the scheduling of processes with the shortest average processing time and selecting the machine that will complete each process earliest, in order to generate a high-quality initial solution.

[0032] The decoding process employs an activity scheduling generation method: for each individual, a process sequence vector is generated. Decode each process sequentially According to its machine-assigned vector Determine the processing machine ( Indicates the first One machine, Then calculate the earliest start time of the process on machine k. and completion time .calculate The machine idle time insertion strategy is adopted: (1) Obtain the machine The list of already scheduled processing intervals (sorted in ascending order of start time); (2) Let the start time of the current candidate be... ( (machine availability time), of which The allowed start time for the process, i.e., the current candidate start time. Select the completion time of the previous process. The larger of the two values ​​between the machine's current available time; (3) Traverse the machine Each arranged interval (s,e): like ,but End the search; otherwise, let ; That is, traversing the machine The arranged interval (in For the start time, (where the end time is), try inserting the process into the idle window; if the x-th candidate start time is... Plus processing time If the start time s of the (x+1)th scheduled interval is not greater than the start time s of the scheduled interval, then a free window is found. Stop searching if the current gap is insufficient; otherwise, start the xth candidate time. After the (x+1)th arranged interval is completed, let Continue to check whether the free window between the start time of the (x+2)th scheduled interval and the end time of the (x+1)th scheduled interval can be used to insert the process; (4) If no suitable insertion position is found after traversing all arranged intervals, then (Place the process at the end of all scheduled interval queues); (5) Calculate the completion time and the processing area ( , Add to machine A list of intervals (keeping sorted).

[0033] Step 5: Iterative Optimization and Genetic Operations Set the maximum number of iterations G=500. Perform the following genetic operations in each generation to generate offspring: Cross operation: For process sequence vector Priority-based crossover (POX) is used to generate the child process sequence vector, such as... Figure 4 As shown, the specific operation is as follows: 1. Randomly select two individuals from the parent population as parents. and Extract the process sequence vectors respectively. and ; 2. Randomly divide all workpiece numbers into two non-empty subsets. and ,and , N is the total number of workpieces; 3. Offspring The process sequence vector is constructed as follows: China belongs to The workpiece numbers should be entered in their original order. Middle; General China belongs to Enter the workpiece numbers in their original order. The remaining positions; 4. Offspring The process sequence vector is constructed as follows: China belongs to The workpiece numbers should be entered in their original order. Middle; General China belongs to Enter the workpiece numbers in their original order. The remaining positions; thus generating the process sequence vectors of the two offspring.

[0034] For machine-assigned vectors Using single-point intersection (SPX), such as Figure 5 As shown, the specific operation is as follows: 1. Randomly select two individuals from the parent population as parents. and Extract their machine allocation vectors respectively. and The vector length is L (total number of processes); 2. Randomly generate the same intersection point in both parent datasets. The range of values ​​is ; 3. Using the intersection point as the boundary, gene segments from both parents are exchanged, and the parent generation... At the intersection Previous and father generation At the intersection The indexes of the machines assigned to each subsequent process should be filled in according to their original order. father generation At the intersection The later and father generation At the intersection The indexes of the machines assigned to each of the preceding processes should be filled in according to their original order. Generate machine assignment vectors for two offspring.

[0035] Mutation operation: For the selected parent individual, mutation is triggered with a certain probability. If mutation is triggered, then in the process sequence vector... Two workpiece numbers from different positions are randomly selected and swapped, while the workpiece numbers in the remaining positions remain unchanged. Figure 6 As shown.

[0036] Crossover and mutation operations generate a offspring population of the same size as the parent population (size: ), and then the parent generation For the selected parent individual, mutation is triggered with a certain probability. If mutation is triggered, a vector is allocated in the machine. Randomly select a process and replace its machine allocation with a set of available machines. Another new machine in the process, different from the current machine, such as Figure 7 As shown.

[0037] The population and its offspring population are merged to form a population of size [missing information]. The merged population.

[0038] Step 6: Two-stage environment selection based on cosine similarity Environmental selection is the core innovation of this invention, aiming to select 100 superior individuals from 200 merged individuals to enter the next generation. The entire process is based entirely on cosine similarity and does not require non-dominated sorting.

[0039] Phase 1: Minimum distance selection based on cosine similarity (ensuring directional diversity) Core idea: In a high-dimensional target space, cosine similarity is used to measure the directional consistency between individuals. A cosine similarity value closer to 1 indicates that the optimization directions of the two solutions are more similar, while a value closer to 0 indicates greater directional differences. By converting cosine similarity to cosine distance (1 minus cosine similarity), a greedy selection strategy is employed to maximize the minimum cosine distance between any two individuals in the selected set, thereby achieving optimal coverage of directional diversity in the high-dimensional space.

[0040] The cosine distance is defined as: like Figure 2 and Figure 8 As shown, the specific sub-steps of this stage are as follows: 1. Eliminate differences in the units and magnitudes of different objectives. Normalize the objective values ​​for all individuals: In the formula Each row represents the objective function value of an individual across all objectives, i.e., the individual's objective vector; each column represents the objective function value of all objectives. The value that an individual can take on a specific goal. For 2N pop A matrix of × M (2N) pop To merge population sizes, M is the target number. and They are respectively The maximum and minimum values ​​for each target in each column are used to perform independent normalization for each target. It is a very small positive number, used to prevent the denominator from being zero.

[0041] 2. Calculate the normalized individual unit direction vector for all individuals: 3. Construct a cosine distance matrix to obtain the cosine distance between every two individual unit direction vectors: The cosine distance ranges from [0, 2], and the smaller the value, the closer the directions of the two bodies are.

[0042] 4. Select initial endpoints: Find the pair of individual unit direction vectors with the largest global cosine distance (i.e., the largest directional difference) in the cosine distance matrix. Add it to the selected set ; 5. Greedy cyclic selection: Repeat the following steps until... : (1) For each candidate solution Calculate its relationship with The minimum cosine distance of all solutions : (2) Select the one with the largest Adding candidate solutions to the value ; (3) Update the minimum distance vector.

[0043] After this stage, 100 solutions are obtained that are distributed as evenly as possible in the direction of the high-dimensional target space, that is, ensuring that the selected 100 solutions cover all directions of the target space.

[0044] The second stage continues to use the unit direction vectors (for cosine distance) and normalized objective values ​​(for origin distance) of the solutions obtained in the first stage.

[0045] Second stage: Iterative nearest neighbor classification and intra-class PK based on cosine similarity (ensuring convergence) Core idea: Continue to use cosine similarity as the core metric, identify nearest neighbor relationships in the high-dimensional target space through cosine distance, pair the unselected individuals with the most similar orientation (highest cosine similarity) with the selected individuals, and conduct convergence competition among the pairings with similar orientations, thereby gradually improving convergence without destroying the orientation diversity established in the first stage based on cosine similarity.

[0046] The convergence metric is the normalized distance from the origin: A smaller distance indicates a smaller overall objective value and better convergence. The computational complexity of this metric is O(M), significantly lower than the O(MN) complexity of non-dominated sorting. 2 ).

[0047] like Figure 2 and Figure 9 As shown, this stage uses the selected set output from the first stage. and unselected set For input, iteratively perform the following operations: 1. Calculate the cosine distance matrix: Calculate and Cosine distance matrix between .

[0048] 2. Identify nearest neighbor pairs: For each unselected solution Find out where The nearest neighbor (the individual unit direction vector with the smallest cosine distance) in the solution; for each selected solution Find out where The nearest neighbor in; if yes nearest neighbor and yes The nearest neighbor, then They form nearest neighbor pairs and are then categorized.

[0049] 3. Intra-class convergence competition: For each pair of nearest neighbors... Calculate the normalized origin distance between the two respectively. The individual with the smaller distance from the origin (i.e., better convergence) is retained, and the other is removed.

[0050] 4. Fallback Mechanism: If no nearest neighbor pair is identified in the current iteration, then... and Find the pair of solutions with the smallest global cosine distance (i.e., the closest directions), force a comparison of the origin distance, and remove the worse ones.

[0051] 5. Iterative Update: The solutions retained from this round are used as the new solutions. ,renew Repeat the above steps until... Empty.

[0052] After the second phase, 100 individuals that maintain both directional diversity and good convergence were obtained as the next generation population.

[0053] The core advantage of this strategy is that cosine similarity only focuses on the directional information of the solution in the high-dimensional objective space and is not affected by the absolute magnitude of the objective value. Therefore, it is naturally suitable for handling high-dimensional multi-objective optimization problems with five or more objectives.

[0054] Step 7: Output the Pareto optimal solution set When the number of iterations reaches the maximum number of iterations G=500, the evolution terminates, and all non-dominated solutions in the current population are output as the Pareto optimal solution set. Decision-makers can then select preferred solutions from this set based on actual production needs.

[0055] Using the above parameter settings, the PCB manufacturing workshop data in the embodiment was run twice independently (Experiment 1 and Experiment 2) to verify the effectiveness and stability of the algorithm.

[0056] Experiment 1: Algorithm Performance Verification (First Group Run) The algorithm proposed in this invention was used to solve the above dataset. The random initial solution, the heuristic initial solution and the solution after algorithm optimization were compared. The results are shown in Table 4.

[0057] Table 4 Performance Comparison of Three Schemes As shown in Table 4, after optimization by the algorithm of this invention, the maximum completion time F1 was reduced from 305h to 118h, with an improvement rate of 61.31%; the total delay time F2 was reduced from 1690h to 34h, with an improvement rate as high as 97.99%; and the total energy consumption F5 was reduced from 11842.70kWh to 7137.10kWh, with an improvement rate of 39.73%. All five objectives were significantly improved.

[0058] And by Figure 10 , Figure 11 , Figure 12 The Gantt charts of the three schemes clearly show the optimization effect: the utilization rate of each machine in the random initial solution is extremely uneven, with a large number of processes concentrated in the second half, resulting in a completion time as high as 305h; the heuristic initial solution compresses the completion time to 179h through intelligent initialization; after optimization by the algorithm based on cosine similarity of this invention, the completion time is further reduced to 118h, and the process allocation on each machine is more compact and balanced.

[0059] Experiment 2: Algorithm Stability Verification (Second Group Run) To verify the stability of the algorithm, a second set of independent runs were performed on the dataset using the same parameter settings, and the results are shown in Table 5.

[0060] Table 5 Performance Comparison of Three Schemes And by Figure 13 , Figure 14 , Figure 15 The Gantt charts for the three schemes show that the optimization trend of Experiment 2 is consistent with that of Experiment 1, further verifying the stability of the algorithm. The completion time of the random solution was reduced from 309 hours to 131 hours after optimization, and the total delay time was reduced from 1456 hours to 63 hours.

[0061] The results of the two sets of experiments show that the algorithm of the present invention can achieve stable optimization results in multiple independent runs. The improvement rate of F1 is stable at 59%-62%, the improvement rate of F2 is stable at 97%-99%, and the improvement rate of F5 is stable at 39%-40%, which verifies the robustness and stability of the algorithm.

[0062] Pareto Frontier Analysis: Five representative Pareto solutions were selected from the final population of Experiment 1, as shown in Table 6.

[0063] Table 6 Pareto optimal solution set These solutions have different focuses on different objectives: Solution 1 is optimal for F1 (maximum completion time) at 118 hours, Solution 2 is optimal for F2 (total delay time) at only 11 hours, and Solution 5 is optimal for F5 (total energy consumption) at 7115.15 kWh. These solutions constitute the Pareto frontier, providing production managers with a variety of decision-making options.

[0064] Figures 16 to 20 The scheduling Gantt charts for the optimal solutions to each of the five objectives are presented, visually illustrating the allocation of processes across machines and the timing of each scheduling scheme. It is also clear that different optimal solutions for different objectives correspond to different scheduling strategies: the F1 optimal solution aims for the shortest completion time, with high and efficient machine utilization; the F2 optimal solution prioritizes on-time completion of workpieces, with urgent orders (J10) given priority; the F3 optimal solution focuses on load balancing among machines; the F4 optimal solution aims for the minimum total processing time; and the F5 optimal solution minimizes energy consumption while ensuring production efficiency. This fully demonstrates the value of multi-objective optimization, providing decision-makers with multiple feasible solutions tailored to different priorities.

[0065] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A high-dimensional multi-objective flexible job shop scheduling method based on cosine similarity, characterized in that, Based on the optimization objective, generate a scheduling scheme that uses M machines to process N workpieces. In each scheduling scheme, the first... Each workpiece contains The number of processes is 10, and the total number of processes is 10. In each scheduling scheme, the machine allocation scheme for each process and the processing sequence and processing time of each process on each machine satisfy the following constraints: Each process In its optional machine set The process is assigned to only one machine at a time; the processes for the same workpiece are processed sequentially; each machine can only process one process at a time; for any given process... The completion time of a process on the assigned machine is equal to the sum of its start time and the corresponding processing time; the start time and completion time of each process are non-negative. The scheduling scheme is generated using the following steps: Step 1: Generate an initial population. Each individual in the initial population represents a scheduling scheme, and each scheduling scheme is coded as follows: , The process sequence vector is composed of workpiece numbers arranged in sequence, with processes for the same workpiece in... The number of times it appears in a process is equal to the number of its steps. Used to determine the global scheduling order of all processes; Assign a vector to the machine, each element being The index of the machine assigned to the corresponding process; and The length is the total number of processes ; Step 2: Iterative optimization, performing crossover and mutation operations on the current population to generate offspring populations, and merging the parent population with the offspring populations to form a merged population; Step 3: Perform a two-stage environment selection based on cosine similarity on the merged population to select the next generation population. The two-stage environment selection includes: In the first stage, normalize the target values ​​of all individuals in the merged population, calculate the unit direction vector of each individual and the cosine distance between individuals, select the pair of individuals with the largest directional difference as the initial endpoint, add them to the selected set, and use a greedy strategy to iteratively select the individual with the largest minimum cosine distance from the remaining individuals to all individuals in the selected set and add it to the selected set until the size of the selected set reaches a preset value, forming the intermediate solution set; In the second stage, calculate the cosine distance relationship between the intermediate solution set and the unselected set of the remaining solutions in the merged population, identify the nearest neighbor pairs of individuals, and retain individuals with better convergence among pairs of individuals with similar directions based on the convergence index, and iteratively update the intermediate solution set; Step 4: Determine if the maximum number of iterations has been reached. If yes, output the Pareto optimal solution set; otherwise, return to step 2 to continue iterating.

2. The method according to claim 1, characterized in that, In step 1, when generating the initial population, a strategy combining randomness and heuristics is used to initialize and obtain the machine allocation scheme for each process in each scheduling scheme: some individuals are obtained by randomly arranging the process sequence and randomly assigning machines; the remaining individuals are generated according to heuristic rules, following the principle of prioritizing scheduling the process with the shortest average processing time and selecting the machine that can make the process complete the earliest for each process.

3. The method according to claim 1, characterized in that, In step 1, before generating the offspring population, an activity scheduling generation method is used to decode and form the process sequence and processing time on each machine. For each individual, decode each process sequentially according to the process sequence vector, and determine the processing machine based on its machine allocation vector; Obtain a list of scheduled processing intervals on the processing machine, the list being sorted in ascending order of start time. Determine the current candidate start time, which is the larger of the allowed start time of the process and the current available time of the machine, where the allowed start time of the process is the completion time of the previous process. Iterate through the list of processing intervals and attempt to insert the process into an idle time window. If an idle time window that meets the processing time of the process is found, the current candidate start time is determined as the earliest start time; otherwise, the process is arranged at the end of the list of processing intervals. The completion time of the process is calculated based on the earliest start time, and the processing interval of the process is added to the scheduled interval list of the processing machine.

4. The method according to claim 1, characterized in that, The crossover operation in step 2 includes: for the process sequence vector, the priority-based crossover POX operator is used for the crossover operation; for the machine allocation vector, the single-point crossover SPX operator is used for the crossover operation. The mutation operation includes: for the process sequence vector, the exchange mutation operator is used for the mutation operation; for the machine allocation vector, the random replacement mutation operator is used for the mutation operation.

5. The method according to claim 1, characterized in that, The optimization objectives in step 1 include: minimizing the maximum completion time, minimizing the total delay time, minimizing the maximum machine load, minimizing the total workload, and minimizing the total energy consumption; The goal of minimizing the maximum completion time is to minimize the maximum completion time among all N jobs; The objective of minimizing the total delay time is to minimize the sum of the delay times of all workpieces whose completion time exceeds their delivery deadline, where the delay time of an individual workpiece is defined as the larger of the difference between its completion time and delivery deadline and zero. The goal of minimizing the maximum machine load is to minimize the maximum value among all machine loads, where the machine load is the sum of the processing times of each workpiece and each operation assigned to that machine; The goal of minimizing the total workload is to minimize the sum of the load on all machines, that is, the sum of the processing time of each process of all workpieces on the selected machines; The goal of minimizing total energy consumption is to minimize the total energy consumption during the workshop production process. The total energy consumption includes energy consumption during machine operation, energy consumption during machine standby, and inherent power consumption of the workshop.

6. The method according to claim 1, characterized in that, The specific process of the first stage in step 3 is as follows: (1) Normalize the target value of each individual in the merged population. In the formula Each row represents an individual's performance across all targets, i.e., an individual's vector; each column represents the numerical value of all individuals on a specific target. and They are respectively The maximum and minimum values ​​of the target for each column. Let M be a very small positive number, and let M be the number of optimization targets. (2) Calculate the normalized individual unit direction vector for all individuals. ; (3) Obtain the cosine distance between the unit direction vectors of every two individuals: ; (4) Find the pair of solutions with the largest global cosine distance as the initial selected set; (5) A greedy strategy is adopted for iterative selection. For each candidate solution, the minimum cosine distance between it and all solutions in the selected set is calculated. The candidate solution with the maximum minimum cosine distance is selected and added to the selected set until the preset number is reached.

7. The method according to claim 6, characterized in that, In step 3, the second stage takes the selected set and the unselected set output from the first stage as input, and the specific process is as follows: (1) Calculate the cosine distance matrix between the selected set and the unselected set; (2) Identify nearest neighbor pairs: If no solution is selected The nearest neighbor in the selected set is the selected solution. And a solution has already been selected. The nearest neighbor in the unselected set is the unselected solution. ,but They form nearest neighbor pairs; (3) For each pair of nearest neighbors, calculate and compare their normalized origin distance. Individuals with smaller distances from the origin are retained, while those with larger distances are removed. This is the normalized target value vector; (4) If there are no nearest neighbor pairs, the fallback mechanism is triggered. The pair with the smallest global cosine distance is found from the selected set and the unselected set. The origin distance is forcibly compared, and the individual with the larger origin distance is removed. (5) Update the selected set and the unselected set, and repeat the above steps until the unselected set is empty; The fallback mechanism ensures that at least one unselected solution is consumed in each iteration, guaranteeing that the algorithm can operate normally under any degenerate condition.

8. The method according to claim 1, characterized in that, The cosine similarity is used to measure the directional consistency of two solutions in the high-dimensional target space. The closer the cosine similarity value is to 1, the closer the directions are. The smaller the cosine distance value is, the closer the directions are. The normalized origin distance is used to measure the convergence of the solutions. The smaller the distance is, the smaller the comprehensive target value is, and the better the convergence is.

9. The method according to claim 1, characterized in that, Convergence is determined using only the normalized origin distance, without the need for non-dominated sorting.