24 public static void Main(String[] args) {
27 const int numLocation = 5;
28 const int numVehicles = 1;
48 (
long fromIndex,
long toIndex) => {
52 return Math.Abs(toNode - fromNode);
78 long index = routing.
Start(0);
79 Console.WriteLine(
"Route for Vehicle 0:");
80 long route_distance = 0;
81 while (routing.
IsEnd(index) ==
false) {
82 Console.Write(
"{0} -> ", manager.
IndexToNode((
int)index));
83 long previousIndex = index;
87 Console.WriteLine(
"{0}", manager.
IndexToNode(index));
88 Console.WriteLine(
"Distance of the route: {0}m", route_distance);
static void Main(String[] args)
This is a sample using the routing library .Net wrapper.