Research Article

Optimization of Rider Scheduling for a Food Delivery Service in O2O Business

Table 3

The pseudo code of the heuristic algorithm.

Input: The order dataset
Output: The numbers of the riders and the rider’s route
Step 1: generate initial route by using insertion heuristic
Step 2: set initial solution as the current solution, neighborhood solution , and best solution
Step 3: implement remove operation on current solution to obtain partial solution
Step 4: use repair operator to obtain neighborhood solution from partial solution
Step 5: if outperforms , accept the inferior solution according to the principle of simulated annealing
Step 6: check if the termination condition is fulfilled, that is, after N consecutive iterations, the value of S_best no longer changes. Then, jump to step 6 if yes, otherwise to step 3
Step 7: output the optimal solution