Research Article

A Modified Harmony Search Algorithm for Solving the Dynamic Vehicle Routing Problem with Time Windows

Algorithm 4

Check Requests ().
  dynamic customers are request in time
  update the location of each vehicle in by using (15).
  for  (each dynamic customer in )  do
    //decide whether to accept or reject customer by using insertion Rules 14.
    if it satisfies Rules 1 and 2  then
     attempts to insert the customer into an existing route by Rule 3.
     if not, apply Rule 4 to split a route into two new routes
     attempts to inserted by Rule 3 again for each two newly routes
    else
    reject it.
  end if
  if  (reject)  then
     add to reject pool
     remove from
  end if
  end for
  return