NIMBY Rails

NIMBY Rails

29 ratings
A Practical Guide to Timetables
By Executor
How to set up complex custom timetables to prevent bunching, service gaps, and collisions
   
Award
Favorite
Favorited
Unfavorite
Introduction
With subsequent updates, the game has added many tools to help easily make complex and realistic schedules. Unfortunately, the game is a bit light on tutorials (to say the least), so this guide aims to try to explain how they all work together to obtain the desired result in a modular and easy to understand way.
Manual Train Orders
To append a new manual order, you must specify:
  • the line you want to run
  • the first place the train will stop when it starts this order (Enter)
  • the last stop the train will stop when it exits this order (Exit)
  • the enter event, for calculating placement
  • days of the week it will run
  • the time, for calculating placement
  • whether the line should loop until the next order
Creating Yards
As far as the game is concerned, a yard is no different from any other station - it's just a place for the train to wait when it's out of service. To make a yard, you simply choose a platform, any platform, and make a special yard line with a stop. You can use existing stations as yards, if you want, but it does make it a little trickier to ensure you don't block off all the platforms.



To create the Detroit yard, for instance, I built a bunch of tracks to the side of the line, and designated one platform the "main" platform and other platforms secondary. This is not any different from how a station would be set up.

There are few differences -

First, I lowered the Area under Station Property to 0 so that the yard doesn't interfere with other stations. Notice how the statistics under the station read "0" for both passengers waiting (clock icon) and passengers in the catchment area (people icon). You can also change the Label to show only the Name if desired, but I kept the full icon to indicate this.

Second, I set the line to be a "Technical Maneuver" under "Service Level" on the Line information. All this means is that passengers won't get on or off. In all other respects, it works like any other line.

Third, selecting "Technical Maneuver" creates a stop behavior option, with two choices - "Black hole main, wait secondary" and "Wait on Platforms"

"Black hole main, wait secondary"
If the secondary platforms are clear, the trains will go to wait there. Otherwise, they will go onto the main platform and vanish. This means you do not need to ensure there is enough space for all trains in the yard.

"Wait on platforms"
The platforms will be used exactly like in normal service. If there aren't enough platforms to accommodate all trains attempting to use the yard at once, you may end up with a traffic jam.



Once you have this set up, you're ready to go, and can send any train to a yard by telling it to "run" this line. It will then proceed to the platform specified, and it will wait until the next order.
Pathfinding Between Lines
Trains do not need to have orders that leave the train exactly where it needs to be next. The trains are smart enough to figure out their own path. If the two lines are both set to revenue service (i.e. not technical maneuvers), then passengers can even ride along between the runs!



Here we can see this in action. I have told the train to go directly from Detroit Station to Detroit Yard, some distance away. Hovering over the order to go to the yard on the schedule breaks this down - the previous stop at Detroit will end at 0108, and the train will take four minutes to arrive at the yard, where it will then wait for a few hours until it's time to leave to get into position for the next trip.

Guiding Pathfinding with Waypoints
In general, a train will attempt to find the fastest route to the next run start. But, in some cases, this is not desirable. For example, I have a yard that has two approaches, from the north and south. The fastest way for my trains to get from the main Chicago station to the yard is via the north, but (to prevent unnecessary crossovers), I want certain lines to go from their platforms to the south approach, which is longer but will not require the trains to cross the tracks from their platforms.



To schedule this, I can tell the train to enter at the first waypoint and exit at the second. It will then use the single stop as a normal yard stop, and it will be able to pathfind its own way to the initial waypoint, and approach from the south, as I wanted. When it leaves, instead of using the north exit (which would be faster) to start its trip at Chicago station, it exits from the south. As long as both the north and south approach lines use the same main platforms, we'll have no problems with collisions in the yard, and they will determine where to wait at approach time, and won't block the black hole.
Enter/Exit Stations
This applies only to the initial entrance and final exit to this line. If the train is set to continue running on the line (by checking the "Loop until next order" box), all subsequent runs will be normal, it won't try to reset to the point you told it to enter.

For example, you have a line that goes [A, B, C, B, A], and you want it to leave from a depot at B and enter the line there. It's safe to tell it to enter and exit at B. It won't skip A.



I have done exactly that here, with a line that goes from Chicago to Detroit. I have trains that are based in the Detroit yard. As you can see by mousing over the run, the first trip is a half run, from stop [34] to [66], and then after that subsequent runs are full, until it's time to return to the depot again.

There is no need to make multiple lines for cases like this - you can tell a train to use only portions of lines as necessary.
Enter Event
The first two options here, "Depart exactly at" and "Arrive exactly at" are fairly clear, but the third, "Arrive no later than", can be very counterintuitive.

"Depart exactly at"
You set the time you want the train to depart from the first stop on the line. If there is slack time between the previous order and this one, it will just wait at the last stop on the previous order.

"Arrive exactly at"
You set the time you want the train to arrive at the station, where it will then begin its wait time. Once again, If there is slack time between the previous order and this one, it will just wait at the last stop on the previous order.

"Arrive no later than"
This is a flexible upper bound on how long it will arrive at this stop. A train will start its next run immediately after the previous run so long as it is before this time. If the previous run ends after this time, then the train will be unable to fit the orders.



In general, you want the actual revenue line to be set to "Depart exactly at" or "Arrive exactly at" and the depot line to be set to "Arrive no later than". That way, the train will immediately proceed to the depot once it finishes its last line

When a run is set to loop, it will fill in as many runs until it can no longer fit one without violating the next run's condition. Therefore, the easiest way to make a train fit in as many runs as it can and then wait at a depot is to tell the train to arrive at the depot no later than a point shortly before the first run starts. Then it will fit in as many runs as it can and immediately return to the depot, letting the depot pick up the slack time instead of sitting at the station



This is what I have done here, telling the train to return to the depot no later than 0400. However, in actuality, the train returns at 0108, because 3 hours is not enough time to finish another complete run (there and back)
Line Timings
Once at least one train has orders to run a line, you can customize the line timing. Because each train has its own acceleration, deceleration, and cruise profile, each type of train will run the line slightly differently. However, while many people understand that having a high speed train run on the same route as a slow train will cause problems with the high speed train catching up, this is far from the only consideration you must take into account.

To properly time a line, you need to decide:
  • how long trains should stop at each station
  • where the trains should wait for extra time
  • how frequently you want trains to run the line (the headway)
Station Stop Time
Although you can set a "Default stop time" under "Default timings", by default most trains will wait longer.

Why is this? Most likely, the line you made will take some random number of seconds to complete, which won't divide into a nice number. Even if you're setting it to auto run, the scheduler tries to make it fit into a week, so that the line runs are periodic in such a way that it will start the first line on Monday at the same time each week.

Case study - line with excessive station waits



My line to Sarnia proved particularly problematic. As you can see when I hover over the header, right above the list of stops, the "minimal loop" (meaning the time it takes to run this line if it had stopped for only 30 seconds at each station) is 7:07:23. But this is a really terrible number. If it keeps running this line with no stops the start time will be offset each week. To fix this, the scheduler rounds up to make the line finish in 8 hours.

But - and this is important to understand - the extra time is made up by waiting longer at stations. By default, the line is set to put the extra stop time (the last option under "Default timings") on every single station!



Although the game does a poor job of explaining it, this is shown clearly on the list of stops with the symbol to the right. This indicates that there is an extra 55 seconds of wait time at this station.

We can confirm it by hovering over the actual times to the left of the stop information.



The train arrives at the first station at the 0 point of the line, but waits for 1 minute and 25 seconds instead of the expected 30 seconds, an extra 55 seconds.

Why it's a problem
This is quite terrible for our timings. My line from Chicago to Sarnia shares a large portion of its track with the line from Chicago to Detroit.



The line from Chicago to Detroit runs with a minimal loop time of 6:53:38, which gets rounded up by the scheduler to 7:00:00, since the number of hours in a week happens to be a multiple of 7 (24 * 7 = 168). But this gives the line less than 10 minutes of extra time, which causes only 6 seconds of extra time at each stop.

This has huge implications for scheduling. Suppose a train to Detroit gets stuck behind a train to Sarnia while leaving the station for whatever reason. Then while the train to Detroit wants to wait for 36 seconds at the 24 stations they share before diverging, the train to Sarnia will wait for 85. This means the Detroit train won't be able to ever catch up, and it will get later and later as it waits for the Sarnia train to finish, depriving it of its change to leave early. The total delay per trip from Chicago to Detroit, in this case, will be 24 * (55 - 6) = 1176 seconds = 19 minutes and 36 seconds. That's really bad, and means any delays will be compounded each run.

It's entirely possible for a train to never make up the time if just set to continuously auto run in these conditions, and your schedule will become complete random chaos. If you set the trains to return to depot at some point, it will be able to make up for (hopefully all) of the slack time there, but if your train ends up something like 20 hours delayed each week, it still won't ever be fixed if it only has a few hours scheduled to return to depot each week.
Where to Wait?
Aside from screwing with your timings, extra stop time at stations also is an inconvenience to passengers. Even if an extra 30 seconds at each stop doesn't sound like a lot, that adds up - rounding up from a 7 hour trip to an 8 hour trip means, in practice, that passengers are going to be waiting an extra half an hour each way just from extra time at stations

Luckily, NIMBY Rails gives us total control over where trains should wait.



By selecting "Manually picked stops" for the extra stop time option, all the extra stop times will be dumped at the last stop on the line instead of evenly on every stop.



And when you select any of the stops from the stop list, there is a new option: "Custom duration wait in this stop"

By selecting this, the extra stop time will be distributed to this stop. The distribution is even between selected stops.



After selecting one, I now have an extra wait time of 46:15 at Sarnia.



But the more stops I choose, the shorter the wait time will be at each individual stop. For most realistic operations, I'd recommend making terminals, and having the complete wait time at one or the other ends of the service. That way, you know that whatever manually set line wait time will always be how long your train waits at intermediary stations.

Making terminals
One thing to be mindful of is that if the train is waiting at a stop for a long time, it will be taking up a platform. I happen to have (spoiler alert for the next section) 10 trains running this line right now, and each train that arrives at Sarnia will then wait for almost 50 minutes each. This might cause a traffic jam.

To confirm that it's not, I can click on the station at Sarnia and then click on the "Platforms" tab. This visually shows how long the train will take up at each station. The caution button at the bottom will even highlight any overlaps.



I can see a sliver of white between each run, which means that the train is scheduled to leave just before the next one comes in. But, if there are overlaps, I would need to build more platforms to accommodate them at the station.

To give you an idea of what it looks like when there are overlaps, here is the Harlem terminal of my expanded Chicago pink line.



PNK1 (the main service that goes along a resurrected north-south Paulina connector) has such a high frequency relative to wait time that at points there will be three trains waiting in the terminal to leave. At the same time, PNK2 (a secondary service that connects to the Dearborn Subway to bolster the blue line) will have one train. So I needed to either build at least four platforms to ensure that I don't have congestion, or else reduce the frequency or the wait time of the line.
Headways & Runtime
Runtime is inexorably connected to timing of the line. If you want to run several trains along a line and space them evenly, the simplest way to do this is to have them run the line spaced out in such a way that the last will leave just as the first finishes. Usefully, NIMBY Rails has built in tools to let us manage this entirely automatically.

So, you should work backwards from the operating pattern you want to figure out both the runtime and number of trains.

Configuring a yard at both terminals
For instance, I want half-an hour frequencies on my line from Chicago to Detroit. As we saw before, the line takes just under 7:00:00 to finish, so we round it up to a 7 hour trip. I set the line to wait at both Chicago main station and Detroit main station, for a 3 minute wait each between runs. I set the two patterns to be parallel - the train will leave Chicago and Detroit at the same time.



Now, after I have two trains set to go from Chicago to Detroit, one starting at Chicago and one starting at Detroit, I go into the "Group" tab next to the train orders and click "Clone as Copier". Since I will have two groups leaving each terminal, I want each to have an hour frequency, which means 7 trains. I change "Shift mode" to "Evenly over line duration" and set it to Chicago - Detroit. You can choose to only shift passenger orders if you want, but I have no problem with the yard time being offset for each train to maximize time that each train will be in service.



Voila! Now when I go to lines, click on my line to Detroit, and go to "Timetable", I can see exactly this! Two groups, each leaving at the same time, parallel to each other.



I finally can confirm that everything is lined up as I want by clicking on a station and ensuring that the headways are even. Here you can see that the trains pass the station every half an hour, exactly as intended.

Configuring a yard at only one terminal
With my Sarnia line, I decide to have only one pattern, originating at Chicago and ending at Sarnia. That means I only need one group. I decide that I want a 45 minute frequency, due to smaller populations along the line.

Unfortunately, the runtime of the line - 8 hours - doesn't allow for me to do this evenly. 8 hours = 480 minutes, which is not a multiple of 45. While I could make a custom schedule that would accommodate this, perhaps with a custom offset for different groups, I decide to keep it simple.



Since I no longer need the line to fit into a week, I change it to a custom period and reduce the running time to 7:30. This also reduces the wait time.



Now that the runtime is 7 hours 30 minutes = 450 = 45 x 10, I know that I can get the desired 45 minute headway with 10 trains.
Syncing Lines that Share Track
Several lines may end up coming together and you'll want to make sure they're relatively evenly spaced so that they aren't all scheduled to converge at once. That way, the lines merging will increase the frequency on this section without bunching up. This is especially useful if you have lines converge closer to cities where densities (and therefore passenger numbers) will be higher.



For example, by the time the trains on these lines get close to Chicago, several of them are now running together: a line to Toledo, a line to Detroit, a line to Sarnia, and a line to Grand Rapids. Each has different frequencies (30 minutes: Detroit, Grand Rapids; 1 hour: Toledo; 45 minutes: Sarnia). But, because the lines share a common divisor in 15 minutes, I can make the schedules periodic in a way that they will always arrive in the same relative positions to each other.

To tweak this, you look at the schedule and determine what time each will leave a reference station, tweaking that as necessary to leave at the appropriate relative times. As long as you have the same types of trains and the same wait time at each station, you know that the headway will stay consistent throughout the shared line. If necessary, section speed limits or track speed limits could be configured to bring them in line, if multiple train times are running the same sections.

Helpfully, the platform view of a station will show this in real time. If you leave it open as you tweak the group time, the platform view will update immediately to show what the new schedule will look like.

Generally, you want to work from biggest to smallest: bigger lines with more shared sections should have their timings determined first, and then smaller lines should have their timings worked out in reference to the bigger lines.
Conclusion
I hope this was helpful! Let me know if there are any things you feel like this guide should include or any feedback. I tried to make it concise and modular to go through the building blocks of the systems that allow you to schedule your train. NIMBY Rails is an incredibly powerful simulation that allows for near limitless customization - provided you really like customizing train schedules, of course. It allows you to very quickly and easily create realistic and effective schedules without actually having to micromanage too much, which I hope I showed here.

Thanks for reading!
2 Comments
Farmerbrown96 1 Oct, 2024 @ 7:45pm 
This has been super helpful for me and i reference it frequently. Can you edit it with the new scheduling update? or create a new one? Or point me to an updated one if I am overlooking it! thanks!
adlet 2 Apr, 2024 @ 8:49pm 
Great guide! A minor technical correction. Under Enter events, for Depart/Arrive exactly at, the train will spend the extra time before the run starts at the last station of the previous run if the previous line timing is set to Minimal, or if set to Custom/Fit but the manual stops for extra time have not been designated. Otherwise it will spend that time at the last station designated for custom time. Also, may be worthwhile noting the stations' platform view has some issues, in some situation arriving trains are not shown there, and certainly passing trains are also not shown.