The International Simutrans Forum

 

Author Topic: Factories are not or at least rarely consuming goods.  (Read 1209 times)

0 Members and 1 Guest are viewing this topic.

Offline Spenk009

  • *
  • Posts: 242
Factories are not or at least rarely consuming goods.
« on: March 24, 2019, 09:31:55 AM »
I've encountered an issue where factories are not or at least rarely consuming goods. Most industries will stockpile as previously found, but most don't consume/convert any goods. A strong offender is the power station at (690,1516), which consumes goods, but provides no electricity output. Then we have a builder's yard at (362,1366), which has consumed resources (planks), but at a pace far slower than labelled.

http://gofile.me/28Rsd/4ZAWyz8tq

I'm hesitant to submit reports as I'm on wine64 and it's a slightly older savegame (120.4). I have used the settings window (i) to change savegame version to 120.7, but this seems to have little effect. It could also be something fixed in the mean time, that simply hasn't applied itself to this savegame.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18683
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Factories are not or at least rarely consuming goods.
« Reply #1 on: March 24, 2019, 10:35:51 PM »
You refer to versions 120.4 and 120.7 - these are Standard version numbers. The current version of Extended is 120.2.1 Ex 14.4. Is this report in the wrong section, or is there an error with the version numbers?

Offline ACarlotti

  • *
  • Posts: 474
Re: Factories are not or at least rarely consuming goods.
« Reply #2 on: March 26, 2019, 03:08:36 AM »
I have used the settings window (i) to change savegame version to 120.7, but this seems to have little effect.

Simutrans Extended uses a mixture or Extended and Standard version numbers. In theory the Standard version number should reflect the state of the savegame version from Standard, but in practice there have been occasions when the Standard save version number was incremented without porting the relevant change to the save configuration. At the moment I don't think changes have been systematically ported as far as 120.7, so allowing this as a save version might be deceptive (in that the code to correctly write in this format hasn't been written yet).

I think it might be better to have a list of tuples of valid save states, since I suspect the current dialogue is overly permissive.

The default save version should be the most up-to-date version that your version of the game accurately supports, so if you're using the latest version of the code (i.e. a current nightly build) then the default save version is correct. And if you aren't using the latest nightly, then you should test with that to see if the bug you describe still exists (if it doesn't, then there's nothing to report; if it does, then it helps us to know that we ought to be able to reproduce it ourselves).

Offline Spenk009

  • *
  • Posts: 242
Re: Factories are not or at least rarely consuming goods.
« Reply #3 on: March 29, 2019, 06:16:19 PM »
I have attempted to convert the savegame to 120.2.1. I then encountered an error describing that the game can't load an invalid vehicle type FFFFFF83.  I have saved the game as 120.1.2, which causes the error attached. I can update from 120.4 to 120.7, but it seems conversion to Extended is not possible.

I think I've "lost" this save. It is a minor inconvenience entirely of my own making, so I don't expect any solution to this issue. I suggest the topic be removed or marked as solved.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18683
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Factories are not or at least rarely consuming goods.
« Reply #4 on: March 29, 2019, 08:48:36 PM »
I am very confused. To what actual version of Extended does this report refer?

If not the latest version, any bug reported may well have been fixed long ago.

Offline Spenk009

  • *
  • Posts: 242
Re: Factories are not or at least rarely consuming goods.
« Reply #5 on: March 30, 2019, 09:00:03 AM »
The actual version of Extended has been kept up to date with nightlies. But I just found an old backup (an original savegame, saved just after the map's creation) that shows the savegame was created under 120.4, which is a Standard savegame number. I have probably twiddled the savegame version by accident and never noticed any issue until I decided to branch into the transport of goods. I think this is therefore a fluke that is unlikely to be encountered by anyone else and can be left as is.

Offline Spenk009

  • *
  • Posts: 242
Re: Factories are not or at least rarely consuming goods.
« Reply #6 on: May 29, 2019, 09:04:56 AM »
I have a savegame in which there are a few industries that don't produce/consume goods. It appears that industries that are fully stocked can enter this state. I noticed it in the steel mill at 699,1236, where the chart indicates that a year ago it was still producing steel. Many industries that are fully stocked, such as the Butcher at 4855, 945 don't consume as they are labelled as.

Here is the save.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18683
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Factories are not or at least rarely consuming goods.
« Reply #7 on: May 29, 2019, 10:02:03 AM »
I have a savegame in which there are a few industries that don't produce/consume goods. It appears that industries that are fully stocked can enter this state. I noticed it in the steel mill at 699,1236, where the chart indicates that a year ago it was still producing steel. Many industries that are fully stocked, such as the Butcher at 4855, 945 don't consume as they are labelled as.

Here is the save.

Thank you for that. Industries that are fully stocked will of course not produce goods, so this is not a bug. Industries fully stocked not consuming goods may be caused by either: (1) in the case of secondary industries, downstream industries also being fully stocked; or (2) in the case of consumer industries, there being no visiting passengers to purchase the goods.

Can I check that you have specifically eliminated those two possible causes before I look into this saved game in detail?

Offline Matthew

  • *
  • Posts: 178
  • Languages: EN, some ZH, DE & SQ
Re: Factories are not or at least rarely consuming goods.
« Reply #8 on: May 29, 2019, 12:14:01 PM »
I have a savegame in which there are a few industries that don't produce/consume goods. It appears that industries that are fully stocked can enter this state. I noticed it in the steel mill at 699,1236, where the chart indicates that a year ago it was still producing steel. Many industries that are fully stocked, such as the Butcher at 4855, 945 don't consume as they are labelled as.

Here is the save.

I have also struggled with this, so I had a quick look at your save game (quick because it was so large it almost crashed my PC) and can offer some observations on your savegame, though almost everyone reading this knows more than me!  ;D James has helpfully posted two possible causes; I will add a third cause and some workarounds.

The first cause is that there are not enough downstream consumers. This is because the game usually generates small numbers of consumer industries (e.g. one bakery for one flour mill) and those consumers often consume tiny amounts (e.g. 4 units per month is typical for a bakery). You can use Settings\Economy\cross-connect_factories so that all factories can supply all consumers, but I prefer using the public-service player to add many more consumer industries. When you start a new game, then I find creating many more industries than you would in Standard is helpful. In the case of your steel mill, you only seem to have transport services for one builders' yard. That one yard is much too small to absorb the output of the steel mill.

The second cause is that industries in cities do not produce unless they have staff (commuters). The GUI now shows very clearly that your steel mill has a staff shortage (thanks Ranran and others for adding this!); it appears to only have 10/2200 workers. So I think you need to dramatically improve the passsenger transport to the steel mill. However, it can be difficult to achieve a full staff ratio with default settings. The quick solution is to change both Settings\Extended\General Ex.\minimum_staff_percentage values to zero (0) . The better solution (IMHO) is to increase Settings\Extended\Passengers\commuting_trip_chance_percent. In my last game, I increased it to 50% as an experiment and this caused a Great Depression. But by trial-and-error I found that ~28% solved all my industrial staffing problems (where passenger transport was good enough).

The third cause is that most consumer industries (e.g. butchers) don't consume unless they have not only materials and staff (=commuters), but also consumers (=visitors). This is the problem with your builder's yard and butcher's; one of them has never had a commuter or a consumer! You must serve them with better passenger transport too.  I often find it difficult to attract enough visitors to industries to get full consumption, which often means that (for example) a bakery's consumption then falls to  2 units a month though. It is also worth noting that although some consumer industries (dairies and gasworks) do not need consumers in theory, in practice they must have a visitor requirement of ~1 and their consumption will increase dramatically in months when that one visitor arrives. I guess that James has a plan for changing both of these difficulties in the future, but has not had time to code it yet. The current code is certainly good enough for us all to have plenty of fun!

By the way, I am increasingly wondering whether industrial commuters and consumers must always use the same stop that is 'connected' for the purposes of goods deliveries. It feels like this works better, but I haven't tested it scientifically.

Offline Jando

  • *
  • Posts: 497
Re: Factories are not or at least rarely consuming goods.
« Reply #9 on: May 29, 2019, 06:14:36 PM »
It is indeed quite difficult to get a smooth cargo operation going with the current game. It's possible, but it will be difficult, it won't run smooth and it won't be profitable.

1. It starts with map creation. Map creation will give you a map with rather few consuming industries (shops) and - since in Simutrans no cargo can get transported without another industry or shop demanding the cargo - this results in very low overall demand for cargo transport to begin with.
2. This already very low demand for cargo gets lowered more by the mechanic of needing commuters (work-force) for both industries and end-consumers like shops.
3. And this already very low demand gets lower again by the mechanic of needing visitors to keep end-consumers like shops going at full rate.

@Matthew (Good post, Matthew!) has already given good advise how to deal with these initial three issues, thus let me just add what I consider issue 4 to 7.

4. Many of the industries need very low class commuters and sometimes visitors. But - until internal combustion in the 1930s - there are no vehicles configured to transport very low class passengers. You need to manually configure all your vehicles to carry very low class passengers, else you can run excellent passenger services to industries and still not get the workforce to it.

5. Equally, until internal combustion - mixing passenger and cargo transport on roads is tricky. Reason: cargo road transport is slow, max. 6 km per hour. Passenger transport on horse coach could go at 11 km/h - but at that speed vehicles cannot overtake each other (and I believe never can in towns), thus your passenger vehicles get stuck behind your cargo vehicles, effectively slowing down your passenger service to 6 km/h as well. At that speed you don't get many passengers using your vehicles, they're faster at their destination just walking.

6. The current mechanic tends to develop spikes in demand and then a long time of no demand at all. This means that you need to build the infrastructure to deal with a large spike in demand (usually rail track and trains and stations) - but then you won't need that infrastructure again for a long time, possibly for many game years.

7. Every little cart or packhorse occupies a cargo bay. Much of the time your freight carts or packhorses will stand around waiting for full cargo, possibly for many game years. You can't remove them because that would break the link between the consumer and the supplying industry. During that time no other cart or packhorse can use that cargo bay. That means that the player sometimes has to bulldoze significant parts of a town to make room for cargo bays for waiting packhorses.

Oh, I soooo wish road vehicles would be treated like water vehicles, can have many of those on the same tile. :)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18683
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Factories are not or at least rarely consuming goods.
« Reply #10 on: May 29, 2019, 07:13:27 PM »
There are plans to improve a number of these issues, but they are complex issues that require a very serious amount of work to get right, and there are other higher priority issues each of which also require a very serious amount of work, leading to a very long queue, not made easier by the fact that I am having hardware trouble with my main computer, but am reluctant to replace it until the next generation of Threadripper processors becomes available later this year, with the result that I am currently spending more of my time on other activities.

To deal with some of these issues individually; no. 1 is intended to be dealt with when town growth is completely overhauled; attempts have been made at interim fixes but nothing that can sensibly be done by way of an interim measure seems to have had a sufficient effect.

As to nos. 2-3, the intention is that, in the early years, the game is calibrated such that industries have sufficient passengers and workers within walking distance (to respond to Matthew's point - it is not necessary for visitors or workers to come from a specifically connected stop: they can walk all the way to their destination or take private cars, or alight from any passenger stop within the passenger radius). My own calibration tests suggest that this does indeed work correctly; but it may be that town growth according to the current mechanism upsets that calibration as towns grow in ways that cannot be fixed without the planned major overhaul of town growth.

In relation to no. 4, trams are pre-set for very low class passengers, and these are available from the 1860s. Before then, very low class passengers were not in reality catered for by public transport, and had to walk. This is intended to be replicated in Simutrans-Extended, including the ability of passengers to walk to destinations. However, it is difficult to get the calibration of this right over a game played over an extended period of time without a very major overhaul of town growth, which will be an enormous amount of work, and is second in priority to the vehicle management features, which is also a very large amount of work, and must itself await the fixing of important known bugs.

As to no. 5, the best solution to this would involve improving the overtaking algorithm to allow much lower relative speed overtaking, but this would also be a huge amount of work as I am unfamiliar with the very complex code for road vehicle movement. This is something that it would be worthwhile anyone looking for a project to get involved with and deal with, and likewise no. 7 - terminal road stops would be far better if they could accommodate 4 vehicles rather than 1, and likewise, it would be sensible if more than one vehicle could fit onto a tile in proportion to its length (i.e., a single tile of 16 length being able to accommodate 8 vehicles of length 2, 4 vehicles of length 4, etc. in each direction) but, again, this would involve very detailed exploration of the road vehicle mechanics, but might be suitable for somebody to make progress with as an independent project as anybody fairly new to the code would need to do no more work than I would need to do to become familiar with the road vehicle movement system. Anyone thinking of doing this should look at the list of features in the current development projects thread, as some of the eventually planned vehicle movement features are described in more detail there.

As to no. 6, it is not immediately clear why this occurs, and I do not believe that I have ever had a reliable reproduction case for this for me to investigate, so I have never been able to look into this.

Offline Matthew

  • *
  • Posts: 178
  • Languages: EN, some ZH, DE & SQ
Re: Factories are not or at least rarely consuming goods.
« Reply #11 on: May 29, 2019, 11:55:44 PM »
It is indeed quite difficult to get a smooth cargo operation going with the current game. It's possible, but it will be difficult, it won't run smooth and it won't be profitable.

Yes, these are important points. Freight loses money. But the mechanics do basically work.

Quote
4. Many of the industries need very low class commuters and sometimes visitors. But - until internal combustion in the 1930s - there are no vehicles configured to transport very low class passengers. You need to manually configure all your vehicles to carry very low class passengers, else you can run excellent passenger services to industries and still not get the workforce to it.

I think part of the problem is with the mix of working-class housing in pak.128-Britain, which differs in some interesting ways from actual 19th-century towns. I'm tinkering with some city-buildings to improve this, but working with Blender's UI is a horrible experience, so they may never be finished...  :-[

Quote
5. Equally, until internal combustion - mixing passenger and cargo transport on roads is tricky. Reason: cargo road transport is slow, max. 6 km per hour. Passenger transport on horse coach could go at 11 km/h - but at that speed vehicles cannot overtake each other (and I believe never can in towns), thus your passenger vehicles get stuck behind your cargo vehicles, effectively slowing down your passenger service to 6 km/h as well. At that speed you don't get many passengers using your vehicles, they're faster at their destination just walking.

This is all true, but it's not all bad, because it is somewhat like real life. One workaround is to build passing loops between towns where passenger vehicles can overtake, though this makes freight even less profitable.

Quote
7. Every little cart or packhorse occupies a cargo bay. Much of the time your freight carts or packhorses will stand around waiting for full cargo, possibly for many game years. You can't remove them because that would break the link between the consumer and the supplying industry. During that time no other cart or packhorse can use that cargo bay. That means that the player sometimes has to bulldoze significant parts of a town to make room for cargo bays for waiting packhorses.

Sometimes, if you are lucky, it's possible to route the carts or packs along a quiet road and then they can just queue up in front of the cargo bay. It just depends on the town layout.

Quote
Oh, I soooo wish road vehicles would be treated like water vehicles, can have many of those on the same tile. :)

But then there would be no overtaking in the motor vehicle era. The overtaking feature is great!

There are plans to improve a number of these issues, but they are complex issues that require a very serious amount of work to get right, and there are other higher priority issues each of which also require a very serious amount of work, leading to a very long queue,
<snip>
 a very major overhaul of town growth, which will be an enormous amount of work, and is second in priority to the vehicle management features, which is also a very large amount of work, and must itself await the fixing of important known bugs.


James, please don't feel any pressure to add new features. You've already done so much for this game.  :thumbsup: I've never doubted that you have pondered solutions to all these issues for the distant future. The game is already in an extremely playable state thanks to your work so far!

I guess that players like to make suggestions for improvements because we want to let off steam in a somewhat constructive way, not because we expect instant action.

Quote
(to respond to Matthew's point - it is not necessary for visitors or workers to come from a specifically connected stop: they can walk all the way to their destination or take private cars, or alight from any passenger stop within the passenger radius).

Thanks for clearing that up. So it's all the fault of my badly-planned lines, not just a quirk of Simutrans.  ;D

Off-topic:
Quote
not made easier by the fact that I am having hardware trouble with my main computer, but am reluctant to replace it until the next generation of Threadripper processors becomes available later this year, with the result that I am currently spending more of my time on other activities.

Getting a Threadripper sounds like a very sensible decision - did you see Lisa Su's comments yesterday confirming that a new TR is planned? The turnaround in AMD's fortunes in recent years is astonishing. They also have a far superior offer at the budget end of the market too.

Offline Dutchman on Rails

  • *
  • Posts: 239
Re: Factories are not or at least rarely consuming goods.
« Reply #12 on: May 30, 2019, 05:40:06 AM »
I don't know if this is still relevant, but since the discussion still seems to be on, I'll post it anyway.
My latest (be it some months old) experience with Simutrans Extended was that apart from the factories, the Industrial Buildings also consumed workers and so did the tourist attractions. With my usual (pre-1800 game, <2500 inhabitant villages) setups, the Industrial buildings generally consumed all the workers long before the factories got their share, resulting in deadlock for the factories.
Also, I second the point @Jando made about downstream consumers. It's good that the consumers have a very low amount of consumption, but each has a tendency to spawn their own supply chain, leading to a several hundred plus private supplier for a <10 consumer. I've played several games with Simutrans Standard, and I find that with a crossconnect percentage of 30-45% consumers check for surplus supply and normally crossconnect if there is. Maybe there's a mechanism that increases the percentage in case of surplus supply.

Offline ACarlotti

  • *
  • Posts: 474
Re: Factories are not or at least rarely consuming goods.
« Reply #13 on: May 30, 2019, 12:35:15 PM »
As to no. 5, the best solution to this would involve improving the overtaking algorithm to allow much lower relative speed overtaking, but this would also be a huge amount of work as I am unfamiliar with the very complex code for road vehicle movement. This is something that it would be worthwhile anyone looking for a project to get involved with and deal with, and likewise no. 7 - terminal road stops would be far better if they could accommodate 4 vehicles rather than 1, and likewise, it would be sensible if more than one vehicle could fit onto a tile in proportion to its length (i.e., a single tile of 16 length being able to accommodate 8 vehicles of length 2, 4 vehicles of length 4, etc. in each direction) but, again, this would involve very detailed exploration of the road vehicle mechanics, but might be suitable for somebody to make progress with as an independent project as anybody fairly new to the code would need to do no more work than I would need to do to become familiar with the road vehicle movement system. Anyone thinking of doing this should look at the list of features in the current development projects thread, as some of the eventually planned vehicle movement features are described in more detail there.

These road vehicle features would (I think) also fit well in Standard, so I would encourage anyone planning to implement them (or something similar) to discuss them in the Standard forums first.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18683
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Factories are not or at least rarely consuming goods.
« Reply #14 on: May 30, 2019, 08:59:29 PM »
Thank you for your replies - yes, I was aware that Threadripper 3 has now been announced; I believe that it is expected in the later part of the year. I imagine that it will be good for Simutrans-Extended.

I think part of the problem is with the mix of working-class housing in pak.128-Britain, which differs in some interesting ways from actual 19th-century towns. I'm tinkering with some city-buildings to improve this, but working with Blender's UI is a horrible experience, so they may never be finished...  :-[

I am interested in how the mix of working-class housing differs in Pak128.Britain-Ex to reality; an information on this would be most helpful. As to Blender, if you let me know what difficulty that you are having with it (preferably in another thread), perhaps I might be able to assist?

Dutchman on Rails - it is indeed intended that all buildings that in reality would have workers are destinations for commuting passengers in Simutrans-Extended, including industrial city buildings, town halls, attractions, depots, station extension buildings, headquarters, commercial city buildings and signalboxes. I spent some time earlier this year modifying the calibration of towns so as to increase the proportion of residential to industrial and commercial buildings so as to accommodate this; I suspect that going any further than I have gone already would require the full reworking of the town growth algorithm, as I suspect that, even if starting with correct values, towns may drift into unbalanced values as they grow, although I have not tested this. I should also note that players who started their games before a month or two ago will still have the old calibration, as this is saved with the game.

Offline Dutchman on Rails

  • *
  • Posts: 239
Re: Factories are not or at least rarely consuming goods.
« Reply #15 on: May 31, 2019, 04:01:44 AM »
Thanks for the update, I'll just reconsider playing Simutrans Extended when factories accept goods again.

Offline Jando

  • *
  • Posts: 497
Re: Factories are not or at least rarely consuming goods.
« Reply #16 on: May 31, 2019, 12:18:19 PM »
As to no. 6, it is not immediately clear why this occurs, and I do not believe that I have ever had a reliable reproduction case for this for me to investigate, so I have never been able to look into this.

Greetings, James. We talked about the topic a few times, most recently in this thread: https://forum.simutrans.com/index.php/topic,18809.0.html
The screenshot in post #5 of that thread shows large demand spikes after industries have been in operation for some game years.
The saved game linked in post #10 of that thread shows how initial spikes happen but has expired by now, I need to make a new one.

I am interested in how the mix of working-class housing differs in Pak128.Britain-Ex to reality

What I find odd with housing is that in Simutrans the highest density of population can sometimes be found in the periphery of towns and not near the center of town. A reason for this is that there are 2 kinds of hovels (using the same graphics): hovels with a population of 16 and hovels with a population of 64. The hovels with a population of 64 are the highest population residential housing in the 1800s, thus sometimes creating population centers in the periphery of towns.

Same with buildings attracting visitors. Most buildings attracting large amounts of visitors are outside the city center (exception churches and esp. cathedrals). While it's totally fine to have the "sports" buildings (football, rugby, cricket) mostly out of town it looks odd that shops and beer houses (both the commercial buildings and these and other industrial end-consumers) are usually in the periphery as well.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18683
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Factories are not or at least rarely consuming goods.
« Reply #17 on: June 05, 2019, 10:22:39 AM »
Of relevance to this topic, see here regarding a modification to the industry demand algorithm implemented in the most recent nightly build.