Train physics made simple
Posted: Sat May 13, 2017 4:31 pm
So we get semi-regular questions on these boards asking about train throughput and wagon versus loco count, 1-way versus 2-way, etc. I decided some of the deeper info, about the actual underlying physics isn't very easy to find (I've had to use some carefully chosen keywords to re-find a rather old post that actually covers the underlying math, though afaik the numbers haven't changed, sans 0.15's max speed modifiers for different fuel types), and even when found, is rather complicated at first look. However, with a bit more work, it's possible to greatly simplify the required calculations, it's reasonably well-known among the regulars on these boards that train speed is related the loco-to-wagon ratio, and perhaps a bit less well known is that locos facing in opposite direction not only don't contribute to the train's forward movement, they are each equivalent to 2 wagons in weight (2000 instead of a wagon's 1000 weight). The locos that are contributing to forward movement also apply their weight, but that does not impact the loco-to-wagon ratio (Each loco can get up to 4000 total weight to maximum speed; hence 1 loco to 2 wagons, or 1-2-0 trains, or multiples thereof, such as 2-4-0, 3-6-0, 4-8-0, etc.), moreover, most people don't actually know train speeds for less-than-maximum speed trains, which can be computed in a relatively straightforward manner using the game's own equations, especially if you first simplify them by entering in the relevant constants.
It is a common convention to denote train configurations with a 3-number triple, such as 1-2-0, or 2-4-2. What this denotes is:
(number of forward facing locos)-(number of wagons)-(number of backward facing locos)
It provides a very concise way of describing the configuration of a train containing all of the important information that determines things such as max speed and theoretical item throughput.
The information below was derived using information obtained from this post: viewtopic.php?f=93&t=21001&p=147834#p147834.
Train speed maximum:
1.2 tiles/tick=72 tiles/sec=259.2 km/h
This is exact, as is easily checked by doing the math assuming that 1 tile=1 (sq.) meter. Because of this, it is easy to derive a conversion factor for converting between tiles/tick and km/h:
Speed conversion factor:
1 tile/tick=216 km/h
Simplified general equation for (1-way) train speed in tiles/tick:
S=5L/(2L+W) (capped at a max of 1.2)
...where...
S is train top speed in tiles/tick
L is number of locos
W is number of wagons
For 2-way trains, use the above formula for 1-way, but treat each backward facing loco as 2 wagons. Explicitly, the resulting formula is:
S=5F/(2F+W+2B) (capped at a max of 1.2)
...where...
S is train top speed in tiles/tick
F is number of forward facing locos
W is number of wagons
B is number of backward facing locos
Since most people that use 2-way trains use 'balanced' 2-way trains, we can further simplify the above formula to obtain:
S=5L/(4L+W) (capped at a max of 1.2)
with L being the number of locos per direction (e.g. a 1-2-1 train has L=1).
An interesting observation is that, for 1-way, the 1-to-2 loco-to-wagon rule is actually slightly loco heavy, the perfect ideal ratio to achieve maximum speed is actually 6 locos to 13 wagons (rather than 12), a 6-13-0 train. An interesting consequence of this is that it actually is possible for a 'balanced' 2-way train to achieve maximum speed with a given number of wagons, the perfect ratio in that case is a 6 locos per direction per wagon, a 6-1-6 train.
The above equations are useful for practical train problems, but for the more theoretical questions pertaining to optimizing large scale train networks, an alternative form, based on the loco-to-wagon ratio is preferable.
Ratio version of general 1-way train speed equation:
S=5/(2+R) (capped at a max of 1.2)
...where...
S is train top speed
R is the ratio of wagons per loco, or W/L.
The cap is reached precisely when R=13/6, and hence, for any R values at or below that number, S is simply 1.2, what's more interesting is what happens to speed as R exceeds 13/6. The equation clearly has the form of a reciprocal, and hence, train speed decreases sharply at first, leveling off towards its asymptote of 0 as R grows without bound. One might naively conclude from this that the highest throughput 1-way trains are those with the exact 6-13 ratio, because that gives highest speed, and therefore most wagons per second, but this is actually presumptive because a nontrivial portion of the train is locos and not wagons, sacrificing some speed could perhaps still result in more wagons per second because more of the train is wagons rather than locos. It turns out however, that the naive assertion is correct, though it takes some work to prove it. Of interest for those wanting to know how much efficiency is lost for running more wagons than is optimal, is the following equation.
Wagon rate in Wagon tiles/tick:
T=5R/((1+R)(2+R)) (only valid for R not less than 13/6)
...where...
R is the ratio of wagons to locos, W/L
T is the number of wagon tiles moved per tick (that is, speed, in tiles/tick, times proportion of train that is made up of wagons)
You can obtain wagons/tick by dividing T by 7, and wagons/sec by multiply that result by 60, or in otherwords:
Wagons/sec=(60/7)*T
To compute efficiency against the theoretical optimum, we first evaluate T for R=13/6, obtaining:
T=78/95=0.8(210526315789473684)...
Then we compare the value of T for general R to that for the optimum, taken general/optimal to obtain efficiency rating in decimal form (to convert to %, multiply by 100). Thus we obtain:
E(R)=475R/(78(1+R)(2+R))
Some sample values, rounded, I've included the actual value of E(2), accounting for capped speed and sub-optimal wagon to loco ratio, compared to ideal E(13/6) for reference:
E(2)=0.97436=97.436%
E(2.5)=0.96663=96.663%
E(3)=0.91346=91.346%
E(3.5)=0.86118=86.118%
E(4)=0.81197=81.197%
E(5)=0.72497=72.497%
E(6)=0.65247=65.247%
It is a common convention to denote train configurations with a 3-number triple, such as 1-2-0, or 2-4-2. What this denotes is:
(number of forward facing locos)-(number of wagons)-(number of backward facing locos)
It provides a very concise way of describing the configuration of a train containing all of the important information that determines things such as max speed and theoretical item throughput.
The information below was derived using information obtained from this post: viewtopic.php?f=93&t=21001&p=147834#p147834.
Train speed maximum:
1.2 tiles/tick=72 tiles/sec=259.2 km/h
This is exact, as is easily checked by doing the math assuming that 1 tile=1 (sq.) meter. Because of this, it is easy to derive a conversion factor for converting between tiles/tick and km/h:
Speed conversion factor:
1 tile/tick=216 km/h
Simplified general equation for (1-way) train speed in tiles/tick:
S=5L/(2L+W) (capped at a max of 1.2)
...where...
S is train top speed in tiles/tick
L is number of locos
W is number of wagons
For 2-way trains, use the above formula for 1-way, but treat each backward facing loco as 2 wagons. Explicitly, the resulting formula is:
S=5F/(2F+W+2B) (capped at a max of 1.2)
...where...
S is train top speed in tiles/tick
F is number of forward facing locos
W is number of wagons
B is number of backward facing locos
Since most people that use 2-way trains use 'balanced' 2-way trains, we can further simplify the above formula to obtain:
S=5L/(4L+W) (capped at a max of 1.2)
with L being the number of locos per direction (e.g. a 1-2-1 train has L=1).
An interesting observation is that, for 1-way, the 1-to-2 loco-to-wagon rule is actually slightly loco heavy, the perfect ideal ratio to achieve maximum speed is actually 6 locos to 13 wagons (rather than 12), a 6-13-0 train. An interesting consequence of this is that it actually is possible for a 'balanced' 2-way train to achieve maximum speed with a given number of wagons, the perfect ratio in that case is a 6 locos per direction per wagon, a 6-1-6 train.
The above equations are useful for practical train problems, but for the more theoretical questions pertaining to optimizing large scale train networks, an alternative form, based on the loco-to-wagon ratio is preferable.
Ratio version of general 1-way train speed equation:
S=5/(2+R) (capped at a max of 1.2)
...where...
S is train top speed
R is the ratio of wagons per loco, or W/L.
The cap is reached precisely when R=13/6, and hence, for any R values at or below that number, S is simply 1.2, what's more interesting is what happens to speed as R exceeds 13/6. The equation clearly has the form of a reciprocal, and hence, train speed decreases sharply at first, leveling off towards its asymptote of 0 as R grows without bound. One might naively conclude from this that the highest throughput 1-way trains are those with the exact 6-13 ratio, because that gives highest speed, and therefore most wagons per second, but this is actually presumptive because a nontrivial portion of the train is locos and not wagons, sacrificing some speed could perhaps still result in more wagons per second because more of the train is wagons rather than locos. It turns out however, that the naive assertion is correct, though it takes some work to prove it. Of interest for those wanting to know how much efficiency is lost for running more wagons than is optimal, is the following equation.
Wagon rate in Wagon tiles/tick:
T=5R/((1+R)(2+R)) (only valid for R not less than 13/6)
...where...
R is the ratio of wagons to locos, W/L
T is the number of wagon tiles moved per tick (that is, speed, in tiles/tick, times proportion of train that is made up of wagons)
You can obtain wagons/tick by dividing T by 7, and wagons/sec by multiply that result by 60, or in otherwords:
Wagons/sec=(60/7)*T
To compute efficiency against the theoretical optimum, we first evaluate T for R=13/6, obtaining:
T=78/95=0.8(210526315789473684)...
Then we compare the value of T for general R to that for the optimum, taken general/optimal to obtain efficiency rating in decimal form (to convert to %, multiply by 100). Thus we obtain:
E(R)=475R/(78(1+R)(2+R))
Some sample values, rounded, I've included the actual value of E(2), accounting for capped speed and sub-optimal wagon to loco ratio, compared to ideal E(13/6) for reference:
E(2)=0.97436=97.436%
E(2.5)=0.96663=96.663%
E(3)=0.91346=91.346%
E(3.5)=0.86118=86.118%
E(4)=0.81197=81.197%
E(5)=0.72497=72.497%
E(6)=0.65247=65.247%