### Author Topic: [patch] Acceleration Graph in Convoi Info Dialog  (Read 5312 times)

0 Members and 1 Guest are viewing this topic.

#### Bernd Gabriel

• Posts: 230
• Addicted to Simutrans: since 2003
• Languages: DE, EN, C++
##### [patch] Acceleration Graph in Convoi Info Dialog
« on: October 29, 2009, 12:21:21 AM »
I will prepare 2 patches for simutrans standard: 1st patch for the graph and 2nd patch for the model.

This is the 1st promissed patch from simutrans experimental: the acceleration graph.

It shows the convoy speed starting from 0 km/h in steps of 15 seconds according to the current weight, friction given by slope and curve of the vehicles, etc.

The graph use exactly the same code, that actually accelerates the convoy. Therefore I had to divorce the calculation part from the setting part in simconvoi_t.calc_acceleration().

#### wlindley

• Devotee
• Posts: 1083
• Languages: EN, DE
##### Re: [patch] Acceleration Graph in Convoi Info Dialog
« Reply #1 on: October 29, 2009, 01:58:44 AM »
The button should be titled, "Speed" because 322 and 990 in the example graphs, are the vehicles' speeds, not their acceleration.  Indeed once the speed reaches the maximum shown, the acceleration is *zero*.

#### z9999+

• Coder/patcher
• Posts: 377
##### Re: [patch] Acceleration Graph in Convoi Info Dialog
« Reply #2 on: October 29, 2009, 01:57:08 PM »
I don't know this is intended or not, but it often shows strange graph.
And airplanes on taxi-way also show strange graph.

#### blove

• Guest
##### Re: [patch] Acceleration Graph in Convoi Info Dialog
« Reply #3 on: October 29, 2009, 03:04:26 PM »
I think this is a really excellent idea!

The way I understand your description and the screenshot, it shows what would happen if "now" was time 0 at 0 km/h.  And each point is what would happen for the next 15 seconds given conditions at "now" (weight, friction, etc).

However, the chart generally shows History, not Future, and it's normally by Month, I believe.  This subtle change in semantics of the Chart might not be obvious.

Perhaps a better place for a graph like this would be in the depot, because that's when speed estimates are most useful?  But then how would the graph pick "appropriate" values for weight/friction?

Ben

#### Bernd Gabriel

• Posts: 230
• Addicted to Simutrans: since 2003
• Languages: DE, EN, C++
##### Re: [patch] Acceleration Graph in Convoi Info Dialog
« Reply #4 on: October 30, 2009, 08:45:12 PM »
@wlindley
You're right, what is shown in the y-axis is "speed", but the more important thing, why you look at the graph is the dynamic in the graph, the "acceleration". IMHO "Speed" would rather fit to a graph like "average speed in that month".

@z9999+
These strange graphs only show, what the "strange" calc_acceleration() method calculated. These graphs might shed some light on those fishy world records
BTW: these graphs were another incentive to overhaul calc_acceleration().

@blove
Quote from: blove
I think this is a really excellent idea!

Quote from: blove
The way I understand your description and the screenshot, it shows what would happen if "now" was time 0 at 0 km/h.  And each point is what would happen for the next 15 seconds given conditions at "now" (weight, friction, etc).
Yes, you're perfectly right.

Quote from: blove
However, the chart generally shows History, not Future, and it's normally by Month, I believe.  This subtle change in semantics of the Chart might not be obvious.

Perhaps a better place for a graph like this would be in the depot, because that's when speed estimates are most useful?  But then how would the graph pick "appropriate" values for weight/friction?

Originally I made this graph to check the results of my speed calculation overhaul only. But later I found, that it could serve the engine developers just as well. Up to now the focus lay on a 'quick and dirty' developer tool  . Ideas for improvement are welcome.

In depots at least you can see the max speed with min/max weight of full load (in simutrans standard) resp. 'fully loaded with heavest freight' ... 'empty convoy' (in simutrans experimental).