Research Article

QoS Analysis for Cloud-Based IoT Data Using Multicriteria-Based Optimization Approach

Algorithm 1

Basic genetic algorithm.
//P: the population of current generation
//n: the number of individuals
//m: the number of groups
//t: the number of current generations
//T: the maximum number of generations
Begin
 Initialize P(n)
  t = 0
   While (t ≤ T) do
    Calculate Fitness for P(n) using equation (1)
     If no Feasible (P), then
      Calculate Fitness for P(n) using equation (2)
     end if
     Sort P(n)
    for i = 1 to n/m
     Select P(i)
     Crossover P(i)
     Mutation P(i)
    end for
    for i = (n/m) + 1 to (n/m)2
     Select P(i)
     Crossover P(i)
     Mutation P(i)
    end for
    …
    for i = n − (m − 1)(n/m) to n
     Select P(i)
     Crossover P(i)
     Mutation P(i)
    end
    for t = t + 1
  end while
 end