The International Simutrans Forum

 

Author Topic: Overtaking and wait-for-clearance issues  (Read 264 times)

0 Members and 1 Guest are viewing this topic.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 223
  • Languages: EN
Overtaking and wait-for-clearance issues
« 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.

Offline THLeaderH

  • Coder/patcher
  • Devotee
  • *
  • Posts: 367
  • Languages: JP,EN
Re: Overtaking and wait-for-clearance issues
« Reply #1 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.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 223
  • Languages: EN
Re: Overtaking and wait-for-clearance issues
« Reply #2 on: June 16, 2020, 12:17:00 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.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19823
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Overtaking and wait-for-clearance issues
« Reply #3 on: June 16, 2020, 01:41:46 PM »
Thank you very much for looking into this - it is much appreciated.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 223
  • Languages: EN
Re: Overtaking and wait-for-clearance issues
« Reply #4 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.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19823
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Overtaking and wait-for-clearance issues
« Reply #5 on: June 17, 2020, 05:00:48 PM »
Thank you very much for this - now incorporated.