Everyone, I have a question. I need to find the longest path from one node to another in the network. As shown in the figure, it is a directed network, and I currently have no idea how to implement it in the “KNIME” tool. The figure is just a simple example. If the quantity is large enough, how should I implement it.
How to implement without using programming tools such as Python or R?
The figure only shows the following results: node 1 to node 4, node 1 to node 3; Node 5 to Node 4
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:
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.
Hi @takbb
I try to contact you directly but find only this way for a question about your component “all routes between nodes”. In the example joined, the directed path 1, 10, 15, 14, 5 is existing :
Hi @JPollet, thanks for letting me know about the problem with the component. This was caused because I’d inadvertently set a low maximum limit on the number of recursions, so it was exiting before finding all the paths in your network. I have updated the component, and added an additional config for maximum recursions. There needs to be a limit, in case of a huge network which might have far too many combinations of paths. I have set the default at 5000.
I also added some additional small efficiency improvements and as a result I think in your case it now requires about 475 recursive iterations. The previous hard-coded limit was about 400.
If you update your component from the hub (you should find version 2 is present)
You can tell if you have the new version, as it now has the following config: