The International Simutrans Forum

 

Author Topic: New factory and attraction disturbs player highways  (Read 704 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1465
  • Languages: ja
New factory and attraction disturbs player highways
« on: July 21, 2020, 09:35:33 AM »
Hello.
I witnessed the road restrictions being rewritten when a factory was opened by chance. (´・ω・`)
I think this is undesirable behavior.



As the factory connected the road, one-way was rewritten as two way mode.
As such, players are sometimes forced to implement public services.

Offline TheRoadmaster1996

  • *
  • Posts: 268
  • Languages: EN, some ES
Re: New factory and attraction disturbs player highways
« Reply #1 on: July 21, 2020, 06:21:07 PM »
Do you have road signs saying that that road is only one way?

Offline Ranran

  • Devotee
  • *
  • Posts: 1465
  • Languages: ja
Re: New factory and attraction disturbs player highways
« Reply #2 on: July 21, 2020, 09:44:57 PM »
Do you have road signs saying that that road is only one way?
Thank you for your advice. Certainly one-way signs seem to help prevent this. As pointed out in another thread, it means that oneway_mode and oneway sign exist independently and they are not linking properly.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20700
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New factory and attraction disturbs player highways
« Reply #3 on: July 21, 2020, 10:35:20 PM »
Thank you for your report.

This is an inherently very complex problem to solve, as this would require a very deep pathfinding algorithm to check whether there are any other roads to connect to an existing city. The current system for connecting industries with roads relies on existing code from Standard, so this addition was intended to be lightweight.

If anyone can come up with a working solution to this, that would be splendid, but I expect that this would be a major project.

Offline Freahk

  • Devotee
  • *
  • Posts: 1423
  • Languages: DE, EN
Re: New factory and attraction disturbs player highways
« Reply #4 on: July 22, 2020, 02:41:12 AM »
The main purpose of such roads is to allow players connecting the industries without expensively affording land for roads first.
A positive sideffect is commuters reaching industries by cars.

A very simple solution would be to retain the road mode of existing roads while using the exact same road constuction algorithm as now.

I am aware this is not a perfect solution, but it's simple and still much better than the obstruction caused by industy spawning at the moment.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20700
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New factory and attraction disturbs player highways
« Reply #5 on: July 29, 2020, 08:19:05 PM »
A very simple solution would be to retain the road mode of existing roads while using the exact same road constuction algorithm as now.

I have now implemented this - I should be grateful if you could test with to-morrow's nightly build.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20700
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New factory and attraction disturbs player highways
« Reply #6 on: August 15, 2020, 02:45:08 PM »
Can I confirm that this is no longer an issue?

Offline Vladki

  • Devotee
  • *
  • Posts: 3691
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: New factory and attraction disturbs player highways
« Reply #7 on: August 17, 2020, 09:54:06 PM »
It is much better now. The mode of roads is not modified. But it has created several "shortcuts" on dual lane motorways, and in one case completely crossconnected a diagonal section

Save: http://list.extended.simutrans.org/~simutrans/debug-saves/industry-roads.sve

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20700
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New factory and attraction disturbs player highways
« Reply #8 on: August 17, 2020, 10:38:55 PM »
I am afraid that I do not think that this is readily avoidable without very major work to the pathfinding algorithm used, which is not likely to be a priority for my own work for a long time.

Offline Ranran

  • Devotee
  • *
  • Posts: 1465
  • Languages: ja
Re: New factory and attraction disturbs player highways
« Reply #9 on: August 18, 2020, 03:12:24 AM »
Can I confirm that this is no longer an issue?
The one way two way patch has a defect in the processing of intersections, which creates roads that cannot reach the industry due to one-way traffic in the middle.
The defect is that one-way applies to the entire tile. (But sometimes it seems to be ignored by hacks. You may have found a strange one way in the diagonal road but it does not have a bad effect.)
There are many examples where the intersection needs to be rewritten in two ways.


Intersections are actually more complicated, but lazy arrows can't convey that information accurately.
Blue coloring one way tile is also to clarify this defect.
« Last Edit: August 18, 2020, 10:30:36 AM by Ranran »