Research Article
Feasible Initial Population with Genetic Diversity for a Population-Based Algorithm Applied to the Vehicle Routing Problem with Time Windows
Algorithm 1
Clustering algorithm applied to VRPTW.
(1) Initialize () | (2) Read Input Data | (3) for : | (4) for : | (5) end-for | (6) end-for | (7) Initialize structure Solution, vect_taboo, index | (8) Repeat | (9) centroid = 1 + (rand()%) | (10) if vect_taboo [centroid] == 1 then | (11) Repeat centroid = 1 + (rand()%) | (12) Until vect_taboo [centroid] == 0 | (13) end-if | (14) vect_taboo [centroid] == 1 | (15) Search_nearest_client_at_centroid | (16) if ( then | (17) if vect_taboo [] == 1 then | (18) Repeat Search_nearest_client_at_centroid | (19) Until vect_taboo [] == 0 | (20) if ( then ++ end-if | (21) end-if | (22) else | (23) vect_taboo [] = 1 | (24) Solution [index] = | (25) end-if | (26) Until index == |
|