Step 1. Load function and its parameters |
Step 2. Generate initial population randomly |
Step 3. While |
> max number of iterations, |
performing random global search using Levy Flight , |
(, , and step length set as ) |
Then, find a promising solution |
Step 4. Determine a random number. Set switching parameter for controlling |
between global search and local search. (We set ) |
If |
switch to local search stage (go to Step 5) |
else |
switch to global search stage (go to Step 6) |
Step 5. In intensive local search stage, search around a promising solution, |
Calculate new velocity and position of each particle via (5) and (6), |
Then evaluate new fitness (Use the objective function based on Newton–Raphson |
power flow for reactive power optimization problem) |
If |
|
Step 6. Update, |
|
Step 7. Stopping criterion, |
Maximum number of iterations or a given tolerance (tolerance set as |
for reactive power optimization problem) |
Step 8. If any criterion is provided, then stop the algorithm else go to Step |