Research Article

A Heuristics-Based Parthenogenetic Algorithm for the VRP with Potential Demands and Time Windows

Algorithm 1

Step  1: Set the model and algorithm parameters , , , and initialize some transient variables
for heuristics , , , , , .
 We let if customer i has not been visited by vehicles yet, otherwise, ; is defined as the remaining quantity
of products loaded by a vehicle k when it departs from customer in its lth cycle; is the cost due to the time windows
is violated, that is, the second term of the objective function, (1).
Step  2: Initially, each vehicle starts from the central depot “” for delivery, and update and for simplicity
where and ;
Step  3: Vehicle k is assigned to service customer j in terms of Rule 1, and update and ;
If  
   Generate the potential demand of customer j, update , and go to Step  4;
Else go to Step  4;
End;
Step  4: Calculate the decision variable in terms of Rule 2, that is, the demand of customer j met by a vehicle in its lth cycle,
and the penalty cost induced by the time windows.
 (a) If   
   If    then and update
         , , ;
      Else    and update , ;
      End;
   Else
    If    then and update , ;
    Else    and update , ;
    End;
   End;
 (b) It can be concluded that from assumption (5):
   If    then ,;
   Elseif then ;
   Else   , ;
   End;
Step  5: Decision whether to continue to delivery or return to the central depot.
If  
   , , go to Step  6;
Else
    If    then , and update , ;
     Go to Step  3;
   Else go to Step  3;
   End;
End;
Step  6: Output the route of all vehicles according to , and the decision variable such that a solution for VRP is created.
Step  7: Repeat Steps  1–6 and terminate until M individuals are generated.