A uniform sampling method for ordering problem metric spaces
By employing dimensionality reduction clustering and random insertion methods, the problem of uneven sampling in sorting problems is solved, achieving a uniform distribution of sampling points in the metric space and improving the algorithm performance of sorting problems.
Patent Information
- Application Number
- CN202310958405.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-08-01
AI Technical Summary
In the existing technology, research on the ranking problem has stagnated. Random sampling leads to limitations in fitness terrain analysis and poor algorithm robustness, and there is a lack of effective uniform sampling methods.
A method combining dimensionality reduction and clustering with random insertion is adopted. The k-means clustering algorithm is used to obtain the center points after dimensionality reduction, and the scale is gradually expanded to the original size. Combined with the extended Latin square matrix and random sampling, the sampling points are ensured to be uniformly distributed in the metric space.
This achieves the effectiveness of uniform sampling in sorting problems, improves the search performance and solution space coverage of the algorithm, and enhances the robustness and accuracy of the algorithm.
Smart Images

Figure CN117171599B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of sequencing problems, and more particularly relates to a uniform sampling method for a sequencing problem metric space. BACKGROUND
[0002] A sequencing problem refers to a combinatorial optimization problem in which the full sequencing of a set of elements can express all solutions in the problem, and such problems exist widely in different fields such as production and manufacturing, transportation, etc. For example, the permutation flow shop scheduling problem, the no-wait flow shop scheduling problem, etc. in production and manufacturing, and the traveling salesman problem in transportation all belong to sequencing problems.
[0003] Most sequencing problems are NP (non-deterministic polynomial) complete problems, that is, so far no algorithm can accurately solve the sequencing problem in a limited time. In this case, intelligent optimization algorithms become the preferred choice for solving the problem, which can obtain a satisfactory solution to the problem within a specified time. Although in the past few decades, scholars have proposed many intelligent optimization algorithms to solve the problem, the research on the algorithm has been stagnant in recent years, and a very obvious sign is that only two examples in the standard example set of the permutation flow shop scheduling problem have been updated in the past ten years. Under this circumstance, we need to strengthen the research on the problem itself (i.e. fitness landscape analysis of the problem) and design a new algorithm framework.
[0004] In existing research, the fitness landscape analysis of sequencing problems is all obtained by random sampling, which makes the problem research have limitations. And most of the random initialization is also used in algorithm design, which makes the robustness of the algorithm not good. In this case, we need to design a uniform sampling method in sequencing problems. However, due to the complexity of the sequencing problem metric space, so far there has been no relevant research. SUMMARY
[0005] In view of the above defects or improvement needs of the prior art, the present application provides a uniform sampling method for a sequencing problem metric space, which solves the problem of how to uniformly sample in sequencing problems.
[0006] To achieve the above purpose, according to the present application, a uniform sampling method for a sequencing problem metric space is provided, which comprises the following steps:
[0007] S1 for a sequencing problem with a size of n and a sampling number of k, reduce the size of the sequencing problem to m and obtain a determined sampling number t under the new size m, m < n; n S2 obtain the uniform sampling of the sequencing problem under the new size m and the sampling number t.
[0008] S2 calculates the total number of solutions of the sorting problem with scale m and the distance between each solution, clusters all solutions by using the distance between solutions, divides all solutions into t classes in this way, calculates the center point of each class of solutions to obtain t center points, and the t center points are t uniformly sampled points of the sorting problem with scale m;
[0009] S3 for any sorting problem with scale m+i, inserts the newly added element of scale m+i compared to m+i-1 in the K m+i-1 sampling points of the sorting problem with scale m+i-1, to obtain K m+i-1 (m+i) sampling points, and then obtains K m+i -K m+i-1 (m+i) sampling points by using the random sampling method, mixes the K m+i-1 (m+i) sampling points and the K m+i -K m+i-1 (m+i) sampling points to obtain K m+i sampling points of the sorting problem with scale m+i, and i is a positive integer;
[0010] S4 repeats step S3 until m+i=n, to obtain k n uniformly sampled points with scale n, that is, to realize the uniform sampling with scale n.
[0011] Further preferably, in step S1, the scale m of the sampling point sorting problem satisfies the sampling point number t=k n *m! / n!.
[0012] Further preferably, in step S2, the clustering adopts the k-means clustering method.
[0013] Further preferably, in step S2, the clustering of all solutions by using the distance between solutions is performed according to the following steps:
[0014] S21 selects any t solutions from all solutions as the center points of t classes of solutions respectively;
[0015] S22 calculates the distance from each solution to each center point, and when the solution belongs to the class to which the center point closest to the solution belongs, the clustering of all solutions is realized.
[0016] Further preferably, in step S2, the calculation of the center point of each class of solutions is performed according to the following steps:
[0017] S23 for the sorting problem with scale m, the position of each element in each solution is weighted;
[0018] S24for each solution, obtain the weight corresponding to each element in the solution, so as to obtain the weight corresponding to all elements in all solutions;
[0019] S25for each element, sum the weight of the element in each solution, and calculate the variance of the weight, so as to obtain the weight sum and variance corresponding to the element in all solutions, sort all elements from small to large according to the size of the weight sum, and the element with small variance is arranged in front for the element with the same weight sum, and the sorting corresponding point is the center point of the class.
[0020] Further preferably, in step S2, the center point obtained in step S25 is used as the center point of the new cluster, and step S22 is returned until the center point of each class no longer changes, so as to obtain the final required t uniform sampling points.
[0021] Further preferably, in step S23, the assignment of the position is assigned from positive integer 1 to positive integer t in the order of position respectively.
[0022] Further preferably, in step S3, the K m+i-1 sampling points obtained by inserting the new element with the size m+i compared with m+i-1 in the sorting problem with the size m+i, the insertion position is any feasible position in the K m+i-1 sorting.
[0023] Further preferably, in step S3, the sampling point obtained by inserting the new element is represented by an extended Latin square.
[0024] Overall, compared with the prior art, the above technical solutions conceived by the present application have the following beneficial effects:
[0025] 1. In the present application, the original size problem is first reduced in dimension, then the reduced dimension size is repaired to obtain uniform sampling points according to the k-means clustering, and finally the original size problem is gradually upgraded to obtain uniform sampling points. K-means clustering algorithm is an unsupervised learning method, which divides all points into t classes according to the distance by algorithm iteration; on the other hand, all points in the sorting problem are uniformly distributed in the metric space, so the classes obtained by K-means clustering algorithm are also uniformly distributed in the metric space, so the center point of each class is also uniformly distributed in the metric space, so K-means clustering algorithm can be used to obtain uniform sampling points of the sorting problem;
[0026] 2. In the process of gradually increasing the dimensionality to the original scale in the present application, the required number of sampling points is obtained by inserting new elements and random sampling, all points in the small-scale sorting problem maintain uniform distribution in the metric space, and all points in the large-scale problem are obtained by inserting new elements in the feasible position of all points in the small-scale problem, and all the obtained points also maintain uniform distribution in the metric space, and for the same reason, the uniform sampling points of the large-scale sorting problem can also be obtained by inserting new elements in the uniform sampling points of the small-scale problem; but the number of sampling points obtained by insertion method may not meet the requirements, therefore, on the basis of the above, random sampling is used to make the number of sampling points meet the requirements; random sampling can ensure that each point in the problem has the same probability of being selected, thus ensuring the uniformity of the sampling points to a certain extent;
[0027] 3. In the clustering algorithm of the present application, all solutions are first clustered to obtain center points, and the center points are used as uniform sampling points, as described above, the clustering method can obtain classes uniformly distributed in the metric space, therefore, by using the center points of each class as sampling points, it can be directly ensured that the obtained points are uniformly distributed in the metric space;
[0028] 4. In the process of obtaining center points in the present application, by setting weight values on the sorting positions, the weight sum and variance of each element are calculated, when calculating the center points of the class, if only the weight sum of each element in the Borda method is used, multiple center points may be obtained, here, by considering the weight sum and variance of each element at the same time, this situation is avoided, and the obtained center points are closer to the real center points. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 is a flow chart of uniform sampling of the metric space of the sorting problem constructed according to the preferred embodiment of the present application;
[0030] Figure 2 is a principle diagram of the k-means clustering method constructed according to the preferred embodiment of the present application;
[0031] Figure 3 is an example of the extended Latin matrix constructed according to the preferred embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical scheme and advantages of the present application more clear and explicit, the present application is further described in detail below in combination with the drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0033] Each sampling point is a kind of sorting, the scale is n, that is, the number of elements is n, the sampling number is kn, that is, kn sorting of n elements, for the sorting problem with scale n, the size of the solution space is n!, that is, the problem has n! solutions.
[0034] A uniform sampling method for sorting problem metric space, the method comprises the following steps:
[0035] S1. According to the scale of the sorting problem and the number of sampling points, the scale of the sampling problem is reduced, and the scale of the reduced sorting problem and the number of uniform sampling points are calculated;
[0036] Specifically, the number of sampling points is obtained by using the number of sampling points / the scale of the sorting problem, and the number of new sampling points is obtained by using the number of sampling points / the scale of the sorting problem, and the number of new sampling points is obtained by using the number of sampling points / the scale of the sorting problem. If (the number of new sampling points> the scale of the new sorting problem*(the scale of the new sorting problem-1)), the conversion of the scale of the sorting problem and the number of sampling points is repeated; otherwise, the final result is the scale of the new sorting problem and the number of clustering of the k-means clustering method. Wherein, the scale of the sorting problem refers to the number of elements in the sequence in the sorting problem.
[0037] S2. In the k-means clustering method, an improved Borda method is used to cluster the new sorting problem, so as to obtain the required uniform sampling points of the reduced sorting problem;
[0038] In the k-means clustering method, an improved Borda method is used to cluster the new sorting problem, that is, the full permutation of the sorting problem is used as the data point of the k-means clustering, and the center point of the clustering number is obtained by random generation. All data points are assigned to the nearest center point, and the same center point is in the same category; then the new center point is calculated in the same category, and the iteration is repeated.
[0039] In the calculation of the center point of the permutation problem, an improved Borda method is used, which is to calculate the average value and variance value of each element in the same category in the sorting problem, and then sort the variance value from small to large, and then sort the average value from small to large. The final sequence of elements is the new center point.
[0040] S3. On the basis of the required uniform sampling points of the reduced sorting problem, the scale of the sorting problem is gradually increased, and the sampling points of the sorting problem with increased scale are obtained by using the insertion method and the random sampling method, respectively. The scale of the sorting problem is gradually increased until the sampling points corresponding to the required sampling scale are obtained, wherein the insertion method uses the extended Latin square.
[0041] Uniform sampling in the original sorting problem is achieved using an extended Latin square matrix and a random sampling method. Specifically, the centroids obtained by clustering are used to insert new elements at different positions of each centroid, resulting in a new sorting problem of size +1 with a sample number of (number of centroids * (number of centroids + 1)). In this new sorting problem, the total number of sample points is then randomly generated to reach the value reserved in the weights. This process is repeated until the number of sample points in the original problem is obtained.
[0042] The present invention will be further described below with reference to specific embodiments.
[0043] This invention provides a uniform sampling method for the metric space of sorting problems, taking 1000 samplings in a sorting problem with 10 elements as an example. Figure 1 As shown, the original problem first needs to be transformed into a new sorting problem and a new number of samples. For a sorting problem with 10 elements, 1000 samples are required. According to the description in S1, the original problem is first transformed into 1000 / 10 = 100 samples of 9 elements. Since 100 > (9 * 8), the problem is then transformed into 100 / 9 = 11 samples of 8 elements. Since 11 < (8 * 7), the final problem is a sorting problem with 8 elements requiring 11 samples.
[0044] For the transformed problem, we first use the k-means clustering method for clustering. In this example, the input to the clustering method is the full permutation of 8 elements (i.e., 8! = 40320 permutations) and the number of clusters, 11.
[0045] First, 11 permutations are randomly selected from 40320 permutations as cluster centroids. Then, the Kendall distance is used to assign each permutation to its nearest cluster centroid. After assignment, the improved Boda algorithm is used to recalculate the centroid sequence of permutations with the same centroid. This process of permutation assignment and centroid calculation is repeated until the centroids no longer change. The improved Boda algorithm is as follows: Figure 2 As shown, if we only need to find the center point of the two sorts (a,b,c,d) and (d,b,a,c), we first assign a weight of {1,2,3,4} to each position in the sort. Then we can calculate the sum of the weights and the variance of the weights for each element. Finally, by sorting the variances from smallest to largest and then sorting the sum of the weights from smallest to largest, we can finally obtain the center point of the two sorts as (b,a,d,c).
[0046] Based on clustering, the sampling of the original problem is obtained by using an extended Latin square matrix and random sampling. The extended Latin square matrix is as follows: Figure 3As shown, for one ordering, by inserting a new element at different places, a square matrix is obtained, and each row of the square matrix is taken as a new ordering. Therefore, for the 11 solutions obtained by the k-means method, a new element can be inserted at 9 places, and 99 orderings can be obtained, and by randomly sampling 1 ordering from the 9 element ordering problems, 100 orderings can be obtained. On this basis, by inserting a new element, 1000 sampling points of 10 elements can be obtained.
[0047] We use the difference degree of the sampling points to calculate the difference degree of the sampling points. Wherein P represents a set of sampling points, N represents the number of sampling points, x i represents the i-th sampling point, D(x i , P) represents the sum of distances from x i to all other sampling points in the set P, and Var represents variance. When the difference degree value is smaller, it indicates that the sampling point distribution is more uniform. We sample different sizes of ordering problems for different times, and perform 10 repeated experiments, and the results are shown in Table 1. Wherein Ig_b and Ig_m respectively represent the percentage of the optimal value and the average value of the experimental results, t / s represents the time used for sampling, and the unit is second.
[0048] Table 1: Comparison of different sampling methods
[0049]
[0050]
[0051] From the above experimental results, in the 50 examples of the TA data set, the neighborhood solution evaluation method of the application is superior to the existing best evaluation method in terms of evaluation accuracy and error size. Although the average time is slightly less, it is also within an acceptable range.
[0052] Example 1
[0053] Permutation flow shop scheduling problem: refers to n workpieces which need to be processed in the same order on m machines, the processing time of different workpieces on the machine is different. The processing order of the workpieces needs to be determined to make the time of completing the processing of all workpieces shortest. In this problem, the processing order of all workpieces needs to be sorted, if different natural numbers are used to represent different workpieces, then the n workpieces can be represented by 1, 2, …, n. When using intelligent optimization algorithm to solve the problem, generally a plurality of initial solutions composed of the above n numbers are obtained by random initialization, and a satisfactory solution is finally obtained by local search and other search strategies. However, when using random initialization, some regions of the problem may not be searched, so the present application proposes a uniform sampling method, which can make the initial solutions of the algorithm uniformly distributed in the solution space of the problem, so that the algorithm can fully search the solution space of the problem. Specifically:
[0054] According to the above, the job shop scheduling problem with n workpieces is mapped to the sorting problem with problem size n, and the number of initial solutions of the intelligent optimization algorithm for solving the job shop scheduling problem is taken as the number of sampling points to be obtained, that is, k n . Then the uniform sampling method proposed in the present application is used, specifically as follows:
[0055] S1: n workpieces need to be processed on a plurality of machines, and the processing order of the workpieces on different machines is the same, the processing order of the n workpieces on the machine is determined to make the total processing time shortest. The problem is a permutation flow shop scheduling problem with n workpieces. The algorithm is initialized, that is, k n initial solutions are generated. In order to improve the search performance of the intelligent optimization algorithm, it is expected that these initial solutions are uniformly distributed in the solution space of the problem. However, when n is large, it is difficult to achieve uniform distribution, so the initialization of the permutation flow shop scheduling problem with n workpieces is first converted into the initialization of the permutation flow shop scheduling problem with m workpieces, and the number of corresponding initial solutions is t, t=k n *m! / n!, where m < n;
[0056] S2: calculate the total number of all solutions of the permutation flow shop scheduling problem with m workpieces, and the distance between each scheduling solution, use the distance between the solutions to k-means clustering of all solutions, so as to divide all solutions into t classes, calculate the center point of each class of solutions to obtain t center points, the t center points are the initial solutions of the permutation flow shop scheduling problem with m workpieces which are uniformly distributed;
[0057] The specific steps are as follows:
[0058] S21 selects any t solutions in all solutions as the center points of t classes of solutions;
[0059] S22 Calculate the distance of each solution to each center point, and when the solution belongs to the class to which the nearest center point of the solution belongs, the clustering of all solutions is realized.
[0060] S23 For the scheduling problem of m pieces of workpieces, the weight of the position of each workpiece in each solution is assigned;
[0061] S24 For each solution, the weight corresponding to each workpiece in the solution is obtained, and the weight corresponding to all workpieces in all solutions is obtained.
[0062] S25 For each workpiece, the weight of the workpiece in each solution is summed, and the variance of the weight is calculated, so as to obtain the weight sum and variance corresponding to the workpiece in all solutions. All workpieces are sorted from small to large according to the size of the weight sum, and the workpiece with smaller variance is arranged in front for the workpiece with the same weight sum. The point corresponding to the sorting is the center point of the class.
[0063] S26 Return to step S22 until the center point of each class no longer changes, so as to obtain the final required t uniform workpiece scheduling.
[0064] S3: For the permutation flow shop scheduling problem with m+i pieces of workpieces, K m+i-1 Uniformly distributed solutions are inserted into the newly added workpieces of m+i compared to m+i-1, so as to obtain K m+i-1 (m+i) uniformly distributed scheduling solutions, and then K m+i -K m+i-1 (m+i) scheduling solutions, the K m+i-1 (m+i) sampling points and K m+i -K m+i-1 (m+i) sampling points are mixed, and K m+i Uniformly distributed scheduling solutions of the permutation flow shop scheduling problem with m+i pieces of workpieces are obtained, and i is a positive integer.
[0065] S4 Repeat step S3 until m+i=n, so as to obtain K n Uniformly distributed scheduling solutions of the permutation flow shop scheduling problem with n pieces of workpieces, that is, the uniform sampling of the size n is realized.
[0066] The uniformly sampled points obtained by the above steps are used as the initial solution of the intelligent optimization algorithm, and then the scheduling scheme of the workshop scheduling problem is finally obtained through the calculation of the intelligent optimization algorithm.
[0067] Embodiment 2
[0068] Traveling salesman problem: its extensive existence in logistics, transportation and other industries. For example, a courier needs to deliver goods to n customers, each customer is at a different location in the city, and the goal is to complete the delivery of n customer goods and minimize the total travel distance. If the n customers are represented by different natural numbers 1, 2, …, n, a sequence needs to be determined. As described above, when using intelligent optimization algorithms to solve the problem, a number of initial solutions consisting of the n numbers described above are generally obtained by random initialization, and a satisfactory solution is finally obtained by local search and other search strategies. However, when using random initialization, some areas of the problem may not be searched, so the present invention proposes a uniform sampling method that can uniformly distribute the initial solutions of the algorithm in the solution space of the problem, thereby enabling the algorithm to fully search the solution space of the problem.
[0069] According to the above, the traveling salesman problem with n cities is mapped to the sorting problem of the problem size n, and the number of initial solutions of the intelligent optimization algorithm for solving the job shop scheduling problem is taken as the number of sampling points to be obtained, i.e. k n . Then the uniform sampling method proposed in this patent is used, as follows:
[0070] S1: The visiting order of the n cities needs to be determined, and each city is visited only once to minimize the total travel distance or cost. This problem is the traveling salesman problem. Initialize the algorithm, i.e. generate k n initial solutions. When n is large, it is very difficult to achieve uniform distribution, so the initialization of the traveling salesman problem with n cities is first converted to the traveling salesman problem with m cities, and the number of initial solutions corresponding to the traveling salesman problem with m cities is t, where m < n;
[0071] S2: Calculate the total number of traveling solutions for the traveling salesman problem with m cities, i.e. the summary of the solutions in this problem, calculate the distance between each solution, and use the distance between the solutions to cluster all the solutions, thereby dividing all the solutions into t classes, and calculate the center point of each class of solutions to obtain t center points, which are the uniformly distributed initial solutions of the traveling salesman problem with m cities;
[0072] The specific steps are as follows:
[0073] S21: Select any t solutions from all the solutions as the center points of the t classes of solutions;
[0074] S22: Calculate the distance between each solution and each center point, and when the solution belongs to the class whose center point is closest to the solution, the clustering of all solutions is achieved.
[0075] S23: For the sorting problem with m cities, assign weights to the position of each city in each solution;
[0076] S24For each solution, obtain the weight corresponding to each city in the solution, and obtain the weight corresponding to all cities in all solutions;
[0077] S25For each city, sum the weight of the city in each solution, and calculate the variance of the weight, and obtain the weight sum and variance of the city in all solutions, sort all cities from small to large according to the weight sum, and the city with small variance is placed in front when the weight sum is the same, and the center point corresponding to the sorting is the center point of the class.
[0078] S26Return to step S22 until the center point of each class no longer changes, and obtain the final required t uniform city sorting.
[0079] S3: For the traveling salesman problem with m+i cities, K m+i-1 (m+i) cities are inserted into the K m+i-1 (m+i) uniformly distributed traveling schemes, and then the K m+i (m+i) traveling schemes are obtained by random sampling. m+i-1 (m+i) traveling schemes, and the K m+i-1 (m+i) sampling points and K m+i (m+i) sampling points are mixed to obtain K m+i-1 (m+i) uniformly distributed traveling schemes of the traveling salesman problem with m+i cities, and i is a positive integer. m+i
[0080] S4Repeat step S3 until m+i=n, and obtain K n (m+i) uniformly distributed traveling schemes of the traveling salesman problem with n cities, that is, realize the uniform sampling of the scale n.
[0081] The uniformly sampled points obtained by the above steps are used as the initial solution of the intelligent optimization algorithm, and then the planning scheme of the traveling salesman problem is finally obtained by the calculation of the intelligent optimization algorithm.
[0082] The present application provides a uniform sampling method for ordering problem metric space, here taking 1000 times sampling in a sorting problem with 10 elements as an example. Figure 1 As shown, first the original problem needs to be converted into a new sorting problem and the number of samplings. For a sorting problem with 10 elements, 1000 samplings are performed, according to the description in S1, the original problem is first converted into a problem of 9 elements with 1000 / 10 = 100 samplings; since 100 > (9 * 8), the problem is converted into a problem of 8 elements with 100 / 9 = 11 samplings for the second time. Since 11 < (8 * 7), the final problem is a problem of 8 elements with 11 samplings.
[0083] For the converted problem, first clustering is performed using the k-means clustering method. In the example, the input of the clustering method is the full permutation of 8 elements (i.e. 8! = 40320 permutations) and the number of clusters 11.
[0084] First, 11 sorting in the 40320 permutations are randomly selected as the center points of the clusters by initialization, and then each sorting in the full permutation is assigned to the nearest cluster center point using the Kendall tau distance. After the assignment is completed, the center sequence of the sorting of the same center point is recalculated using the improved Borda method. The assignment from the full permutation and the calculation of the center point are repeated until the center point does not change. The improved Borda method is as follows Figure 2 As shown, if only the center points of (a, b, c, d) and (d, b, a, c) are calculated, first each position of the sorting is assigned a weight of {1, 2, 3, 4}, then the weight sum and weight variance of each element can be calculated, and finally the center points of the two sorting can be obtained by first sorting the variance from small to large and then sorting the weight sum from small to large.
[0085] On the basis of clustering, the original problem is sampled using the extended Latin square and random sampling method. The extended Latin square is as follows Figure 3 As shown, for a sorting, a square matrix is obtained by inserting a new element at different positions, and each row of the square matrix is a new sorting. Therefore, for the 11 solutions obtained by the k-means method, 99 sorting can be obtained by inserting a new element at 9 positions, and 100 sorting can be obtained by randomly sampling 1 sorting from the sorting problem of 9 elements. On this basis, 1000 sampling points of 10 elements can be obtained by inserting new elements.
[0086] We use to calculate the diversity of the sampling points. Where P represents the set of sampling points, N represents the number of sampling points, x i represents the i-th sampling point, and D(x i , P) represents the distance between x iThe sum of the distances to all other sample points in the set P, and Var represents the variance. When the diversity value is smaller, it means that the sample points are more evenly distributed. We perform different numbers of sampling on different sizes of sorting problems, and perform 10 repeated experiments. The results are shown in Table 1. Ig_b and Ig_m represent the percentage of the optimal value and the average value of the experimental results, respectively, and t / s represents the time used for sampling, in seconds.
[0087] Those skilled in the art will easily understand that the above description is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for uniform sampling of a metric space of a ranking problem, characterized in that, The method comprises the following steps: S1 for a sorting problem with size n and sampling number k n , reduce the size of the sorting problem to m and obtain a determination of the corresponding sampling number t at the new size m, m < n; The sorting problem is a permutation flow shop scheduling problem, that is, a plurality of workpieces need to be processed on a plurality of machines, and the processing sequence of the workpieces on different machines is the same, and the processing sequence of the plurality of workpieces on the machines is determined to minimize the total processing time; wherein the scale n, m represents the number of workpieces; S2, the total number of solutions of the sorting problem with the scale m is calculated, and the distance between each solution is calculated, the solutions are clustered by using the distance between the solutions, so that all the solutions are divided into t classes, the center points of each class of solutions are calculated to obtain t center points, and the t center points are t uniformly sampled points of the sorting problem with the scale m; S3 For any sorting problem of size m+i, the K of the sorting problem of size m+i-1 m+i-1 Insert the element of size m+i compared to m+i-1 into each sampling point to obtain K. m+i-1 (m+i) sampling points, and then K is obtained by random sampling. m+i -K m+i-1 (m+i) sampling points, the K m+i-1 (m+i) sampling points and K m+i -K m+i-1 The K of a sorting problem of size m+i is obtained by mixing (m+i) sampling points. m+i There are sampling points, where i is a positive integer; S4 Repeat step S3 until m + i = n, thus obtaining k of size n. n A uniform sampling point is used to achieve uniform sampling of size n.
2. A method for uniform sampling of an order problem metric space as recited in claim 1, wherein, In step S1, the size m of the ordering problem satisfies , the number of sampling points .
3. A method for uniform sampling of a metric space of ranking problems according to claim 1 or 2, characterized in that, In step S2, the clustering adopts a k-means clustering method.
4. A method for uniform sampling of an order problem metric space as defined in claim 3, wherein, In step S2, the clustering of all solutions by using the distance between the solutions is performed according to the following steps: S21, select any t solutions in all solutions as the center points of t classes of solutions respectively; S22, the distance between each solution and each center point is calculated, and when the solution belongs to the class to which the center point closest to the solution belongs, the clustering of all solutions is realized.
5. A method for uniform sampling of an order problem metric space as defined in claim 4, wherein, In step S2, the center points of each class of solutions are calculated according to the following steps: S23, for the sorting problem with the scale m, the position of each element arrangement in each solution is weighted; S24, for each solution, the weight corresponding to each element in the solution is obtained, so that the weight corresponding to all elements in all solutions is obtained; S25, for each element, the weight of the element in each solution is summed, and the variance of the weight is calculated, so that the weight sum and the variance corresponding to the element in all solutions are obtained, all elements are sorted from small to large according to the size of the weight sum, and for the elements with the same weight sum, the element with the smaller variance is arranged in front, and the point corresponding to the sorting is the center point of the class.
6. A method for uniform sampling of an order problem metric space as defined in claim 5, wherein, In step S2, the center points obtained in step S25 are used as the center points of new clustering, and step S22 is returned until the center points of each class no longer change, so that the required t uniformly sampled points are obtained.
7. A method for uniform sampling of an order problem metric space as recited in claim 5, wherein, In step S23, the assignment is assigned from positive integer 1 to positive integer t in the order of position.
8. A method for uniform sampling of a metric space of ranking problems according to claim 1 or 2, characterized in that, In step S3, the K m+i-1 sampling points of the ranking problem of size m+i-1 are inserted with the elements added in size m+i, the inserted position being any feasible position in the K m+i-1 ranking.
9. A method for uniform sampling of an order problem metric space as defined in claim 8, wherein, In step S3, the sampling points obtained by inserting new elements are represented by an extended Latin square.
Citation Information
Patent Citations
Systems and methods for improving computational efficiency of processor-based devices in solving constrained quadratic models
US20240248947A1
Design of an aerodynamic component using surrogate modeling
WO2024094979A1