Marine Predators’ Algorithm: Application in Applied Mechanics

In this paper we will demonstrate how Marine Predators Algorithm (MPA for short) can be used for solving certain optimization problems in applied mechanics. In the first part, biological fundamentals, as well as method explanation are given. Afterwards, MPA algorithm and its’ applicability is explained in detail. The pseudo code for this algorithm was written using Matlab R2019a software suite. This algorithm can be used for optimization of engineering problems, such as: pressure vessel optimization, cantilever beam optimization, cone clutch optimization and speed reducer optimization. In the end, all the results for the fore mentioned problems, as well as a result comparison with other methods are shown.


INTRODUCTION
A metaheuristic can be defined as a high-level algorithmic framework or approach that can be specialized to solve optimization problems. It consists of an iterative process, which guides other heuristics in a search for feasible solutions. Almost all of the metaheuristic algorithms have been conceptualized very recently, are simple in design, and their basic characteristics stem from, directly or indirectly, observing systems found in nature. Due to the simplicity of metaheuristic algorithms, they are easy to program in any programming language, since the code for most of these algorithms takes up to 100 lines of code. Such simple algorithms can be applied to a wide range of optimization problems with minimal code adjustments.
The most famous biologically inspired metaheuristic algorithms are: Whale Optimization Algorithm In this paper the Marine predators algorithm (MPA), one of the biological metaheuristic algorithms created by Faramarzi [1], will be demonstrated. After the algorithm was published in 2019, it drew research attention, and it was implemented and improved in many areas of expertise.
In paper by Abdel-Basset et al. [2], four modified MPA algorithms adapted for multi-objective optimization problems was demonstrated. The first version is a basic modification of the MPA for multi-objective optimization problems. This version of the algorithm is called multi-objective MPA, or MMPA for short. The second version, a strategy called dominance strategy-based exploration-exploitation (DSSE) was incorporated into the first version, putting together dominance of the solutions with the exploration and exploration phases. The solutions with high dominance undergo an exploitation phase, while others undergo the exploration phase. This algorithm is called M-MMPA for short. The third version adds Gausian-based mutation to M-MMPA in order to guide exploration and exploitation strategies. The fourth version uses the Nelder-Mead simplex method with M-MMPA at the start of the optimization process to construct a front of the non-dominated solutions that will help M-MMPA to find more good solutions. This version is called M-MMPA-NMM for short. These four versions are tested on a large set of theoretical 614 TEHNIKA -MAŠINSTVO 71 (2021) 5 and practical problems. For all the cases, the proposed algorithm and its variants are shown to be superior to a number of well-known multi-objective optimization algorithm. In the paper by Soliman et al. [3], a MPA model was used to model triple-diode photovoltaic (TDPV) models using a new objective function. A numerical analysis was performed and compared with real-life photovoltaic (PV) panels. The MPA algorithm was successfully utilized to minimize the objective function, obtaining the nine-parameters of the TDPV model of the PV module. This is important, because these parameters cannot be obtained from the datasheet. The algorithm has shown to successfully optimize the design parameters of two marketable PV modules.
In paper by Ramezani et al. [4], a developed version of the MPA is tested on standard test functions as well as real world optimization problem based on PID control applied to a DC motor. This version of the algorithm is based on the opposition-based learning method, chaos map, self-adaptive of population and switching between exploration and exploitation phases. This algorithm was compared with the original algorithm, as well as several other optimization algorithms. Eventually, the simulation results proved that the suggested algorithm has better results compared with other algorithms for the studied case studies.
This paper consists of five sections. In section 1 brief introduction is given, section 2 is devoted to detail description of Marine Predators Algorithm (MPA). In section 3, the description of optimization models is given and section 4 discusses experimental results for several engineering in applied mechanics. Finnaly, in section 5, conclusions based on experimental results are discussed.

MARINE PREDATORS' ALGORITHM
This nature-inspired algorithm is based on the survival of the fittest theory, where predators choose an optimal strategy in order to have higher chances of encountering prey. The foraging process of most species is modeled as a random walk, where the next position of the animal is determined by a set of probabilities.
Random walk is defined as a sequence of steps on some mathematical space, where the steps are determined by a mathematical distribution. The two random walks used by this algorithm are the Brownian motion and Levy flight.
Brownian motion is a type of random walk whose step sizes are determined from the normal distribution with a mean 0 and variance 1. [5]     2 2 2 2 Levy flight is type of random walk whose step sizes are determined from a probability function defined by Levy distribution: Where xj is the flight length, α having the value between 1 and 2 is the power-law exponent [6]. In Figure 1, the distributions, 2D trajectories and 3D trajectories for the Brownian motion and Levi flight were shown. What is important to note is the greater range of values in the Brownian motion distribution. This means that the movement of search agents will be greater when the Brownian motion is used, which is convenient for the exploration phase of the MPA, while the smaller movement of search agents using the Levy flight is convenient for the exploitation phase of the MPA.

Figure 1 -Levy flight (a) distribution, b) 2D tra-jectory, c) 3D trajectory vs Brownian motion (d) distribution, e) 2D trajectory, and f) 3D
trajectory [1] In the first trial, the solutions are uniformly distributed over the search space. As explained later, this population will be used to construct both the Prey and the Elite part of the population.
Where the terms with the Xmin and Xmax subscripts design the lower and upper bounds for the variables, and rand is a uniform random vector in the range of 0 to 1.
The population in this algorithm is split into two parts, Elite and Prey, represented by two matrices containing the values of all the dimensions of the problem.
First, the Prey part of the population is initialized, represented by the matrix shown below.
Where n is the population number, and d is the number of dimensions of the problem. Since predators chase the prey in real life, the positions of members in this population are used to update the positions of the predator population.
The predator population is constructed as such: the best member of the Prey population is the top predator, and that solution is replicated n times in order to construct the Elite matrix. The predator matrix is shown below:  (5) This matrix is of shape n*d, n being the population size and d being the number of dimensions. ⃗⃗⃗⃗ is the top predator vector, the one that is used to initialize the Elite matrix.
MPA optimization process is divided into three main phases of optimization considering different velocity ratio and at the same time mimicking the entire life of a predator and prey:  high velocity ratio on when prey is moving faster than predator  unit velocity ratio or when both prey and predator are moving at almost the same pace  low velocity ratio when predator is moving faster than prey These three phases are determined by the first, second and third equal part of the iteration count. Essentially, the first phase represents the exploration phase, since the prey moves as fast as possible from the predator, moving through the search space with great speed. The second phase represents a transition to the exploitation phase, since the prey population moves at a slower pace, while the predator population speeds up. The third phase represents the exploitation phase, since only the predator population moves at a slow pace, converging to the best solution.
It is important to add some remarks in terms of labels used. ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ represents the step that the i-th member of a population makes in the given iteration. ⃗⃗⃗⃗⃗ represents a vector of random numbers generated using the Brownian motion random walk, the ⃗⃗⃗⃗ represents a vector of random numbers generated using the Levy flight random walk, while ⃗ represents a vector of random numbers generated using the uniform distribution in the range [0, 1]. Parameter P is equal to 0.5, while parameter CF is the adaptive factor, controlling the step size of predator movement during a given iteration (the equation given later in text). ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ and ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ are the i-th member of the Elite and Prey populations, respectively In unit velocity ratio or when both prey and predator are moving at the same pace. It mimics that both of them are looking for their prey. This phase represents slowly transitioning to exploitation. In this phase, both exploration and exploitation matters. Consequently, half of the population is designated for exploration and the other half for exploitations. In this phase, prey is responsible for exploitation and predator for exploration. Based on this rule, in the unit velocity ratio (v≈1), if prey moves in Levy, the best strategy for predator is Brownian. Thus, this study considers prey moves in Levy while predator moves in Brownian. The movement equations for Elite and Prey in this phase of the algorithm are: Where iter is the current iteration, and maxiter is the maximum number of iterations.
In low velocity ratio or when predator is moving faster than prey. This scenario happens in the last phase of the optimization process which is mostly associated with high exploitation capability. In low velocity ratio (v = 0.1) the best strategy for predator is Levy. The movement equation for Elite in this phase of the algorithm is: Another point which causes a behavioral change in marine predators is environmental issues such as the eddy formation or Fish Aggregating Devices (FADs) effects. The FADs are considered as local optima and their effect as trapping in these points in search space. Consideration of these longer jumps during simulation avoids stagnation in local optima. The FAD effect is mathematically presented as: Where FADs = 0.2 is the probability of FADs effect on the optimization process. ⃗ ⃗ is the binary vector with arrays including zero and one. This is constructed by generating a random vector in [0,1] and changing its array to zero if the array is less than 0.2 and one if it is greater than 0.2. r is the uniform random number in [0,1]. ⃗⃗⃗⃗⃗⃗⃗⃗⃗ and ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ are the vectors containing the lower and upper bounds of the dimensions. r1 and r2 subscripts denote random indexes of prey matrix.
Based on the highlighted points, marine predators have a good memory in reminding the place where they have been successful in foraging. This capability simulated by memory saving in MPA. After updating the Prey and implementing FADs effect, this matrix is evaluated for fitness to update the Elite. The fitness of each solution of the current iteration is compared to its equivalent in prior iteration, and the current one replaces the solution if it is more fitted. The pseudo-code for the algorithm is given below:

Initialize search agents (Prey) populations i=1,…,n While termination criteria are not met Calculate the fitness and construct the Elite matrix
If Iter<Max_Iter/3 Update prey based on Eq. 6 in paper [1] Else if Max_Iter/3<Iter<2*Max_Iter/3 For the first half of the populations (i=1,…,n/2) Update prey based on Eq. 7 in paper [1] For the other half of the populations (i=n/2,…,n) Update prey based on Eq. 8 in paper [1] Else if Iter>2*Max_Iter/3 Update prey based on Eq. 9 in paper [1]

Accomplish memory saving and Elite update
Applying FADs effect and update based on Eq. 10 in paper [1] End while

OPTIMIZATION MODELS
In this section, for each of the optimization problems we describe the basis of the problem, goal function, algorithm parameters, as well as conditions that are to be met. Every step of this process was done using the MATLAB R2019a software suite.

Optimization of the speed reducer
The goal of speed reducer optimization is minimizing the reducer weight whilst fulfilling all the defined constraints.

Figure 3 -Schematic view of the speed reducer with variable parameters
Project variables for the speed reducer problem are: the width between the shafts (x1), the module of the teeth (x2), the number of teeth in the pinion (x3), the length of the first shaft between the bearings (x4), the length of the second shaft between the bearings (x5), the diameter of the first shaft (x6) and the diameter of the second shaft (x7).
Goal function to be minimized is defined as: Whilst the conditions to be met are:   10 110   10 85

Optimization of the pressure vessel
Second problem is optimization of a pressure vessel (figure 4), which consists of reducing costs of material, montage and welding costs. Four variables are defined for this problem: radius of the shell (x1), length of the shell (x2), thickness of the shell (x3) and thickness of the dish end (x4).
Whilst the conditions to be met are:

Optimization of the cantilever beam
In this part, we will be solving the popular structural design problem of a cantilever beam ( Figure 5). The goal is to minimize the weight of the cantilever beam.

Figure 5 -Schematic view of the cantilever beam with
variable parameters As seen in Figure 5, the cantilever beam consists of five hollow, box shaped bearings with a square shaped frame. Project variables are lengths of the five squares which make up the cantilever beam.
The goal function is defined by the equation:

Optimization of the cone clutch
In Figure 6, a schematic view of cone clutch, along with all the project variables, is shown.

Figure 6 -Schematic view of cone clutch with variable parameters
The cone clutch problem must be designed for minimum volume coupling to two constraints. Problem variables are: inner radius of the coupling 1 1 Rx  and outer radius of the coupling 2 2 R x  . Goal function to be minimized is defined as: (33) Whilst the conditions to be met are: x  A detailed display of the results obtained by MPA and a comparison with several results obtained by other methods, for the problem of speed reducer, are shown in Table 1. In the case of this problem, MPA has given better results than those found in literature. For the pressure vessel problem, the expected value for the goal function is 5885.3327, with the results shown in Table 2. As in the case of the speed reducer problem, the MPA algorithm gave better results than those found in literature.
For the cantilever beam design problem, the results shown in Table 3, along with the results obtained by ALO, MMA and GOA methods. In this case, the MPA gives near the same result as the MMA algorithm, ALO and GOA.
Experimental research was performed for the cone clutch problem, and the results of MPA algorithm, along with the results for GWO, GOA, and WCA algorithms, are given in Table 4. In the case of cone clutch optimization, MPA gives the same result as CS, while GWO and GOA giving a slightly worse result.

CONCLUSION
This paper describes using Marine predators' optimization algorithm in order to solve a few engineering problems with a constant number of variables. For this algorithm, 25 search agents and 500 iterations were chosen as input parameters. Larger numbers for search agents and iteration count did not yield better solutions, all the while increasing the time to finish the algorithm. Smaller numbers of search agents and iteration count did speed up the algorithm, yet solutions better than those shown in the paper were not reached. Therefore, we consider these values of input parameters to be optimal for the presented set of problems.
In the case of speed reducer and pressure vessel optimization, the Marine predators' algorithm gives better results than other methods found in literature. The results for the other two optimization problems, namely the cantilever beam and cone clutch problem, were shown to be near optimal. This paper focuses on application of optimization algorithms on engineering problems in applied mechanics. In this field of study, further research is always necessary, due to its applicability and possibility for the improvement of the optimization results.

ACKNOWLEDGEMENT
This work was supported by the Serbian Ministry of Education, Science and Technological Development through Mathematical Institute of the Serbian Academy of Sciences and Arts.