#### 3.2. The Idea of the Proposed Algorithm

An algorithm was proposed for solving the BLPP based the HEM combined with the decision-making process of the BLPP. The genetic representation of each individual depends on the upper and lower solution rather than only one decision maker, so the lower maker passes on the relevant optimal solutions to the upper to construct the individual genetic representation. The lower level problem can be regarded as a common nonlinear programming problem under the circumstances that the upper level decision variable is given. Therefore, in the presented algorithm, the HEM focuses on the upper level problem and controls the evolution tendency for two level problems while the lower level problem is dealt with by GA.

To solve the BLPP using the HEM, we redefine how to generate the individuals. Firstly, let us define the following:

$x={({x}_{1},{x}_{2},\cdots ,{x}_{{n}_{x}})}^{T}$: upper level decision variable,

$y={({y}_{1},{y}_{2},\cdots ,{y}_{{n}_{y}})}^{T}$: lower level decision variable,

$F$: upper level objective function,

$f$: lower level objective function,

$N$: quantity of new individuals.

As mentioned above, the exhaustive process of generating new individuals is elaborated as following.

Step 1: Randomly produce the upper decision variables of size $N$ denoted by $X=({x}_{1},{x}_{2},\cdots ,{x}_{N})$. In this part the individual genetic representation cannot be defined.

Step 2: For each upper variable viewed as the known variable, solve the lower problem using genetic algorithm and obtain the relevant solution noted by $Y=({y}_{1},{y}_{2},\cdots ,{y}_{N})$. And then all the lower optimal solutions are transmitted to the upper.

Step 3: Based on X and Y, we will obtain the genetic representation of each individual $g{r}_{i}=({x}_{i}^{T},{y}_{i}^{T})=({x}_{i1},{x}_{i2},\cdots ,{x}_{i{n}_{x}},{y}_{i1},{y}_{i2},\cdots ,{y}_{i{n}_{y}})$, where $i=1,2,\cdots ,N$. As of this stage, we get a new population of size $N$, where the genetic representation and effect are expressed as $GR=(g{r}_{1};g{r}_{2};\cdots ;g{r}_{N})$ and $GE=(g{e}_{1};g{e}_{2};\cdots ;g{e}_{N})$ respectively. Moreover, we must adjust the population so as to ensure each individual meet the constraints.

Step 4: Randomly generate the genetic effect for each individual denoted by $g{e}_{i}=(g{e}_{i1},g{e}_{i2},g{e}_{i3},g{e}_{i4})$. Where $g{r}_{i1}$,$g{r}_{i2}$,$g{r}_{i3}$,$g{r}_{i4}$ represent individual gender, actual age, maximum age and the pheromone levels, respectively.

Step 5: Calculate the upper objective function for each individual taken as the fitness, i.e., the objective value, $ov(i)=F(g{r}_{i})$. Eventually, we get the intact population shown as $P=(GR,GE,OV)$.

Each new individual is constructed according to the above steps, which are noted as $NewP$. Furthermore, the steps of the proposed algorithm are listed in details as follows.

Step 1: Initialize the parameters. Population size is set $N$, the maximum size is $ub$, the minimum size is $lb$, and the maximum generation is $M\_Gen$. At this stage, the generation is set $t=0$.

Step 2: Create an initial population of size $N$ using $NewP$ noted by ${P}^{t}$.

Step 3: For the $t\mathrm{th}$ generation, the best individual ${p}^{Best}$ is saved in a Tabu List (TL) which is defined as $t{l}^{t}$. The same individual cannot be saved in the list repeatedly. Moreover, each individual in the list $TL={\left\{t{l}^{t}\right\}}_{t=1}^{L}$ has a radius $\rho $ to represent a subspace in the search space.

Step 4: Update the population ${P}^{t}$. Genetic operator and predation operator are respectively applied to the whole population so as to control the genetic effects and genetic representations.

Step 5: Select individuals. According to the pyramidal selection rule, we select the individuals satisfying the criteria to create a new population.

Step 6: The variance of the best individual for the last generations is calculated and saved as ‘Variance’, and the variable named ‘Cycling’ is obtained according to that value. After that, we will get the quantity of individuals that will be eliminated and create respectively named ‘Delete’ and ‘Create’ using AIIS based on the two variables.

Step 7: Eliminate the individuals with less fitness in accordance with the variable ‘Delete’, as well as create some new individuals in view of the variable ‘Create’ using TS.

Step 8: If the terminal condition is fulfilled, save the optimal individual. The genetic representation of this individual is the optimal solution and the objective value is optima of the upper. If not, go to Step 3.

According to the steps mentioned above, the flow chart of the proposed algorithm is shown in the following

Figure 2.