Optimization can be defined as one of the branches of knowledge dealing with discovering or arriving at the optimal solutions to a specific issue within a set of alternatives.
The methods of solving optimization problems divided into two types of algorithms: Deterministic Algorithms and Stochastic Algorithms.
Most of classical algorithms are specific algorithms. For example, the Simplex method in linear programming is a specific algorithm, and some specific algorithms use tilt information (Gradient), which called slope-based algorithms. For example, Newton-Raphson algorithm) is an algorithm based on slope or derivative .
As for random algorithms, they have two types of algorithms, although the difference between them is small: Heuristic Algorithms and Meta-Heuristic Algorithms .
The Whale Optimization Algorithm (WOA) is an algorithm inspired by the humpback whale search behavior for its food and hunting method and was first proposed by Lewis and Mirjalili (2016) .
In the same year, WOA improved by Trivedi and others by incorporating a new technology called WOA Adaptive Technology (WOA) .
In the same year, Touma studied the economic transmission problem on the IEEE Bus-30 system using a whale optimization algorithm, which gives good results compared to other algorithms .
In 2017, Hu and others proposed an improved algorithm of whale optimization by adding its inertia weights called (WOAs). The new algorithm tested using 27 functions and applied to predict the daily air quality index. The proposed algorithm showed efficiency compared to other algorithms .
This algorithm used in the same year by researchers Prakash and Lakshminarayana in determining the optimal location of the capacitors and determining their size in the radial distribution network, in order to reduce the losses of the distribution network line as the positioning of the capacitors in optimal locations will improve system performance, stability and reliability .
In the same year, the researcher Desuky used a whale optimization algorithm to improve two levels of male fertility classification. Recently, diseases and health problems that were common among the elderly only became common among young people, and some of the causes of these medical problems are behavioral, environmental and lifestyle factors. The whale optimization algorithm then combined with the Pegasos algorithm to enhance the male fertility rating at both levels. This integration improved the results by 90% .
The algorithm of the whale optimization was also used in the same year by Reddy and others to optimize renewable resources to reduce losses in electricity distribution systems .
In the same year, Mafarja and Mirjalili crossed the whale optimization algorithm with Simulated Annealing Algorithm and used in the classification process. The results confirm the efficiency of the hybrid algorithm in improving classification accuracy .
The aim of the research is to propose a new hybrid algorithm consisting of a Whale optimization algorithm (WOA) with Modified traditional Conjugate Gradient Directional Methods (WOA-MCG). Table 1 represents a definition of the variables used in this study.
2. Conjugate Gradient Method
In unconstrained optimization, we minimize an objective function depends on real variables with no restrictions on the values of these variables. The unconstrained optimization problem is:
where is a continuously differentiable function, bounded from below. A nonlinear conjugate gradient method generates a sequence , k: integer number, . Starting from an initial point , the value of calculate by the following equation:
where the positive step size is obtained by a line search, and the directions are generated as:
where , the value of is determined according to the algorithm of Conjugate Gradient (CG), and its known as a conjugate gradient parameter, and , consider is the Euclidean norm and . The termination conditions for the conjugate gradient line search are often based on some version of the Wolfe conditions. The standard Wolfe conditions:
Table 1. Represents a definition of the variables used.
where is a descent search direction and , where is defined by one of the following formulas:
Al-Bayati and Al-Assady (1986) proposed three forms for the scalar defined by:
3. Proposed a New Conjugacy Coefficient
We have the quasi-Newton condition
We multiply both sides of Equation (9) by and we get
Multiply both sides of Equation (12) by and we get
From (13) and (14) we have
We assume that
Then we have
From Equation (17) we get:
Then, we have
Since then we suppose: then:
3.1. Outlines of the Proposed Algorithm
Step (1): The initial step: We select the starting point , and we select the accuracy solution is a small positive real number and we find , , and we set .
Step (2): The convergence test: If then stop and set the optimal solution is . Else, go to step (3).
Step (3): The line search: We compute the value of by Cubic method and that satisfy the Wolfe conditions in Equations (4), (5) and go to step (4).
Step (4): Update the variables: and compute and , .
Step (5): Check: if then stop. Else continue.
Step (6): The search direction: We compute the scalar by using the Equation (22) and set , and go to step (4).
3.2. Flowchart of Conjugated Gradient Algorithm
Figure 1 shows the flowchart of the standard conjugated gradient method.
3.3. Theoretical Properties for the New CG-Method.
In this section, we focus on the convergence behavior on the method with exact line searches. Hence, we make the following basic assumptions on the objective function.
Figure 1. Flowchart of the standard conjugated gradient method.
f is bounded below in the level set ; in some neighborhood U of the level set , f is continuously differentiable and its gradient is Lipschitz continuous in the level set , namely, there exists a constant L > 0 such that:
forall . (23)
3.3.1. Sufficient Descent Property
We will show that in this section the proposed algorithm defined in the equations (22) and (3) satisfy the sufficient descent property which satisfies the convergence property.
The search direction that generated by the proposed algorithm of modified CG satisfies the descent property for all k, when the step size satisfied the Wolfe conditions (4), (5).
Proof: we will use the indication to prove the descent property, for , , then we proved that the theorem is true for , we assume that ; and and assume that the theorem is true for any k i.e. or since , now we will prove that the theorem is true for then:
Multiply both sides of the Equation (25) by we get:
Divided both side by :
For some positive constant c > 0. This condition often has been used to analyze the global convergence of conjugate gradient methods with inexact line search.
3.3.2. Global Convergence Property
The conclusion of the following lemma used to prove the global convergence of nonlinear conjugate gradient methods, under the general Wolfe line search.
Suppose assumptions (1) (i) and (ii) hold and consider any conjugate gradient method (22) and (3), where is a descent direction and is obtained by the strong Wolfe line search. If
For uniformly convex functions which satisfy the above assumptions, we can prove that the norm of given by (25) is bounded above. Assume that the function f is a uniformly convex function, i.e. there exists a constant such that for all ,
Using Lemma 1 the following result can be proved.
Suppose that the assumptions (i) and (ii) hold. Consider the algorithm (3), (22). If tends to zero and there exists nonnegative constants and such that:
and f is a uniformly convex function, then.
Proof: From Equation (22) We have:
From Cuchy-Shwartz we get:
But . Then
From Equation (41)
Let from theorem (1):
4. Whale Optimization Algorithm (WOA)
Whales are the largest animals in the world where there are whales with a length of up to 30 meters and weighs 180 tons. There are major species in the world such as killer whales, humpback whales, blue whales. Whales are often predators and whales are sleepless because they breathe from the ocean surface. In fact, only half of the brain sleeps and the interesting thing about whales is that they are very smart animals to add to emotion .
The hunting technique used by these whales is one of the most interesting methods and is called the method of nutrition, the process of searching for food. Figure 2 represents the feeding behavior using the bubble trap in humpback whales.
Figure 2. Represents the feeding behavior using the bubble trap in humpback whales.
The humpback whale dives about (12) meters down and then creates bubbles in the form of circles or spiral encircles the prey and then swim towards the surface and this process consists of three different stages as follows:
1: Coral loop.
2: Lob tail.
3: Capture loop.
This style of food can be observed in the humpback whale only.
4.1. Mathematical Model
In this section, we will talk about how physically encircle the prey, which divided into maneuvering the spiral and how to get to the prey. We will also discuss Whale Optimization Algorithm (WOA).
1) Encircling prey
One of the characteristics of humpback whales is their knowledge of the location of the prey and encircling them either in the research space. The optimal location can not be known in advance. But the whale algorithm assumes that the target prey is the best or near solution, then the rest of the other elements will update their positions according to the best location and is represented by the following equations:
t: represents instantaneous iteration (instantaneous).
A, C: Indicates the vectors.
: means the position vector.
represents the site vector for the best solution obtained and should occur in all iterations if the solution is not preferred
To calculate the values of vectors A and C, we use the following formulas:
The value of decreases over the frequency range from 2 to 0 and represents a vector that takes values in the period [0, 1] at random.
2) Bubble-net attacking method (Exploitation phase)
Where the humpback whale style of food Bubble trap was divided mathematically into two parts are:
a. Shrinking encircling mechanism
This process carried out by the value of where its value decreases as in Equation (5) which leads to decreasing as well.
The value of can found from the following formula:
t: means the current iteration.
Maxlter: Maximum number of iterations allowed .
From this, we conclude that the value of falls between [−a, a] which is a random value and that over all iterations the value of (a) decreases from 2 to 0 by placing values of in [−1, 1] randomly.
The new location of the researched element can be considered in any position between the best element currently and the original position of the element. Figure 3 shows the possible position of (X, Y) in the direction of (X*, Y*) where this can be achieved in the space of the two axes by setting as follows It also explains the reduction of the encircling mechanism:
b. Spiral updating position
In this method, we will calculate the distance between the whale in (X, Y) and the prey in (X*, Y*) as shown in Figure 4 and then create an equation that is a spiral equation between the position of the prey and the whale that represents the movement of the snail movement Humpback whales are as follows:
Figure 3. Represents the reduction of the encircling mechanism.
Figure 4. Represents the spiral updated location.
Also, represents the best distance between the whale and its prey obtained to the present moment, (b) is a constant number to determine the shape of the logarithmic spiral, l is a number belonging to the period [−1, 1] randomly.
Humpback whales run around their prey in a shrinking circle and are in the form of a spiral. To express this technique, we will impose a 50% probability of selection to reduce the cord or spiral pattern to improve the position of the whales. It shall be mathematically as follows:
where P: number represents belong to the period [0, 1] at randomly .
3) Search for prey:
The same method based on the variation in vector can be used to search for prey. Humpback whales randomly search for their prey depending on the position of each one. Therefore, we will use the vector with values greater than 1 or less than −1 randomly as this process will force the search element to search away from the reference whale, and in contrast to the exploitation stage. We will improve the position of the search element randomly in the exploration phase rather than better Element obtained so far, this method and . It emphasizes the exploration process and allows the WOA algorithm to do a full research and the mathematical representation is:
4.2. Whale Optimization Algorithm
The WOA algorithm relies on a set of random solutions that begin with each
Figure 5. Represents the exploration mechanism in the WOA algorithm.
process. The search elements optimize their position based on the randomly selected search element or based on the best solution found to date. To facilitate the properties of exploration and exploitation, where the random element is found when , when is the best solution, because the position of the search element is improved .
The WOA algorithm is able to change the movements between the motion of the helix or circular motion based on the value of P and the algorithm will terminate if the stop condition is met.
If we take the WOA algorithm in theory, we can say that it is an integrated optimization algorithm because it has the ability to explore and exploit. On this basis, the proposed method defines the process of research on the best solutions and allows the rest of the other research elements to take the best obtained so far.
In the WOA algorithm, the search vector (A) can be allowed to update for the better by the easy passage between exploration and exploitation. For exploitation at ( ), it should be noted that the WOA algorithm has only two internal key parameters to be modified, A, C. .
4.3. Whale Optimization Algorithm Features
1. Algorithms are easy to implement.
2. This algorithm is highly flexible.
3. Do not need many parameters.
4. You can easily navigate through exploration and exploitation based on one parameter.
5. Due to the simplicity of this algorithm and its lack of many parameters, it is used to solve the logarithmic spiral function, it covers the boundary area in the research space.
6. The position of the elements (solutions) in the exploration phase is improved based on randomly selected solutions rather than the best solution obtained so far .
4.4. Proposed Hybrid Algorithm
In this paragraph, a new hybrid method proposed to solve the optimization issues called WOA-CG, a proposed hybrid algorithm that links the evolutionary ideas of the WOA algorithm with the classical optimization of Conjugate Gradient Algorithm, called WOA-CG. Figure 6 represents the proposed algorithm
Figure 6. Represents the proposed algorithm (WOA-CG).
(WOA-CG). In this algorithm, the process in each iteration divided into two phases. In the first stage, the random community and the initial velocity of the WOA are generated, and in the second stage, the HS-CG algorithm is used. The steps of the proposed hybrid algorithm (WOA-CG) can be summarized as follows:
Step 1: Create a primary community by generating a primary community and configuring parameters A, C.
Step 2: The random community then entered into the classic conjugate gradient algorithm to improve the community and get the best solution.
Step 3: Calculate the fitness function of the resulting new community (from the traditional conjugate gradient algorithm as the primary community of the whale optimization algorithm) for each search element that represents the distance between the whale and its prey.
Step 4: Calculate the best position in the search elements. With this feature can produce a new generation of children.
Step 5: Update the location of each search element using the algorithm attributes: prey search, prey encirclement, hunting and attacking prey.
Step 6: Update the new generation position using numbered Equations (6) and (7).
Step 7: The WOA algorithm performs a number of iterative steps until the stop condition is met.
5. Practical Aspect
For the purpose of evaluating the performance of the proposed algorithms in solving optimization problems, the proposed WOA-CG algorithm was tested, using (10) standard functions to compare with the algorithm of the whale optimization themselves. The minimum and upper limits of each function used when the function reaches the minimum value and the highest frequency of all programs equals (500) iterations (Table 2).
Tables 3-5 show the results of the WOA-MCG algorithm compared with the results of the WOA algorithm. The proposed WOA-MCG algorithm shown to be successful by improving the results of most high-standard test functions. This confirms the success of the hybridization process.
The test was carried out by a laptop with the following characteristics: CPU speed is 2.70, RAM is 8 GB, and Matlab R2014a runs on Windows 8.
1. Hybridization of post-intuitive algorithms with one of the classical algorithms has contributed to improving its performance by increasing the speed of convergence.
2. Hybridization of post-intuitive algorithms with one of the classical algorithms has contributed to an improvement in the quality of the resulting solutions by increasing its exploratory and exploitative capabilities, as numerical results show the ability of hybrid algorithms to solve different optimization problems.
Table 2. Details of test functions.
Table 3. Comparison of results between WOA and WOA-MCG using the number of elements consisting of 5 elements and the number of iterations 500.
Table 4. Comparison of results between WOA and WOA-MCG using the number of elements consisting of 10 elements and the number of iterations 500.
Table 5. (a) Comparison of results between AWO and AWO-MCG using the number of elements consisting of 15 elements and the number of iterations 500; (b) Comparison of results between AWO and AWO-MCG using the number of elements consisting of 30 elements and the number of iterations 500.
The results of the WOA-MCG algorithm compared with the WOA algorithm itself, which led to encouraging results as good solutions were obtained for most test functions.
 Meng, X., Liu, Y., Gao, X. and Zhang, H. (2014) A New Bio-Inspired Algorithm: Chicken Swarm Optimization. In: Tan, Y., Shi, Y., Coello, C.A.C., Eds., Advances in Swarm Intelligence, ICSI 2014. Lecture Notes in Computer Science, Vol. 8794. Springer, Cham, 86-94.
 Trivedi, I.N., Pradeep, J., Narottam, J., Arvind, K. and Dilip, L. (2016) Novel Adaptive Whale Optimization Algorithm for Global Optimization. Indian Journal of Science and Technology, 9, 1-6. https://doi.org/10.17485/ijst/2016/v9i38/101939
 Abhiraj, T. and Aravindhababu, P. (2017) Dragonfly Optimization Based Reconfiguration for Voltage Profile Enhancement in Distribution Systems. International Journal of Computer Applications, 158, 1-4. https://doi.org/10.5120/ijca2017912758
 Manoharan, N., Dash, S.S., Rajesh, K.S. and Panda, S. (2017) Automatic Generation Control by Hybrid Invasive Weed Optimization and Pattern Search Tuned 2-DOF PID Controller. International Journal of Computers, Communications & Control, 12, 533-549.
 Mirjalili, S. (2016) Dragonfly Algorithm: A New Meta-Heuristic Optimization Technique for Solving Single-Objective, Discrete, and Multi-Objective Problems. Neural Computing and Applications, 27, 1053-1073. https://doi.org/10.1007/s00521-015-1920-1
 Mafarja, M.M. and Mirjalili, S. (2017) Hybrid Whale Optimization Algorithm with Simulated Annealing for Feature Selection. Neurocomputing, 260, 302-312.