New Post
Grey Wolf Optimization Algorithm Numerical Example
- Get link
- X
- Other Apps
Grey Wolf Optimization Algorithm Numerical Example
Grey Wolf Optimization Algorithm Steps
1.) Initialize Grey Wolf Population.
2.) Initialize a, A, and C.
3.) Calculate the fitness of each search agent.
4.) šæ_š¶ = best search agent
5.) šæ_š· = second-best search agent
6.) šæ_š¹ = third best search agent.
7.) while (t<Max number of iteration)
8.) For each search agent
update the position of the current search agent by the above equations
end for
9.) update a, A, and C
10.) Calculate the fitness of all search agents.
11.) update šæ_š¶, šæ_š·, šæ_š¹
12.) t = t+1
end while
13.) return šæ_š¶
Grey Wolf Optimization Algorithm Numerical Example
STEP 1. Initialize the Grey wolf Population [Initial Position for each Search Agent] š_(š ) (i = 1,2,3,ā¦n)
n = 6 // Number of Search Agents
[ -100, 100] // Range
Initial Wolf Position
3.2228
4.1553
-3.8197
4.2330
1.3554
-4.1212
STEP 2. Calculate Fitness for Each Search Agent.
Objective Function: F6(x) = sum(abs((š_š + 0.5)).^2);
Initial Fitness Value
13.8592
21.6718
11.0204
22.4013
3.4425
13.1131
STEP 3. Compare the gray wolves fitness value, and determine the current first three best wolves.
Select: šæ_šØšššš,šæ_š©ššš, šæ_š«šššš
X(Alpha) = 3.4425
X(Beta) = 11.0204
X(Delta) = 13.1131
STEP 4. Check ( t < Maxt )
t = 0
0 < 50 [True]
STEP 5. Update position of Current search agent
a = 2- t*((2)/Maxt); [where a is decreases linearly from 2 to 0]
A1= 2*a*r1-a;
C1= 2*r2;
(š·_š¼lpha ) =|š¶_1. (š_š¼lpha ) ā š (š”)|
(š_1 ) =| (š_š¼lpha ) ā š“_1 .(š·_š¼lpha ) |
X1= AlphaPosition - A1 * Dalpha;
(š·_š¼lpha ) = 0.6154
š_1 = 0.6361
(š·_š½eta ) = 1.8659
š_2 = 5.9968
(š·_Delta ) = 1.6909
š_3 = -3.7867
š_1 = 0.6361
š_2 = 5.9968
š_3 = -3.7867
Updated position for Current Search Agent.
šæ (š+š) = ((š_1 ) + (š_2 ) + (š_3 ) )/3
šæ (š+š) = ((0.6361+5.9968ā3.7867))/3
šæ (š) = 3.4732
š_1 = 0.6361 NewFitness = 1.2910 //AlphaScore
š_2 = 5.9968 NewFitness = 5.5976 //BetaScore
š_3 = -3.7867 NewFitness = 10.8023 //DeltaScore
STEP 6. Update Alpha, Beta and Delta Position.
Compare the Fitness Value and Wolf Score.
If ( AlphaOldFitnessValue > AlphaNewFitness )
THEN
Update Alpha: Replace AlphaOldPosition with AlphaNewPosition and AlphaNewFitnessValue;
Else
Use Old Position and Fitness Value.
Compare the Fitness Value and Wolf Score.
1.) UPDATE Alpha
If ( AlphaOldFitnessValue > AlphaNewFitness )
If ( 3.4425 > 1.2910 )
THEN
Update Alpha: Replace AlphaOldPosition with AlphaNewPosition and AlphaNewFitnessValue;
2.) UPDATE Beta Wolf
If ( BetaOldFitnessValue > BetaNewFitness )
If ( 11.0204 > 5.5976 )
THEN
Update Alpha: Replace BetaOldPosition with BetaNewPosition and BetaNewFitnessValue;
3.) UPDATE Delta Wolf
If ( DeltaOldFitnessValue > DeltaNewFitness )
If ( 13.1131 > 10.8023 )
THEN
Update Alpha: Replace DeltaOldPosition with DeltaNewPosition and DeltaNewFitnessValue;
REPEAT LOOP until stopping criteria met.
STEP 5. Update Alpha, Beta, and Delta Position.
REPEAT LOOP
Estimate the position of Prey by Alpha, Beta and Delta
Grade the Wolf: Best Solution is Alpha.
REPEAT LOOP until Condition Met.
a = 2-t*((2)/Maxt); % a decreases linearly from 2 to 0
A1= 2*a*r1-a;
C1= 2*r2;
(š·_š¼lpha ) = 2.2059
š_1 = 0.3045
(š·_š½eta ) = 6.9456
š_2 = -2.6423
(š·_Delta ) = 4.5037
š_3 = 2.4711
š_1 = 0.3045
š_2 = -2.6423
š_3 = 2.4711
Updated position for Current Search Agent.
šæ ā (š+š) = ((š_1 ) ā+ (š_2 ) ā+ (š_3 ) ā)/3
šæ ā (š+š) = ((0.3045ā2.623+2.4711))/3
šæ ā (š) = 0.1526
Calculate Fitness for Update position of Current search agent
š_1 = 0.3045 NewFitness = 0.6473 //AlphaScore
š_2 = -2.6423 NewFitness = 4.5895 //BetaScore
š_3 = 2.4711 NewFitness = 8.8276 //DeltaScore
STEP 7.Return š_š“ššāš
š_š“ššāš = 0.3045 AlphaFitnessValue = 0.6473
Software Testing using Metaheuristic Optimization
Topics Covered in this Video:
- Get link
- X
- Other Apps
Comments
Post a Comment