[1.1.91] Locomotive tooltip should say acceleration force instead of power

Bugs that are actually features.
farcast
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Fri Jul 06, 2018 8:25 am
Contact:

[1.1.91] Locomotive tooltip should say acceleration force instead of power

Post by farcast »

TL;DR
FIX_TRAIN_UNIT_PLS.png
FIX_TRAIN_UNIT_PLS.png (31.33 KiB) Viewed 853 times
What?
This topic of utmost importance deserves my strongest argument: Your own math.

From the locomotive wiki page:
The speed of an accelerating, fully fueled, train is calculated every tick by the game with the following formula:

Code: Select all

train_speed = max(0, abs(train_speed) - train_friction_force ÷ train_weight)
train_speed = train_speed + (10 × number_of_locomotives_in_moving_direction × fuel_acceleration_bonus ÷ train_weight)
train_speed = train_speed × (1 - air_resistance_of_front_rolling_stock ÷ (train_weight ÷ 1000))
We can ignore the first and third lines. My beef is with the second line, specifically that mysterious, unit-less, 10. Luckily, there's enough information to figure out its unit.

-number_of_locomotives_in_moving_direction is exactly that. (L)
-fuel_acceleration_bonus: unit-less, and that's normal.
-train_weight: kilo-grams (kg)
-train_speed: tiles per tick, or meters per tick, assuming 1 tile = 1 meter. (m * t^-1)
-It doesn't matter what the actual numbers are, as the units remain the same and we're not converting anything yet.
-The stuff in parenthesis is being added to speed, so the final unit of that stuff must also be speed. (m * t^-1 = (stuff-unit))
-The stuff in parenthesis is actually a change in speed across a 1 tick time interval, so there's an implied 1 tick being multiplied here (and the result doesn't make sense without this). (m * t^-1 = (stuff-unit) * t)

Altogether:

Code: Select all

m * t^-1 = (Unknown-unit * L * kg^-1) * t

Solving for Unknown-unit:
m * t^-1 * (L^-1 * kg * t^-1) = (Unknown-unit * L * kg^-1) * t * (L^-1 * kg * t^-1)

kg * m * t^-2 * L^-1 = Unknown-unit
Mass * distance * time^-2 is force, not power, so the unknown unit is force per locomotive. Power would be mass * distance^2 * time^-3.

We can convert this custom force unit to Newtons (kg * m * s^-2) by converting the ticks into seconds:

Code: Select all

60 ticks per second: (60 t * s^-1)

(10 kg * m * t^-2 * L^-1) * (60 t * s^-1) * (60 t * s^-1)

= 10 * 60 * 60  kg * m * s^-2 * L^-1

= 36000 kg * m * s^-2 * L^-1

= 36000 N * L^-1

= 36 kN * L^-1
There you have it. Each locomotive provides 36 kilo-Newtons of accelerative force. Acceleration remains constant at all speeds up to the speed limit, which is what a constant force would do. If it were power, acceleration would drop as the train got faster, beyond what drag does. You can simulate zero drag by using lots and lots of locomotives.
Conclusion
I get it, "power" is an objectively superior word to "force", but it'd be inaccurate to use it here. Either change it to force or change the train simulation to actually use power.

...or do nothing. No one complained about this for years, after all. As far as I know, at least.
Attachments
factorio-current.log
(11.58 KiB) Downloaded 35 times
Efficient inefficient design.
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [1.1.91] Locomotive tooltip should say acceleration force instead of power

Post by FuryoftheStars »

It's probably listed as "power: 600 kW" because that's how it is listed in the actual prototype.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: [1.1.91] Locomotive tooltip should say acceleration force instead of power

Post by SoShootMe »

farcast wrote: Mon Sep 25, 2023 2:36 am I get it, "power" is an objectively superior word to "force", but it'd be inaccurate to use it here. Either change it to force or change the train simulation to actually use power.
"Acceleration power" is a questionable name, I think what it is actually telling you is the fuel power (ie rate of consumption while taking power) and acceleration bonus (if any).

The model is just not physically accurate and the information is presented in a way that shows that up, but I'd say that is as much a bug as the fact you can assemble nuclear reactors by hand and keep them in your pocket, or any number of other things in the game.

A more realistic model might be interesting - lower power at low speed then full power up to top service speed (with force decreasing so acceleration due to engine power does too), at which point power is reduced to maintain speed - but I'm not sure it would actually add to the game (other than more calculation, though probably not significant).
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2964
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.91] Locomotive tooltip should say acceleration force instead of power

Post by boskid »

I wont change this. Maybe your unit math is correct but there is also a power related to the speed a fuel is consumed. Not a bug.
Post Reply

Return to “Not a bug”