specless.tsp.tsp
TSP
# Number of locations >>> n = 4 >>> nodes: List[int] = [0, 1, 2, 3]
# Ready time >>> a: List[float] = [0, 5, 0, 8]
# Due time >>> b: List[float] = [100, 16, 10, 14]
# Travel time >>> costs: List[List[float]] = [ … [0, 3, 4, 5], … [3, 0, 5, 4], … [4, 5, 0, 3], … [5, 4, 3, 0], … ]
# 1. Just Test with the cost (TSP Solver) >>> tsp = TSP(nodes, costs)
>>> service_times = [2, 2, 2, 2]
>>> tsp = TSP(nodes, costs, service_times)
Classes
General TSP. |
|
Traveling Salesman Problem |
|
Traveling Salesman Problem With Timed Window Constraints |
|
Traveling Salesman Problem With TPO Constraints |