News:

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

New factory and attraction disturbs player highways

Started by Ranran(Hibernating), July 21, 2020, 09:35:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(Hibernating)

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.
(´・ω・`)シミュトランスのアップデート履歴(日本語) (※更新停止中)
bit.ly/3AuKHHP

Ronin1996

Do you have road signs saying that that road is only one way?

Ranran(Hibernating)

Quote from: TheRoadmaster1996 on July 21, 2020, 06:21:07 PMDo 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.
(´・ω・`)シミュトランスのアップデート履歴(日本語) (※更新停止中)
bit.ly/3AuKHHP

jamespetts

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

Sirius

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.

jamespetts

Quote from: Freahk on July 22, 2020, 02:41:12 AMA 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.
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.

jamespetts

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

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

jamespetts

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

Ranran(Hibernating)

Quote from: jamespetts on August 15, 2020, 02:45:08 PMCan 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.
(´・ω・`)シミュトランスのアップデート履歴(日本語) (※更新停止中)
bit.ly/3AuKHHP