A small question about path finding
Technici4n opened this issue ยท 4 comments
I have a small question:
What algorithm do you use to find the shortest path between two pipes ?
Or at least if you could point me out the code doing it it would be great.
Thanks.
What are you looking for? The code which looks for connections from one routed pipe to another, or the code that calculates our routing tables?
Not exactly, but I found in a subfolder the class PathFinder I was looking for =D (because it's hard to optimise path finding, and it doesn't seem to cause lags in LP). I can also see how complicated it is to manage the item requests.
Thanks for your help.
I am looking for the code which does: "The crafting pipe at x1,y1,z1 requires 64 sticks from the provider at x2,y2,z2. What is the shortest path ?" (The routing tables I guess).
Then you are probably looking for this: https://github.com/RS485/LogisticsPipes/blob/dev/common/logisticspipes/routing/ServerRouter.java