The International Simutrans Forum

 

Author Topic: Closing a factory may prevent the associated factory from producing anything.  (Read 387 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1163
  • Languages: ja
There have been frequent factory closures recently, especially in collieries on the server.
Yesterday the only colliery connecting with the Ironworks I am shipping was closed. (´・ω・`)
The coal there may have been depleted. But even today it has no new connections.

As such, it is completely incapacitated because it is not connected to any Colliery.


Also, some markets had to be shipped from 700 km away due to the closure of colliery. I am afraid of such a situation. In that case the factory should be closed in reality. (In other words, it is possible that the supplier is too far away to be in a suitable location for the factory.)
It may connect so far, not so close, in which case the player may no longer be able to connect it.

I have a question.
Does this automatically restore the connection? When is it likely to occur?
At least my downstream network is out of service because the top-tier production has stopped.
In any case, it's best to either restore or close the connection when it loses it, if possible.

Offline Freahk

  • Devotee
  • *
  • Posts: 1257
  • Languages: DE, EN
Does this automatically restore the connection?
From my experience, it might happen but it's very unlikely.
Industry shutdown will usually lead to dead factories.

The same issue applies to upgrades: If the types of good of an industry changes, contracts won't be adjusted accordingly, so there might be industries connected that serve goods not anymore demanded by the industry.

Offline Ranran

  • Devotee
  • *
  • Posts: 1163
  • Languages: ja
As you can see on the server, I think there are some problems with current industrial systems.

1) Almost no upgrade
After the retire date, the industry will die sooner or later.

Consideration of some causes:
- Industry with multiple connections is very unstable.
Even the relatively simple fish industry is not stable as it repeatedly disconnects and connects.

Opportunity to upgrade is reduced because the factory is not operating stably.
- Inefficient routing is done
-- When building a complex network, the routing of luggage is incorrect, and it accumulates at an unintended station and remains as it is.
No more shipping due to max intransit limits. That way, factory operations tend to stop.
-- Freight network is easily destroyed by multiple players competing. And it's a little difficult for players to notice anomalies and interferences outside their network.


2) No new industry will occur.
It is strange that the world population of servers is increasing, and new industries are not born, and are decreasing.
The development of railways and the development of steam engines were accompanied by freight transport of coal, but in game servers coal mines are disappearing


3) Do not rebuild broken connections
Another Ironwoks also lost Colliery's connection, but eventually it closed after some time.
Anyway, I think it would be better to add a new status display.



I think the factory can try to add a connection when it has this status, but I don't know much about the code for it. At present, I modified the code and I have confirmed that automatic repair is possible in the primary industry.


4) Possibility of incorrect lead time calculation
There may be incorrect shipping restrictions due to incorrect lead time calculations, as reported in another thread.
Depending on the industry, there is a big difference between the industries that can ship many and the ones that can hardly ship.
While looking at piled papers, wheat and livestock are only one at the latest. On the other hand, if you transport paper and books nearby, the shipping volume will be very small.
« Last Edit: July 14, 2020, 05:35:04 PM by Ranran »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20207
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Thank you for your reports in relation to this. It will be extremely difficult to investigate what is occurring without a reliable reproduction case for this, albeit I can imagine this being complex to create as industry closures are partly random.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20207
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
I have been investigating the issues with industry upgrades to-day.

First of all, I have changed the system for deciding when and industry should be closed down as opposed to upgraded to use long-term data (Ranran's operating rate over the last 12 months, a combination of the average and maximum value of these), subject to a minimum 50% chance of upgrading if the actual industry density is lower than the target industry density.

I have also been investigating an issue on the server's saved game with the target industry density. The industry density proportion, from which the target industry density is calculated, has been calculated at a value far too low: 3038 instead of 9762. This value is set once in the first new month of a game, and is fixed thereafter. This means that new industries will not be generated until a great many industries have closed, as new industries are only generated, and old industries upgraded, when the actual industry density is lower than the target industry density.

I am not entirely sure why the miscalculation occurred. I have pushed a possible fix for these miscalculations in the future, but this will not affect the existing game. I am not sure whether this is an effective fix: the calculation is currently correct when I test it, but I am not sure whether the old code produced the old incorrect calculation. I will need to re-test that.

Edit: I have confirmed that the pre-fixed code does indeed produce the incorrect number seen on the server. This had not been spotted before, I think, because it only affected games with high populations.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20207
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
I have now implemented a system allowing players to override the built in industry density proportion and set this to something slightly higher than what it would have been but for this error on the server.

Hopefully, the correct industry density proportion will prevail from to-morrow's nightly build onwards.