| Input: the candidate target host queue CTHQ = |
| Output: BestTargetHost |
| Pseudo-code as follows: |
| () CTHQ = are marked unexplored; Set the SimMigTaskQueue; |
| () Set the maximum temperature (T_max), T = T_max and T_min; |
| () Initialize CandidateTargetHostQueue; |
| () Set NeighborHostQueue to be Null, and set BestTargetHost also to be Null; |
| () Set the number of following bees as ; |
| () Set the initial time point , // set the number of VM migration requests; |
| () While (T ≥ T_min) |
| () Select an undetected host randomly, and send scouts in candidate target host queue; |
| () do |
| () Parbegin |
| () Calculates the host power // Sent following bees near the scouts randomly |
| () Use of gradient descent, calculation and evaluation function |
| |
| () If () |
| () Output the host number of current nearby following bee // find current local optima |
| () else |
| () in accordance with the rules of |
| , |
| to apply the program of the gradient descent |
| () , |
| |
| () Endif |
| () use |
| to update ; |
| () ParEnd |
| () // Make use of simulated annealing. |
| () Update fitness value, |
| ; |
| () While () |
| () Following bees have returned, update current best target host; |
| () Update unexplored candidate target host group; |
| () Update the nearby hosts, candidate host queue and Top-N current best target host queue |
| () Recording time ; |
| () Endwhile |
| () // Out of the current local optimal solution based on the Metropolis criterion |
| () If ( |
| () Return to Line |
| () else |
| () Output BestTargetHost |
| () Endwhile |
| () Output similar target hosts |