Show HN: NYC Subway Simulator and Route Designer (buildmytransit.nyc)

201 points by HeavenFox ↗ HN
Hello HN!

As a long term NYC resident, I have read countless articles on ideas tweaking subway services, but always found them hard to follow without visual aid. So over the long weekend I decided to build one. It has all the basic features: trains would spawn at their origin, stop at stations, and slow down if it gets too close to another. You can also design custom routes by piecing tracks together.

Have fun, and let me know what you think!

14 comments

[ 3.1 ms ] story [ 29.2 ms ] thread
Very cool.

Sometimes when I Edit Routes and click an "<- Add" button I get the console error "Uncaught Error: coordinates must be an array of two or more positions" and the page blanks out.

This is sadly not mobile friendly in an amusing way; the map controls are nice and legible but they block basically the entire map. If there was a way to minimize them (perhaps automatically), this might work well on mobile.
Very cool! It would be nice to have a bit more information in the readme about the project structure and e.g. how to adapt it for other cities :)
I contract out work to MTA, specifically their AI/ innovation teams.

I'm 100% showing this to them today just for fun. They'll get a kick out of it.

I can't figure out how to add a route from Bay Ridge to Clinton in NJ. That's my wishlist subway - got to Newark Airport from Brooklyn without going through Manhattan.

Edit: Actually Clifton is in NY, and playing with Google maps there's ZERO public transport from Staten Island to NJ, except by going through Manhattan!

So my idea wouldn't help anyway, unless they extended that subway all the way over the Goethals Bridge.

Very nice! I thought of doing the same thing in the past!
Finally, I will make a subway that crosses the park!
I want to love this but the visual language makes it kind of unusable for me. Why not match the track and train colors to their line color (red for the 123) and then use different visual indicators for train state (stopped, at station, etc)?

For example: Selected: Black fill Normal operation: Color fill with 100% opacity Slowing down: 70% opacity Stopped: striped fill, 50% opacity At station: pulsing opacity

What's the point of designing custom routes, except I guess for fun? NYC is never going to build any new routes.
I love it! Amazing work.

A slider to do a bit of time-travelling if possible would be also a nice to have

Your default dwell times are wayyyyy too short.

On high capacity systems, train dwell time becomes the limiting factor on passenger capacity. 30 seconds is generally the minimum possible dwell time a system can manage, 20 seconds might be possible during much lower demand periods. But you’re unlikely to ever achieve better than that.

The London Victoria Line, which runs with 90 second headways at peak, achieves at best 24 second dwell times in central section, but 30-40 seconds is more realistic for most stations.

Don’t forget, dwell time includes more than just passengers getting off and on. It has to include time to open the doors, close the doors (including a 2-3 second visual and audible warning!), perform needed safety checks, and eventually pull away. Those operational components the sandwich the core “people getting on and off” bit of station stops add up to a non-trivial number of seconds.

https://www.researchgate.net/figure/Dwell-Time-and-Passenger...

As a minor note, the NYC subway uses a system of fix automatic blocks, not a moving block system, which is what your simulation appears to use. Moving block systems are dramatically more efficient than fixed block systems. But I have no idea how you would get hold of accurate block locations for the NYC subway.

you need to model passenger behavior at rush hour in the face of train cars with a truly foul smells and puddles on the floor!
This is awesome—a sandbox for transit nerds lol my husband will love this. The dwell time + simulation rate sliders are super fun, can do a lot with congestion indicators or bottleneck flags when trains start stacking up or something... fun to stress test bad routing decisions.