Skip to main content
. 2024 Mar 14;10:e1839. doi: 10.7717/peerj-cs.1839
Algorithm 4 Outline of solution generation
Input: parent solution x; adaptive method parameter p1;
Output: candidate solution y
1. Generate a rand value r
2. If r < p1
Select five different random solutions xr1xr2xr3xr4xr5 from the whole population.
Create a candidate solution use DE/rand/2 strategy: yi = xr1 + F∗[(xr2 − xr3) + (xr4 − xr5)]
Else
Create a candidate solution use DE/current-to-exemplar/1 strategy: yi = xi + F∗[(xexemplar − xi) + (xr1 − xr2)]
End
3. Repair the candidate solution: yi=aiyi<aibiyi>aiyiotherwise where ai and bii = 1(, 2, …, n) is the lower and upper boundaries.
4. Crossover the candidate solution: yi=yiifrandj<Crorj=kyiotherwisewhere j = 1, 2, …, n and randj ∈ U[0, 1], Cr is crossover rate, k is a random integer in the range of [1,n ].
Return yi.