Research Article
Multidepot Recycling Vehicle Routing Problem with Resource Sharing and Time Window Assignment
Algorithm 1
3D k-means clustering algorithm.
| Input: Number of RCs, geographic coordinates, and time windows of customers and RCs | | Output: Clusters, including RCs and their assigned customers | (1) | Import the geographic locations and center point of the time windows of RCs and customers as initial data. | (2) | Establish 3D vectors on the basis of the initial data and construct 3D data elements. | (3) | Set i as the number of clusters on the basis of the number of RCs. | (4) | Select the data from RCs as the initial clustering center of each cluster. | (5) | Traverse all the data elements. | (6) | Calculate the spatial and temporal distances from each element to the clustering center. | (7) | Assign each element to the nearest clustering center. | (8) | Update i clusters, and calculate new clustering centers. | (9) | If existing customers need to be adjusted among clusters | (10) | Then return to step 5; | (11) | Else | (12) | End if | (13) | End for | (14) | Output the results of i clusters. |
|