Minecraft Transit Railway (Automated trains, planes, and more!)

Minecraft Transit Railway (Automated trains, planes, and more!)

1M Downloads

Pathfinding algorithm doesn't choose the best route.

Libertas007 opened this issue ยท 2 comments

commented

When I play the MTR mod, the routes taken by the trains sometimes don't make sense. The mod is not choosing the best path.

This is the example where the train goes from Cliffside Birch Lake to Cliffside Village South.

System Map Image
Picture of my system map

Expected Behaviour
The train should have gone in the direction of the blue arrow in the image. There is a path, there are rails with 120 km/h speed.

Actual Behaviour
The train turned back on a turnback rail between Cliffside Birch Lake (it once was a terminal station) and it went all the way along the green arrow. The ride took around 5 minutes.

Environment

Minecraft Version: 1.19.2, Fabric Loader 0.14.11, Fabric API 0.68.0

Installed Mods:

  • MTR 3.2.2
  • LU Addon 1.11
  • Joban Client 1.2.1
  • Slideshow 1.0.2
  • Worldedit 7.2.12

Additional Information
I looked through the code where the path is generated and I think the MTR mod could use the Dijkstra's algorithm for the pathfinding. Unfortunatly I wasn't able to fully understand the current implementation of the pathfinding algorithm.

commented

I also have the same issue. I submitted the same problem a few months ago. Don't know when the next update will come out but they should definitely tackle this problem by then since its severely impacting the playability of the mod, at least for me. I'm not really experienced with coding but I think the Dijkstra's Algorithm is definitely a solution they should try out.

commented

This should be fixed in 4.0.0. Please reopen this issue if you still encounter this issue with 4.0.0, thanks!