Hi @lichang , I don’t know how well this will work with a large data set, as internally it uses a recursive loop along, but take a look at the following workflow:
The hard work is inside this component:
which internally looks like this:
Feel free to disconnect it/open it up and have a play!
Given the following network (based on your picture)
the workflow generates the following result:
Finding the shortest route is much simpler (and faster), as there is a node for that, but not for All Paths or Longest Path… Python or R would no doubt run more quickly.