Research Article

Vehicle Routing Problems with Fuel Consumption and Stochastic Travel Speeds

Algorithm 2

Input:
(1) string vector VRPS and fuel consumption function about travel speed .
(2) single vehicle cost:, vehicle capacity: , demand matrix , speed matrix , distance matrix .
Output: total cost of all vehicles, including fixed cost and expected fuel consumption
Begin
(1) ,
(2)   = find the last nonzero index of VRPS; //find the real end of the string
(3) For    to    do begin //start from the last customer of the last vehicle
(4)  ; //distance of arc()
(5)  ; //the mean of the average speed of this arc
(6)  If   //find a used vehicle
(7)    ; //reset the load to zero
(8)    ; //update the number of vehicles
(9)  Else
(10)    ; //update the vehicle load
(11)  End If
(12)  ; //update the expectation of fuel consumption
(13) End For
(14) ;
(15) Return  
End