The International Simutrans Forum

 

Author Topic: [BUG] overtaking cars switch back to the left lane too early  (Read 387 times)

0 Members and 1 Guest are viewing this topic.

Offline Freahk

  • Devotee
  • *
  • Posts: 1585
  • Languages: DE, EN
I have observed the main source of jams on highwayss is not the more-or les chaotic lane switching around merging roads.
The main source of jams begins after cars have successfully merged already. Cars will correctly attemt to use the right lane if the left lane is occupied. When they have successfully overtaken, that means as soon as the right lane on the same tile is clear, they will immediately switch back to the right lane.
That is, however most often too early, as they don't respect the security distance of one tile, causing the car that was just overtaken to emergency brake down to zero speed to prevent an accident.


I'd rather expect cars switching the lane as soon as they can do so without braking down another car behind them.
In simutrans that would mean, a car switching back the lane should not only check its current tile for other cars, but also the tile they have just left. If both tiles are clear, they can safely switch the lane.

Additionally, it might be a good idea for traffic flow to allow vehicles exceeeding (vehicles and roads) maximum speed by a few percent on the overtaking lane if the vehicle on the main lane has the same maximum speeed.

Although not legal in reality, cars driving a little faster than allowed on the overtaking lane can very often be observed on any road outside of towns, at least in Germany.
The other way round can obviously also be observed (at least in Germany). Many people won't drive faster than the advisory speed limit of 130 km/h.
Some people will exceed it a little, some will even stay below a little, others might exceed it a lot... Will never ever enter the car of a collegue again, who drove along a rather curvy and hilly highway at 220 km/h just because there was no speed limit and his car was capable of 220 km/h...
« Last Edit: May 08, 2020, 05:44:32 PM by Freahk »

Offline Vladki

  • Devotee
  • *
  • Posts: 3726
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: [BUG] overtaking cars switch back to the left lane too early
« Reply #1 on: May 08, 2020, 05:44:59 PM »
Yeah I was also thinking that allowing private cars to break the speed limits slightly (especially if overtaking) would add realism (at least for central europe ;)

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20915
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [BUG] overtaking cars switch back to the left lane too early
« Reply #2 on: May 11, 2020, 05:42:48 PM »
Thank you for reporting this. I should note that the code for this was not written by me, and I do not know how it works, so it would take a very considerable time for me to reverse engineer the code to work out how this system is supposed to work in order to look into this.

Offline Vladki

  • Devotee
  • *
  • Posts: 3726
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: [BUG] overtaking cars switch back to the left lane too early
« Reply #3 on: May 11, 2020, 06:14:15 PM »
Also cars should not completely stop when they catch after a slower vehicle (and can not overtake). Instead they should slow down to the same speed, and overtake later if it is possible.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20915
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [BUG] overtaking cars switch back to the left lane too early
« Reply #4 on: May 11, 2020, 06:40:42 PM »
Also cars should not completely stop when they catch after a slower vehicle (and can not overtake). Instead they should slow down to the same speed, and overtake later if it is possible.

This is behaviour inherited from Standard, I believe - changing this would require a considerable rewrite of private car movement logic (and also movement logic for player road vehicles). It would be a very large undertaking.