The International Simutrans Forum

Simutrans Extended => Pak128.Britain-Ex Bug Reports => Pak128.Britain-Ex => Simutrans-Extended paksets => Pak128.Britain-Ex closed bug reports => Topic started by: Matthew on January 02, 2021, 10:03:52 AM

Title: BUG: Oil-based industrial chains blocked
Post by: Matthew on January 02, 2021, 10:03:52 AM
A study of the factories on Bridgewater-Brunel shows that there is a major oil shortage. Here are some examples from December 1971:

Cement works requires chemicals, but none of them have any links to an oil refinery:
(https://i.imgur.com/jUfMuWv.png)

Paper mills require chemicals, but again none of them have any links to an oil refinery:
(https://i.imgur.com/3lkMlOB.png)
This also blocks printworks, even before we consider the fact that they require a chemical input themselves.

All but one pharmaceutical factories also lack links to an oil refinery:
(https://i.imgur.com/YrrfA0c.png)

There are four problems here.

The first is that most of these factories are linked to obsolete suppliers. For example, those pharma factories have many links to collieries and vegetable farms, because the previous (pre-update) pharma factory required coal and vegetables. This is due to a bug in the code, which I will address in the appropriate forum.

But there's also a bug in the pakset design. Looking at the print chain, the current distributionweights are
Oil refineries 3
Paper mill 4
Printworks 5

That might work on the assumption that one refinery can feed several paper mills, and one paper mill can feed several printworks. But oil refineries supply a very wide range of factories:

(https://i.imgur.com/CfJeBmb.png)

There are never going to be enough output connections from two oil refineries to feed all those inputs and since the print chain requires chemicals at two steps, hardly anything in that large chain (forests, paper mills, printworks & newsagents) is operational.*

This is not only poor gameplay, but it is also unrealistic. Cynics might suggest that oil shortages were a very 1970s phenomenon, but those were entirely acute shortages due to wars in the Middle East, and we do not model wars as a matter of policy. There was no chronic oil shortage. On the contrary, the British Isles were a major centre for oil refining. The data from the 1978 UN Statistical Yearbook (https://unstats.un.org/unsd/publications/statistical-yearbook/files/SYB30.pdf) shows (Table 121, p.311f.) that in 1972 the UK and Ireland had 5% of the capitalist** world's petroleum refinery distillation capacity, and 14% of non-Soviet Europe's capacity. The UK was a refining powerhouse well before North Sea oil came on stream. By contrast, the two countries produced only 2% of the world's (and 8% of Europe's) newsprint (Table 106, p.283f.). So the current distributionweights are completely back to front.

The oil refinery distributionweight should therefore be increased to 10, twice that of newsprint, as per the statistics above. [PR will be added when a link back to this thread is available]

I am not certain that this will have any effect on the current BB game though, due to the fourth problem: the emergency industrial fix. But this must also be addressed in the coding forum.

Footnotes
* And that it is assuming that all the factories with links can be connected with transport in a reasonable period of time and a reasonable cost, which is unlikely since the networks are likely to be widely scattered across the map and there are always players on hiatus.
** PR China and the USSR are not included in the dataset.



Title: Re: BUG: Oil-based industrial chains blocked
Post by: jamespetts on January 02, 2021, 11:37:35 AM
I am afraid that this is not a pakset bug: the code is intended to ensure that there is always sufficient supply to any consumer industry regardless of the distributionweights of the supplier industries. If this is not working, it is the code that is faulty and that will need to be investigated when I am able to do so.
Title: Re: BUG: Oil-based industrial chains blocked
Post by: Matthew on January 02, 2021, 03:40:53 PM
Quote from: jamespetts on January 02, 2021, 11:37:35 AM
I am afraid that this is not a pakset bug: the code is intended to ensure that there is always sufficient supply to any consumer industry regardless of the distributionweights of the supplier industries. If this is not working, it is the code that is faulty and that will need to be investigated when I am able to do so.

It is at least a code bug, yes. That was point one. Now filed here (https://forum.simutrans.com/index.php/topic,20662.new.html#new).
Title: Re: BUG: Oil-based industrial chains blocked
Post by: RESTRICTED ACCOUNT on January 02, 2021, 03:48:44 PM
This bug has been reported some times.
The connection destination is not updated when the upgrade is performed, and the connection that is no longer needed remains as it is. (There was a bug that crashed when opening the dialog as it was creating an empty connection. At that time, this problem came to light.)
Also, there is no code to fix the connection at a specific time. (For example at the beginning of the month)