The International Simutrans Forum

 

Author Topic: Private cars attempt to reverse on the edge of towns causing circular jam  (Read 446 times)

0 Members and 1 Guest are viewing this topic.

Offline VOLVO

  • *
  • Posts: 115
In the BB server in Barnor. it seems that private cars have a tendency to wait for a space for reversing on the edge of town blocking traffic behind, which in turn the traffic behind blocked the roundabout, which blocked the traffic leaving Barnor, and therefore the private cars never have the space to reverse. Perhaps roundabouts are not supposed to be a thing on Simutrans (either extended or not), but the waiting for space for reverse have cause the road traffic jam to be more serious than it actually should be. I think it makes more sense for the private cars to only be allowed to reverse when they hit a dead end.

Offline Vladki

  • Devotee
  • *
  • Posts: 3716
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
I have seen similar behavior on stephenson-siemens many times too.

Offline Matthew

  • *
  • Posts: 547
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
I just came here to say exactly the same thing!  ;D

To be clear, the specific issue is not that private cars turn around at the edge of town, it's that they do so on trunk roads. As a result, these 'town cars' cannot turn around until there is a break in the flow of traffic coming into town, which may be almost never. This can, and does, cause gridlock: a car on the west edge of town is waiting to turn eastwards, but the eastbound traffic isn't moving because there is a car on the east edge of town waiting to turn westward.

It should be noted that this is a gameplay issue that has no basis in reality. It's caused by a very sensible abstraction that improves performance, so the basic design is good!

Two possible fixes:
  • As VOLVO suggests, 'town cars' could only turn around at dead ends. This could mean private cars get carried all the way to the next town, but most of the time they will end up turning around in the dead ends left behind by all the industrial roads.
  • Another possibility would be to just move them across to the opposite lane without waiting for a break, in the same way that new cars are generated in a tile regardless of what's there already. This is no more unrealistic than the current situation (gridlock caused by inexplicable U-turns on main roads).

If the first option is chosen, then it could cause delays on intercity roads as 'town cars' randomly turn right (that is, across the other lane, depending on the left/right setting). So if someone is kind enough to code this, it would be a bonus if 'town cars' would only turn left (that is, the same direction as the left/right setting) when outside a city.

Offline Vladki

  • Devotee
  • *
  • Posts: 3716
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Yeah I think that a car on straight road should just continue along without regard of his destination. A check for destination should happen only on crossing, where there is a choice. And if the vehicle has to turn back for whatever reason, then the path it was following should be recalculated ASAP.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20722
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
This is not a bug: private cars have to reverse when they reach the edge of towns or else the private car routing system that allows cars to leave towns only on a route to their destination could not work and the whole private car routing system would fail.

However, I can see the problem that is created by cars waiting to turn around on busy trunk routs. Matthew's second solution has something to recommend it, although care must be taken for this not to be able to be exploited by the building of "car traps". An alternative might be for such a car, instead of turning around, to teleport to some other road in the immediate locality, thereby reducing the impact of local traffic on trunk roads.

Offline Freahk

  • Devotee
  • *
  • Posts: 1473
  • Languages: DE, EN
Teleportation indeed simulates reality quite well, just to pick up the most commonly used argument.

Offline Vladki

  • Devotee
  • *
  • Posts: 3716
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
:-)  How about letting such cars to just continue in their random/heuristic mode? Let them get out of town and turn into whatever branch road they find eventually returning to their home town, or timer expiring?  Real drivers, if they happen to enter trunk road and leave the town (by mistake) - usually just have no other choice than to get to nearest crossing, turn on less busy road, turn around there, and get back to the town.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20722
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
The real problem with allowing cars to leave the towns not on a route to their destination is that it makes it much less likely that they will ever get to the route to their destination as they can get very, very far away indeed on an inter-town route. Also, it will mean that the level of traffic on inter-town routes does not accurately reflect the actual number of vehicles using those routes to get to their destinations.

Since it is (relatively) easily possible to solve the underlying problem without either of these side effects, it is not sensible to choose a means of solving it that does have these side effects.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20722
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
I have now implemented Matthew's second suggestion: this will be incorporated from to-morrow's nightly build. I should be grateful if people could test whether this improves the position apropos trunk roads and gridlock in towns from to-morrow onwards.

Offline Matthew

  • *
  • Posts: 547
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Thank you for addressing this issue so quickly, James! My initial impression is that this has worked and that at least one place (Wheaterpool island) has come out of gridlock as a result.