A multi-objective artificial bionical optimization method for knapsack problem
By employing a multi-objective artificial protozoan optimization method to simulate foraging, hibernation, and reproduction behaviors, and combining discretization and position update strategies, the problem of long computation time in traditional algorithms for large-scale multi-objective knapsack problems is solved, achieving efficient multi-objective optimization.
Patent Information
- Application Number
- CN202411991776.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Traditional algorithms struggle to effectively solve large-scale multi-objective knapsack problems within a reasonable timeframe, especially discrete multi-objective optimization problems, resulting in long computation times, high costs, and difficulty in finding high-quality optimal solutions.
A multi-objective artificial protozoan optimization method is adopted to simulate the foraging, hibernation and reproductive behaviors of artificial protozoa. The continuous solution space is transformed into a discrete solution space through discretization. The population position is updated by combining non-dominated sorting and crowding distance strategies to find a high-quality solution set.
It effectively balances global and local search, avoids getting trapped in local optima, improves the efficiency and accuracy of solving multi-objective optimization problems, and finds a better global solution.
Smart Images

Figure CN119882626B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of optimization calculation of knapsack problem, and particularly relates to a multi-objective artificial zoology optimization method for solving knapsack problem. BACKGROUND
[0002] With the rapid development of science and technology, the optimization problems in the fields of production practice, scientific research, economic management and daily life present unprecedented complexity. In the face of these challenges, traditional calculation methods face the problems of high computational complexity and long time consumption, especially when dealing with NP-hard problems, classical algorithms, constructive algorithms and local search algorithms often have difficulty in finding satisfactory solutions within a reasonable time. In order to overcome this difficulty, the scientific community actively explores and innovates a series of heuristic intelligent optimization methods.
[0003] Knapsack problem is a combinatorial optimization NP-complete problem, and its core is how to select a set of items to maximize the total value under the given total weight limit. Multi-objective knapsack problem is a multi-objective version of knapsack problem, and its core is to select a subset from a set of items to maximize (or minimize) multiple objective functions. This problem has wide application in production practice, scientific research, economic management and daily life.
[0004] With the complication of the number and properties of items in the knapsack, the solution challenge of multi-objective knapsack problem increases significantly, and its solution space and time complexity expands dramatically, showing an exponential growth trend. In the face of large-scale multi-objective knapsack problem, the huge solution space makes traditional calculation methods not only time-consuming and costly, but also difficult to effectively search for high-quality optimal solutions. In order to overcome these difficulties, it is particularly important to research and apply efficient search methods, aiming to achieve a good balance between solution time and solution accuracy. In this context, random optimization algorithms that simulate the process of natural evolution, such as multi-objective whale optimization algorithm (MOWOA), multi-objective particle swarm optimization algorithm (MOPSO), multi-objective grey wolf optimization algorithm (MOGWO) and multi-objective artificial bee colony optimization algorithm (MOABC), etc., have shown unique advantages.
[0005] Václav The artificial zoology optimization algorithm was proposed by the team in 2024, and it has attracted widespread attention due to its strong competitiveness. However, this artificial zoology optimization algorithm can only solve continuous single-objective optimization problems, and it has a large exploration space for discrete multi-objective optimization problems. Therefore, the multi-objective artificial zoology optimization method for solving knapsack problem has certain research value. SUMMARY
[0006] The purpose of the present application is to solve the technical problems in the above background, and propose a multi-objective artificial bion optimization method for solving knapsack problem, comprising the following steps:
[0007] S1, setting artificial bion population parameters and control parameter values, initializing the position and fitness value of each artificial bion in the artificial bion population;
[0008] S2, simulating the foraging, hibernation and reproduction behavior of artificial bion;
[0009] S3, updating the position and fitness value of artificial bion according to step S2;
[0010] S4, converting the continuous solution space into discrete solution space through discretization processing;
[0011] S5, selectively selecting part of the goods according to the characteristics of all goods;
[0012] S6, repeating steps S2-S5, iteratively updating the position and fitness value of artificial bion until the iteration termination condition is met.
[0013] In the preferred scheme, in step S1, first determine the problem dimension according to the actual problem, set the maximum population iteration number, and then carry out optimization calculation.
[0014] In the preferred scheme, in the initialization process, the position of artificial bion is randomly discretized, and the mathematical formula is:
[0015] X j ∈{0,1},j=1,2,3,…,n;
[0016] Where j is the population dimension, X j is the position of artificial bion corresponding to each population dimension.
[0017] In the preferred scheme, step S4 further comprises the following steps: first, use the transfer function T(X) to convert the space of the problem to the space [0,1), and then use the mapping method to convert the data to the discrete space, and the mathematical formula is:
[0018]
[0019] In the preferred scheme, step S5 further comprises the following steps: all goods are sorted from large to small, and a is randomly selected from the first percentage of goods and put into the knapsack, and the mathematical formula is:
[0020] c1=n*a,c2∈{1,2,…c1};
[0021] X k =1, k=B(c2);
[0022] Where n is the dimension of the item, a is 10, c1 is the number of items in the top 'a' percent, c2 is the random item selection index, and k is the mapping of the item selection index in the sorted knapsack.
[0023] In the preferred scheme, in step S6, when the iteration termination condition is met, the final non-dominated solution set is output.
[0024] In the preferred scheme, the location update formula for the foraging behavior of artificial protozoa under the influence of internal factors is as follows:
[0025]
[0026] in, This is the updated position, leader. i The leader is selected from the archive for the i-th iteration, f is the foraging factor between [0,1], ps is the population size, and np refers to the number of neighbor pairs among external factors. max This refers to the maximum number of neighbor pairs among external factors, X. i X is the position of the i-th artificial protozoan. j This represents the randomly selected j-th artificial protozoan position, ⊙ represents the Hadamard product, and iter represents the current iteration number. max X represents the maximum number of iterations. k- X represents an artificial protozoan with a ranking lower than i, randomly selected from the k-th pairing neighborhood. k+ w represents another randomly selected artificial protozoan with a higher ranking than i in the k-th pair neighborhood. a It is a weighting factor, and M f It is a mapping vector (1*dim) used for foraging, where each element is either 0 or 1, d i It is a dimensional index, d i ∈{1, 2, 3, ..., dim}.
[0027] In the preferred scheme, the location update formula for the foraging behavior of artificial protozoa under the influence of external factors is:
[0028]
[0029] Rand=[rand1, rand2, rand3,…,rand dim, ];
[0030] X near It is a nearby location, X i-k Let X represent the ikth artificial protozoan with rank ik selected from the kth pairing neighborhood.i+k represents the i+kth artificial bion in the i+kth pair of neighborhood selected with rank i+k, w h is a weight factor, ± represents X near is in different directions, Rand is a random number in the interval [0,1], leader i is the leader of the i-th iteration selected from the archive, r2 represents a random value uniformly distributed in the interval [0,2π], r3 represents a random value uniformly distributed in the interval [-2,2], r4 represents a random value uniformly distributed in the interval [0,1], and r1 is a random value constructed by the following formula:
[0031]
[0032] wherein, represents a constant, t represents the current iteration number, and T represents the maximum iteration number.
[0033] In the preferred scheme, the artificial bion in the hibernation behavior position updating formula is:
[0034]
[0035] X min =[lb1,lb2,lb3,…,lb dim ], X max =[ub1,ub2,ub3,…,ub dim ];
[0036] wherein, X min and X max represent the lower limit and the upper limit of the vector, respectively.
[0037] In the preferred scheme, the artificial bion in the reproduction behavior position updating formula is:
[0038]
[0039] wherein, ± represents that the disturbance can be positive or negative, and M r is a mapping vector in the reproduction behavior.
[0040] Compared with the prior art, the present application has the following beneficial effects:
[0041] (1) The present application inherits the basic framework of artificial bion, simulates the foraging, hibernation and reproduction stages, and can guide the search direction to turn to other unexplored areas for multi-objective optimization problems, so as to find a better global solution.
[0042] (2) In the location update process, the selected items have greater value and smaller weight by fully considering the characteristics of the items, which can promote the population to form a better pareto frontier. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 Pareto frontiers obtained by different algorithms on F1-20 test function.
[0044] Figure 2 Pareto frontiers obtained by different algorithms on F1-200 test function.
[0045] Figure 3 Pareto frontiers obtained by different algorithms on F1-450 test function.
[0046] Figure 4 Pareto frontiers obtained by different algorithms on F1-750 test function.
[0047] Figure 5 Pareto frontiers obtained by different algorithms on F2-20 test function.
[0048] Figure 6 Pareto frontiers obtained by different algorithms on F2-200 test function.
[0049] Figure 7 Pareto frontiers obtained by different algorithms on F2-450 test function.
[0050] Figure 8 Pareto frontiers obtained by different algorithms on F2-750 test function. DETAILED DESCRIPTION
[0051] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0052] The knapsack problem function used in this example is shown in Table 1, and the parameter settings of each algorithm are shown in Table 2.
[0053] Table 1 Knapsack problem function used in optimization calculation
[0054]
[0055] Table 2 Parameter settings of algorithms
[0056] Parameters MOWOA MOABC MOPSO MOGWO IMOAPO Population size 100 100 100 100 100 Archive size 100 100 100 100 100 Beta - - 4 4 - Gamma - - 2 2 -
[0057] When the multi-objective artificial bionics algorithm is used to solve the optimal value iteration, the problem dimension n is determined according to the actual problem (in the example, n = 10, 200, 450 and 750), and the maximum population iteration number is set to 400 to carry out the optimization calculation.
[0058] In the second step, the random parent population is generated in the problem space according to the value range and dimension of the problem to be solved, and the fitness value of each parent population is calculated according to the knapsack problem.
[0059] In the third step, iterative search is carried out.
[0060] Firstly, according to the iteration number, it is determined whether the iteration termination condition is met. If the iteration termination condition is not met, the population position updating is continued, otherwise the finally obtained non-dominated solution set is output, and the mapping of these non-dominated solution sets in the target space constitutes the pareto front.
[0061] The population position updating strategy is as follows:
[0062] The non-dominated sorting (NDS) and crowding distance (CD) are applied to the parent population, different position updating formulas are adopted according to the different behaviors of artificial bionics, the parent population and the new population are combined to create a new parent population. In addition, the non-dominated solutions are saved in the archive. These steps are repeated until the loop termination condition is met.
[0063] The foraging behavior position updating formula of artificial bionics under the influence of internal factors is as follows:
[0064]
[0065] wherein, is the updated position, leader i is the leader selected from the archive in the i th iteration, f is the foraging factor between 0 and 1, ps is the size of the population, np indicates the number of neighbor pairs in the external factor, np max indicates the maximum value of the number of neighbor pairs in the external factor, X i is the position of the i th artificial bionics, X j indicates the position of the j th artificial bionics selected at random, indicates the Hadamard product, iter indicates the current iteration number, iter max indicates the maximum iteration number, X k- represents an artificial bionics with a lower rank than i selected at random in the k th paired neighborhood, X k+ indicates another artificial bionics with a higher rank than i selected at random in the k th paired neighborhood, w a is the weight factor, and M fis the mapping vector for foraging (1*dim), where each element is 0 or 1, d i is the dimension index, d i ∈{1,2,3,…,dim}.
[0066] The position update formula of the artificial zooids under the influence of external factors is:
[0067]
[0068] Rand=[rand1,rand2,rand3,…,rand dim ] (15)
[0069] X near is a neighboring position, Xi-k represents the i-kth artificial zooid selected from the kth paired neighborhood with the rank of i-k, Xi+k represents the i+kth artificial zooid selected from the kth paired neighborhood with the rank of i+k, ± represents the direction of X near may be in different directions, w h is a weight factor, where, leader i is the leader of the i-th iteration selected from the archive, r2 represents a random value uniformly distributed in the interval [0, 2π], r3 represents a random value uniformly distributed in the interval [-2, 2], r4 represents a random value uniformly distributed in the interval [0, 1], and r1 is a random value constructed by formula (16):
[0070]
[0071] wherein a is a constant usually assumed to be 2, t represents the current iteration number, and T represents the maximum iteration number.
[0072] The position update formula of the artificial zooids in the hibernation behavior is:
[0073]
[0074] X min =[lb1,lb2,lb3,…,lb dim ],X max =[ub1,ub2,ub3,…,ub dim ] (18)
[0075] wherein X min and X max represent the lower limit and upper limit of the vector, respectively.
[0076] The position update formula of the artificial zooids in the reproduction behavior is:
[0077]
[0078] wherein ''±'' indicates that the perturbation can be positive or negative, and M r is a mapping vector in the reproductive behavior.
[0079] The above process is a Monte Carlo numerical simulation process. To reduce the influence of random effects, N=10 Monte Carlo calculations are performed in this example.
[0080] To evaluate the performance of each algorithm, the evaluation index inverse generational distance (IGD) is used to evaluate the pros and cons of each algorithm. IGD mainly measures the distance between a set of obtained non-dominated solutions (solutions found by optimization algorithm) and the reference Pareto optimal front (Pareto-optimal front). The smaller the value of IGD, the closer the solution obtained by the algorithm to the ideal Pareto optimal solution. Table 3 is the simulation results of different algorithms on different test functions for the IGD evaluation index, Figures 1-8 The pareto front formed by different algorithms on different knapsack problems is shown.
[0081] Table 3 Simulation results of different algorithms on different test functions for the IGD evaluation index
[0082]
[0083]
[0084] It can be seen that the multi-objective artificial primary animal optimization algorithm (IMOAPO) proposed in the present application is obviously superior to other multi-objective optimization algorithms, indicating that IMPAPO can effectively balance global search and local search, avoid falling into local optimal solution, and thus provide a high-quality solution set for multi-objective optimization problems.
[0085] The above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A multi-objective artificial bionical optimization method for solving knapsack problem, characterized in that: The method comprises the following steps: S1, setting artificial native animal population parameters and control parameter values, initializing the positions and fitness values of each artificial native animal in the artificial native animal population; S2, simulating the foraging, dormancy and reproduction behaviors of the artificial native animals; S3, updating the positions and fitness values of the artificial native animals according to step S2; S4, converting the continuous solution space into a discrete solution space through discretization processing; S5, selectively selecting part of the articles according to the characteristics of all the articles; Sort all items by Sort all items by Sort all items by c1=n*a,c2∈{1,2,…c1}; X k = 1, k = B(c2); Wherein n is the dimension of the article, a takes 10, c1 is the number of the first a percent of the articles, c2 is a random article selection index, and k is a mapping of the article index selected in the ordered knapsack; S6, repeating steps S2-S5, iteratively updating the positions and fitness values of the artificial native animals until the iteration termination condition is met.
2. The multi-objective artificial bionical optimization method for solving knapsack problem according to claim 1, characterized in that: In step S1, first, the problem dimension is determined according to the actual problem, and after setting the maximum population iteration number, the optimization calculation is carried out.
3. The multi-objective artificial bionical optimization method for solving knapsack problem according to claim 1, characterized in that: In the initialization process, the positions of the artificial native animals are randomly discretized, and the mathematical formula is: X j ∈ {0,1}, j = 1,2,3,..., n; where j is the population dimension, X j is the position of the artificial zooids corresponding to each population dimension.
4. The multi-objective artificial bionical optimization method for solving knapsack problem according to claim 1, characterized in that: Step S4 Further comprising the following steps: first, the space of the problem is converted to the space [0, 1) by using the transfer function (X), and then the data is converted to the discrete space by using the mapping method, and the mathematical formula is:
5. The multi-objective artificial bionical optimization method for knapsack problem according to claim 1, characterized in that: In step S6, when the iteration termination condition is met, the finally obtained non-dominated solution set is output.
6. The multi-objective artificial bionical optimization method for knapsack problem according to claim 1, characterized in that: The foraging behavior position update formula of the artificial native animals under the influence of internal factors is: where, is the updated position, leader i is the leader of the i-th iteration selected from the archive, f is a foraging factor between [0, 1], ps is the size of the population, np refers to the number of neighbor pairs in the external factor, np max refers to the maximum value of the number of neighbor pairs in the external factor, X i is the position of the i-th artificial biont, X j represents the j-th artificial biont position randomly selected, ⊙ represents the Hadamard product, iter represents the current iteration number, iter max represents the maximum iteration number, X k- represents a randomly selected artificial biont with a lower rank than i in the k-th paired neighborhood, X k+ represents another randomly selected artificial biont with a higher rank than i in the k-th paired neighborhood, w a is the weight factor, and M f is the mapping vector for foraging (1*dim), where each element is 0 or 1, d i is the dimension index, d i ∈{1, 2, 3, …, dim}.
7. The multi-objective artificial bionical optimization method for solving knapsack problem according to claim 6, characterized in that: The foraging behavior position update formula of the artificial native animals under the influence of external factors is: Rand = [rand1, rand2, rand3,..., rand dim ]; X near is a neighboring position, X i-k represents the i-kth artificial pioneer animal with rank i-k selected from the kth pair neighborhood, X i+k represents the i+kth artificial pioneer animal with rank i+k selected from the kth pair neighborhood, w h is a weight factor, ± indicates X near the i-th artificial pioneer animal is in a different direction, Rand is a random number in the interval [0, 1], leader i is the leader of the i-th iteration selected from the archive, r2 represents a random value uniformly distributed in the interval [0, 2π], r3 represents a random value uniformly distributed in the interval [-2, 2], r4 represents a random value uniformly distributed in the interval [0, 1], and r1 is a random value constructed by the following formula: Wherein, a is a constant, t represents the current iteration number, and T represents the maximum iteration number.
8. The multi-objective artificial bionical optimization method for solving knapsack problem according to claim 7, characterized in that: The dormancy behavior position update formula of the artificial native animals is: X min = [lb1, lb2, lb3,..., lb dim ], X max = [ub1, ub2, ub3,..., ub dim ]; where X min and X max represent the lower and upper bounds of the vector, respectively.
9. The multi-objective artificial bionical optimization method for solving knapsack problem according to claim 8, characterized in that: The reproduction behavior position update formula of the artificial native animals is: where ± indicates that the perturbation can be positive or negative, and M r is a mapping vector in the reproductive behavior.
Citation Information
Patent Citations
0-1 knapsack problem solving method and article scheduling method based on hybrid whale algorithm
CN115759429A
Multi-target network reconstruction method and system for power distribution system
CN116093995A