(3): Generate PV module shadow distribution randomly
(4): Calculate the output power of each PV array according to equation (5) and keep it as the current optimal output power and optimal shadow distribution
(5): While k ≤ kmax
(6): Update the acceleration of each atom by equation (6)
(7): Update the velocity of each atom by equation (8)
(8): Update the position of each atom by equation (9)
(9): Calculate the output power of each PV array again and update the optimal shadow distribution and optimal output power
(10): Set k = k + 1
(11): End while
(12): Output: best shadow distribution of PV arrays and the maximum output power
(13): Calculate mismatch loss, ff of the optimal solution, and STD of simulation results of ASO in 20 runs