Designing Benchmark Generator for Dynamic Optimization Algorithm

Real-world problems always change over time. In the past two decades, many researchers have become increasingly interested in studying evolutionary optimization algorithms for dynamic problems owing to their great importance in real-world applications. Currently, there are no unified and mature test functions for dynamic problems, and the existing dynamic test functions are incapable of simulating a real dynamic environment. This study constructs a new benchmark test function generator for simulating dynamic environments that combine existing static benchmark functions and their related properties to form new dynamic test functions. It is simple to construct and conveniently control the dynamic properties by adjusting the corresponding parameters. Through a series of comparisons with the dynamic benchmark of the generalized dynamic benchmark generator (GDBG), the simulation results show that the dynamic test functions constructed by this generator can reflect different types of changing intensity.


I. INTRODUCTION
Many real-world problems are dynamic problems, and the fitness functions are not only related to the decision variables but also to the changing time, which is random and time-varying. For instance, owing to the complex structure and dynamic nature of the indoor environment, the strength of the wireless signal changes accordingly in indoor positioning, and the nodes of the wireless sensor network increase or decrease over time [1]. In logistics services, the real-time information sharing of logistics resources changes over time [2]. In data mining, the contents of the mined database are constantly updated [3]. In actual operation, solid oxide fuel cells are vulnerable to performance degradation over time [4]. New job arrivals and deletion of old tasks [5]. Because of their wide practical applications, dynamic optimization problems have aroused people's concern over the past 20 years. There have been regular annual special sessions and workshops dedicated to DOPs, such as the Congress on Evolutionary Computation(CEC) and the Genetic and Evolutionary Computation Conference(GECCO) workshops. In the vast amount of research The associate editor coordinating the review of this manuscript and approving it for publication was Md. Abdur Razzaque .
literature [6]- [9], any problems that change over time are considered dynamic or time-varying problems. Dynamic optimization problems(DOPs) are defined as a series of static optimization problems [10]- [12]. Each dynamic function is composed of one or several static functions, and a set of dynamic sequences is obtained by applying dynamic rules to the basis function. A DOP can be defined as follows [13]: where S is the search space, t is the time, f (X , t): S × T → R is the objective function that assigns a value to each possible solution X ∈ S. X = [x 1 , x 2 , . . . , x D ] is the vector of variables to be optimized and D is the number of variables.
To study the performance of evolutionary algorithms (EAs) in dynamic environments, developing proper dynamic benchmark generator is an important task [14], [15]. There are many DOP generators that can create dynamic test functions, which can be roughly divided into three types in this paper. For the first type, the environment is switched between several stationary problems or several states of a problem. For example, Cobb et al. proposed a switching function [16] to study a genetic algorithm in the changing tracking environment. The core idea is to construct two different landscapes, A and B, and there are three main ways to change. (i) Linear translation of all the peaks in landscape A; (ii) the global optimum randomly moves while the rest of landscape A is fixed; (iii) environmental oscillations between landscapes A and B, resulting in significant changes in the entire landscape. The second type of DOP generator constructs dynamic environments by reshaping a predefined fitness landscape. For example, Branke et al. suggested a dynamic benchmark problem, called the ''moving peaks'' benchmark (MPB) [17] problem. The fitness landscape consists of a number of randomly generated peaks, each of which has its own timevarying parameters, such as width, height, and position, a dynamic environment can be constructed by changing these three parameters. De Jong et al. suggested the DF1 benchmark problem [18], [19], which involves designing a static basic function from the problem at first, and then adding the dynamic characteristics required by the benchmark generator. Yang et al. used a rotating fitness landscape to reconstruct a continuous dynamic optimization problem generator(CDOPG) [20]. The principle of the problem is to use an orthogonal transformation matrix to periodically rotate a static landscape to create dynamic instances. The degree of change depends on the size of the rotation angle. Li et al. proposed a generalized dynamic benchmark generator(GDBG) in the dynamic optimization competition of IEEE CEC2009 [21]. This generator is a combination of existing ideas about landscape shifting, rotating, and using dynamic rules to control changes. It can realize the unification of a binary space, real space, and composite space. Dynamic control was achieved by setting different rotation angles. The third type of DOP generator is the benchmark generator in the combination domain. For example, dynamic match fitness [22] is a function based on static bit matching and finds a solution that matches a given string. Dynamic changes are introduced by changing the number of bits in the match-string. In addition, Yang et al. proposed the exclusiveor(XOR) benchmark generator [23], [24], which can not only take any static binary-coded functions to generate dynamic landscape problems by XOR operations, but the landscape structure was preserved after each change. Later, Yang proposed a decomposable trap function(DTF) [15] that is based on static unitation and trap functions. The static functions are made dynamic by time-varying the static parameters and changing the scales of the function values.
Through the analysis of the above three types of DOP benchmark generators, we conclude that the benchmark problem constructed by the first type of DOP generator is based on a single problem and is limited to the basic static test function. The second type of dynamic generator is still developed for specific problems or instances of specific problems. The third type of dynamic composite system also has some defects, such as the lack of more scalable dynamic instances. Although all the above DOP benchmarks can generate dynamic environments, the changing intensity of the dynamic environment is difficult to be simulated by using the DOP generators mentioned above. For example, the rotation method can change the environment, but the changing inten-sity is unknown to the researchers. As the changing intensity determines the specific operators of the dynamic optimization algorithm, the DOP generators need to have the ability to simulate different changing intensity environments to test the effectiveness of the designed dynamic optimization algorithm. This paper proposes a new method for constructing a DOP generator that combines two static functions to form a new dynamic test function. When compared with the previous DOP generator methods, the proposed new method has two obvious contributions: the first contribution is that the proposed new method is simple and easy to be implemented; the second one is that it is capable of adjusting the changing intensity of the dynamic environment by controlling the parameters of two static test functions, and therefore it is convenient for the researchers to test and evaluate their designed dynamic optimization algorithms. The experimental simulation results demonstrate that the designed new DOP generator can adjust the changing intensity of the dynamic environment, allowing for environmental changes of different intensities, including two levels of gradual and abrupt changes, and different intensity types from small to large changes.
The remainder of this paper is organized as follows. Section II briefly describes the mathematical model of the benchmark generator commonly used in the field of dynamic composition. Section III introduces a new benchmark generator model based on a dynamic environment. The corresponding experimental simulation and analysis of the results are presented in Section IV. Section V summarizes this study.

II. DYNAMIC COMPOSITE BENCHMARK GENERATOR MODEL
The dynamic composition functions were extended from the static functions developed by Liang et al. [25]. Owing to its strong practicability, it is widely used [21], [26]- [29]. In short, the composition function is a new type of composition that is weighted and aggregated by n basic functions. It can be described as [21]: where F(x, ξ, t) is the new composition function, ξ = In Eq.(2), the normalized weight w i of each basic function can be calculated as follows: where the parameter σ i is used to control coverage range, and a small σ i gives a narrow range for f i (x). D is the number of variables.
In Eq. (2), the normalized function f i (x) is obtained as follows: where C is a predefined constant, which is set to 2000 by default, and |f i max (x)| is the estimated maximum value of f i (x), which is estimated as where x max is the maximum of search space. In order to avoid the distribution of the local optimal solution along the coordinate axis and retain the attributes of the benchmark function, so M i is an orthogonal rotation matrix of D × D, calculated using the method provided by Salmon [30], the projection of a group of vectors x on the i − j plane is rotated θ degrees from the i-th axis to the j-th axis, the orthogonal rotation matrix algorithm as follows [27]: Step 1. Randomly select l dimensions (l is an even number) from the n dimensions to compose a vector r = [r 1 , r 2 , · · · , r l ].
Step 2. For each pair of dimensions r [i] and dimension Step 3. An orthogonal matrix M (t) is obtained as follows: [1] ,r [2] (θ (t)) · R r [3] ,r [4] where the change severity of θ is set to 1, and the range of θ is [0, 2π]. In the GDBG system [27], [31], there are six types of environmental change: small step, large step, random, chaotic, periodic, periodic change with noise. By changing the values of the above seven control parameters, seven different dynamic properties are presented. The six types of changes are described as follows.
Small step change (T 1): Large step change (T 2): (9) Random change (T 3): Chaotic change (T 4): Periodic change (T 5): Periodic change with noisy (T 6): where ξ is the change range of ξ , ξ severity is the change severity of ξ , ξ min is the minimum value of ξ , and noisy severity is the noisy severity in recurrent with noisy change. α ∈ (0, 1) and α max ∈ (0, 1) are constant values, which are set to 0.02 and 0.1 in the GDBG system. A logistics function is used in the chaotic change type, where A is a positive constant between (1.0, 4.0), and P is the period of recurrent change and recurrent change with noise. ϕ is the initial phase, r is a random number in (−1, 1), sign(r) returns 1 when x is greater than 0, returns −1 when x is less than 0, and 0 otherwise. N (0, 1) denotes a normally distributed one-dimensional random number with a mean of zero and standard deviation.

III. A NEW BENCHMARK GENERATOR
To better test dynamic optimization algorithms, benchmark generators should be simple, easy to analyze, and easy to simulate dynamic environments [32], [33], such as a large change environment and small change environment. In addition, the degree of change should be adjusted using the parameters to facilitate testing. Despite the benchmark generators mentioned above, the requirements for designing a benchmark generator are still not fulfilled. This study proposes a new method that combines different existing static benchmark functions and forms all types of dynamic environments. This section elaborates on three subsections: construction of the dynamic generator, generation of dynamic test functions, and types of environmental change.

A. CONSTRUCTION OF DYNAMIC ENVIRONMENT
To solve the dynamic optimization problem, the first task is to model the environment. Dynamic optimization means that the fitness function value of the candidate solution changes with the environment, which is changeable and time-varying.
To simulate a dynamic environment, several existing static benchmark functions (see Table 1) are applied to construct a dynamic benchmark function. The variables of the decision vectors of the benchmark functions in this study are randomly selected from the original decision vector X , but the dimensions of the benchmark functions are always consistent with the dimension of the original decision vector X because each variable has its own special meaning in the real world. When the variable is not selected, it is given a value of 0, which means that the variable has no effect on the final fitness value. For example, a dynamic composition function F(X ) is constructed by two basis functions, the Sphere and Rastrign functions, as shown in Eqs. (14), (15), and (16): where X is the original decision vector, and X 1 and X 2 are the decision vectors of the basis functions f 1 (X 1 ) and f 2 (X 2 ), respectively. D denotes the number of dimensions, and x is the variable of the basis function. The decision vector X k (k = 1, 2) is obtained through the vector X k left multiplied by the orthogonal matrix M , as described in equations (17) − (19). The purpose is to simulate the high correlation vector, which means that all variables in vector X k will be affected once one variable in X k changes. The variables of vector X k are randomly selected from the original decision vector X .
In order to illustrate this, the dimension of the original decision vector X is set three for simplicity, expressed as X = [x 1 , x 2 , x 3 ] , the ratio of the number of selected variables from the basis functions f 1 (X 1 ) and f 2 (X 2 ) is set 1:2 from the original decision vector. The variable chosen from the basis function f 1 (X 1 ) is set to x 2 , and the corresponding basis function f 2 (X 2 ) selects the other two variables x 1 and x 3 . Therefore, the vectors X 1 and X 2 are expressed as follows: The decision vectors of the basis functions f 1 (X 1 ) and f 2 (X 2 ) can be calculated by formulas (22) − (27) as follows: Substituting the decision vectors X 1 and X 2 into equations (15) and (16) to calculate the values of the basis functions f 1 (X 1 ) and f 2 (X 2 ): Finally, according to equation (14), the function value of the dynamic function F(X ) is expressed as: X 1 and X 2 constitute the current environment, which is denoted as {X 1 , X 2 } for the convenience of description. Over time, when the environment changes, the variables x i selected by X 1 and X 2 from the original decision vector X may be different, i ∈ [1, 2, . . . , D]. If the variables selected at the next moment are different from the variables at the current moment, it is considered that environmental change has occurred. The steps of the environment creation mechanism are as follows: Step 1. Initialize the vectors of X 1 and X 2 the basis functions f 1 (X 1 ) and f 2 (X 2 ) are initialized to 0. Note that their dimensions must be consistent with the original decision vector dimensions.
Step 2. Determine the number of dimensions' ratio N 1 :N 2 , which are randomly selected by the basis functions f 1 (X 1 ) and f 2 (X 2 ) from the original decision vector X .
Step 3. The indexes of all variables in the original decision vector X are arranged in a random order, and a new index vector can be obtained.
Step 4. Select the index of N 1 variables from the vector , obtain the vector 1 , and select the indexes of the variables from N 1 + 1 to D to obtain the vector 2 .
Step 5. Extract the variables from the original decision vector X one by one through the index values in the vectors 1 and 2 , and then store them in X 1 and X 2 , respectively.

B. GENERATION OF DYNAMIC TEST FUNCTIONS
Dynamic test functions can be generated by adding multiple basic functions that have different properties. First, the VOLUME 10, 2022 basis functions search for the global optimal solution in their respective decision spaces, and finally add the optimal solution to form the optimal solution of the dynamic composition test function. The dynamic composition test function CF(X ) can be described by the following formula: where X k = [x 1 , x 2 , . . . , x D ], X k is the decision vector of each basis function, X is the original decision vector, N is the number of basis functions used to construct the composition function. Five basic benchmark functions are used in this study. Table 1 lists the details of these five functions.

C. TYPES OF ENVIRONMENTAL CHANGE
Dynamic optimization problems in real life are changing, and the types of environmental changes may also be different. Hence, the environment constructed by the benchmark test function is mainly considered based on two features: change frequency and change intensity.

1) CHANGING FREQUENCY
The environmental change is mainly controlled by the preset number of function evaluations (FEs); when the number of FEs reaches the preset value, the dynamic generator is activated. In this study, the change frequency is set to two grades: rapid change and slow change. The changing frequency is mainly achieved by presetting the size of the FEs. Here, a popular optimization algorithm called the particle swarm optimizer (PSO) is applied to optimize a test function [34], and the parameters are listed in Table 2. Figure 1 shows the convergence characteristics of the PSO to the test function. When the FEs reaches the preset 1600, the environment changes for the first time; therefore, all the particles are re-initialized to find the optimal point in the new environment. It can be seen from figure 1 that the best function value has an obvious increase. As time passes, the sum of the FEs continuously accumulates. The following two changes are set to take the number of FEs at 6600 and 16600. Then, when the number of FEs reaches 36600, the environment changes for the fourth time. In summary, the first environment lasts 1600 FEs, which is denoted as FEs 1 = 1600, and then the number of FEs is increased to FEs 2 = 5000, FEs 3 = 10000, and FEs 4 = 20000 for each environmental change. It is obvious that the frequency of environmental change can be determined by the size of the FEs between the two environments. The smaller the FEs, the faster the changing frequency; conversely, the larger the FEs, the slower the changing frequency. Figure 1 shows the changing frequency from fast to slow and then from slow to fast.

2) CHANGING INTENSITY
In the process of dynamic problems, the changing intensity has a significant impact on the optimization problems. When a drastic environmental change is detected, the essence of the problem changes. The previously preserved optimal point cannot be applied to this new environment. If there is only a small environmental change, the optimal point of the previous problem is still useful in this new environment. In this study, the intensity of environmental change is determined by the ratio of the number of dimensions randomly selected by the basis function from the original decision vector, and the different ratios indicate that the intensity of environmental change is different. For example, as described in Subsection A of Section III, if the dynamic test function has six dimensions and two basis functions, the current environment is denoted as {X 1 , X 2 }, and the following changed environment is {X 1 , X 2 }, where the vectors X 1 , X 2 , X 1 , and X 2 are expressed as follows: The environment {X 1 , X 2 } is compared with {X 1 , X 2 } where the dimensional ratio of the two basis functions selected from the original decision vector is 1:5, and the dimensional ratio of the two basis functions selected from the original decision vector is 2:4. Owing to the different nature of the basis functions and their different effects, it is clear that the environment has changed from {X 1 , X 2 } to {X 1 , X 2 }. If there is another environment {X 1 , X 2 } expressed as follows: The dimensional ratio of the two basis functions selected from the original decision vector is 5:1. Compared with the environment {X 1 , X 2 }, the {X 1 , X 2 } has a larger change because of the larger difference in the number of selected variables from the original decision vector; therefore, the changing intensity can be controlled by adjusting the dimensional ratio of the basis functions. The algorithm steps of the changing intensity using the two basis functions are as follows: Step 1: Determine whether the number of FEs reaches the preset value of environmental change; if it reaches the preset value of environmental change, execute Step 2 to Step 5; otherwise, continue to search for the optimal solution in the current environment.
Step 2: Determine the dimensional ratio N 1 :N 2 randomly selected by the basis function from the original decision vector X .
Step 3: According to the dimensional ratio in Step 2, randomly select variables of N 1 dimensions from the original vector X , record the indexes of these variables, and store them in vector 1 , and the indexes of the remaining N 2 variables are stored in vector 2 .
Step 4: Use index vectors 1 and 2 to extract variables from the original decision vector X individually, and then store them in X 1 and X 2 , respectively.

IV. EXPERIMENTS AND RESULTS ANALYSIS A. EXPERIMENTAL DESIGN 1) SETTING TEST FUNCTIONS AND ALGORITHM
From the descriptions in Section III, the dynamic test functions can be obtained by combining basis functions with different properties. In the dynamic experiments, six different dynamic composition functions (CFs) are created using the basis functions listed in Table 1, and the PSO algorithm is applied to simulate these dynamic composition functions.
Since the PSO algorithm converges slower in the later stages of the search, we introduced a dynamic adjustment strategy based on the betarnd(a, b) function [35] for the inertia weight of the PSO algorithm, the specific expression for its dynamic inertia weights is as follows: where T max denotes the maximum number of particle iterations, t denotes the t-th iteration count, and w max and w min are the maximum and minimum values of the inertia weights, respectively. σ is the inertia adjustment factor, and betarnd(a, b) generates a random number that obeys a beta distribution, a and b are the two parameters. The parameters of the PSO algorithm are listed in Table 2. The six new dynamic composition functions are as follows: The number of environmental changes is set to four, that is, when the number of FEs reaches 1600, 6600, 16600, and 36600, the environmental change will occur; therefore, the FEs for each change are 5000, 10000, and 20000, respectively. In summary, the changing frequency is gradually reduced. Corresponding to each change, the dimensional ratios randomly selected by the basis functions f 1 (X 1 ) and f 2 (X 2 ) from the original decision space are set as 5:25, 10:20, VOLUME 10, 2022 15:15, 20:10, and 25:5, respectively. Therefore, the change in the intensity gradually increases. Fig.2 shows a flowchart of the designed dynamic environment.

2) DETECTING ENVIRONMENTAL CHANGES
The algorithm is required not only to search for the optimal solution, but also to detect whether the environment has changed precisely. There are two frequently used methods for detecting environmental changes [36]. The first is to use a re-evaluation method to detect changes in the environment. The detector can be a sub-population [37], it can also be a global optimal solution and a global sub-optimal solution [38], or a group of solutions is randomly selected in the solution space [39]. The algorithm re-evaluates the fitness value of the detector before each iteration; when the algorithm detects that the fitness of the detector has changed, it is considered that the solution environment is changed. The second is to detect environmental changes based on algorithm behavior. For example, a similarity detection operator [40] determines whether the environment has changed. In [41], where the swarm was divided into a tree-based hierarchy of sub-swarms, environmental change was detected based on the observation of changes in the hierarchy itself. In [42], a memory-based linear regression method was used to detect when and how the environment changed. In this study, a fixed set of detectors is used to detect the environmental changes. Before updating the global optimal value of each particle, the fitness values need to be re-evaluated. If their fitness values have changed, it indicates that an environmental change has occurred; otherwise, the environment has not changed.

3) CHANGING RESPONSE
In general, there are some connections among environments, and the previous information can provide an effective experience for the algorithm to search in a new environment. Therefore, it can be used to improve the search efficiency of the algorithm; however, if the environment has changed drastically, it means that the previous information cannot provide any help to the algorithm's decision-making in the new environment. For this type of situation, re-initialization is a better choice. Therefore, when a change is detected in the environment, reasonable dynamic measures should be adopted to respond to changes. Many methods have been proposed. In [43], a strategy for decomposing decision variables was proposed, through which all the decision variables were divided into two groups according to the interval similarity between each decision variable and interval parameters. Then, two sub-populations were utilized to cooperatively optimize the decision variables in the two groups. Meanwhile, a strategy based on the change intensity and a random mutation strategy were employed to rapidly track the changing Pareto front of the optimization problem. In [44], a cooperative co-evolutionary strategy based on environmental sensitivity was proposed. In this strategy, all decision variables were first divided into two sub-components according to their interrelationships with the environment. Furthermore, differential prediction and Cauchy mutations were used to collaboratively optimize the two sub-components to accelerate their response to environmental changes. Other methods, such as memory-based methods, enhancing diversity, and introducing multiple groups [45]. As the main purpose of this study is to design dynamic test functions, a simple re-initialization method is applied for all change situations.  Table 3. Meanwhile, a twotailed t-test with 58 degrees of freedom at a 0.05 level of significance is applied to analyze the initial values' difference between the former environment and the subsequent latter environment. The results are listed in Table 4.
By observing the experimental results from Fig.3 to Fig.8, it is obvious that the consumption of FEs is increased for each environmental change, which is in accordance with our previous experimental setting. As for the changing intensity, environment 1 takes five variables from the basis function f 1 (X 1 ) and 25 variables from f 2 (X 2 ). As more of the variables are involved from f 1 (X 1 ) and less of those from f 2 (X 2 ) for each environmental change, this means that the dynamic   environment is more influenced by f 1 (X 1 ) and less influenced by f 2 (X 2 ). The initial values shown in Table 3 are consistent with this statement. The gradual increase in the initial value   indicates that not only does the environment change, but the changing intensity increases with the dimensional ratio. In other words, the parameter settings of the dimensional ratio can be used to adjust the changing intensity of the   dynamic environment. For example, a large change in the environment can be implemented by drastically changing the dimensional ratio from environment 1 to environment 5,  while a small change in the environment is achieved by adjusting the dimensional ratio within a small change.
In the dynamic environment of the GDBG, the re-initialization method is also adopted to respond to environmental changes. The environment changes when the FEs reaches 4000,8000, 12000, and 16000. Fig. 9 shows the composition of the sphere's function in GDBG's small step change type, and Fig. 10 shows the ones with GDBG's large step change type. Table 5 lists the parameter settings for the GDBG system. Table 6 also records the mean and standard deviation of the initial values within 30 times for GDBG in the large step change type. These test functions include the composition of Sphere's function(F2), composition of Rastrign's function(F3), composition of Griewank's function(F4), composition of Ackly's function(F5), and hybrid composition function(F6), the results of the t-test analysis are presented in Table 7. Based on these two figures and Table 6, it is clear that the GDBG method can make a small change, but it is very difficult to make a larger step change, and the degree of change in intensity cannot be controlled through parameter setting. Comparing Tables 4 and 7, it can be seen that the change in the initial values created by the proposed method is obvious, but the change created by GDBG in the large  The t -test of the initial values created by GDBG between the former environment and the following latter one.
step change type is indistinct. Therefore, this new dynamic benchmark generator has obvious advantages in simulating dynamic situations when compared with the GDBG method.

V. CONCLUSION
This study analyzes the shortcomings of the existing dynamic benchmark generators and proposes a new dynamic benchmark generator that is simple to construct. Through a series of comparisons with the GDBG, the test results show that the proposed dynamic benchmark is much better than GDBG in terms of controlling the changing intensity. Relying on the dimensional ratio that is randomly selected from the basis functions, the designed benchmark generator can adjust the changing intensity of each environment, which is critical for simulating the dynamic environment. In real-world dynamic problems, different dynamic situations need to adopt different strategies. Therefore, this new dynamic benchmark generator is helpful for researchers to simulate dynamic situations and test the designed dynamic optimization algorithms.