Mobility resource allocation method based on multi-objective optimization genetic algorithm
Through the mobilization resource allocation method based on multi-objective optimization genetic algorithm, the problem of task volume satisfaction and workload balance in task implementation is solved, and efficient and balanced resource allocation is achieved.
Patent Information
- Application Number
- CN202411391391.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-02-28
AI Technical Summary
In mobilizing and resource allocation, it is difficult to ensure the satisfaction of the task volume and the balance of the task workload undertaken by each region during the implementation of tasks.
The mobilization resource allocation method based on multi-objective optimization genetic algorithm is adopted. By defining variables, objective functions and constraints, a mobilization resource allocation model is constructed, and the multi-objective genetic algorithm is used to optimize to generate a reasonable resource allocation plan.
It achieves the satisfaction of task volume and the balance of work volume in various regions, and improves the efficiency and effectiveness of resource allocation.
Smart Images

Figure CN119539323A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of neural network and resource allocation, in particular to a mobilization resource allocation method based on a multi-objective optimization genetic algorithm. Background Art
[0002] The problem of mobilization resource allocation can be regarded as a "transportation problem": each mobilization demand on the "mobilization demand list" is actually a task to be assigned. Each mobilization demand has a user unit, a handover time, and a handover area, which can be regarded as the destination of the "transportation problem"; the cities under the jurisdiction of XX Province can be regarded as resource warehouses or production factories of the "transportation problem". The "transportation problem" of mobilization resource allocation is "there are n mobilization tasks, how to allocate and transport the resources of m resource warehouses to the handover locations of n mobilization tasks."
[0003] The allocation patterns of mobilization resources are complex and diverse, and different types of mobilization needs often correspond to different resource allocation methods. Summary of the invention
[0004] In order to overcome the defects in the above-mentioned prior art, the present invention provides a mobilization resource allocation method based on a multi-objective optimization genetic algorithm, which solves the problem of ensuring that the task volume can be met while taking into account the balance of the task workload undertaken by each region when implementing the task.
[0005] To achieve the above object, the present invention adopts the following technical solutions, including:
[0006] The mobilization resource allocation method based on multi-objective optimization genetic algorithm includes the following steps:
[0007] S1, define the variables, objective functions and constraints of the mobilization resource allocation plan, and build a mobilization resource allocation model;
[0008] The variable is: the amount of tasks x assigned to region i in the jth mobilization task ij , i = 1, 2, ..., m, j = 1, 2, ..., n, m is the number of regions, n is the number of mobilization tasks, and each mobilization task corresponds to a mobilization resource;
[0009] The objective function is:
[0010]
[0011] Among them, c ij represents the unit transportation cost from the i region to the handover location of the jth mobilization task; C represents the total transportation cost, minC represents the minimization of transportation cost; D represents the total task difference, minD represents the minimization of task difference;
[0012] S2, design a multi-objective genetic algorithm for optimizing mobilization resource allocation schemes: define a mobilization resource allocation scheme as an individual, and define a certain number of mobilization resource allocation schemes as a population; the genes of each individual are composed of m gene segments, each gene segment contains n gene positions, and each individual includes m×n gene positions, and the gene value of each gene position is x ij ;
[0013] S3, generate the initial population;
[0014] S4, take the initial population as the parent population P t Perform genetic operations to generate subpopulation Q t ;
[0015] S5, merge parent population P t With subpopulation Q t , and get the merged population R t =P t ∪Q t ; For the combined population R t Perform non-inferior classification, classify into various front ends, and obtain the non-dominated sequence value of each individual in each front end;
[0016] S6, in population R t The crowding distance of each front end is calculated internally to obtain the crowding distance of each individual in each front end;
[0017] S7, according to population R t The non-dominated sequence value and crowding distance of each individual in each front end of , select individuals, and get the updated new population P t+1 ;
[0018] S8, determine the current number of iterations or the updated new population P t+1 Whether the end condition is met, if the end condition is met, the multi-objective genetic optimization genetic algorithm is terminated and the updated new population is output; otherwise, jump to step S5 and the new population P t+1 As the parent population, it continues to iterate until the end condition is met, ending the multi-objective genetic optimization genetic algorithm and outputting the updated new population.
[0019] Preferably, in step S1, if a non-negative multi-objective programming model is adopted, the constraint condition is:
[0020]
[0021] Among them, r j represents the resource requirement of the jth mobilization task; R ij R represents the reserve or mobilizable amount of region i for the jth mobilization task (mobilization resources); ij′ represents the task amount of the jth mobilization resource assigned to region i.
[0022] Preferably, in step S1, if a 0-1 type multi-objective programming model is adopted, the constraints are:
[0023]
[0024] Among them, r j represents the resource requirement of the jth mobilization task; R ij R represents the reserve or mobilizable amount of region i for the jth mobilization task (mobilization resources); ij ′ represents the amount of task (mobilization of resources) assigned to the jth task in region i.
[0025] Preferably, in step S5, the specific process of non-inferior classification is as follows:
[0026] S51, solving all objective function values of all individuals in the current population according to the mobilization resource allocation model, wherein the population size is assumed to be A and the number of objective functions is assumed to be K;
[0027] S52, initializing the non-dominated sequence values η of all individuals in the current population;
[0028] S53, for individual a in the current population, according to all objective function values of individual a and all objective function values of all other individuals in the current population, compare the dominance relationship between individual a and other individuals in the current population one by one: if individual a is not inferior to other individuals in all objective functions, and is superior to other individuals in at least one objective function, then individual a is said to dominate other individuals, that is, individual a is superior to other individuals;
[0029] S54, if individual a is in a dominant position with respect to all other individuals, then the non-dominant rank value rank[a] of individual a is 1, let a=a+1, and proceed to step S53 to examine the next individual; if individual a is not in a dominant position with respect to all other individuals, let a=a+1, and proceed to step S53 to examine the next individual; wherein a=1, 2, ..., A;
[0030] S55, repeating steps S53-S54 until a=A+1, at which point all individuals in the first front end Front[1] of the non-inferior classification have been obtained, and the non-dominated rank values of the individuals in the first front end Front[1] are all equal to 1;
[0031] S56, perform the same operation on the remaining individuals in the population except the first front end in the same manner as steps S53-S55, and obtain all individuals in the second front end Front[2] of non-inferior classification, where the non-dominated rank values of the individuals in the second front end Front[2] are all equal to 2; and so on, until all individuals in the current population complete the non-inferior classification.
[0032] Preferably, an elite retention strategy is adopted to achieve fast non-inferior classification, specifically:
[0033] Set two non-inferiority parameters for each individual: H a is the number of individuals in the population that have a dominant relationship with individual a; S a is the set of individuals dominated by individual a in the population;
[0034] The process of fast non-inferior classification is as follows:
[0035] First, calculate the non-inferiority parameter of all individuals in the population, namely H a and S a ;
[0036] Then find H a = 0 are all placed in the first front end;
[0037] Next, for individual a in the first front end, let the set S of individual a be a The parameter H of the internal individual b b Minus 1, that is, H b =H b -1; then find H b =0 individuals are placed in the second front end;
[0038] By analogy, all the front ends of the non-inferior classification can be finally obtained, and the rapid non-inferior classification of the population is completed. Preferably, in step S6, the crowding distance is calculated inside each front end, and the specific process is as follows:
[0039] S61, for individuals in the same front end, initialize the crowding distance, and set the crowding distance distance[]=0, where the number of individuals in the front end is Z;
[0040] S62, re-sort the individuals in the same front end in ascending order of the kth objective function value, locate(z) represents the individual stored at position z in the new sorting, then locate(1) is the individual with the smallest kth objective function value, locate(Z) is the individual with the largest kth objective function value, and value(z) represents the kth objective function value of the individual at position z in the new sorting; wherein z=2,..,Z-1; k=1,2,...,K, where K is the number of objective functions;
[0041] S63. For the individuals at the sorted edge positions, let the crowding distance of individuals locate(1) and locate(Z) under the k-th objective function be:
[0042] distance_k[locate(1)] = distance_k[locate(Z)] = μ;
[0043] S64. For the individual locate(z) at the sorted middle position, its crowding distance under the k-th objective function is:
[0044] distance_k[locate(z)] = (value(z + 1) - value(z - 1));
[0045] S65. If k < K, let k = k + 1, go to step S62, and repeat steps S62 - S64 to calculate the crowding distance of each individual in the front under the (k + 1)-th objective function; if k = K, then execute step S66;
[0046] S66. The crowding distance of each individual is: the sum of the crowding distances of the individual under all objective functions, that is
[0047]
[0048] Preferably, in step S7, the specific method of selecting individuals is:
[0049] Randomly select any 2 individuals from the population. If the non-dominated rank values of the 2 individuals are different, preferentially select the individual with the smaller non-dominated rank value; if the non-dominated rank values of the 2 individuals are the same, preferentially select the individual with the larger crowding distance.
[0050] Preferably, in step S7, the specific process of generating the new population P t+1 is as follows:
[0051] S71. Initialize the solution set of the new population P t+1 to 0;
[0052] S72. Perform non-dominated sorting of level 1 on the merged population R t to obtain the optimal solutions of level 1, that is, obtain the individuals in the first front;
[0053] S73. If the number of the solution set of the new population P t+1 plus the optimal solutions of level 1 is less than the population size A, add the optimal solutions of level 1 to the solution set of the new population P t+1 and perform non-dominated sorting of the next level to obtain the optimal solutions of the next level, that is, obtain the individuals in the next front, and continue to the next step; otherwise, find the individual with the larger crowding distance among the optimal solutions of level 1 until the new population Pt+1 After adding the individuals with larger crowding distance from the optimal solution of level 1 to the solution set, the number reaches the population size A, and the algorithm ends to obtain the new population P t+1 The final solution set of ;
[0054] S74, continue to add new population P in the same manner as step S73 t+1 The optimal solution of the next level is added to the solution set until the number reaches the population size A, and the algorithm ends to obtain a new population P t+1 The final solution set.
[0055] Preferably, the end condition of the updated new population is: judging whether the new population is mature, when the population evolution slows down and reaches the specified condition, it can be determined that the new population is mature, that is, the end condition is met;
[0056] The determination method is as follows:
[0057] The average fitness value of the kth objective function when the population evolves to the tth generation is:
[0058]
[0059] f represents the objective function; f(k) represents the kth objective function; k represents the objective function index, k = 1, 2, ..., K, K represents the number of objective functions; f(k) t represents the average fitness value of the kth objective function when the population evolves to the tth generation; t represents the iteration number index, t=1,2,…,T, T represents the total number of iterations; represents the kth objective function value of individual a in the tth generation population; a represents the individual index, a=1,2,…,A, A represents the population size, that is, the number of solutions;
[0060] Given a threshold α, if after 5 consecutive iterations, all objective functions of the population satisfy f(k) t+1 -f(k) t ≤α, the new population is judged to have reached maturity.
[0061] Preferably, in step S4, the genetic operation includes selection, crossover and mutation operations.
[0062] The advantages of the present invention are:
[0063] (1) The present invention constructs a mobilization resource allocation model and adopts a multi-objective genetic algorithm for optimization, which solves the problem of ensuring that the task volume can be met while balancing the workload of each region when implementing the task.
[0064] (2) The use of genetic algorithms combined with the mobilization task field involves a set of gene coding sequences applicable to both non-negative numbers and 0-1 modes.
[0065] (3) The present invention takes into account the deficiencies that the algorithm model may have in practical problems. The genetic algorithm of the present invention can provide a variety of different task implementation strategies for the same task, helping decision makers to choose, thereby improving the applicability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 The present invention is a flowchart of the method for allocating mobilization resources based on a multi-objective optimization genetic algorithm.
[0067] Figure 2 Schematic diagram of the genetic coding of the non-negative multi-objective programming model.
[0068] Figure 3 Schematic diagram of genetic coding for the 0-1 type multi-objective programming model.
[0069] Figure 4 A schematic diagram of crowding distance.
[0070] Figure 5 Schematic diagram of the generation process of a new population. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0072] The allocation of mobilization resources should follow the basic allocation principles: ① All tasks on the mobilization demand list should be met; ② The mobilization tasks allocated or assigned to each region should be within its reserve or mobilization capacity; ③ For large-scale, key strategic resource mobilization needs, mobilization tasks should be allocated to multiple provinces and cities; ④ For scattered, small-scale mobilization needs, mobilization tasks should be assigned to one province and city; ⑤ In terms of macro-level, mobilization resource allocation should be based on proximity and convenience, and transportation costs and time should be minimized; ⑥ Mobilization resource allocation should be coordinated among regions, and the mobilization tasks undertaken by each region should be relatively balanced, so as to avoid affecting the mobilization guarantee standards and local living order in a certain region due to excessive mobilization tasks; ⑦ In the process of matching demand and potential, mobilization resource allocation should ensure that the mobilization objects are matched.
[0073] Design considerations for the multi-objective planning model of mobilization resource allocation: ① Objective function. Two objective functions are constructed, the first is to minimize transportation costs, and the second is to minimize the difference in the overall mobilization task volume between regions. One advantage of this modeling is that the Pareto frontier of non-inferior solutions can simultaneously reflect the mobilization resource allocation plan to save transportation costs and comprehensively reduce the difference in the mobilization task volume between different regions, which is convenient for decision makers to weigh and choose between the two decision indicators of proximity and overall arrangement. ② Constraints.
[0074] For example, if an earthquake occurs in a certain place, the resource allocation task received by XX Province is shown in Table 1 below:
[0075] Table 1 Resource Allocation Task Table
[0076] Mobilization mission content (mobilization resources) quantity flour 200 tons Convenience Food 2 million boxes gasoline 5 million liters
[0077] According to statistics, the reserve quantities of various materials in various cities under the jurisdiction of XX Province are shown in Table 2 below:
[0078] Table 2 Reserves of various resources in various regions
[0079] Task content City A b city City C D City e City f city … flour 135 tons 17 tons 16 tons 30 tons 138 tons 111 tons 135 tons Convenience Food 550,000 boxes 1.91 million boxes 290,000 boxes 1.32 million boxes 130,000 boxes 880,000 boxes 550,000 boxes gasoline 1.91 million liters 280,000 liters 180,000 liters 1.07 million liters 390,000 liters 690,000 liters 1.91 million liters
[0080] It is necessary to distribute 200 tons of flour, 2 million boxes of convenience foods and 5 million liters of gasoline to each city according to the reserve capacity of each city under the jurisdiction of XX Province.
[0081] 1. Construct a mobilization resource allocation model and design the objective function and constraints of the mobilization resource allocation model.
[0082] The specific models can be the following two:
[0083] (1) Non-negative multi-objective planning model. For the allocation of large-scale and critical resources, such mobilization tasks should be assigned to multiple provinces and cities, and the mobilization resource allocation model belongs to the non-negative multi-objective planning model.
[0084] Objective function:
[0085]
[0086]
[0087] Constraints:
[0088]
[0089] in:
[0090] x ij represents the amount of tasks assigned to region i in the jth mobilization task;
[0091] cij represents the unit transportation cost from the i region to the handover location of the jth mobilization task;
[0092] C represents the total transportation cost, and minC represents the minimization of transportation cost;
[0093] D represents the total task difference, and minD represents the minimization of task difference;
[0094] r j represents the resource requirement of the jth mobilization task;
[0095] R ij It represents the reserve or mobilizable amount of region i for the jth mobilization task (mobilization resources);
[0096] R ij ′ represents the task volume of the jth mobilization resource assigned to region i. Among them, since the mobilization resources of different mobilization tasks on the mobilization demand list may be the same type of resources, when calculating the total task volume of a region undertaking a certain type of resources, the mobilization tasks of the same type of resources should be merged.
[0097] Model description: The objective function minC represents the minimization of transportation cost, and minD represents the minimization of task difference; the constraint condition Indicates that the jth mobilization task should be met, R ij ′≤R ij Indicates that the mobilization tasks of various types of resources allocated or assigned to each region should be within its reserve or mobilization capacity, x ij ≥0 indicates that the search space of the planning model is non-negative.
[0098] (2) 0-1 type multi-objective programming model. For the allocation of scattered, small-scale resources, such mobilization tasks are assigned to a province or city. The allocation of mobilization resources belongs to the 0-1 assignment problem, and the model belongs to the 0-1 type multi-objective programming model.
[0099] Objective function:
[0100]
[0101]
[0102] Constraints:
[0103]
[0104] in:
[0105] x ij It represents the amount of tasks assigned to region i in the jth mobilization task;
[0106] c ijrepresents the unit transportation cost from the i region to the handover location of the jth mobilization task;
[0107] C represents the total transportation cost, and minC represents the minimization of transportation cost;
[0108] D represents the total task difference, and minD represents the minimization of task difference;
[0109] r j represents the resource requirement of the jth mobilization task;
[0110] R ij It represents the reserve or mobilizable amount of region i for the jth mobilization task (mobilization resources);
[0111] R ij ′ represents the task volume of the jth task (mobilization resources) assigned to region i. Among them, since the mobilization resources of different mobilization tasks on the mobilization demand list may be the same type of resources, when calculating the total task volume of a region undertaking a certain type of resources, the mobilization tasks of the same type of resources should be merged.
[0112] Model description: The objective function minC represents the minimization of transportation cost, and minD represents the minimization of task difference; the constraint condition Indicates that the jth mobilization task should be met, R ij ′≤R ij Indicates that the mobilization tasks of various types of resources allocated or assigned to each region should be within its reserve or mobilization capacity, x ij =0,1 means that the planning model belongs to the 0-1 type assignment model.
[0113] 2. Aiming at the problem of mobilizing resources and allocating them, the following study designs a specific multi-objective genetic algorithm.
[0114] (1) Concept extraction
[0115] For the multi-objective planning model of mobilization resource allocation, the relevant concepts are extracted according to the multi-objective genetic algorithm (NSGA-II algorithm) based on the NSGA-II strategy (non-dominated elite strategy), and the corresponding relationship between the problem model and the solution algorithm is obtained, as shown in Table 3 below.
[0116] Table 3 Correspondence between mobilization resource allocation model and solution algorithm
[0117]
[0118] (2) Gene coding
[0119] Before using genetic algorithm to solve the problem, first the model and parameters of the specific problem must be specially coded, generally represented by a string, and this operation is called genetic coding. Genetic coding encodes the specific scheme of the actual problem into a gene sequence that is convenient to implement genetic evolution operations, which is the first step in designing a genetic algorithm. Most of the subsequent genetic operations are closely related to genetic coding. Different encoding methods may have a greater impact on the efficiency and performance of the genetic algorithm, so suitable encoding methods will be selected according to the problem model. Common encoding methods are binary encoding, real number encoding, and ordered string encoding. If the binary encoding method is selected, the chromosome gene string will be longer when the mobilization demand and potential resource items are more, so the present invention adopts the decimal encoding method.
[0120] For each variable in the mobilization resource allocation model, the gene string assigns a corresponding gene position to it, and the gene value on each gene position is set according to the variable constraints in the mobilization resource allocation model. According to the mobilization resource allocation model in the previous article, it is assumed that there are m regions under the jurisdiction of XX Province that can perform tasks, and there are n mobilization tasks on the current mobilization demand list (resource allocation task list) of XX Province. In the corresponding multi-objective genetic algorithm, the genes of each individual in the population are composed of m gene segments (corresponding to m regions), and each gene segment contains n gene positions (corresponding to n mobilization tasks), so the individual gene contains a total of m×n gene positions. Different gene positions are used to indicate the matching relationship between potential resources and mobilization needs in mobilization resource allocation, and the gene value of each gene position indicates the mobilization tasks allocated or assigned to each region. According to the differences between the two resource allocation models, two gene codes are designed:
[0121] ① Gene coding of non-negative multi-objective programming model. For the non-negative multi-objective programming model, the gene coding is designed as follows: the gene value of each gene position indicates the amount of mobilization resources allocated to each region. For example, the jth gene position and its gene value in the i-th gene segment indicate the matching relationship between the i-th region and the j-th mobilization task and the amount of mobilization resources allocated. Figure 2 The concepts of gene segments, gene positions, gene values, etc. are briefly labeled, and the matching relationship between gene positions and gene values is explained (to simplify the chart, the number of mobilization task items is set to n = 4).
[0122] ②Gene coding of the 0-1 type multi-objective programming model. For the 0-1 type multi-objective programming model, the gene coding is designed as follows: the gene value of each gene position indicates whether a mobilization task is assigned to each region. For example, the jth gene position and its gene value in the i-th gene segment indicate the matching relationship or assignment relationship between the i region and the j-th mobilization task. Figure 3 The concepts of gene segments, gene positions, gene values, etc. are briefly labeled, and the matching relationship between gene positions and gene values is explained (to simplify the chart, the number of mobilization task items is set to n = 4).
[0123] (3) Initial population
[0124] According to the needs of the genetic algorithm population evolution operation, after completing the gene coding of the algorithm, it is necessary to construct an initial population composed of a certain number of initial solutions for the genetic evolution operation of the algorithm. An initial population with higher fitness can reduce the number of iterations of the evolution operation, which is conducive to completing the evolution optimization in a relatively short time, so research and construction of a suitable initial population is of great significance for the genetic algorithm. The present invention adopts a method of randomly generating a non-negative real number or randomly generating 0-1 to construct an initial population according to the value characteristics of the gene value of the mobilization resource allocation problem. In addition, the larger the general population size, the more genetic evolution patterns there are, that is, the diversity of individuals in the population is relatively better, so the risk of the algorithm falling into a local optimum is smaller, but the larger the population size, the greater the amount of calculation will be, which affects the efficiency of the algorithm, so a suitable population size will be selected according to the problem model, and the population size is generally tens to hundreds of individuals in practical applications.
[0125] (4) Individual fitness
[0126] In multi-objective genetic algorithms, the calculation method of individual fitness is very different from that of single-objective genetic algorithms. The fitness of an individual is not a single fitness value, but is determined by two indicators, the non-dominated sequence value and the crowding distance. The non-dominated sequence value has a higher priority than the crowding distance.
[0127] 1. Non-dominated sequence value
[0128] The non-dominated sequence value is the primary indicator for determining individual fitness and can be used to classify individuals in a population as non-inferior in the process of genetic evolution. The non-dominated sequence value of an individual can be determined by the non-dominated classification method. First, the entire objective function value of each individual is solved by mobilizing the resource allocation model. For all individuals in the population, they are compared one by one to find all the dominant solutions or non-inferior solutions of the current population. The non-dominated sequence value is defined as 1. These individuals are classified from the population to form the first front end Front[1]. The remaining individuals in the population are screened for the front end according to the same method to obtain the second front end Front[2]. The non-dominated sequence value is defined as 2. Similarly, by sorting the front ends, all individuals in the current population can be classified into different front ends. The smaller the non-dominated sequence value, the better the individual fitness.
[0129] The specific steps of the non-dominated classification method are as follows:
[0130] ① Solve all objective function values of all individuals in the current population by mobilizing the resource allocation model (assuming the population size is A and the number of objective functions is K);
[0131] ② Initialize the non-dominated sequence values of all individuals in the current population to η;
[0132] ③ For individual a in the current population, according to all the objective function values of individual a and all the objective function values of all other individuals in the current population, compare the dominance relationship between individual a and other individuals in the current population one by one: if individual a is not inferior to other individuals in all objective functions, and is superior to other individuals in at least one objective function, then individual a is said to dominate other individuals, that is, individual a is superior to other individuals;
[0133] ④ If individual a is in a dominant position over all other individuals, then the non-dominant rank value of individual a, rank[a] = 1, let a = a + 1, and proceed to step ③ to examine the next individual; if individual a is not in a dominant position over all other individuals, let a = a + 1, and proceed to step ③ to examine the next individual; where a = 1, 2, ..., A;
[0134] ⑤ Repeat steps ③ and ④ until a=A+1. At this point, all individuals in the first front end Front[1] of the non-inferior classification have been obtained, and the non-dominated rank values of the individuals in the first front end Front[1] are all equal to 1;
[0135] ⑥ Follow steps ③④⑤ to perform the same operation on the remaining individuals in the population except the first front end, and obtain all individuals in the second front end Front[2] of non-inferior classification. The non-dominated rank values of the individuals in the second front end Front[2] are all equal to 2; and so on, until all individuals in the current population complete the non-inferior classification.
[0136] 2. Crowding distance
[0137] In order to avoid local aggregation of individuals and thus maintain the diversity of individuals in the multi-objective genetic algorithm, the algorithm of the present invention first introduces the concept of crowding distance: the sum of the relative distances of two adjacent nodes (two individuals with relatively close objective functions) in each dimension in the multi-dimensional space corresponding to a front-end individual. Figure 4 As shown in the figure, the crowding distance of node z in space is equal to the sum of the two sides of the rectangle formed by the adjacent nodes z-1 and z+1 (f(1) and f(2) represent two objective functions respectively). It is known that the larger the crowding distance value, the less crowded the individuals are, and the better the population diversity is. Therefore, using the crowding distance can ensure that the non-dominated solutions are relatively evenly distributed in the solution space, making the algorithm more robust.
[0138] Because the crowding distance is mainly used to measure the degree of crowding between individuals in the same front end, the crowding distance is calculated in each front end of the non-inferior classification.
[0139] The specific steps for each front end to calculate the crowding distance are as follows:
[0140] ① For individuals in the same front, initialize the crowding distance, and let the crowding distance distance[] = 0 (assuming the number of individuals in this front is Z);
[0141] ② For individuals in the same front, re - sort them in ascending order according to the k - th objective function value. locate(z) represents the individual stored at position z in the new sorting. Then locate(1) is the individual with the smallest k - th objective function value, and locate(Z) is the individual with the largest k - th objective function value. value(z) represents the k - th objective function value of the individual at position z in the new sorting. Here, z = 2,.., Z - 1;
[0142] ③ For individuals at the sorting edge positions, to give them a greater selection advantage, let the crowding distances of individuals locate(1) and locate(Z) under the k - th objective function be:
[0143] distance_k[locate(1)] = distance_k[locate(Z)] = μ;
[0144] ④ For the individual locate(z) at the middle position of the sorting, its crowding distance under the k - th objective function is:
[0145] distance_k[locate(z)] = (value(z + 1)-value(z - 1));
[0146] ⑤ If k < K (K represents the number of objective functions), let k = k + 1, go to step ②, and repeat steps ②③④ to calculate the crowding distances of each individual in this front under the (k + 1)-th objective function. If k = K, then execute step ⑥;
[0147] ⑥ So far, the calculation of the crowding distances of each individual is completed. The crowding distance is the sum of the crowding distances of the individual under all objective functions, that is
[0148] (5) Genetic operation
[0149] Selection: Different from the roulette wheel method of the general genetic algorithm, the selection strategy of the multi-objective genetic algorithm adopts the tournament selection method: randomly select 2 individuals from the population each time, and then select the better individual to enter the sub-population based on the non-dominated rank value and crowding distance. Repeat this operation until the size of the sub-population reaches the size of the original population. Specifically, randomly select any 2 individuals a and a' from the population. If ① rank[a] < rank[a'] or ② rank[a] = rank[a'] and distance[a] > distance[a'], then individual a is better than individual a', and select individual a to enter the sub-population. Generally speaking, if the non-dominated rank values of 2 individuals are different, preferentially select the individual with a smaller non-dominated rank value; if the non-dominated rank values of 2 individuals are the same, preferentially select the individual with less crowding (larger crowding distance) around.
[0150] The crossover and mutation operations are basically the same as those of the general genetic algorithm and will not be elaborated here. It should be noted that for constrained problems, the new individuals generated by the crossover and mutation operations may not meet the constraint conditions. Therefore, feasibility tests need to be carried out after generating new individuals.
[0151] (6) Fast non-dominated sorting
[0152] In the multi-objective genetic algorithm, to obtain different fronts, the population is classified into non-dominated levels according to the non-dominated rank values of individual fitness. According to the concept of non-dominated rank values in individual fitness, in order to calculate the non-dominated rank values of population individuals, each individual needs to be compared with the rest of the population one by one for domination relationships. The time complexity of calculating the non-dominated rank value of a single individual is O(nA), where n is the number of mobilization requirements (the number of mobilization task items), and A is the population size (the size of the population); the time complexity of calculating the non-dominated rank values of all individuals in the population is O(nA 2 ), and at this point, the individuals in the first front of the population have been found; to find the individuals in the remaining fronts, the previous process needs to be repeated, removing the individuals in the first front of the population and comparing the domination relationships of the remaining individuals one by one. If the elitist retention strategy is not adopted, in the worst case (there is only one solution in each non-dominated level), the time complexity of completing the non-dominated sorting of all individuals is O(nA 3 ).
[0153] Therefore, the NSGA-II algorithm of the present invention adopts a proprietary elitist retention strategy, which can achieve fast non-dominated sorting, and the time complexity in the worst case is O(nA 2 ). The specific steps are as follows: Set two non-dominated parameters for each individual: 1) H a is the number of individuals in the population that have a domination relationship with individual a; 2) S a is the set of individuals in the population that are dominated by individual a. When performing non-dominated sorting, first calculate the non-dominated parameters of all individuals in the population (i.e., H a and Sa ), the time complexity is O(nA 2 ); Then, find H a = 0, these individuals are non-inferior solutions of the current population, all of which are put into the first front end; for individual a in the first front end, let S a H of individual b inside the set b The parameter is reduced by 1, that is, H b =H b -1; then, check H b Parameters, find H b = 0 (indicates that individual b is the second-best individual after the first front end), and put it into the second front end; and so on, we can finally get all the front ends of the non-inferior classification and complete the fast non-inferior classification of the population. The time complexity of solving each front end is O(A). In the worst case, there are at most A front ends, and the time complexity of calculating all front ends is O(A 2 ), then the total time complexity of the population non-inferior classification is equal to the sum of the iterative check complexity and the non-inferior parameter calculation complexity, which is O(A 2 )+O(nA 2 ), which is O(nA 2 ).
[0154] (7) Generate a new population
[0155] In the process of generating the next generation population, the NSGA-II algorithm of the present invention adopts an elite retention strategy: the parent population P t Generate subpopulation Q through genetic operations such as selection, crossover, and mutation t , this step does not specifically retain the elite; merge the parent population and the child population to obtain R t =P t ∪Q t ; For the combined population R t Perform non-inferior classification and calculate the crowding distance of each individual in each front end of the non-inferior classification; prune the population R according to the non-dominated sequence value and crowding distance of each individual t , and get the next generation population P t+1 The generation process of the new population is as follows: Figure 5 shown.
[0156] Generate a new population, the next generation population P t+1 The specific steps are as follows:
[0157] ① Merge parent population P t and subpopulation Q t , and get the merged population R t =P t ∪Q t ; New population P t+1 The solution set is initialized to 0;
[0158] ② For the combined population R t Perform non-inferior classification of level 1 and obtain the optimal solution of level 1, that is, obtain the individuals in the first front end;
[0159] ③ If the new population P t+1 The solution set plus the number of optimal solutions of level 1 is less than the population size A, then in the new population P t+1 Add the optimal solution of level 1 to the solution set, and perform the next level of non-inferior classification to obtain the optimal solution of the next level, that is, obtain the individual in the next front end, and continue to the next step; otherwise, find the individual with a larger crowding distance in the optimal solution of level 1 until the new population P t+1 After adding the individuals with larger crowding distance from the optimal solution of level 1 to the solution set, the number reaches the population size A, and the algorithm ends to obtain the new population P t+1 The final solution set of ;
[0160] ④Follow step ③ and continue to add new population P t+1 The optimal solution of the next level is added to the solution set until the number reaches the population size A, and the algorithm ends to obtain a new population P t+1 The final solution set.
[0161] (8) Termination conditions
[0162] The termination condition is used to determine whether the population stops evolving. There are two most commonly used termination conditions:
[0163] First, the termination iteration number T is specified. When the population evolves to the termination iteration number T, the algorithm stops running, and the current population is the optimal solution. The best individual in the current population is the optimal solution, and the best individual is the individual with the largest crowding distance in the first front end of the current population. For multi-objective genetic algorithms, the individuals at the first front end of the population at the termination iteration number T are all non-inferior solutions, and the algorithm outputs non-inferior solutions. The value range of the termination iteration number T is generally 100-10000. Here, it is necessary to estimate the termination iteration number T of the specific problem based on experience.
[0164] The second is to determine whether the new population is mature. When the population evolution slows down and reaches the specified conditions, the new population can be determined to be mature. The determination method is as follows:
[0165] The average fitness value of the kth objective function when the population evolves to the tth generation is:
[0166]
[0167] f represents the objective function; f(k) represents the kth objective function; k represents the objective function index, k = 1, 2, ..., K, K represents the number of objective functions; f(k) trepresents the average fitness value of the kth objective function when the population evolves to the tth generation; t represents the iteration number index, t=1,2,…,T, T represents the total number of iterations; represents the kth objective function value of individual a in the tth generation population; a represents the individual index, a=1,2,…,A, A represents the population size, that is, the number of solutions;
[0168] Given a threshold α, if after 5 consecutive iterations, all objective functions of the population satisfy f(k) t+1 -f(k) t ≤α, the new population is considered mature and the algorithm terminates. The value of the threshold α is determined according to the specific problem.
[0169] Example 1
[0170] like Figure 1 As shown, the mobilization resource allocation method based on the multi-objective optimization genetic algorithm of the present invention comprises the following steps:
[0171] S1, define the variables, objective function and constraints of the mobilization resource allocation plan, and build a mobilization resource allocation model.
[0172] The variable is: the amount of tasks x assigned to region i in the jth mobilization task ij , i=1,2,...,m, j=1,2,...,n, m is the number of regions, n is the number of mobilization tasks, and each mobilization task corresponds to a mobilization resource.
[0173] The objective function is:
[0174]
[0175]
[0176] Among them, c ij represents the unit transportation cost from the i region to the handover point of the jth mobilization task; C represents the total transportation cost, minC represents the minimization of transportation cost; D represents the total task difference, minD represents the minimization of task difference.
[0177] For the allocation of large-scale and critical resources, a non-negative multi-objective programming model is used with the following constraints:
[0178]
[0179] Among them, r j represents the resource requirement of the jth mobilization task; R ij R represents the reserve or mobilizable amount of region i for the jth mobilization task (mobilization resources); ij ′ represents the task amount of the jth mobilization resource assigned to region i.
[0180] For the allocation of scattered and small-scale resources, a 0-1 multi-objective programming model is used, and the constraints are:
[0181]
[0182] Among them, r j represents the resource requirement of the jth mobilization task; R ij R represents the reserve or mobilizable amount of region i for the jth mobilization task (mobilization resources); ij ′ represents the amount of task (mobilization of resources) assigned to the jth task in region i.
[0183] S2, design a multi-objective genetic algorithm for optimizing mobilization resource allocation schemes: define a mobilization resource allocation scheme as an individual, and define a certain number of mobilization resource allocation schemes as a population; the genes of each individual are composed of m gene segments, each gene segment contains n gene positions, and each individual includes m×n gene positions, and the gene value of each gene position is x ij .
[0184] S3, generate the initial population.
[0185] S4, take the initial population as the parent population P t Perform genetic operations, including selection, crossover, and mutation operations, to generate subpopulation Q t .
[0186] S5, merge parent population P t With subpopulation Q t , and get the merged population R t =P t ∪Q t ; For the combined population R t Perform non-inferior classification, classify into various front ends, and obtain the non-dominated sequence value of each individual in each front end.
[0187] S6, calculating the crowding distance inside each front end to obtain the crowding distance of each individual in each front end.
[0188] S7, select individuals according to the non-dominated sequence value and crowding distance of each individual in each front end to obtain the updated new population P t+1 .
[0189] S8, determine the current number of iterations or the updated new population P t+1 Whether the end condition is met, if the end condition is met, the multi-objective genetic optimization genetic algorithm is terminated and the updated new population P is output t+1 Otherwise, jump to step S5 and set the new population P t+1As the parent population, it continues to iterate until the end condition is met, ending the multi-objective genetic optimization genetic algorithm and outputting the updated new population.
[0190] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A mobilization resource allocation method based on a multi-objective optimization genetic algorithm, characterized in that: The following steps are involved: S1, define the variables, objective functions and constraints of the mobilization resource allocation plan, and build a mobilization resource allocation model; The variable is: the amount of tasks x assigned to region i in the jth mobilization task ij , i = 1, 2, ..., m, j = 1, 2, ..., n, m is the number of regions, n is the number of mobilization tasks, and each mobilization task corresponds to a mobilization resource; The objective function is: Among them, c ij represents the unit transportation cost from the i region to the handover location of the jth mobilization task; C represents the total transportation cost, minC represents the minimization of transportation cost; D represents the total task difference, minD represents the minimization of task difference; S2, design a multi-objective genetic algorithm for optimizing mobilization resource allocation schemes: define a mobilization resource allocation scheme as an individual, and define a certain number of mobilization resource allocation schemes as a population; the genes of each individual are composed of m gene segments, each gene segment contains n gene positions, and each individual includes m×n gene positions, and the gene value of each gene position is x ij ; S3, generate the initial population; S4, take the initial population as the parent population P t Perform genetic operations to generate subpopulation Q t ; S5, merge parent population P t With subpopulation Q t , and get the merged population R t =P t ∪Q t ; For the combined population R t Perform non-inferior classification, classify into various front ends, and obtain the non-dominated sequence value of each individual in each front end; S6, in population R t The crowding distance of each front end is calculated internally to obtain the crowding distance of each individual in each front end; S7, according to population R t The non-dominated sequence value and crowding distance of each individual in each front end of , select individuals, and get the updated new population P t+1 ; S8, determine the current number of iterations or the updated new population P t+1 Whether the end condition is met, if the end condition is met, the multi-objective genetic optimization genetic algorithm is terminated and the updated new population is output; otherwise, jump to step S5 and the new population P t+1 As the parent population, it continues to iterate until the end condition is met, ending the multi-objective genetic optimization genetic algorithm and outputting the updated new population.
2. The method for mobilizing resources based on a multi-objective optimization genetic algorithm according to claim 1 is characterized in that: In step S1, if a non-negative multi-objective programming model is used, the constraints are: Among them, r j represents the resource requirement of the jth mobilization task; R ij R represents the reserve or mobilizable amount of region i for the jth mobilization task (mobilization resources); ij ′ represents the task amount of the jth mobilization resource assigned to region i.
3. The method for mobilizing resources based on a multi-objective optimization genetic algorithm according to claim 1 is characterized in that: In step S1, if a 0-1 type multi-objective programming model is used, the constraints are: Among them, r j represents the resource requirement of the jth mobilization task; R ij R represents the reserve or mobilizable amount of region i for the jth mobilization task (mobilization resources); ij ′ represents the amount of task (mobilization of resources) assigned to the jth task in region i.
4. The method for mobilizing resources based on a multi-objective optimization genetic algorithm according to claim 1 is characterized in that: In step S5, the specific process of non-inferior classification is as follows: S51, solving all objective function values of all individuals in the current population according to the mobilization resource allocation model, wherein the population size is assumed to be A and the number of objective functions is assumed to be K; S52, initializing the non-dominated sequence values η of all individuals in the current population; S53, for individual a in the current population, according to all objective function values of individual a and all objective function values of all other individuals in the current population, compare the dominance relationship between individual a and other individuals in the current population one by one: if individual a is not inferior to other individuals in all objective functions, and is superior to other individuals in at least one objective function, then individual a is said to dominate other individuals, that is, individual a is superior to other individuals; S54, if individual a is in a dominant position with respect to all other individuals, then the non-dominant rank value rank[a] of individual a is 1, let a=a+1, and proceed to step S53 to examine the next individual; if individual a is not in a dominant position with respect to all other individuals, let a=a+1, and proceed to step S53 to examine the next individual; wherein a=1, 2, ..., A; S55, repeating steps S53-S54 until a=A+1, at which point all individuals in the first front end Front[1] of the non-inferior classification have been obtained, and the non-dominated rank values of the individuals in the first front end Front[1] are all equal to 1; S56, perform the same operation on the remaining individuals in the population except the first front end in the same manner as steps S53-S55, and obtain all individuals in the second front end Front[2] of non-inferior classification, where the non-dominated rank values of the individuals in the second front end Front[2] are all equal to 2; and so on, until all individuals in the current population complete the non-inferior classification.
5. The method for mobilizing resources based on a multi-objective optimization genetic algorithm according to claim 4 is characterized in that: The elite retention strategy is adopted to achieve fast non-inferior classification, specifically: Set two non-inferiority parameters for each individual: H a is the number of individuals in the population that have a dominant relationship with individual a; S a is the set of individuals dominated by individual a in the population; The process of fast non-inferior classification is as follows: First, calculate the non-inferiority parameter of all individuals in the population, namely H a and S a ; Then find H a = 0 are all placed in the first front end; Next, for individual a in the first front end, let the set S of individual a be a The parameter H of the internal individual b b Minus 1, that is, H b =H b -1; then find H b = 0 individuals are placed in the second front end; By analogy, we can eventually obtain all the front ends of non-inferior classification and complete the rapid non-inferior classification of the population.
6. The method for mobilizing resources based on a multi-objective optimization genetic algorithm according to claim 1 is characterized in that: In step S6, the crowding distance is calculated inside each front end, and the specific process is as follows: S61, for individuals in the same front end, initialize the crowding distance, and set the crowding distance distance[]=0, where the number of individuals in the front end is Z; S62. Re - sort the individuals in the same front in ascending order according to the k - th objective function value. Let locate(z) represent the individual stored at position z in the new sort. Then locate(1) is the individual with the smallest k - th objective function value, locate(Z) is the individual with the largest k - th objective function value, and value(z) represents the k - th objective function value of the individual at position z in the new sort; where z = 2,.., Z - 1; k = 1,2,..., K, and K is the number of objective functions. S63. For the individuals at the sorting edge positions, let the crowding distance of individuals locate(1) and locate(Z) under the k - th objective function be: distance_k[locate(1)] = distance_k[locate(Z)] = μ; S64. For the individual locate(z) at the middle position of the sort, its crowding distance under the k - th objective function is: distance_k[locate(z)] = (value(z + 1)-value(z - 1)); S65. If k < K, let k = k + 1, transfer to step S62, and repeat steps S62 - S64 to calculate the crowding distance of each individual in this front under the (k + 1)-th objective function; if k = K, then execute step S66. S66, the crowding distance of each individual is: the sum of the crowding distances of the individual under all objective functions, that is 7. The method for mobilizing resources based on a multi-objective optimization genetic algorithm according to claim 1 is characterized in that: In step S7, the specific way to select individuals is as follows: Randomly select any 2 individuals from the population. If the non - dominated rank values of the 2 individuals are different, preferentially select the individual with the smaller non - dominated rank value; if the non - dominated rank values of the 2 individuals are the same, preferentially select the individual with the larger crowding distance.
8. The method for mobilizing resources based on a multi-objective optimization genetic algorithm according to claim 1 is characterized in that: In step S7, a new population P is generated t+1 The specific process is as follows: S71, new population P t+1 The solution set is initialized to 0; S72, for the merged population R t Perform non-inferior classification of level 1 and obtain the optimal solution of level 1, that is, obtain the individuals in the first front end; S73, if the new population P t+1 The solution set plus the number of optimal solutions of level 1 is less than the population size A, then in the new population P t+1 Add the optimal solution of level 1 to the solution set, and perform the next level of non-inferior classification to obtain the optimal solution of the next level, that is, obtain the individual in the next front end, and continue to the next step; otherwise, find the individual with a larger crowding distance in the optimal solution of level 1 until the new population P t+1 After adding the individuals with larger crowding distance from the optimal solution of level 1 to the solution set, the number reaches the population size A, and the algorithm ends to obtain the new population P t+1 The final solution set of ; S74, continue to add new population P in the same manner as step S73 t+1 The optimal solution of the next level is added to the solution set until the number reaches the population size A, and the algorithm ends to obtain a new population P t+1 The final solution set.
9. The method for mobilizing resources based on a multi-objective optimization genetic algorithm according to claim 1 is characterized in that: The termination condition for the updated new population is: Judge whether the new population is mature. When the population evolution slows down to reach the specified condition, it can be determined that the new population has reached maturity, that is, the termination condition is satisfied. The determination method is as follows: The average fitness value of the k - th objective function when the population evolves to the t - th generation is: f represents the objective function; f(k) represents the kth objective function; k represents the objective function index, k = 1, 2, ..., K, K represents the number of objective functions; f(k) t represents the average fitness value of the kth objective function when the population evolves to the tth generation; t represents the iteration number index, t=1,2,…,T, T represents the total number of iterations; represents the kth objective function value of individual a in the tth generation population; a represents the individual index, a=1,2,…,A, A represents the population size, that is, the number of solutions; Given a threshold α, if after 5 consecutive iterations, all objective functions of the population satisfy f(k) t+1 -f(k) t ≤α, the new population is judged to have reached maturity.
10. The method for mobilizing resources based on a multi-objective optimization genetic algorithm according to claim 1, characterized in that: In step S4, the genetic operations include selection, crossover, and mutation operations.
Citation Information
Cited By
A farmland drought evaluation method and system based on nematode food web monitoring
CN122390237B