The International Simutrans Forum

 

Author Topic: Factory production/boost tab.  (Read 1171 times)

0 Members and 1 Guest are viewing this topic.

Offline jameskuyper

  • *
  • Posts: 78
  • Languages: en
Factory production/boost tab.
« on: May 26, 2018, 07:27:46 PM »
As part of a test that was intended, among other things, to determine whether I correctly understand how factory boosts work, I created a pak64 (+food add-on) city with perfect transportation. It has one factory of every type, and one cargo-only station for each good, which covers all factories (and only those factories) that either produce or consume the good. There is one giant pax/mail-only station that covers every possible source or destination of passengers and mail. Therefore, all goods, passengers and mail can walk from source to destination without any need for convoys (the one exception was fish, which I handled more conventionally). I expanded the city (with corresponding expansion of the pax/mail station) with the intention of making it provide the maximum possible passenger and mail boosts for all factories. Electric boost is not an option yet, since the game year is 1866. I've kept the city population stable for four months (since factory_arrival_periods == 4), at the level I expected to be sufficient.
I learned from my test that I don't understand what's going on, so I seek enlightenment. Here are the relevant stats from the Production/Boost tab on the factory window for the Pharmacy, the factory with the largest amount of customers/employees:
Max: 448 units/month
Consumption:
-Chemicals 0/0(2412)/176 crates 100%

Passenger Boost: 59%
Max Passenger Boost: 200%
Passenger Demand: 2112
Passengers Generated: 10046
Passengers Departed == Passengers Arrived == 4002

On the Goods tab, Chemicals Arrived and Consumed have kept close to each other, and are currently 110 and 101, respectively, their highest levels since i started the test.
I had expected that the Passenger Boost would match the Max Boost when Departed and Arrived both got high enough to equal the Demand. Obviously not the case. So what are the relationships between these numbers, and what do I need to do to achieve maximum Boost?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Factory production/boost tab.
« Reply #1 on: May 26, 2018, 07:56:32 PM »
Passenger and mail boost use a time slot algorithm. As such if they arrive in bursts it can result in averaging that is not perfect. Use small constant busses and try the test again. Yeh I know it is messy...

Offline jameskuyper

  • *
  • Posts: 78
  • Languages: en
Re: Factory production/boost tab.
« Reply #2 on: May 26, 2018, 11:10:46 PM »
Does that mean that walking passenger traffic tends to arrive in bursts?
"Averaging that is not perfect" sounds like an inadequate description of a phenomenon that's the explanation for a passenger boost that is only 30% of what it should be.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1309
Re: Factory production/boost tab.
« Reply #3 on: May 27, 2018, 01:05:18 AM »
Seems the factory stats have been wrong for the last 16 months with nobody noticing....
Try r8463.
« Last Edit: May 27, 2018, 01:34:07 AM by TurfIt »

Offline jameskuyper

  • *
  • Posts: 78
  • Languages: en
Re: Factory production/boost tab.
« Reply #4 on: May 27, 2018, 10:25:22 AM »
Try r8463.
I feel stupid asking this - I have Subversion installed on my home machine - but my personal subversion repository resides on not only the same machine, but the very same disk volume, as my working copies. I'm not sure of the syntax for retrieving from a remote server - what I tried didn't work. I've used Subversion at work,  but some the relevant details were hidden behind aliases and definitions of environment variables that I can't access right now. What would the Subversion command look like for retrieving that version?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5368
  • Languages: EN, NO
Re: Factory production/boost tab.
« Reply #5 on: May 27, 2018, 11:12:35 AM »
The only difference is the URL you use. Everything else works the same no matter where the repository is. (Assuming a network link to the remote repository has been established. That usually amounts to plugging in the network cable or logging onto WiFi these days.)

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1309
Re: Factory production/boost tab.
« Reply #6 on: May 27, 2018, 05:06:07 PM »
What would the Subversion command look like for retrieving that version?

Code: [Select]
svn co svn://servers.simutrans.org/simutrans/trunk
run in a new empty directory. (actually gives the latest version - append @r8463 to the command if you truly want just that version.)

There's also a github mirror @ https://github.com/aburch/simutrans if you prefer GIT.
Or wait a few more hours for this evenings nightly (eveningly? - timezones!) to be available...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5368
  • Languages: EN, NO
Re: Factory production/boost tab.
« Reply #7 on: May 27, 2018, 07:22:23 PM »
If only English had a word for a period of 24 hours that wasn't also the same word for the time between sunrise and sunset.

Offline jameskuyper

  • *
  • Posts: 78
  • Languages: en
Re: Factory production/boost tab.
« Reply #8 on: May 27, 2018, 09:20:35 PM »
The only difference is the URL you use.
I tried using the URL specified in <https://sourceforge.net/p/simutrans/code/HEAD/tree/where-is-the-code.txt>, so I could give you the exact command line that failed yesterday. However, this morning it succeeded. Oh, well.

Here's the new results using r8463 and loading in the same game described earlier:
Boost Passengers: 60%
Max Boost Passengers: 200%
Demand Passengers: 2112
Passengers Generated: 10,054
Passengers Departed (==Arrived): 4,006
Customers live in:
641 pax 54 mail Springby

I kept it running for an additional four months, just in case that mattered, with no significant change. Do I need to start my test over again with the new version of simutrans? And what exactly should I be seeing differently as a result of that update?
Also, what is the connection, if any, between that final number of 641 customers and the Demand number?

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Factory production/boost tab.
« Reply #9 on: May 27, 2018, 09:46:12 PM »
Also, what is the connection, if any, between that final number of 641 customers and the Demand number?
The demand is how many "employees" the factory needs coming and going in a month to be 100% operational (2112), the 641 is the amount of available "work force" for that factory in the city. At least that's the rough idea, but the numbers confuse, 2112 is just the amount of people coming and going, not exactly employees. Just like end user "factories"/shops demand is better represented as the amount of customers. I never checked this code so I only know the rough idea of what it represents.

Mostly the final number is more to help you know which cities generate the passenger that want to go to that factory.

Offline jameskuyper

  • *
  • Posts: 78
  • Languages: en
Re: Factory production/boost tab.
« Reply #10 on: May 27, 2018, 10:00:06 PM »
Let me put it this way: if I continue expanding the city until the current actual passenger boost equals the maximum passenger boost, then at the time when that goal is first achieved, what relationships, if any, should I expect to see between the other five numbers I quoted? Have I given enough information that you could predict what those numbers will be?

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1309
Re: Factory production/boost tab.
« Reply #11 on: May 27, 2018, 10:09:27 PM »
Here's the new results using r8463 and loading in the same game described earlier:

Those numbers look the same as before. The bug was the graph numbers for passengers arrived, departed, etc. weren't being reset each month. i.e. They were cumulative. So, post fix, you should be seeing much lower numbers.
Can you post your savegame?

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3594
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Factory production/boost tab.
« Reply #12 on: May 27, 2018, 11:08:27 PM »
If only English had a word for a period of 24 hours that wasn't also the same word for the time between sunrise and sunset.

It's two words, but there is "diurnal period", although this would probably not be clear to many. Nor would it assist with timezones. 🌞

Offline Matthew

  • *
  • Posts: 98
  • Languages: EN, some ZH, DE & SQ
Re: Factory production/boost tab.
« Reply #13 on: May 27, 2018, 11:29:06 PM »
It's two words, but there is "diurnal period", although this would probably not be clear to many. Nor would it assist with timezones. 🌞

"Daily" would probably be adequate for this purpose.   :P

Offline jameskuyper

  • *
  • Posts: 78
  • Languages: en
Re: Factory production/boost tab.
« Reply #14 on: May 28, 2018, 03:22:37 AM »
My savegame is 763175 bytes, and maximum total size for all attachments to a single message is 512KB. I remember seeing other people comment on this problem before, but I don't remember how they dealt with it, and I haven't been able to locate the messages where they described how they dealt with it.

Offline Matthew

  • *
  • Posts: 98
  • Languages: EN, some ZH, DE & SQ
Re: Factory production/boost tab.
« Reply #15 on: May 28, 2018, 05:36:09 AM »
My savegame is 763175 bytes, and maximum total size for all attachments to a single message is 512KB. I remember seeing other people comment on this problem before, but I don't remember how they dealt with it, and I haven't been able to locate the messages where they described how they dealt with it.

Normally you would be able to use https://simutrans-germany.com/files, but it's been down for a few days.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5368
  • Languages: EN, NO
Re: Factory production/boost tab.
« Reply #16 on: May 28, 2018, 05:40:12 AM »
It's two words, but there is "diurnal period", although this would probably not be clear to many. Nor would it assist with timezones. 🌞
It's two words, but there is "diurnal period", although this would probably not be clear to many. Nor would it assist with timezones. 🌞
A diurnal event is still diurnal, no matter the time zone. At least so long as one doesn't travel. Except possibly two times a year in places where daylight saving time is observed, or the rarer cases when time zones are changed. It says nothing about when something happens, just how often.

"Daily" would probably be adequate for this purpose.   :P

But, but... It doesn't happen during the day! It happens during the night! (For some, at least.)

Offline jameskuyper

  • *
  • Posts: 78
  • Languages: en
Re: Factory production/boost tab.
« Reply #17 on: May 28, 2018, 11:13:27 AM »
Normally you would be able to use https://simutrans-germany.com/files, but it's been down for a few days.
OK, I'll post it there after it comes back up.
Some relevant information:
The Oil Pump has a Max Production of 464 units/month, a passenger boost that peaked at 39% in July 1866, and actual production that peaked at 512 that same month, of which 510 were delivered. I assume, therefore, that "max" refers to the production before any boosts have been applied. However, 512/464 = 1.114, so I'm not sure I understand the relationship between those numbers.
The Chemical Plant has a Max production of 3016 units per month, a passenger boost which peaked at 16%, and a mail boost which peaked at 10%. The consumption factor for Oil is 300%, so production of Chemicals is determined by the consumption of Oil, which peaked at  517 in July 1866, which is limited by the amount of Oil that arrives that arrives, which peaked at 510 in July 866 . The production factor for Chemicals is 60%, so it's consistent with the peak Chemical production of 103 in July 1866. Delivery of Chemicals peaked at 110 that same month.
The Pharmacy's Max production is 444, and the consumption factor for Chemicals is 100%, so consumption (which peaked at 101 in July 1866) is limited by the amount of Chemicals that arrive (which peaked at 110 in July 1866).

Since the pharmacy is selling only about 25% of it's capacity for Chemicals, it only needs 25% of

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3594
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Factory production/boost tab.
« Reply #18 on: May 28, 2018, 08:03:15 PM »
But, but... It doesn't happen during the day! It happens during the night! (For some, at least.)
May I humbly suggest… drum roll please… "nightly"! 🤔🤣

Offline jameskuyper

  • *
  • Posts: 78
  • Languages: en
Re: Factory production/boost tab.
« Reply #19 on: May 28, 2018, 08:28:27 PM »

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1309
Re: Factory production/boost tab.
« Reply #20 on: May 28, 2018, 08:50:12 PM »
I see 640 pax arrive, 2112 demand, with boost at 61% of 200%.  Ratios match.

In the attached, the continuously increasing arrived count 4 months prior and before was the bug I fixed. It will take a full year to get the graph showing all the right values.

Offline jameskuyper

  • *
  • Posts: 78
  • Languages: en
Re: Factory production/boost tab.
« Reply #21 on: June 01, 2018, 02:55:12 PM »
I see 640 pax arrive, 2112 demand, with boost at 61% of 200%.  Ratios match.

In the attached, the continuously increasing arrived count 4 months prior and before was the bug I fixed. It will take a full year to get the graph showing all the right values.
OK - I see that now. I don't know how I missed it when I tested with the new version. I guess I was concentrating my attention on the boost%, which was unchanged by the bug fix.
So, that moves my question by one step. What do I need to do to get the number of passengers arrived to meet the demand? I've got a city with a population of 277,551, of whom 266,096 are unemployed. All passenger sources and destinations (except for miscellaneous attractions scattered around the map) are perfectly connected to each other by walking through a single station, so they shouldn't have any trouble getting there. Perhaps the unemployed don't make good customers for the Pharmacy, but for the Farm or the Oil Rig, the passenger demand should refer to workers, not customers, so why aren't they anywhere near to being  maximally passenger-boosted? I did a test run increasing the city population to 600,000, and all that did was increase the number of unemployed.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9309
  • Languages: De,EN,JP
Re: Factory production/boost tab.
« Reply #22 on: June 02, 2018, 12:46:44 PM »
There are not enough houses! There are equally high homeless numbers? Since the actual passenger generation depends on house level and not on the city "citicens" number, you will need enough houses with high level to fill demand.

Offline jameskuyper

  • *
  • Posts: 78
  • Languages: en
Re: Factory production/boost tab.
« Reply #23 on: June 02, 2018, 02:46:36 PM »
There are not enough houses! There are equally high homeless numbers? Since the actual passenger generation depends on house level and not on the city "citicens" number, you will need enough houses with high level to fill demand.
It didn't even occur to me to check that - I thought that the city growth button automatically built enough housing for the population it was adding. I know it sometimes does add some houses. How does it decide how many houses to add?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9309
  • Languages: De,EN,JP
Re: Factory production/boost tab.
« Reply #24 on: June 03, 2018, 12:13:09 AM »
It will add/renovate houses until homeless and jobless numbers are below 100. Higher number mean it does not find places to build houses.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1309
Re: Factory production/boost tab.
« Reply #25 on: June 04, 2018, 02:00:39 AM »
good customers for the Pharmacy, but for the Farm or the Oil Rig, the passenger demand should refer to workers, not customers, so why aren't they anywhere near to being  maximally passenger-boosted? I did a test run increasing the city population to 600,000, and all that did was increase the number of unemployed.
For some bizarre reason, the commuters headed to end chain industries (that only consume goods) are called customers rather than workers in the GUI. It's only text, so no effect on simulation, they're still passengers of the worker type.


So, that moves my question by one step. What do I need to do to get the number of passengers arrived to meet the demand? I've got a city with a population of 277,551, of whom 266,096 are unemployed. All passenger sources and destinations (except for miscellaneous attractions scattered around the map) are perfectly connected to each other by walking through a single station, so they shouldn't have any trouble getting there. Perhaps the unemployed don't make
Try this: https://drive.google.com/open?id=1MvCyv-xCm3KztrXLh5ypfnspE1W4GkPC  Unemployed/homeless do indeed make poor workers. You effectively had a town of 11000 not 277000.

All passengers come from buildings, at a rate controlled by the 'passenger_factor' setting. They split into worker / tourist / traveler groups based on the 'factory_worker_percentage' and 'tourist_percentage' settings. Further, if 'factory_enforce_demand' setting is true, then once enough pax have arrived, no more workers will be generated; instead they'll be assigned the traveler class.

To your original question on boosts, the only thing that matters is pax arrived, and pax demand.  If enough pax arrive to meet the demand, -> full pax boost is achieved. In the factory gui, the 'workers/customers live in' gives the possible supply. If less pax are listed here than the demand, you can never achieve full boost. (As DrSuperGood pointed out, there is a smoothing algorithm at work too, but in steady state  arrived/demand=boost%)

The problem in your testgame is only ~630 workers are available of the 2113 demanded. Using the editing tools to increase the city size was/is ineffective as all it was doing was adding to the homeless since there was no where to build new buildings in the city limits. The city limits are supposed to increase, but clearly that's buggy.



It will add/renovate houses until homeless and jobless numbers are below 100. Higher number mean it does not find places to build houses.
Did you look at his savegame? One would expect with all that wide open land houses would find a place to be built.  The city limits should expand shouldn't they?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9309
  • Languages: De,EN,JP
Re: Factory production/boost tab.
« Reply #26 on: June 04, 2018, 03:03:02 PM »
Not when all slots are blocked by player buildings. Houses need streets first, at least with pak64 city rules.