News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Theoretical maximum speed

Started by Zeno, September 07, 2014, 08:06:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zeno

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

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

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

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

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

Quote from: Zeno 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?

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

#6
Quote from: Zeno 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?
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.
Parsley, sage, rosemary, and maggikraut.

Zeno

Quote from: prissi 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?
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.

Quote from: Dwachs on September 08, 2014, 12:17:53 PM
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

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?
Parsley, sage, rosemary, and maggikraut.

Zeno

About the limit you're right, it's limited to 70 km/h.

Quote from: Dwachs on September 08, 2014, 12:17:53 PM
-- 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:
obj=vehicle
name=Mercedes-Benz_L-319-D
copyright=SilverHorse
waytype=road
freight=Post
payload=35
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