Tutorial:Train Throughput

This is to help figure out how to best utilize trains to transport items while maintaining a stable production throughput.

The idea is that the rate that you load a particular item on one train station persits on the receiving station's end without interuption. In other words, the inventory of the freight platform on the receiving end should never be depleted if you're drawing at the same rate that it's being loaded on the shipping end.

Main Goal
In order to ensure item throughput is maintained between both ends of a train route, the train must take less time to complete it's round-trip route than it would take for the produced items to fill the train's freight cars.

Example Problem
I'll use this scenario as a reference throughout the article: "Let's say you're producing 600 iron ingots per minute on one corner of the map. You want to use all of that output and produce 600 iron rods per minute on another corner of your map. You want to transport those iron ingots using automated trains."

Train/Station Setup

 * You can set up your route however you like, with as many train stations along the route as you like. Just be prepared to expand your stations, as you may need to add more freight cars to your train.
 * You can place locomotives on the same train facing in opposite directions, allowing for a train to travel frontwards and backwards along it's track. This may make route creation simpler, however changing the stations after the fact may be challenging and will change which freight platforms and freight cars that items are loaded/unloaded to.
 * Single direction trains make train station setups and their subsequent expansions easier, but will require more work on route set up.
 * Approximate how many freight cars you may need, keeping in mind that this may change, as will your stations.
 * You can have multiple locomotives in the same direction, which will increase acceleration and deceleration, but will not increase max speed.

Multiple Trains On The Same Route
This would certainly solve any throughput issues, however without clipping the trains would eventually "meld" and look rather unsightly. It would also require more power to run multiple trains. If you follow this guide, multiple trains are not necessary.

Calculate Your Route Duration
Grab a stop watch and time the entire route, starting and ending on the same station. If a train doesn't load/unload at a station that it stops at, add 25 seconds (this takes in to account for loading/unloading time it would normally take). For simplicity, convert the final time to seconds. For our example problem, lets say the route took 9 minutes(') and 40 seconds("), and that the train didn't load at two stations on the way:
 * 9' + 40" + (25" * 2)
 * =(9' * 60") + 40" + (25" * 2)
 * =630"

Freight Car Fill Time
To calculate fill time (f) we need three values:
 * Item stack size (s)
 * Item rate of production per minute (r)
 * The number of inventory slots on a freight car (32).

We would divide the maximum iventory capacity of that item in a freight car by the item's production rate. Then we would convert it to seconds to compare against our route duration. Simplified in an equation, this would be:

f=1920s/r If we're producing 600 iron ingots per minute, and iron ingots have a 100 item stack size then:
 * f = 1920 * 100 / 600 = 320"

Adjust and Re-Test
If you want to ensure the throughput is maintained on both ends of a train route, adjust the number of freight cars so that it takes longer to fill them than it takes the train to complete it's round trip. "With our above example, if it takes 320 seconds to fill a freight car, and the round-trip route takes 630 seconds, then we would need at least two freight cars for the iron ingots since it would take 640 seconds to fill them. With just a 10 second margin it may be more practicle to even have 3 train cars" Since adding freight cars increases route times, make sure to time them again and ensure that proper throughput is achieved.