Research Article
A Three-Stage Saving-Based Heuristic for Vehicle Routing Problem with Time Windows and Stochastic Travel Times
Algorithm 3
The procedure to calculate the evaluation value of a top-layer point denoted by saving from the depth layer of the data structure.
(1) Function calculateEvaluationValue(Saving, Depth): | (2) Set Depth = Depth − 1; | (3) Connect the pair of customers in Saving; | (4) Set TotalValue = 0, TotalValueNumber = 0; | (5) While there is any saving in the saving list that has not been considered, do: | (6) Fetch a saving from saving list into Sav; | (7) If the pair of customers in Sav can be connected without violating any problem constraint, do: | (8) If depth > 0, do: | (9) Call function calculateEvaluationValue(Sav, depth) and get the evaluation value of Sav, denoted by SavEv; | (10) Set TotalValue = TotalValue + SavEv, TotalValueNumber = TotalValueNumber + 1; | (11) Elseif depth = 0, do: | (12) Set the evaluation value of Sav, denoted by SavEv, to its saving value; | (13) Set TotalValue = TotalValue + SavEv, TotalValueNumber = TotalValueNumber + 1; | (14) Endif; | (15) Endwhile; | (16) If TotalValueNumber > 0, set SavingEv = TotalValue/TotalValueNumber; | (17) Disconnect the pair of customers in Saving; | (18) Return SavingEv. |
|