Skip to main content
. 2022 Feb 25;22(5):1826. doi: 10.3390/s22051826
Algorithm 2: PCCGWO pseudo-code.
Master process
1. Randomly initialize the grey wolf population.
2. Decompose the population into m sub-swarms denoted as S1,S2,,Sm.
3. Initialize the buffer C using randomly selected individuals from each sub-swarm.
4. Send each sub-swarm to a slave.
5. Cycle = 0
6. While termination criteria = false do
7.   Parallel for j=1:m slaves
8.   Send to slaves the buffer vector C defined in Equation (14).
9.   Waiting for slaves.
10.   Receive all representatives of sub-swarms from slaves.
11.   End Parallel for
12.   Update the buffer vector C.
13.   Cycle = Cycle + 1
14. End While
Slave [j] process
15. While true do
16.   Receive the buffer vector C from Master process.
17.   Execute GWO on sub-swarm Sj.
18.   Send the representative of sub-swarm Sj to Master process.
19. End While