News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[BUG] overtaking cars switch back to the left lane too early

Started by Mariculous, May 08, 2020, 05:32:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mariculous

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...

Vladki

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 ;)

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

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.

jamespetts

Quote from: Vladki 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.

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.