Initiation;
Label  1: Generation primitive sub-swarms;
Foreach sub-swarm-i In sub-swarms Do
Calculate the fitness value;
If (run==first-time)
Then Update the personal and global optimal position as in QPSO;
Else Update the personal and global optimal position with;
Calculate the best particles;
Check the condition of DVSA, if not satisfied, and then go to the second step.
Calculate the reduced search area.
End  Foreach
Calculate the fitness value;
Foreach dimension-i In  D Do
Update the personal and global optimal position;
Update the particles based on quantum behavior with the Lévy disturbance;
End  Foreach
Calculate the electoral best position;
Test whether satisfy the condition of termination;
If (Meet terminal condition) Then ends
Else repeat from Label  1;
End  If
End.
Algorithm 1: Pseudocode of CQPSO-DVSA-LFD.