The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: freddyhayward on June 16, 2020, 11:36:30 AM

Title: Overtaking and wait-for-clearance issues
Post by: freddyhayward on June 16, 2020, 11:36:30 AM
In this thread (https://forum.simutrans.com/index.php/topic,19948.msg188325) we raised the issue of horse-drawn vehicles being unable to overtake slower ones. James said that his testing of vehicles on two-way roads shows that overtaking does work in ideal conditions. I tried my own test in the linked save file where a 12km/h convoy is unable to overtake a 6km/h convoy on a perfectly straight 12km/h road with no intersections. Second, the faster convoy seemed to wait for clearance at the end of the road long after the slower one has passed. I intend to look further into these issues and hopefully find a fix.
Title: Re: Overtaking and wait-for-clearance issues
Post by: THLeaderH on June 16, 2020, 12:02:05 PM
Overtaking needs at least 10km/h difference in speed. Thus, a 12km/h convoy cannot overtake a 6km/h convoy. This regulation is imposed so that convoys move on the passing lane when they can really overtake the other, without occupying the passing lane for a long time. However, this regulation seems to be inappropriate for extremely slow vehicles like horses.
Title: Re: Overtaking and wait-for-clearance issues
Post by: freddyhayward on June 16, 2020, 12:17:00 PM
Quote from: THLeaderH on June 16, 2020, 12:02:05 PM
Overtaking needs at least 10km/h difference in speed. Thus, a 12km/h convoy cannot overtake a 6km/h convoy. This regulation is imposed so that convoys move on the passing lane when they can really overtake the other, without occupying the passing lane for a long time. However, this regulation seems to be inappropriate for extremely slow vehicles like horses.
As said in the other thread, James had already reduced the differential to 2km/h.
Title: Re: Overtaking and wait-for-clearance issues
Post by: jamespetts on June 16, 2020, 01:41:46 PM
Thank you very much for looking into this - it is much appreciated.
Title: Re: Overtaking and wait-for-clearance issues
Post by: freddyhayward on June 17, 2020, 02:41:44 AM
I created a pull request (https://github.com/jamespetts/simutrans-extended/pull/198) that fixes the main issue, which was convoys not overtaking even in ideal conditions. The max_power_speed was initialised to the maximum possible speed (i.e. the maximum sint32 value), for all convoys, meaning they could never overtake each other. There are still further issues to look into, but this alone should be a big improvement.
Title: Re: Overtaking and wait-for-clearance issues
Post by: jamespetts on June 17, 2020, 05:00:48 PM
Thank you very much for this - now incorporated.