# A Phase Angle-Modulated Bat Algorithm with Application to Antenna Topology Optimization
## 4 Experimental Results and Discussions
### Zero-One Knapsack Problems  
The 0-1 knapsack problem is a common and typical combinatorial optimization non-deterministic Polynomial complete (NP-C) problem, which is often used for numerical testing of binary optimization algorithms. The knapsack problem was first proposed by [PERSON] in 1957 [40,41]. Classical 0-1 knapsack problems can be described as follows:  
\[ \begin{array}{l}\max f(p)=\sum\limits_{i=1}^{N}p_{i}x_{i}\\ s.t.=\left\{\begin{array}{l}f(w)=\sum\limits_{i=1}^{N}w_{i}x_{i}\leq C\\ x_{i}=0,1\,(i=1,2,\cdots,N)\end{array}\right.\end{array}  \tag{15}\]  
where \(p_{i}\) and \(w_{i}\) represent the profit and weight of the individual items \(i\), \(N\) is the number of individuals, and \(x\) represents the decision variable of the \(i\)-th item. If the item \(i\) is packed, \(x\) takes 1; otherwise, \(x\) takes 0. The backpack problem can be described as follows: On the premise of ensuring that the total weight \(f(w)\) of the objects in the backpack does not exceed the maximum capacity \(C\) that the backpack can bear, we find the distribution strategy with the highest total value \(f(p)\) of the items. The profit and weight of the items are positive. In this paper, 12 different dimensional test examples of the knapsack problem were selected to compare P-AMBA with other optimization algorithms. The data of the classic knapsack problem test cases k1-k5 are shown in Table 1, where 'D' represents the dimension of the backpack, that is, how many items are there. 'Parameter (\(w\), \(p\), C)' represents the weight and value of the item and the maximum load capacity of the backpack, respectively, while 'Opt' is the optimal value for this instance. Meanwhile, cases k6-k12 are high-scale knapsack problems. The item data are generated by a random generator to compare the application of several optimization algorithms in a high-dimensional environment. The weight \(w_{i}(i=1,2,\cdots,N)\in[5,20]\), and the profit \(p_{i}(i=1,2,\cdots,N)\in[50,100]\)[42]. The relevant data of these randomly generated backpack items are shown in Table 2. The 'Total values' denotes the total values of all items. In the k6-k12 cases, the formula \(\frac{3}{4}\sum_{i=1}^{N}w_{i}\) was used to calculate the total capacity of items in the backpack. For the example test of the knapsack problem, the classic BPSO [23], the traditional BBA [22], the AMBA [27], and the A-AMBA [28] (the latter two also used the idea of angle modulation) were selected for comparison with the proposed P-AMBA. The relevant parameter settings of the optimization algorithms in the verification tests are shown in Table 3. The parameter range is set according to [28], which is suitable for the knapsack problem. In order to objectively compare the optimization capabilities of different optimization algorithms, the parameter settings of this paper are all initial settings. The population size was set to 30, and the number of iterations was set to 500. To avoid accidental deviations, the algorithm was run 30 times independently for each function. Table 4 shows the test results of the five optimization algorithms after the optimization, including the maximum, minimum, average, standard deviation, and optimization time. In the table, 'No.' and 'Alg.' represent the test examples and the optimization algorithm types of the knapsack problem, respectively. 'Best' represents the maximum value of the 30 population optimal values, which is the optimal value that the optimization algorithm can find in the optimization process. 'Worst' represents the worst value of the optimal value of the 30 populations. 'Mean' is the average optimal value of the 30 optimization results. 'Std' is the standard deviation, reflecting the degree of dispersion of the 30 optimization results. 'Time' is the average time consumed for each optimization, reflecting the optimization speed of the optimization algorithm.