Research Article

A Pseudo-Parallel Genetic Algorithm Integrating Simulated Annealing for Stochastic Location-Inventory-Routing Problem with Consideration of Returns in E-Commerce

Pseudocode 1

Pseudocode of the proposed PPGASA.
Procedure: PPGASA for LIRP
Input: coordinates of nodes, demands and returns of retailers, MC parameters, vehicle capacity, PPGASA parameters
Output: the best solution (include routes, MCs locations, order times and order size)
Begin
Take pop
for i = 1 to pop_size
Calculate individual fitness value  
end
  
n = 1
k = 1
T = 100
while n ≤ 300
  select operator
  if random  then
  crossover operator
end
if random  then
mutation operator
end
newpop
   for m = 1 to newpop_size
    if objvalue(m) < objvalue1(m)
     Sel(m,:) = Z(m,:)
    else
     Sel(m,:) = Cos(m,:)
    end
   end
  pops1 = zhuanh(Sel)
 [objvalue1 = calobjvalue(pops1, d)
  for i = 1: popsize
   if objvalue(i) > objvalue1(i)
    objvalue(i) = objvalue1(i)
    Z(i,:) = Sel(i,:)
   else
    p = rand
    if pexp((objvalue1(i) − objvalue(i))/T)
     objvalue(i) = objvalue1(i)
    Z(i,:) = Sel(i,:)
    end
   end
  end
  gen = gen + 1
  pops2 = zhuanh(Z)
 [objvalue2] = calobjvalue(pops2, d)
 [hh, kk] = min(objvalue2)
  GY(gen, 1) = hh
   GX(gen,:) = pops2(kk,:)
   end
   T = α * T
end
output the best solution
end