Train physics

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
ejg
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri May 05, 2017 9:15 am

Train physics

Post by ejg »

Does anyone know where I can find the exact train physics (formula's) factorio is using the calculate the speed, acceleration, braking distance etc.? I only have found a lot of empirical stuff but no actual formula's describing the physics currently used.


Wackerstamfer
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Sat Oct 22, 2016 9:38 pm
Contact:

Re: Train physics

Post by Wackerstamfer »

Yeah, seen that. It's however not exact.

We'll run some tests... :geek: :twisted:

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Train physics

Post by Optera »

Derived from acceleration code:

Code: Select all

speed[t] = (speed[t-1] - min( speed[t-1]; friction/weight) + power/weight/1000) * (1 - air_resistance/(weight/1000) )
Weight, power and friction is summed across the whole train, air resistance is taken only from the front carriage.

Original post: viewtopic.php?f=66&t=53445&p=312921&hil ... la#p312921

Post Reply

Return to “Gameplay Help”