I am running a vehicle routing optimization model. below is the list of location coordinates (nodes), and the optimization output showing the sequence of locations to visit. I am wondering how to create a graph like below to visualize my output.
locations = \
[(4, 4), # depot
(2, 0), (8, 0), # row 0
(0, 1), (1, 1),
(5, 2), (7, 2),
(3, 3), (6, 3),
(5, 5), (8, 5),
(1, 6), (2, 6),
(3, 7), (6, 7),
(0, 8), (7, 8)]
[Route for vehicle 0:
0 -> 8 -> 6 -> 2 -> 5 -> 0
Distance of the route 0: 1552.0
Route for vehicle 1:
0 -> 7 -> 1 -> 4 -> 3 -> 0
Distance of the route 1: 1552.0
Route for vehicle 2:
0 -> 9 -> 10 -> 16 -> 14 -> 0
Distance of the route 2: 1552.0
Route for vehicle 3:
0 -> 12 -> 11 -> 15 -> 13 -> 0
Distance of the route 3: 1552.0][1]