The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: ӔO on January 06, 2011, 05:09:34 PM

Title: weight/tractive effort. Is there an easy way to figure out acceleration?
Post by: ӔO on January 06, 2011, 05:09:34 PM
I find the detailed specs are very nice, but I also find that it can be a bit tricky to figure out which vehicles will have better acceleration performance, especially when there are more than one power units.

An acceleration statistic in the depot window can be handy for differentiating which convoy will be better for long or short journeys.

I think something like " in 10 tiles (or km)" added onto the end of "Max. speed: ###km/h @ ##t" at the top of the depot window could be handy.

So it would display "Max. speed: 200km/h @ 150t in 35 tiles"

I thought about m/s/s, but tiles seems to be more straight forward.
Title: Re: weight/tractive effort. Is there an easy way to figure out acceleration?
Post by: jamespetts on January 06, 2011, 05:35:35 PM
Hmm, this is an interesting idea, although it was Bernd Gabriel who wrote the physics engine and the statistics, so I'm not as familiar with the details of it as I might b.
Title: Re: weight/tractive effort. Is there an easy way to figure out acceleration?
Post by: inkelyad on January 06, 2011, 05:46:15 PM
Main equation described in convoy.h in Experimental. It should be easy. For someone who know how to solve differential equations.
Title: Re: weight/tractive effort. Is there an easy way to figure out acceleration?
Post by: jamespetts on January 06, 2011, 05:58:05 PM
Quote from: inkelyad on January 06, 2011, 05:46:15 PM
Main equation described in convoy.h in Experimental. It should be easy. For someone who know how to solve differential equations.


That rules me out, then!
Title: Re: weight/tractive effort. Is there an easy way to figure out acceleration?
Post by: Milko on January 10, 2011, 12:03:38 PM
Hello

I need help from some expert in C, to understand some parts of the code:

In convoy.cc, convoy_t::calc_move:
get_force = f (v) - Frs;

I'm having trouble figuring out how to calculate get_force (v).

Reconstructing the path followed by the calculation of the function are arrived at convoy.h file, where the base of everything, is the function get_force_summary ().

The definition of get_force_summary () I found is this:
virtual sint32 get_force_summary (sint32 speed) = 0;

I misunderstood or in practice the function always returns 0?

Giuseppe
Title: Re: weight/tractive effort. Is there an easy way to figure out acceleration?
Post by: inkelyad on January 10, 2011, 03:46:46 PM
Quote from: Milko on January 10, 2011, 12:03:38 PM
virtual sint32 get_force_summary (sint32 speed) = 0;
I misunderstood or in practice the function always returns 0?
No.
It is pure virtual function (http://en.wikipedia.org/wiki/Virtual_function#Abstract_classes_and_pure_virtual_functions)
Title: Re: weight/tractive effort. Is there an easy way to figure out acceleration?
Post by: Milko on January 10, 2011, 04:30:07 PM
Hello Inkelyad

Thanks for help, but now I'm unable to find the implementation.

In the project the only file containing "get_force_summary" is convoy.h.

How may I find the implementation/s of get_force_summary?

Thanks
Giuseppe
Title: Re: weight/tractive effort. Is there an easy way to figure out acceleration?
Post by: inkelyad on January 10, 2011, 04:54:03 PM
Unix way:

grep -r get_force_summary *

Windows way: MSVC should do it.

result:

convoy.cc:sint32 potential_convoy_t::get_force_summary(sint32 speed /* in m/s */)
convoy.cc:sint32 existing_convoy_t::get_force_summary(sint32 speed /* in m/s */)
Title: Re: weight/tractive effort. Is there an easy way to figure out acceleration?
Post by: ӔO on August 27, 2011, 08:53:25 PM
I've had some more reading about this, and IMO, it might be better and easier to just display acceleration in km/h/s.

With this unit, it's easier to figure out how many seconds or tiles it would take to reach maximum speed when compared to m/s/s.
Title: Re: weight/tractive effort. Is there an easy way to figure out acceleration?
Post by: jamespetts on August 27, 2011, 09:21:33 PM
The simple way of thinking about tractive effort and power is:

Power determines how much weight that can be pulled at top speed.
Tractive effort determines the speed of acceleration.