Units>Trains - Bad travel time formula
Posted: Tue Jul 23, 2024 12:30 pm
Time travel formula should be: (2S / A) + (distance - S^2 / A) / S
Here's my explanation (I'm using your unit labels, only the distance for D is changed, and some values from the same article) :
S = 72 tiles*sec^(-1) - maximum speed
A = 9.26 tiles*sec^(-2) - acceleration
D = 1000 tiles - distance
Demonstrative insertion of these values into your and my formula:
Yours: 2S / A + (D-4*S^2/A)/S ≈ -1.66 sec
Mine: 2S / A + (D-S^2/A)/S ≈ 21.66 sec
Here's an example of speed graph in GeoGebra: https://www.geogebra.org/calculator/wjaprzjg
My long explanation:
So the total travel time should be the sum of the part where the train speed increases, the part where the train speed decreases and the part where the train speed is constant.
travel time = sIncT + sConT + sDecT
If we assume your quote "deceleration = acceleration", then the increase and decrease in speed take the same time.
travel time = 2*sIncT + sConT
To calculate the time for the increase in speed, we use T=S/A.
travel time = 2*S/A + sConT
Our speed constant time is the distance (where the train has the maximum speed) divided by the maximum speed.
travel time = 2*S/A + (DwithS)/S
The distance (where the train has the maximum speed) is just the total distance without the acceleration sections. To calculate the distance travelled by the train during acceleration, we can take the speed graph on it, the acceleration part can resemble this formula currentSpeed = time*A and we can integrate this formula with respect to time to get
DistanceWithSInc = A/2 * time^2 and we already have a formula for the time at which the speed of the train increases, so after substitution we get:
DistanceWithSInc = A/2 * (S/A)^2 = (S^2)/A * 0.5
Then our distance travelled at maximum speed is equal to the distance minus distance the distance travelled accelerating and decelerating (so times 2):
DwithS = D - 2*DistanceWithSInc = D - 2*S^2/A*0.5 = D-S^2/A
So, if we plug in, we get back:
travel time = 2*S/A + (D-S^2/A)/S
Here's my explanation (I'm using your unit labels, only the distance for D is changed, and some values from the same article) :
S = 72 tiles*sec^(-1) - maximum speed
A = 9.26 tiles*sec^(-2) - acceleration
D = 1000 tiles - distance
Demonstrative insertion of these values into your and my formula:
Yours: 2S / A + (D-4*S^2/A)/S ≈ -1.66 sec
Mine: 2S / A + (D-S^2/A)/S ≈ 21.66 sec
Here's an example of speed graph in GeoGebra: https://www.geogebra.org/calculator/wjaprzjg
My long explanation:
So the total travel time should be the sum of the part where the train speed increases, the part where the train speed decreases and the part where the train speed is constant.
travel time = sIncT + sConT + sDecT
If we assume your quote "deceleration = acceleration", then the increase and decrease in speed take the same time.
travel time = 2*sIncT + sConT
To calculate the time for the increase in speed, we use T=S/A.
travel time = 2*S/A + sConT
Our speed constant time is the distance (where the train has the maximum speed) divided by the maximum speed.
travel time = 2*S/A + (DwithS)/S
The distance (where the train has the maximum speed) is just the total distance without the acceleration sections. To calculate the distance travelled by the train during acceleration, we can take the speed graph on it, the acceleration part can resemble this formula currentSpeed = time*A and we can integrate this formula with respect to time to get
DistanceWithSInc = A/2 * time^2 and we already have a formula for the time at which the speed of the train increases, so after substitution we get:
DistanceWithSInc = A/2 * (S/A)^2 = (S^2)/A * 0.5
Then our distance travelled at maximum speed is equal to the distance minus distance the distance travelled accelerating and decelerating (so times 2):
DwithS = D - 2*DistanceWithSInc = D - 2*S^2/A*0.5 = D-S^2/A
So, if we plug in, we get back:
travel time = 2*S/A + (D-S^2/A)/S