  Author Topic: Theoretical maximum speed  (Read 4230 times)

0 Members and 1 Guest are viewing this topic. Zeno Theoretical maximum speed
« on: September 07, 2014, 08:06:24 PM »
I've noticed that (in r7148) the maximum speed of the vehicles in my games is lower than what I can calculate following the formula "max speed = sqrt(2500*power/weight-2500)", which worked for me in the past. Does this calculation shown in the vehicle details dialog come from a different formula? prissi Re: Theoretical maximum speed
« Reply #1 on: September 07, 2014, 09:00:53 PM »
This is only a rough approximation of the difference equation which actually determines the maximum speed. (Or to be honest: This is an entirely empirical formula.) The actual maximum speed also depens on frame rate/fast forward speed. So a 2-3% error is expected. Zeno Re: Theoretical maximum speed
« Reply #2 on: September 07, 2014, 09:41:36 PM »
I wouldn't be surprised by a 2-3% error, the problem is that in game it shows 61km/h and the formula result is 86km/h, for 33kW, gear 0.45, 3.8t. That's a lot to be an error, that's why I was surprised; maybe the error was mine, but I looked at the calculations several times and see no problem. I will try with a clean install with latest nightly and see if the numbers still don't match. prissi Re: Theoretical maximum speed
« Reply #3 on: September 07, 2014, 09:53:32 PM »
Since these are small powers (even with low gear) and low weight, it is entirely possible that the step wise accelleration gives a different  final speed than the empirical formula. Was the maximum speed at fast forward? DrSuperGood

• Dev Team
• Devotee
• • Posts: 2727
• Languages: EN Re: Theoretical maximum speed
« Reply #4 on: September 07, 2014, 10:36:54 PM »
The maximum speed represents the theoretically obtainable maximum speed. For convoys where the speed limit is close to what power allows this may never be obtained.

From a physics point of view, the faster a convoy moves the more power is used keeping the convoy moving (drag) so the less power is left to actually accelerate the convoy. Also at high speeds due to (mv^2/2) this means that changing velocity requires more power. If your maximum speed is only reached with 1-2 watts spare of power and is quite fast it may require several hours to obtain that final km. This is also why even very badly designed networks can still have trains running >200 km/h as even with all the drag the high speed trains will accelerate around corners, just they cannot reach max speed doing so due to the extra drag.

In standard this makes little difference. Only time you need to care about physical speed is for high traffic networks where slow trains will bottleneck the line. Just put enough power so that the train in the depot states it can reach full speed and you will be paid as if it does.
In Experimental actual speed is used. For this reason it is often more profitable to run trains with few coaches than it says it can at maximum speed so that it accelerates fast enough to get a good speed bonus.

That said the depot window can only be described as pretty useless in what it tells you. Trains especially since a lot of their power is wasted moving the engine around (which is equivalently the cost of the engine as power is money quite literally). Ters

• Coder/patcher
• Devotee
• • Posts: 5543
• Languages: EN, NO Re: Theoretical maximum speed
« Reply #5 on: September 08, 2014, 05:36:33 AM »
I've noticed that (in r7148) the maximum speed of the vehicles in my games is lower than what I can calculate following the formula "max speed = sqrt(2500*power/weight-2500)", which worked for me in the past. Does this calculation shown in the vehicle details dialog come from a different formula?

The formula I know is sqrt((256*power/weight - 256) * 256) * 50 / 256. I don't have the time to see if this in anyway can be shortened to your formula, but it will surprise me if it matches exactly. Unfortunately I don't remember where I once found this formula, so I can't tell if I have it correct myself. Dwachs

• DevTeam, Coder/patcher
• • Posts: 4602
• Languages: EN, DE, AT Re: Theoretical maximum speed
« Reply #6 on: September 08, 2014, 12:17:53 PM »
I've noticed that (in r7148) the maximum speed of the vehicles in my games is lower than what I can calculate following the formula "max speed = sqrt(2500*power/weight-2500)", which worked for me in the past. Does this calculation shown in the vehicle details dialog come from a different formula?
It depends on the window you opened:
-- in the info window for a convoi / train the max speed is only the speed limit of the convoi / train
-- in the detail window of a convoi the max speed is a combination of the theoretical max speed (your formula) and the average of the speed limits since the last stop of the convoi
-- the depot window shows the theoretical max speed for empty and full train respecting speed limit

Edit: your vehicle is able to reach 84 km/h top speed in game. Pretty close to the result of the formula. Depot window shows 96 km/h, which is way-off due to integer arithmetic.
« Last Edit: September 08, 2014, 12:38:51 PM by Dwachs » Zeno Re: Theoretical maximum speed
« Reply #7 on: September 08, 2014, 05:37:26 PM »
Since these are small powers (even with low gear) and low weight, it is entirely possible that the step wise accelleration gives a different  final speed than the empirical formula. Was the maximum speed at fast forward?
Thanks prissi, it wasn't in fast forward though. I just created a new game, bought the vehicle, assigned a route and opened the detail window. 61 was shown instead of 86, nothing else, that's why I asked.

It depends on the window you opened:

[...]

Edit: your vehicle is able to reach 84 km/h top speed in game. Pretty close to the result of the formula. Depot window shows 96 km/h, which is way-off due to integer arithmetic.
Sorry, I didn't mention but it's about a mail van. It weights 2t and carries 45 bags of mail (1.75t). Its speed is limited to 50 km/h, but doesn't look like accelerating like a vehicle able to reach 86 km/h, and that's why I opened the detail window to see the maximum speed there. Being 61 km/h, pretty closer to 50 km/h, is reasonable that the acceleration is quite lower; the problem is that the formula doesn't match that value, and I don't know why :( Dwachs

• DevTeam, Coder/patcher
• • Posts: 4602
• Languages: EN, DE, AT Re: Theoretical maximum speed
« Reply #8 on: September 08, 2014, 06:36:09 PM »
If the speed limit is set to 50, then you will not see the theoritical max-speed of the vehicle without speed limit in any of the vehicle windows.

The vehicle detail window also takes speed limit of the vehicle and of the road into account.

To see whether there is a discrepancy between announced maximum speed in depot window and actual performance, you have to built a straight high-way and watch the vehicle accelerate until its maximum speed.

Could you write the entries in the dat file of the vehicle in question? Zeno Re: Theoretical maximum speed
« Reply #9 on: September 08, 2014, 07:59:51 PM »
About the limit you're right, it's limited to 70 km/h.

-- in the detail window of a convoi the max speed is a combination of the theoretical max speed (your formula) and the average of the speed limits since the last stop of the convoi
The average of ... uh? I'd love to hear a reason to find that useful...
Btw, that probably explains my confusion with the numbers, and the acceleration was only my desire to see the van running faster Anyway, there you go the dat:
Code: [Select]
obj=vehicle
name=Mercedes-Benz_L-319-D
freight=Post
power=33
speed=70
gear=50
intro_year=1967
intro_month=1
retire_year=1987
retire_month=1
cost=1000
sound=-1
RunningCost=24
weight=2
length=7