SonOfTheStars / Logistics-Pipes-2

MIT License
30 stars 7 forks source link

Cached dijkstra #9

Closed Borimino closed 7 years ago

Borimino commented 7 years ago

DijkstraRouter now has a Cached counterpart, where for every pair of start and target nodes the route is calculated at most once. The cache is cleared when the router is shutdown.

Caching might not give the optimal path, if a shortcut has been added after the route was first calculated