I setup a basic reference track to help my understanding of what the game has to work with.
![Image](https://forums.factorio.com/images/ext/55b42d6e3b1b3b87ebbf3907a9194eaa.png)
Enabling some of the debug information shed some light on how the game chunks the track sections
![Image](https://forums.factorio.com/images/ext/d6b6c063c81add4d4bf3c499d66ad328.png)
Are optimizations like caching routes, or simplifying the node graph for continuous sections, done behind the scenes?
Are there specific things that would help you out, like code examples or sample algorithms? Are there specific constraints that need to be satisfied?