im trying this vrp example
From my understanding, we must have 2d array to define distance matrix between all nodes
But for my demand, there is few nodes wont have distance matrix between, like this graph
The distance matrix array will be:
public final long[][] distanceMatrix = {
{0, 2, 1, 0, 0},
{0, 0, 0, 2, 1},
{0, 1, 0, 0, 0},
{0, 0, 0, 0, 3},
{0, 0, 0, 0, 0},
};
The issue is that for the distance matrix array, we must have int number between all nodes, so for two nodes that dont have direct path between (like A->D) i use 0, but OrTool will understand the cost to travel between those two nodes is zero. and the solver always choose that path to go.
So is there any support from ortool library to declare this kind on directional graph?
Thanks
