Open nikosGeography opened 1 month ago
The Travelling Salesman Problem finds the optimal route visiting a set of nodes, while (if I am right) the Chinese Postman Problem finds the optimal route visiting a set of edges. How this could normally be solved is by converting the network to its linegraph, in which nodes become edges and vice versa, using tidygraph::to_linegraph()
, and then solving a regular TSP. However I have not tried myself before if it works well with sfnetwork objects for this case, would be interesting to find out!
Hi, thank you for creating this amazing package. I am trying to solve the chinese postman problem (CPP). So far, I followed the tutorial found here, where I just set 10 points that the postman needs to pass from, given that the starting and ending point are the same. The code:
Now I want to set a point (see the
dput(p
) below) which will serve as my starting and ending point but the postman needs to pass from every street (if possible) instead of 10 random points. I tried fe things without success (that's why I'm not posting ane example). I am very new to graphs so any help to point me to the right direction would be nice.The dataset I am using:
And the road network