Research Article

A Cross-Regional Scheduling Strategy of Waste Collection and Transportation Based on an Improved Hierarchical Agglomerative Clustering Algorithm

Algorithm 2

Garbage collecting path planning (GCPP) algorithm.
Input: GCPList, GCPLocs, GTSloc, nums
Output: The optimal collecting route
(1)pathCost←[]
(2)% Get all possible paths
(3)allPaths←permutations (GCPList, GCPLocs, nums)
(4)% Calculate the distance of each path in allPaths
(5)for path in allPaths do
(6) % calculate the operating cost between each collection point
(7) cost←getCost1 (path)
(8) % calculate the operating cost from the last collection point to the transfer station
(9) cost←cost + getCost2 (path[−1], GTSLoc)
(10) pathCost append (cost)
(11)end for
(12)% Select the path with the least cost from all the paths
(13)optPath←allPaths [pathCost.index (min (pathCost))]
(14)return optPath