Research Article

Energy-Aware Scheduling of Workflow Using a Heuristic Method on Green Cloud

Algorithm 1

Best heuristic scheduling (BHS).
 Input: number of grasshoppers, Max iteration, lower limit, upper bound, number of dimensions and features that the grasshopper is to optimize them, and objective function. This is the RACF algorithm and VMs.
Output: optimum value of the objective function, order to perform tasks.
(1)function [TargetFitness, TargetPosition] = BHS (N, , lb, ub, dim, RACF, VM)
(2)GrassHopperPositions = initialization (N, dim);
(3)for i = 1 : size (GrassHopperPositions, 1)
(4)[GrassHopperFitness(1,i),,CRVM] = RACF(Task(GrassHopperPositions(i,:)), VM,alpha);
(5) end for;
(6)l = 1;
(7)while l <  + 1
(8);
(9) for i = 1:size(GrassHopperPositions,1)
(10)  temp = GrassHopperPositions’;
(11)  for k = 1 : 2: dim
(12)   for j = 1:N
(13)    If I∼ = j
(14)    ;
(15)  end if
(16)    end for
(17)     total(k:k+1,) = ;
(18)  end for
(19)  GrassHopperPositions_temp(i,:) = round(c + ());
(20)   [FNew] = RACF (Task(GrassHopperPositions_temp),VM,alpha);
(21)   [FLSTF] = RACF (LSTFlist, VM, alpha);
(22)   [FSPT] = RACF (SPTlist, VM, alpha);
(23)   [FLPT] = RACF (LPTlist, VM, alpha);
(24)   [FLNS] = RACF (LNSlist, VM, alpha);
(25)   ISelected = RouletteWheelSelection (FNew, FLSTF, FSPT, FLPT, FLNS, TargetFitness);
(26)   switch ISelected
(27)    case1: GrassHopperPositions(i,:) = GrassHopperPositions_temp(i,:);
(28)    case2: GrassHopperPositions(i,:) = IDof List(LSTFlist);
(29)    case3: GrassHopperPositions(i,:) = IDof List(SPTlist);
(30)    case4: GrassHopperPositions(i,:) = IDof List(LPTlist);
(31)    case5: GrassHopperPositions(i,:) = IDof List(LNSlist);
(32)  end switch
(33) end for
(34)  l = l + 1;
(35) end while
(36) End