Research Article

A Multifactory Integrated Production and Distribution Scheduling Problem with Parallel Machines and Immediate Shipments Solved by Improved Whale Optimization Algorithm

Algorithm 2

Pseudocode for Improved WOA.
Input data
input , ,
Initialize
for to npop;
generate for all , , , ;
decode the continuous vector to binary variable using ;
evaluate the fitness of the initial population;
end;
;
Main steps
while t≤ maximume number of iterations;
update (, );
update as random variable ;
for to npop
if 2
  if 2 ;
  update the current search agent using improved shrinking encircling mechanism;
  
  
  end if 2
  if 2
  select a random search agent from ;
  update the current search agent using improved equations
  
  
  ;
  end if 2
end if 1
if 3
update the current search agent using spiral updating mechanism;
end if 3
decode the continuous vector to the binary variable using ;
implement the production and delivery scheduling considering the constraints;
evaluate the fitness of the ;
end;
update the if better;
;
end while;
return ;