The International Simutrans Forum

 

Author Topic: Industries build/"upgraded" with missing connections and/or useless connections  (Read 1394 times)

0 Members and 1 Guest are viewing this topic.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 681
  • Languages: EN
Examples from bridgewater-brunel:


Offline Ranran

  • Devotee
  • *
  • Posts: 1549
  • Languages: ja
I'm just adding a status display for the purpose of clarifying the anomaly.
I believe we can add processing to try connections at the beginning of the month with the missing connections flag.
And if possible, make the correct connection during the upgrade.
« Last Edit: November 14, 2020, 10:19:33 AM by Ranran »

Offline freddyhayward

  • Devotee
  • *
  • Posts: 681
  • Languages: EN
I'm just adding a status display for the purpose of clarifying the anomaly.
What do you mean by this? I'm not sure how it could be clearer...

Offline Ranran

  • Devotee
  • *
  • Posts: 1549
  • Languages: ja
What do you mean by this? I'm not sure how it could be clearer...
It means, I just added that error display and not added any processing to make up for it.

At that time, I noticed that industries on the bridge water server was shut down one after another and sometimes lacked connectivity.
The factory did not indicate that the connection was lost until the indication was added.

In addition to the pattern of losing connections with upgrades, closures can also cause loss of connection.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 681
  • Languages: EN
There might be a translation error here. "I'm just adding a status display" might mean "Currently, I am adding a status display" but it seems you really meant "Previously, I only added a status display".

Offline Ranran

  • Devotee
  • *
  • Posts: 1549
  • Languages: ja
Oh, that's right. I intended the latter. (´・ω・`)
Did not check the translation cautiously.

Offline wlindley

  • Devotee
  • *
  • Posts: 1071
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Perhaps each industry could, a few times a year, check its connections, and -- thinking like a businessperson -- renegotiate unsatisfactory contracts?

This would mean: drop suppliers from which no goods are received for a long time. And request to add suppliers for which transportation channels exist (non-greyed out in the dialog boxes), with the supplier at the other end deciding (based on its own contracts and output levels) whether it wants to accept. The same on the consuming end.

Then, as new suppliers, consumers, and  factories are added, the whole economy would start to act like a real economy, with occasionally-changing networks that react to our (hopefully) improving transporation networks.

Offline Ranran

  • Devotee
  • *
  • Posts: 1549
  • Languages: ja
I've noticed that I'm seeing a missing connection on a power plant that doesn't require a connection to run, such as wind power plants, so I fixed that. Included with pull request # 296.

Offline Matthew

  • Devotee
  • *
  • Posts: 580
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
[BUG] Factory updates do not rebuild chains
« Reply #8 on: January 02, 2021, 03:47:53 PM »
One of the causes of this bug appears to be that factories are not rebuilding their chains when they are updated.

For example, these pharmaceutical factories need chemicals, but most of them have connections to collieries and vegetable farms instead of oil refineries, because coal and vegetables were inputs to an earlier incarnation of pharma factory:



I can't give steps to reproduce, because this bug is in the factory AI.

But the expected outcome is that when factories are updated, they disconnect from irrelevant factories and connect to relevant ones.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20807
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
I have merged this with a previous report of what appears to be the same problem. This appears to be a high priority issue for me to look into in more detail when I return home.

Offline Matthew

  • Devotee
  • *
  • Posts: 580
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Apologies for re-posting an existing bug.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20807
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
I believe that I have now fixed this: industries should recheck their connexions fully when they upgrade or when any industry to which they are connected closes down. Also, any industries marked as having a missing connexion will be relinked at the beginning of the next month.

I should be grateful if people could re-test with to-morrow's nightly build.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 681
  • Languages: EN
I believe that I have now fixed this: industries should recheck their connexions fully when they upgrade or when any industry to which they are connected closes down. Also, any industries marked as having a missing connexion will be relinked at the beginning of the next month.

I should be grateful if people could re-test with to-morrow's nightly build.
This change does not appear to be working correctly; there are still many industries with missing connections, notably all steelworks in the world.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20807
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Thank you for letting me know. The trouble seems to be that there are not, in fact, any iron ore mines; in principle, the steel mills should close down in this case, but that would then mean no steel on the map at all even if some future iron ore mines do come into existence.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 681
  • Languages: EN
Thank you for letting me know. The trouble seems to be that there are not, in fact, any iron ore mines; in principle, the steel mills should close down in this case, but that would then mean no steel on the map at all even if some future iron ore mines do come into existence.
This would also necessitate the closure of several other industry chains, including breweries, canneries, furniture factories and car factories.

Offline Matthew

  • Devotee
  • *
  • Posts: 580
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
New factories do not have complete chains

My understanding is that new factories should now be built with complete chains. This does not happen. Today we have had a clear-cut example on B-B:



The new department store only has one of its four possible inputs. The message says that five industries were built, from which we can conclude that the furniture factory has also been newly built without a complete chain (it is missing steel and plastic). The latter is the more serious problem as the furniture factory won't function at all without its inputs.

I intend to check whether the reconnection patch above fixes this at the new month, but I am not optimistic given the many other broken chains.

Transitional fix

Bridgewater-Brunel does not have any iron mines and I think it's now down to a single oil refinery, which means there are hundreds (probably over a thousand) useless factories. Since this is partly a transitional consequence of the previous bug, it would be appreciated if you could manually add a couple of iron mines and oil refineries, James. If the reconnection patch above is working correctly, then the wider problems should in theory gradually be rectified.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20807
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
I believe that I have fixed an error causing industries not to link properly to other industries. It may take some time for existing industries to be reached in a mature game.

It is very difficult to create a reliable reproduction case for new industries being generated without connexions; I have identified this occurring, but to be able to reproduce it, I need it to be able to occur reliably and predictably so that I can trap the occurrence in a debugger.

Hopefully, this change should at least reduce the number of industries that are not properly linked.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 681
  • Languages: EN
This patch improves the generation of consumer industries but had no impact on the steel industry in bridgewater-brunel. After allowing 1024 iterations of increase_industry_density, there are still no iron ore mines on the server.

Offline merry

  • *
  • Posts: 71
An aspect of this bug affects the current main release of Simutrans-Extended-64 [120.4.14.14], and its predecessors back at least 6 months.
I recently started a new game from 1760, and an Ironworks has been generated (in a Builders Merchant chain). But there is no Iron Ore Mine, so obviously no iron.

As Public Service player, I tried to add industry manually.
No matter what climate flat land is chosen, the Iron Ore Mine returns an error: "This industry cannot be built here". Adding an industry chain that calls for iron gives a chain without an iron ore mine. It seems that there is a bug preventing placing of the Iron Ore Mine, whether manually or through the industry chain generation routine.

This seems a related bug to the one reported in this thread. If not, Mods please move to a new or more suited thread!

Offline Ranran

  • Devotee
  • *
  • Posts: 1549
  • Languages: ja
As Public Service player, I tried to add industry manually.
No matter what climate flat land is chosen, the Iron Ore Mine returns an error: "This industry cannot be built here". Adding an industry chain that calls for iron gives a chain without an iron ore mine. It seems that there is a bug preventing placing of the Iron Ore Mine, whether manually or through the industry chain generation routine.
I think you've noticed a good point. Many industries do not currently have a region in which it should be located, but Iron Ore Mine does. Can you check if the region in which it can be placed exists correctly on the map?
They are
- Cambria
- Northumberland
- Caledonia

It should be noted that it does not contain the default region "Albion".




Offline merry

  • *
  • Posts: 71
Hmm, that's interesting.
Regions are a new thing, TBH I have no idea how they work - I had not identified their existence before.
How can this be fixed if the region doesn't exist?

OK, I tried creating a new game (timeline, 1750), and an ironworks again generated (in Albion) wihtno iron ore mine. There are at least Erin and Cambria on the map, but perhaps too far away. it's a farily big and hilly map (I like hills!).
Sooo, this suggests the industry generatoin works form consumer to source, and currently doesn't have a rip-up-and-retry approach if industries can't be placed. In this case, it means the chain build & placment algorithm is nonfunctional for the ironworks as it can't produce any iron...

Workarounds include adding a 'ignore regions' tickbox in the manual Add Industry dialogue (and supporting this in the placement routines). And eventually of course a fix in the routines, but that could wait if worked around.

Oh, as an aside, I can't see how you view region boundaries, as there isn't an option in the map as far as I can see. Definitely one to add!