A Multi-Verse Optimizer with Levy Flights for Numerical Optimization and Its Application in Test Scheduling for Network-on-Chip

We propose a new meta-heuristic algorithm named Levy flights multi-verse optimizer (LFMVO), which incorporates Levy flights into multi-verse optimizer (MVO) algorithm to solve numerical and engineering optimization problems. The Original MVO easily falls into stagnation when wormholes stochastically re-span a number of universes (solutions) around the best universe achieved over the course of iterations. Since Levy flights are superior in exploring unknown, large-scale search space, they are integrated into the previous best universe to force MVO out of stagnation. We test this method on three sets of 23 well-known benchmark test functions and an NP complete problem of test scheduling for Network-on-Chip (NoC). Experimental results prove that the proposed LFMVO is more competitive than its peers in both the quality of the resulting solutions and convergence speed.

Multi-verse optimizer (MVO) is a promising and up-to-date optimization algorithm proposed by [16]. As the name implies, it is inspired by the theory of multi-verse in physics. The three main concepts of the multi-verse theory (white hole, black hole, and wormhole) are the basis for the MVO algorithm. The concepts of white hole and black hole were utilized to explore search spaces by MVO. The wormholes help MVO exploit the search spaces. The A universe with a higher inflation rate is highly probable to have white holes and tend to send objects through white holes, whereas a universe with a lower inflation rate is highly probable to have black holes and tends to receive objects through black holes. The white/black hole tunnels are used to exchange objects between different universes. Despite the inflation rate, objects in all universes have a high probability of shifting to the best universe via wormholes.
A roulette wheel selection (RWS) is adopted to mathematically model the exchange of objects between universes and the white/black hole tunnels. At each iteration, one of the universes is chosen by the RWS to have a white hole based on its inflation rate.
Assume that U ¼ x 11 x 12 Á Á Á x 1d x 21 where d indicates the number of parameters (variables) and n denotes the number of universes (candidate solutions): where x ij expresses the jth parameter of the ith universe, x kj expresses the jth parameter of the kth universe selected by an RWS, r1 2 [0, 1] denotes a random number, U i denotes the ith universe, and NI(U i ) denotes a normalized inflation rate of the ith universe. The wormhole tunnels are always built between a universe and the best universe constituted so far to provide local changes for each universe and the high probability of refining the inflation rate via wormholes as follows: where X j is the jth parameter of the best universe constituted so far; travelling distance rate (TDR) and wormhole existence probability (WEP) are coefficient; ub j and lb j are the upper bound and the lower bound of jth variable, respectively; x ij denotes the jth parameter of the ith universe; and r2, r3and r4 are random numbers in [0, 1]. WEP is defined as the existence probability of wormholes in universes. To enhance exploitation during the progress of the optimization process, it increases linearly over the iterations.
where Wmin indicates the minimum (commonly set to 0.2), Wmax indicates the maximum (commonly set to 1), l is the current iteration, and L is the maximum iteration. TDR is defined as the distance rate by which an object can be teleported by a wormhole around the best universe obtained so far. To gain more precise exploitation/local search around the best universe, TDR is increased over the iterations.
where p (set to 6 in this paper) indicates the exploitation accuracy over the iterations. The general steps of the MVO algorithm are described as follows. The optimization process starts by creating a set of random universes. At each iteration, objects in the universes with high inflation rates incline to shift to the universes with low inflation rates through white/ black holes. Simultaneously, objects in each universe have the chance to randomly teleport to the best universe via wormholes. This process continues until it is terminated by satisfying an end criterion (e.g., maximum iterations).

Brief overview of Levy flights
In general terms, Levy flights are a random walk whose step length obeys the Levy distribution. The Levy distribution is often in accordance with a simple power-law formula L(s) * |s| −1−β , where 0 < β 2 is an index. Mathematically a simple version of the Levy distribution can be described as [18,20] Lðs; g; mÞ ¼ where μ denotes a location or shift parameter and γ > 0 denotes a scale parameter. According to Fourier transform, a Levy distribution can be defined where α indicates skewness or scale factor and β indicates Levy index. The inverse of this integral does not have an analytical form for the general β except for a few special cases. For the case of β = 2, we have whose inverse Fourier transform corresponds to a Gaussian distribution. For the case of β = 1, we have which corresponds to a Cauchy distribution pðx; g; mÞ ¼ 1 p where μ is the location parameter and γ is the scale parameter.
For the general case, the inverse integral can be evaluated only when s is large enough. We have where Γ(z) expresses the Gamma function When z = n is an integer, we have For exploring unknown, large-scale search spaces, Levy flights are superior to Brownian random walks [20,26].

The proposed LFMVO algorithm
In the original MVO algorithm, when wormholes stochastically re-span a number of the solution universes around the best solution achieved over the course of iterations, the MVO is likely to get trapped in the local optima.
If the universes cannot improve self-solutions, they are re-formed with Levy flights such that the best universe obtained so far is affected and being trapped in local optima is prevented.
In the proposed method, when generating new solutions U tþ1 i (for universe i), a Levy flight is executed where K is the Levy weight that controls the impact of the previous universe on the current universe, Lb is the lower bound of the feasible region, and Ub is the upper bound of the feasible region. It should be noted that a larger Levy weight inclines to facilitate a global search, while a smaller Levy weight to facilitate a local search. Therefore, the Levy weight K is crucial to the convergence behavior of MVO. A suitable value for the Levy weight usually provides a balance between global exploration and local exploitation and results in refined solutions. To achieve a trade-off between exploration and exploitation and to accelerate convergence speed, we proposed a Levy weight that linearly decreases over the course of iterations. In the early stages, a relatively large Levy weight is adopted to coarse-tune the whole search area. At the end stages, a relatively small Levy weight is adopted to fine-tune the current search area. This adaptive Levy weight factor (ALWF) is determined as follows.
where Max_Iter is the maximum iterations, t is the current iteration.
It is not trivial to generate step size s samples using Levy flights [27]. There are several approaches to achieve step size samples, but the direct and efficient approach is to adopt the Mantegna algorithm [28]. In Mantegna's algorithm, the step size s can be described by where u and v are drawn from normal distributions. That is Thus, a simple scheme can be depicted as where β is a constant (= 1.5) and σ is measured in Eq (19). Based on the above, the pseudo code of the LFMVO is shown in Algorithm 1.  (4) and Eq (5) BHI = i; Update U using Eq (15) Step 4: Termination Output BU and NI(BU) In step 1, the universes are randomly generated in a feasible region using Eq (23) for a given optimization problem. Let UP represent the universe population, which can be denoted as follows: where n is the number of universes and i = 1, 2,. . ., n. Each universe U i can be expressed as where d is the number of variables and j = 1, 2,. . ., d.
where Lb j is the lower bound of the jth variable, Ub j is the upper bound of the jth variable, and rand(0, 1) represents a random number in [0, 1].
In step 2, we sort the universe population into a non-decreasing order and normalize the inflation rate (fitness) of the universes.
Step 3 is the process of iterative optimization. First, we evaluate the fitness of all universes NI(U i ) using Eq (13). Then, for each universe U i , we update WEP and TDR using Eq (4) and Eq (5), respectively. Next, we record the black hole index BHI and update the universes U using Eq (15). After that, we update each object x ij of the universes using Eq (2) and Eq (3).
In step 4,when the end criterion is satisfied, the optimal objective function value NI(BU) and the optimal solution BU are obtained.

Experimental Results and Discussion
To evaluate the performance of the proposed LFMVO algorithm, 23 standard benchmark functions are employed. These functions are well-known and have been widely adopted by many researchers. The functions are shown in Table 1, where d is the dimension of the function and f min represents the optimum value of the function. The optimum values of functions f1-f13 are zero except for f8 which has an optimum value of -418.9829 Ã d.All the functions f14-f23 have nonzero optimum values. The benchmark functions can be divided into three groups: unimodal benchmark functions (f1-f7), multi-modal benchmark functions (f8-f13), and fixed-dimension multimodal benchmark functions (f14-f23). The unimodal benchmark functions have one global optimum. However, the multi-modal test functions have a global optimum, and the number of local optima increases exponentially with the dimensions. The fixed-dimension multimodal benchmark functions have only a few local optima.
We set the dimension of the test functions (f1-f13) to 40. To have a fair comparison, all algorithms have the same population size (set to 60) and the same maximum number of iterations (set to 600). We run each algorithm 40 times so that we can execute significant statistical analysis (e.g., best, mean and standard deviation). The parameter settings of the algorithms, which are commonly used in the literature, are provided in Table 2. For verification of the results, we compare the LFMVO algorithm with MVO, PSO and MFO, as shown in Tables 3-5.

Results analysis of unimodal test functions
Since a unimodal benchmark function has one global optimum, it is suitable for benchmarking the convergence rates (exploitation) of algorithms. Table 3 lists the results of the benchmark functions f1-f7 for different algorithms. First, we rank the algorithm from the smallest mean solution to the largest mean solution. Then, we calculate the average rank with respect to these seven functions and determine the overall rank, as shown in Table 3. From the rank of each function, we see that the LFMVO results are superior to the other algorithms except for f6 where the PSO is better. However, LFMVO obtains the overall best rank. The experimental results show that the proposed algorithm has superior performance in terms of exploitation.

Results analysis on multi-modal test functions
The multi-modal test function has a global optimum, and the number of local optima increases exponentially with the dimensions. It is suitable for benchmarking the exploration of algorithms. Table 4 lists the results of benchmark functions f8-f13 for different algorithms. We ,100] 0 [-100,100] 0 [-5.12,5.12] 0 ,600] 0 i¼1 uðx i ; 10; 100; 4Þ  5] 0.0003075 [-50,50] -1.0316285 15] 0.398 [0,10] -10.1532 also adopt the rank scheme used in the previous sub-section. From the rank of each function, we can determine that the LFMVO are superior to those of other algorithms except for f11 and f13, where the PSO outperforms the LFMVO algorithm. Nevertheless, the LFMVO ranks best overall. The experimental results demonstrate that the performance of the LFMVO is highly competitive with respect to exploration and escape from poor local optima.

Results analysis on fixed-dimension multimodal benchmark functions
Compared with functions f8-f13, functions f14-f23 are simpler due to their lower dimension and fewer local minima. The results of benchmark functions f14-f23 for different algorithms are shown in Table 5. Though most algorithms were able to easily reach optima for functions f14-f23, we still rank these algorithms. Each of the algorithms can find the optimum at the best condition. For functions f16-f19, there are no differences among the approaches. From Table 6, we find that the LFMVO reaches better solutions than other algorithms.

Convergence analysis
To investigate the convergence behavior of the proposed algorithm, we compare the convergence curves of the LFMVO, MVO, PSO and MFO for four test functions. The convergence curves of functions f2 and f7 (unimodal test functions) are illustrated in Fig 1 and Fig 2. The convergence curves show that the LFMVO algorithm can successfully improve the fitness of all universes and find a better solution over the course of iterations. The  results of f2 and f7 demonstrate that the proposed algorithm has a very fast convergence speed. The reason is that objects in the universes with high inflation rates incline to shift to the universes with low inflation rates through white/black holes, so the fitness of all universes is get better over the course of iterations. Moreover, the proposed Levy flights phase can produce universes with long jumps that leads to quick convergence toward hopeful areas of the search spaces. The convergence curves of functions f9 and f10 (multimodal test functions) are illustrated in Fig 3 and Fig 4. The graphical results of f9 and f10 (multimodal test functions) show the superior local optima avoidance and global search ability of the LFMVO algorithm. The reason is that regardless of inflation rate, wormholes incline to exist stochastically in any universe which drive universes maintain the diversity over the course of iterations. In addition, Levy flights stage has the ability to escape from local optima and converge to the global optimum rapidly. We have provided the explanation between convergence and application in sub-section Convergence analysis.
The above results demonstrate the superior performance of the LFMVO algorithm in solving different benchmark functions compared with well-known algorithms. To further investigate the performance of the proposed LFMVO algorithm, a real engineering problem, which proved to be an NP complete problem, is solved in the following section.

The application of the LFMVO on NoC test scheduling optimization
In this section, we apply the LFMVO to practical engineering applications to investigate the applicability and feasibility of the proposed algorithm. We estimate the performance of the LFMVO in terms of an engineering design problem-an NoC test scheduling problem. We describe the engineering applications generally and present the relevant mathematical models in the following paragraphs.
The NoC design paradigm has been proposed as an alternative to the traditional Systemon-Chip (SoC) design paradigm for the next generation of complex Very Large Scale Integration (VLSI) [30]. The NoC is composed of IP cores, routers, resource interfaces and interconnection links. Due to the packet-switching network, the NoC provides high performance interconnection to embedded IP cores. However, testing embedded cores for NoC-based systems poses new challenges compared to traditional SoC [31].
Like traditional bus-based SoC, the general issues of the NoC system testing are composed of the test architecture design (test wrapper and TAM) and the test scheduling approaches. The test wrapper is the logic added around an embedded core, which is used to isolate the embedded core from surrounding logic and to offer test access to the core via a TAM. The TAM is the physical mechanism used to transport test stimuli and test responses for the cores. The test scheduling approach is employed to decide the test organization that targets test efficiency while considering all test constraints [32].
Testing is usually executed using automated test equipment (ATE), which offers test stimuli and estimates the test responses. ATE provides a limited number of tester pins (test channels) that can be used to send data to/receive data from the core-under-test (CUT). Inefficient use of tester pins (tester channels) has a negative impact on test cost [31].
In testing the embedded cores of NoC, we aim to minimize the test time while satisfying the test pins constraints and power constraints. The test time depends on the test architecture (test wrapper and TAM) and the corresponding test schedule with the test pins and power constraints. Here, we consider only the test wrapper proposed in [33] and a dedicated test access mechanism (TAM). The test scheduling problem for the NoC system can be defined as follows: in a NoC system, given the set parameters of cores Co, such that each core has a test time T(c) associated with the TAM width, the maximum test channels Nt for NoC, and the maximum power limit PoL for NoC, develop a test schedule, such that 1) Nt is not violated, 2) PoL is not violated, 3) the overall test time is minimized [18].
The embedded cores in a TAM are tested in series, and different TAMs are tested in parallel. The total test time is the sum of all the maximum test times for all the TAMs that are tested in parallel.
We introduce binary variables y ij (1 i N and 1 j B) that are used to determine the assignment of cores to TAMs in the NoC. Each core in the system must be assigned to exactly one TAM.
We can formulate this unity condition by y ij defined in Eq (24) with the unity condition formulated in Eq (25). The time needed to test all cores on TAM j is given by Since all the TAMs can be tested in parallel, the overall test time equals The core test time is associated with the transmit bandwidth of the test data. Assuming that core i is assigned to TAM bandwidth w, the test time T i (w j ) is defined by Eq (28): where S in (S out ) denotes the length of the longest wrapper scan-in (scan-out) chain for a core and np denotes the number of test vectors. T i (w j ) is calculated with a Best Fit Decreasing (BFD) algorithm for wrapper design from [31]. The total test pins used by the cores cannot exceed Pin max during the whole test process. We can formulate the test pins used, Pin t used , during time slot t as follows: where Pin max is the total number of test pins available for testing. l t i is defined by Eq (30): where TS i and TE i are the test start time and test end time of core i, respectively. Although increasing the number of TAMs can effectively shorten the test time and reduce the test cost, it can lead to increasing test power. Therefore, to ensure the viability of the test, power must be constrained during the test.
In any test slot t, power consumption must satisfy where P testi is the power consumption on core i, and P max is the maximum power consumption allowed for the system. Therefore, test scheduling for NoC can be formulated as follows: For the experiments, we used three SOCs from the ITC'02 SoC Test Benchmarks [34]: d695, p22810 and p93791 (see Table 6). We change the problem structure to use much bigger cases for the sake of observing convergence. In others words, we artificially constructed a hybrid system named hy629 including one d695, one p22810 and one p93791.
To compare conveniently, we used the same parameters as in the previous section. Every algorithm was run independently 40 times, and the best results of each algorithm for d695, p22810, p93791 and hyd629 are expressed in Tables 7-10, respectively.
The shortest test results times among the four algorithms are indicated by bold font for each method. From Table 7, we find that the four algorithms obtain the same results in most cases because d695 has the smallest scale among the three benchmarks. However, as the scale increases, the proposed algorithm yields the smaller test time in each category than the three reference methods. The experimental results of Tables 8-10 verify this statement. To further investigate the performance of the LFMVO (especially on the border/critical cases), we show the boxplots of the four algorithms for the different test benchmarks in Figs 5-8. Figs 5-7 show the condition Pin max = 256 and P max = 100%. Fig 8 shows the condition Pin max = 512 and P max = 100%. From Figs 5-8, we can see that the LFMVO outperforms other algorithms with respect to robustness and optimization accuracy. The reason of the superior results of LFMVO on application is that this proposed algorithm efficiently gains a balance between exploration and exploitation. For one, the concepts of white/black holes and Levy flights promote exploration, which can maximize the efficiency of resource searches in uncertain search space. For another, adding the existence of wormholes guarantees exploitation around the most hopeful area of the search space. In general, our proposed algorithm yields the higher performance in each statistical parameter than the three reference methods.

Conclusions
A new algorithm named LFMVO is proposed in this paper, and it improves the performance of the MVO by incorporating Levy flights. The Levy flights component is introduced to enhance the global search ability of the MVO and its ability to escape from local optima. Experimental results on three sets of 23 well-known benchmark functions have verified that the proposed LFMVO has outstanding performance in speed of convergence and precision of the solution for global optimization in most cases. A real engineering application using NoC test scheduling optimization confirms that our proposed algorithm outperforms several stateof-the-art algorithms. This superior performance proves that the Levy flights are a promising way of strengthening the searching performance of MVO. Current studies implies that the LFMVO is a powerful and universal approach; it should be investigated further in several applications of engineering optimization problems, such as cloud computing, big data, smart city and vehicular named data networks [35][36][37][38][39][40][41][42][43][44][45]. Our future work is to extend the LFMVO to these fields.