4 ms·
Typical metro maps are quite complicated to automatically calculate. At least I know of no efficient algorithm and force-directed layout doesn't really work, si
by ygra 4y ago
Typical metro maps are quite complicated to automatically calculate. At least I know of no efficient algorithm and force-directed layout doesn't really work, since you want the stations in roughly the right place, especially relative to other stations. A colleague tried something based on a paper a few years ago [1], alas it only really worked with a commercial ILP solver. We've tried an open-source one a year before that and could only get results in acceptable time for three lines or so.
I think most tube maps are hand-arranged, perhaps with some algorithmic help, but oftentimes you also have to fit a specific aspect ratio or shape (because the greater metropolitan area is also shown on the map, along with fare zones), which I don't think any algorithm currently does well. And the manual approach can result in niceties like the actual circle around the city center here: https://www.rsag-online.de/fahrplan/liniennetzplaene https://www.rsag-online.de/fahrplan/liniennetzplaene
[1] https://www.yworks.com/blog/automatic-metro-map-generation https://www.yworks.com/blog/automatic-metro-map-generation