News:

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

Industries build/"upgraded" with missing connections and/or useless connections

Started by freddyhayward, November 14, 2020, 07:44:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Ranran(retired)

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.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

freddyhayward

Quote from: Ranran on November 14, 2020, 10:07:08 AMI'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...

Ranran(retired)

Quote from: freddyhayward on November 14, 2020, 10:21:32 AMWhat 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.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

freddyhayward

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

Ranran(retired)

Oh, that's right. I intended the latter. (´・ω・`)
Did not check the translation cautiously.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

wlindley

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.

Ranran(retired)

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.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Matthew

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.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

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

Matthew

(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

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

freddyhayward

Quote from: jamespetts on January 10, 2021, 05:33:01 PMI 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.

jamespetts

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

freddyhayward

Quote from: jamespetts on January 11, 2021, 11:38:36 PMThank 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.

Matthew

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.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

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

freddyhayward

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.

merry

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!

Ranran(retired)

Quote from: merry on February 03, 2021, 03:27:12 PMAs 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".



ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

merry

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!