2.2. Bio-Inspired Metaheuristic Optimization Method
The problem of finding the global minimum of the objective function on the set of feasible solutions of the form is considered.
The Tomtit Flock Optimization (TFO) method of simulating the behavior of a flock of tomtits is a hybrid algorithm for finding the global conditional extremum of functions of many variables, related to both swarm intelligence methods and bio-inspired methods.
A tomtit unites in flocks. They obey the commands of the flock leader and have some freedom in choosing the way to search for food. Tomtits are distinguished from other birds and animals by their special cohesion, coordination of collective actions, intensity of use of the food source found until it disappears, and clear and friendly execution of commands common to members of the flock.
Finite sets of possible solutions, named populations, are used to solve the problem of finding a global constrained minimum of objective function, where is a tomtit-individual (potential feasible solution) with number , and is a population size.
In the beginning, when number of iterations
, the method creates initial population of tomtits via the uniform distribution law on a feasible solutions set
. The value of objective function
is calculated for each tomtit, which is a possible solution. The solution with the best value of objective function is the position of flock leader. The leader does not search for food in the current iteration. It waits for results of finding food for processing results and further storage in the memory matrix:
The memory matrix size is , where is a given maximum number of records. The best achieved result on each -th iteration is added in the matrix until the matrix is fulfilled. The number defines the iterations counted in one pass. Results in the matrix are ordered by the following rule. The first record in the matrix is the best solution ; other records are ordered by increasing (nondecreasing) value of the objective function. When the memory matrix is fulfilled, the best result is placed in a special set Pool (set of the best results of passes), after which the matrix is cleared.
New position of the leader is randomly generated by Levy distribution [
29]:
where
is a coordinate of the leader’s position on the
-th iteration, and
is a movement step,
. Studies of animal behavior have shown that the Levy distribution most accurately describes the trajectory of birds and insects. Due to the “heavy tails” of the Levy distribution, the probability of significant deviations of the random variable from the mean is high. Therefore, according to the above expression, sufficiently large increments are possible for each coordinate of the vector
If the new value of the certain coordinate does not belong to the set of feasible solutions; that is
then one should repeat the generation process.
This process describes the flight of the flock leader from one place to another. Other tomtits fly after it at the command of the leader. Positions of these tomtits are modeled using a uniform distribution on the parallelepiped set. The center of the parallelepiped set is determined by the position of the leader of the flock; the lengths of the sides are equal , , where , , —reduction parameter of search set; if , then the current pass is stopped and a new one starts. Upon reaching iterations or when the condition is fulfilled, the pass is considered complete, the counter of passes is increased: , and the parameter that describes the size of the next search space is set equal to , where —reconstruction parameter of search set. The found coordinate values determine the initial conditions for the search at the current iteration (the initial position of each tomtit).
It is assumed that each -th individual has a memory that stores:
Current iteration count ;
Current position and the corresponding value of objective function ;
The best position and the corresponding value of objective function in population ;
The best position of a tomtit during all iterations and the corresponding value of objective function ;
The best position among all tomtits located in the vicinity of the -th individual of radius and the corresponding value of objective function .
The trajectory of movement of each individual (for all tomtits
) on the segment
, during which the search is carried out at the current iteration, is described by the solution of the stochastic differential equation:
where
—standard Wiener stochastic process,
—the time allotted by the leader of the pack for searching for members of the pack at the current iteration,
—Poisson component, which can be written as:
—asymmetric delta function,
—moments of jumps. In random moments of time
the position of a tomtit experiences random increments
, forming a Poisson stream of events of a given intensity
. The solution of the equation determines the trajectories of the tomtit’s movement that implement the diffusion search procedure with jumps.
Drift vector
is described by the equation:
i.e., it takes into account information about the best solution in the population: the position of the global leader of the flock.
Diffusion matrix
takes into account information about the best solution obtained by a given individual for all past iterations, about the best solution in the vicinity of the current solution, determined by the radius
:
where
,
,
—effect coefficients;
—random parameters uniformly distributed on the segment
. Parameter
determines the process of forgetting about one’s search history; parameter
describes the leader’s effect among neighbors.
The solution of a stochastic differential equation is a random process, the trajectories of which have sections of continuous change, interrupted by jumps of a given intensity. It describes the movement of the tomtit, accompanied by relatively short jumps. This solution can be found by numerical integration with a step size
. If any coordinate value hits the boundary of the search area or goes beyond it, then it is taken equal to the value on this boundary. The best position achieved during the current iteration is chosen as the new position
of the tomtit. This process is shown in
Figure 1a. Among all the new positions of tomtits, the best one is selected. It is recorded in the memory matrix and identified with the final position of the leader of the flock at the current iteration, after which the next iteration begins with the procedure for finding a new position of the leader of the flock and the initial positions of the members of the flock relative to it. This procedure is shown in
Figure 1b. The method terminates when the maximum number of passes
P is reached.
The proposed hybrid method uses the ideas of evolutionary methods to create the initial population [
15,
16,
17,
18], the method of imitating the behavior of cuckoo to simulate the jump of the flock leader based on Levy flights [
29], the application of a modified numerical Euler–Maruyama method for solving a stochastic differential equation describing the movement of individuals in a population [
31]; the idea of particle swarm optimization technique in a flock for describing the interaction of individuals with each other, the modified method of artificial immune systems for updating the population, the Luus-Jaakola method for updating the search set at the end of the next pass [
1].
Figure 2 below illustrates the block diagram of the algorithm.
Below is a detailed description of the algorithm.
Step 1. Creation of the initial tomtit population:
Step 1.1. Set parameters of method:
Number of tomtits in population ;
Flock leader movement step ;
Reduction parameter of search set ;
Reconstruction parameter of search set ;
Levy distribution parameter ;
Tomtit’s neighborhood radius size ;
Parameters , , , which describe drift vector and diffusion matrix in the stochastic differential equation;
Number of maximum records in memory matrix ;
Integration step size ;
Number of maximum discrete steps ;
Time required for searching by tomtits ;
Number of maximum passes ;
Jump intensity parameter .
Set the value (the number of passes), .
Step 1.2. Create initial population
of
solutions (tomtits) with randomly generated coordinates
from the segment
using a uniform distribution:
where
is the uniform distribution law on the segment
.
Step 2. Movement of flock members. Implementation of the diffusion search procedure with jumps.
Step 2.1. Set the value: (iteration counter).
Step 2.2. For each member of flock calculate the value of objective function: . Order flock members in increasing (nondecreasing) objective function values. The solution corresponds to the best value, i.e., the position of the leader.
Step 2.3. Process current information about flock members.
For set the following. The best position is and the corresponding value of objective function in population.
For all other flock members find:
The best position of a tomtit during all iterations and the corresponding value of objective function ;
The best position among all tomtits located in the vicinity of the -th individual of radius and the corresponding value of objective function .
Step 2.4. For each find the numerical solution of the stochastic differential equation with step size on the segment using the Euler–Maruyama method.
Step 2.4.1. Set the value: and .
Step 2.4.2. Find the diffusion part of the solution
where
are random parameters uniformly distributed on the segment
and
is a random variable that has a standard normal distribution with zero mean value and unit variance value. It is possible to model this variable using the Box–Muller method:
in which
and
are an independent random variables uniformly distributed on the segment
.
Step 2.4.3. Check jump condition: , where is a random variable uniformly distributed on the segment . In the process of integration, one should check whether the solution belongs to the set of feasible solutions: if any coordinate value of the solution hits the boundary of the search area or goes beyond it, then it is taken equal to the corresponding value on the boundary.
If the jump condition is satisfied, then set the value:
where
is a random increment, in which coordinates are modeled according to the uniform distribution law:
.
Otherwise, set the value:
Step 2.4.4. Check the stop condition of the moving process of a flock’s member.
If , set the value and go to step 2.4.2. Otherwise, go to step 2.5.
Step 2.5. For each flock member (), find the best solution among all solutions obtained: . Denote it as .
Step 2.6. Among positions of tomtits (solutions) find the best one. Record it in the memory matrix. This is the leader’s position at the end of the current iteration .
Step 2.7. Check the stop condition of a pass. If (memory matrix is full) or , then stop the pass. From the memory matrix, choose the best solution and put it in the set Pool, then go to step 3. If , set the value , and go to step 2.8.
Step 2.8. Find the new position of the leader:
To generate a random variable according to the Levy distribution, it is required: for each coordinate
to generate number
,
by uniform distribution law on the set
where
distinguishability constant, and carry out the following [
10]:
Generate numbers and , , where is a distribution parameter;
Calculate values of coordinates:
If the obtained value of the coordinate does not belong to the set of feasible solutions; that is , then repeat the generation process for the coordinate .
If, after ten unsuccessful generations, the coordinate does not belong to the set of feasible solutions, then generate by uniform distribution law on the set .
Step 2.9. Release the flight of the rest of the tomtits.
Positions of all other tomtits () are modeled using a uniform distribution on the parallelepiped set (see step 1.2). The center of the parallelepiped set is determined by the position of the leader of the flock (see step 2.8), and the lengths of the sides are equal , .
If the value of tomtit’s coordinate does not belong to the set of feasible solutions, then generate a new position using uniform distribution:
On the set when ;
On the set when .
Go to step 2.2.
Step 3. Check the stop condition of the search. If , then stop the process and go to step 4. If , clear the memory matrix, increase the counter of passes: , and set the value , where is a reconstruction parameter of the search set.
Generate a new flock of tomtits. Choose the best solution from Pool set: . Positions of all other tomtits () are modeled using a uniform distribution on the parallelepiped set (see step 1.2). The center of the parallelepiped set is determined by the position of the leader of the flock , and the lengths of the sides are equal , .
If the value of the tomtit’s coordinate does not belong to the set of feasible solutions, then generate a new position using uniform distribution:
On the set when ;
On the set when .
Go to step 2.
Step 4. Choosing the best solution. Among solutions in the set , find the best one, which is considered to be the approximate solution of the optimization problem.
As a result of generalizing the data obtained both in solving classical separable and nonclassical nonseparable optimal control problems, recommendations for choosing the values of hyperparameters were developed: number of tomtits in population ; flock leader movement step ; reduction parameter of search set ; reconstruction parameter of search set ; Levy distribution parameter ; tomtit’s neighborhood radius size ; parameters , , ; number of maximum records in memory matrix ; integration step size ; number of maximum discrete steps ; number of maximum passes ; jump intensity parameter .