News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Limit on storing incoming goods in factories

Started by dom700, January 10, 2012, 09:13:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dom700

Hello,

as some of you might know, there is a limit on how many goods a factory can store, any incoming transport that would lead to a storage of more than 15k is completely disregarded. Now I started a discussion in the german forum about this topic, and since pak128 features a few industries, which can easily reach this limit (refineries *sigh*, steel mills :P), I would like to hear your opinion about this. On the german forum the opinion basically was two-fold. On one hand, Dwachs suggested that it can be changed quite easily (which cfds did for the personal version the two of us are using), while theTransporter suggested that raising the limit would lower the difficulty of the game, because you dont have to care about wasted goods anymore.

Opinions?

greenling

dom700
your idea to limit the overflow it´s nice.
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

TurfIt

This is more an issue with pak128 having insanely sized storages IMHO. Likely due to them not having been updated when the code change that scales them based upon production went in. A multi-year supply in storage is...

If factory storages legitimately are desired at such sizes, then this should be increased; Shouldn't be throwing away goods when not even full yet.


dom700

Quote from: greenling on January 10, 2012, 09:51:41 PM
dom700
your idea to limit the overflow it´s nice.
a0001
it's already in the game, everything after 15k is thrown away.

Postlimit

QuoteA multi-year supply in storage is...
I think you should find the balance between the size of a single (train/boat/truck) cargo load (anything between 5 and 500 tons or so?), and the storage. And I think it's alright at the moment.

In reality (which I still think is what simutrans tries to imitate?) refineries, steel factories, coal power plants do NOT use the "just in time" principle, while car factories, and a lot of food/feed industry does use this principle.

In the game, the storage can be multi-year, but a single train journey can take months. In reality, storage of large industry is for weeks, but 7 days on a train gets you from Moscow to China. It's the same ratio.

VS

If there's a strong push for making the storages smaller, then why not. However, I think some more discussion could happen, particularly meaning "more people"...

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

TurfIt

Strong push, nah. Gentle nudge, maybe.
Playing Severous' Wilderland scenario was my first time actually playing a game with pak128 in quite a while. Seeing sawmills producing 5000/month with 75000t input storage was startling. I think such large storage capacities work against the spirit of the JIT setting. While you eventually have to connect the downstream industry, you can delay doing so for quite a long while.

I also wonder if this causes some of the frequent 'help: my industries have stopped working' posts that pop up. For the sawmill above, you could feed it with the full forest output of 6250/month for 14 months, then 'suddenly' it stops working. It's perhaps unexpected to work for so long before triggering the JIT mechanic.

VS

...I'm not aware of any changes, and these numbers stayed the same in sources. It might have happened at some unspecified earlier time - I haven't been playing the game much.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

TurfIt

#8
Included in Knightley's factory boost patch was a change to scale the factory storage amounts based upon actual production rate of the instantiated factory. Previously the storages were of a fixed size. e.g. If you specify production=100, storage=1000, range=50-500, and a factory with actual production of 400 is created, then storage will be 4000 for that factory.

I presumed pak128 set them based upon the old behaviour, and hence now tend to be on large side with the new...

VS

Don't forget that pak128 has twice as long months. Still, the numbers don't add up. It's either a bug, or I'll eat my (metaphorical) hat and recognize it as a pakset bug. Let's take the sawmill as an example (code below). Taking into account the longer month and everything maxed up, the maximal monthly production is:

(100 + 160) * (1 + (1000 + 200 + 500) / 1000) * 2 = 1404

1404 < 5000 => ???

Something is still missing...


Productivity=100
Range=160

Electricity_amount=50
Electricity_boost=1000
Mail_demand=5
Mail_boost=200
Passenger_demand=20
Passenger_boost=500

#total input 240
InputGood[0]=Holz
InputCapacity[0]=3000
InputSupplier[0]=0
InputFactor[0]=125

OutputGood[0]=Bretter
OutputCapacity[0]=500


edit: Now that I think about it, the numbers I saw in Severous' game were pretty shocking to me, too, but I thought he modified the save manually to give players some boost. I certainly remember playing with something saner.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

TurfIt

If you mean the 5000 production, I think that scenario had the factories manually placed. So the productivity and range values aren't used.

Storage capacities don't scale with bits/month, only production/base production. Was added originally in the patch but removed after lengthy discussions about what should/should not scale. Correct or not, I don't know. So easy to get completely confused with such a simple parameter...

The .dat is specifying 24 months storage @18b/m, rather large for meaningful JIT function IMO. But that's only one opinion.

VS

#11
I think that somewhere along the discussion, I mixed productivity and storage. Cue freak-out music. Going yet again through the numbers, it seems that productivity is not wrong, just the storages, and these agree with dat files. So, I'm going to excuse myself for a bit and munch some tasty hat in the corner... :P

Anyway, it's good to know where is the problem. Before, I just thought these numbers are already good and don't need touching, so I didn't even bother to learn what they do!

Now, I can give my informed agreement that some storages are probably indeed excessive :) BTW, these are, too, ancient and pre-JIT.




Anyway! The technical matters seem to be solved, and the original issue still stands... I understand that when eg. a bunch of ships (high capacity) comes, the unloaded goods get lost if they exceed input storage. Was it that?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

jk271

I think, that input storage capacity of steel mill in pak128 is ok. I made some calculations and result of it is: Stell mill has input capacity for 2 days and 6 hours (for iron ore). (without electicity supply - with electricity supply it woudl be one half).
Switching on (I dont know correct english expression) of steel mill is extremly expensive, so it must have enough raw materials for continuous production.
Coal power station (and not only coal- ) has to have enough coal supply for continuous production of electric energy because of strategic reasons. Accident can happen e.g. - tree fallen over the track.
Bigger limits enables usage of ship transport - and it improves varriability of game.
For example Crude oil is transported by tankers or pipes and not so much by trains as it is in game.

Wood has to dry up to can be used as a construction material so bigger capacity of sawmill is correct too.

Just in time factories are another issue.

dom700

Well jk, the problem is, the limit for steelmills is not okay. There is a hardcoded limit of 15k in the code, all goods arriving after this limit is reached magically disappear in a nearby river.
Even at smaller maps this limit causes a lot of iron ore to just go to waste, which is not its intended use.

missingpiece

Quote from: VS on January 12, 2012, 05:26:18 PMI understand that when eg. a bunch of ships (high capacity) comes, the unloaded goods get lost if they exceed input storage. Was it that?
Quote from: dom700 on January 28, 2012, 07:02:01 AMWell jk, the problem is, the limit for steelmills is not okay. There is a hardcoded limit of 15k in the code, all goods arriving after this limit is reached magically disappear in a nearby river.
Oh, dear, I may not have paid enough attention at my game yet to notice this very unfortunate side effect...and on a side note I do agree that the late kicking in of the JIT effect is...challenging. If indeed the wasting of material, that is by shipments arriving and exceeding the 15k limit, can be changed by adjusting the values of the pack instead of coding, then I would strongly lean to such a solution. Because having values such that materials go to waste is IMO against the game's intention. (the hard-coded limit must be seen as set in stone for this matter I guess).

MagnusA

In real life the storage is limited. I have no idea how limited (production X days or so?), but it is in some way or another.

In the game I think that one of the main goals/challenges is to *not* overflow the inventories of the factories. Even if the coal mine is capable of delivering 4,000 units per month you should not haul away all these 4,000 units if the factory cannot consume more than 1,000 units a month. In real life you won't get paid for those excessing 3,000 units that the factory did not order (at least I would not pay for stuff I haven't ordered). Ultimately it is the "consumer market" that decides the deliveries from the raw material supplies.

jk271

#16
Overflowing is bad. The problem with overflowing could be solved by adding new entry (e.g. factory_max_input) into game settings.
It would enable *pak* developers to adjust the more suitable value.

There is a following statement in file simfab.cc on line 64:
static const int FAB_MAX_INPUT = 15000;

So it would not difficult to change the value to a bigger number.

Edit:
This patch should solve the problem.
when patch is applied, add following lines to pak128/config/simuconf.tab:

# factory_max_input_capacity
factory_max_input_capacity = 25000

P.S. I will add have added the patch to patch releases.

http://forum.simutrans.com/index.php?topic=9090.0

TurfIt

I don't see why this needs to be a configurable value.
Why not just use twice the max storage?


missingpiece

Quote from: MagnusA on January 28, 2012, 10:26:31 AMIn the game I think that one of the main goals/challenges is to *not* overflow the inventories of the factories.
I am absolutely with you there. But the game mechanic problem as I understand it now from this thread is the following :

While usually a full receiver will lead to the producer not delivering any further goods, that is the connecting station will not receive more, though the trains will deliver everything that has already been deposited into the connected station's storage (of the producer). It has been called here the JIT effect.

However in this situation where you hit the binary program code's limit of units in the factory, the problem described here in the thread, the trains continue delivering, yet the goods are thrown to waste.

Is that it ?

VS

Yes, that's it, more or less. There are some other effects, but the essence is indeed that - cargo in transport wreaks havoc.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

dom700

Quote from: TurfIt on January 28, 2012, 07:51:00 PM
I don't see why this needs to be a configurable value.
Why not just use twice the max storage?

Sorry for noticing your post just now.
CFdS has changed the max storage in a customized version, which were using anyway because of our signal addons.
Somehow this changed max storage leads to another bug, causing the storage to stop counting downwards at 16384 or 32768 units (we limited max storage at 50k)(and yes the numbers are straight 2^x). This effectivly stops all production by the factory involved, eventually killing off all industrial production. So far no clue whats happening.

dom700

#21
Any changes to the situation coming? At the moment this leads to large (or should I say LARGE) maps having quite some problems with lots of goods disappearing.

Edit: I just noticed having a steelmill in my game with a storage limit for ore of more than 15k. Thats a joke because it can never be reached and clearly a bug

mach1

Hello everybody,

I know the topic is very old.
I've had the problem with the pak 128 for years.
Is there a solution for this?

I have a factory with a limit of 14700 units and everything over 15k will be deleted. This is very annoying.

-Greeting
mach1

makie

yes
I have a problem with the 15k limit too

I think, it is a quick an dirty hack for avoid an overflow problem
Fix the overflow problem and it is no need for a hard coded 15k limit anymore

DrSuperGood

There has to be a limit because the integers used in the calculations have numeric limits. If not for a human friendly number like 15,000, it would be some computer related limit.
Quote from: dom700 on March 11, 2012, 08:25:24 PMEdit: I just noticed having a steelmill in my game with a storage limit for ore of more than 15k. Thats a joke because it can never be reached and clearly a bug
Does this bug still exist?