People are saying "why didn't we buffer up more" ? Well, there we go. Play Factorio. You'll see just how bad buffers are in a simulated factory.
People are saying "why didn't we buffer up more" ? Well, there we go. Play Factorio. You'll see just how bad buffers are in a simulated factory.
Factorio often has implicit buffers through its belts (or bot network). If you build an inserter-only factory you'll become painfully aware how important they are to to the smooth operation of the factory. Otherwise it's very easy to get rolling waves of cascading backpressure, where the entire factory is only able to produce at good efficiency as long as you have fully saturated input as well as complete consumption of every product you produce.
Leaving 1000 items on a belt (aka: a belt of length 70) is just less effective than bots flying to fetch an item _just_ when you need it. The buffer is counter-productive.
-------
The only time you want to "buffer" in Factorio is to provide 12-items to stack inserters, to maximize UPS (updates per second). If your stack inserters are moving 12-items every swing, that's using less CPU power than if they're moving 6 or 5 items per swing.
And as we all know: the expert's biggest problem in Factorio is when you've built such a large factory that your own CPU starts to slow down (aka: UPS problems). So buffers of size 50 come to the rescue (the smallest buffer available, and just enough to take advantage of 12-item stack inserters).
A true on-demand factory would take ages to produce anything, it would basically not be much faster than handcrafting because the iron plates wouldn't start being created until the pipe is needed, and the pipe wouldn't be needed until the steam engine is needed. But it's much slower to make iron plates than pipes, and much slower to make 10 pipes than make a steam engine. Which is why you absolutely need those buffers.
When Ford ran out of chips (https://www.cnbc.com/2021/03/31/ford-slashes-vehicle-product...) because of its "just-in-time" process, Ford was able to give 2-months of notice before shutting down one of its lines.
That means that Ford had a 2-month buffer __in practice__.
----------
When you go bot-based, you have full control over the size of your buffers at all steps of your Factorio design. At that point, you realize that smaller buffers are more efficient, and that larger-buffers don't do anything.
Ex: if you achieve maximum throughput with buffer-size 20, you leave it at 20-sized buffers. There's no reason to buffer-up 1000x items when 20-sized buffers work out fine.
---------
Belts force you to buffer everywhere... and proportionally to the size of the belt. A long belt 1000 tiles long would force you to buffer up 7000 (one side) or 14,000 items (double-sided). The size of these buffers are grossly larger than what anyone needs.
The key buffer size is usually 12 (the stack-inserter's grab size). Maybe 24 or 36 so that you have enough buffering to handle 2 or 3 swings of the stack inserter in case those items don't arrive on time (bots "seemingly randomly" run out of power, from the perspective of that assembly machine)... but anything more than that is redundant. Buffer size 50 (minimum size allowed on chests) are used in practice.
this is sort of tautological, or at least hinges on how you interpret "necessary". certainly no one would implement a buffer knowing at the time that it was unnecessary!
but even in factorio, it can be worth maintaining a buffer deeper than what's needed to keep the factory running at 100% under optimal conditions. you don't want to find out that you're out of stone when your bots stop autoreplacing your walls and the biters flood in, or discover that you've exhausted all your uranium patches when your base goes dark. it's a real pain to reseed your kovarex enrichment in a power crisis. I usually maintain fairly deep buffers of critical defense items and monitor them periodically (or set up alarms). especially with fuel cells, I like to have at least a two hour supply, in case setting up the next mine is nontrivial.
disclaimer: I have played several hundred hours of factorio, but I have never built a base so large that my PC itself became the bottleneck.
But stone is used in more than just walls. You also use stone to make concrete.
So what do you buffer? Do you buffer stone? Cause buffering stone didn't actually solve anything (your "stone reserves" are the mine itself. If you really wanted to see "how good" your reserves are, you check how many stone mines you have left).
Do you buffer concrete? No. That wastes stone unnecessarily. Maybe you need the stone for the biter attack.
Do you buffer walls? No. That wastes stone. Maybe you need the stone to make concrete.
--------
So here's our 4 potential buffers:
* Buffer Stone -- Inferior to just running by your stone mines every few minutes and checking to see how many stone is left in the mine. The __MINES__ itself are your buffer.
* Buffer Concrete -- Wastes walls.
* Buffer Walls -- Wastes concrete.
* Buffer Concrete AND Walls -- Wastes furnaces, pumpjacks, and oil refineries. All of which require stone to make (and can't be made out of Concrete or Walls).
It's not entirely dissimilar to the chip shortage we are seeing. Our processes require a long lead time, which depends on accurate forecasting to work well. When the forecasts fail, you additionally get huge knock-on effects because downstream products also get delayed, which delays additional products.
It's incredibly efficient, nobody is denying that, but what can also not be denied is that incredibly fragile.
I argue that your style of buffering causes the delays we see.
If Ford hoarded 1 year of chips, not only would Ford not be making cars, nor would anyone else be making cars. Every single chip made last year went into a car: and pretty much every car was sold.
We are limited at the chip manufacturing level. The only solution is to make more chips. This process of spinning up chip production takes months to years.
Blaming JIT for showing us the answer is backwards.
------------
That being said: we do have substantial buffers where it counts: dealership lots. We don't actually have a car shortage yet, just a dramatic increase in car prices. We're all looking ahead to the future to see a lack of production because we're actually more forward looking than we give ourselves credit for.
That doesn't take long. And you'd have enough walls as a finished product to wait out that small delay. (A tiny percent of what you'd have if you tried to buffer the full supply.)
> It's not entirely dissimilar to the chip shortage we are seeing. Our processes require a long lead time, which depends on accurate forecasting to work well.
The thing making the chip shortages so bad and hard to catch up is that we don't have enough manufacturing capacity. For both chips and the supplies they need. Buffers would not help much, because all the spare capacity we had wouldn't have filled them very far, and then they would have quickly drained back to leave us exactly where we are.
If you want to handle longer term disruptions then you need to have more factories, not more warehouses.
A shortage in real life causes critical issues for real people. A shortage in Factorio does not.
An iron shortage in Factorio causes my iron plates to run out. My iron plates feed the steel furnaces. The steel furnaces build ammo. My ammo is automatically belted to my defensive garrisons. Then the bugs completely wipe out my base, because I was out of ammo.
Going backwards: Understanding why I'm out of ammo requires me to understand why I'm out of steel, which requires me to understand why I'm out of iron, which requires me to walk over to the mines and realize the mine is out.
----
Now lets see what happens with buffers.
Understanding why I'm out of ammo: wait, I'm not out of ammo. I've got thousands of ammo buffered up right now. As such, I don't fix the problem for 2 or 3 hours.
2 or 3 hours later: my ammo runs out. I then begin the process of figuring out that I'm out of iron. When you have buffers, its hard to tell where your bottlenecks are: buffers make it _seem_ like you have plenty of supply, when in reality, the iron mine ran out a long time ago.
------
Now look at real life. The same thing happens. Toyota had a large buffer of critical chips so that it could feed its factory for months after the chip shortage started (https://www.reuters.com/article/us-japan-fukushima-anniversa...).
Oh right. Lol, guess what? Woops, Toyota has run out of chips (https://www.nytimes.com/2021/09/10/business/toyota-productio...)
> Understanding why I'm out of ammo: wait, I'm not out of ammo. I've got thousands of ammo buffered up right now. As such, I don't fix the problem for 2 or 3 hours.
We don't live in a centrally planned (by a single person) economy where companies are run by simple automation.
Companies are run by people. These people notice when their suppliers are disrupted. They notice when they can't refill their buffers even before the buffers run out. And suppliers of raw materials certainly notice raw material shortages.
We didn't find out about the chip shortage from the article you linked when Toyota's buffer of chips ran out.
What happens if something in the middle breaks and you don't have a buffer? What happens if there is no iron shortage but the steel furnace blows up? Aren't buffers important in such situations?
Okay, lets have two factories that convert 5-iron into 1-steel (Factorio ratio):
* "Buffer Factory": requiring 7000 steel to buffer up / 35000 iron before working at full capacity.
* "JIT Factory" : requires 200 steel to buffer / 1000 iron before working at full capacity.
The JIT-factory can sustain for 5-seconds without any inputs. (Belts in the game pull 40-items per second). The Buffer-factory can sustain for 175 seconds. You're seeing this as a good thing. It is not.
When you hook up a new source of iron to the JIT-factory, it only needs 5-seconds (assuming 5-belts of iron: 200 iron/second) before it starts up to full capacity.
When you hook up a new source of iron to the Buffer-factory, it needs 175 seconds before it goes back into full capacity. (The 175 seconds of buffering "need to be paid" at some point. In the case of Buffer-factories, that payment is done _before_ your end product is even finished).
JIT-factory is more useful. You shutdown when you run out of material (aka: using less electricity. Using fewer resources. Using fewer items).
The Buffer-factory needs 175-seconds to shutdown after running out of material. It also needs 175-seconds of "booting up" once you hook up new sources of material to it. That's electricity you're spending, resources you're using on BUFFERING that's completely a waste.
-------
Yeah, it sucks to be a worker in the JIT-factory, because your managers want to fire you during these low periods. But you can't deny the underlying efficiency of the strategy. Of course workers want the 175-seconds of buffering periods (aka: to be paid even when the factory is unproductive). But that's short-sighted.
I'm not saying that workers "Deserve" to get screwed here. But fundamentally speaking, the JIT-factory is clearly more efficient. What we need to discuss politically is how to protect the livelihoods of the workers during these periods when supplies run out.
But building systems where you have long periods of "boot up" and "shut down" just so that workers have something to do? That's not useful at all. And anyone who has played Factorio will see this instantly when thinking about buffers.
------------
Now I don't know the "ratios" of chips to cars. But lets say 100 chips create 1 car for simplicity.
Lets say Ford gets a shipment of 100,000 chips next month. Should Ford build 1000 vehicles? Or should Ford build 500 vehicles (and buffer up 50,000 chips) ??
Think about what the buffer actually means. Obviously, building 1000 vehicles is the answer. The sooner the vehicles are done, the better. The buffer only wastes time and energy.
In real life, factories/farms/hospitals are not designed to agilely shut down and start up again while awaiting inputs, or when there is no demand for the output. Upon a drop in inputs the company goes bankrupt, the crop doesn't get planted, or the patient dies. Upon a drop in demand the company goes bankrupt, the crop gets thrown out, or the travel nurses go elsewhere. Where flexibility in supplies is not an option, the solution is to have a buffer of money (or credit), seed, or medical supplies to smooth out anticipated supply shocks, and we buffer against demand shocks with money/credit, features markets, storage facilities, and some hospital inefficiency.
No.
> I think of a buffer as a system that slowly fills up due to excess capacity greater than demand, which can be drawn down in times when demand exceeds production.
Yes. That's what I mean.
The steel furnaces __use iron__. This means that during the buffering process, the steel furnaces are "saving up iron", and preventing the rest of your factory from using iron.
That is to say: the 35,000 iron you put into the steel furnace __COULD HAVE BEEN USED__ in the yellow-belt portion of your factory, and could have instead made 23333 yellow belts.
--------
Its not worthwhile to save up 7000 steel (aka: 35,000 effective iron) when that iron could have been used to make _OTHER_ parts of your factory do important things.
-----
It doesn't matter if you "buffer up" that 35,000 iron slowly, quickly, all at once or over anything. Any such buffering means your "steel portion" has arbitrarily decided that the iron should be saved here, in a box unused. While shortages propagate outward to all the other parts of your Factorio where you __COULD__ have been using the iron instead.
This chip shortage thing was foreseen in March: 7 months ago. That was more than enough time for a new batch of chips to be made or for production runs to be reallocated.
EDIT: Taiwan seems to think some hoarding is going on: https://www.taiwannews.com.tw/en/news/4306366. We know that all chip-manufacturers are using more wafers and creating more chips than ever before. Yes, even this year (even as Texas got that cold-snap and frozen power plants). So why do we have a chip shortage?
A buffer gives us time. That time can be used to save lives.
A buffer absorbs a short term disruption in a supplier which prevents the shortage. A buffer gives time to look for another supplier in a long term disruption. A buffer delays a shortage when no other supplier is feasible.
But Factorio is more complicated than what can be typically described in say... the 470 posts in this topic thus far.
As such, Factorio is "closer to reality" than the discussion (at least, than the discussion without Factorio being used as a crutch).
I'm using Factorio to elevate the argument closer to reality. Rather than using a crappier hypothetical example in the abstract.
-----------
In contrast, if you buffered up... you end up running out of Iron 10 hours ago. Then your buffers deplete and you're back in the same position, except you've built out your supply chain to be even more fragile than before (because you had an additional 10 hours of expansion).
What oversupply?
Every chip that was allocated to cars has been used to make more cars. Saving up more chips in 2020, 2019, or 2018 would have only resulted in fewer cars being built compared to today.
In factorio, setting up some cable, chest readers and an alarm - but Factorio unmodded can't alert on rate of chest depletion IIRC.
Unmodded can do it for sure. All you need is a clock and a divisor circuit.
Clock circuits are a constant circuit (+1) applied to a flip-flop, so that the flip-flop counts +1 per tick. (+60 per second).
With a second flip-flop circuit, you can read-and-save the looping time. You subtract the saved time from the current clock to see how much time has passed.
You have a 3rd flip-flop save the value of the chest, and calculate (chest - (flip-flop of chest) / (current-clock - saved-clock)).
Blast that value onto a decider circuit (X > Y) hooked up to a simple alarm. Bam. Fully vanilla factorio solution.
-----------
I may have played this game too long...
I'm simply pointing out that Factorio has a factory-like system that has the "buffering" problem innate to the game mechanics. As far as I can tell, the problem of buffering in real life is closely modeled by Factorio correctly.
Sim City is on the unrealistic side. But Factorio / Hearts of Iron / OpenTTD seem to do a good job of making the "real world issues translate well into a game". I think most people would benefit if they played those games and learned from them.
FWIW I think there's way too much discussion focus on the keeping of inventory, as it is just one of many ways that the system can have slack. Things like having some extra machinery so it's not all running 24/7, having enough employees so that there is no overtime on a regular week, or treating your employees well so that they'll go the extra mile - these are all ways that production can be ramped up quickly when needed, that don't exist if a business is trying to optimize every last bit of short term profit.
I agree that more people should learn system dynamics and modeling though, whether through games or otherwise.
You do have a nominal amount of supplies buffered up in the mall, but only as much as you ever expect the human (ie: yourself) to ever use at any given time.
Let me discuss the Belt hiearchy. Belts are used to move items around the factory, but are used relatively unpredictably.
Iron makes gears. Iron + Gears make Yellow Belts (slow). Yellow belts + Gears make Red Belts. Red Belts + Lubricant + Gears make Blue belts (fastest belts).
Lets say you're at endgame, so you'll only be using blue belts (very expensive, but useful to the human to have fewer "SKUs" so to speak to think about. Yellow/Red belts save on material but blue belts are best, so you end up just "eating the cost" in most cases).
There's really only one item you should buffer: blue belts. All other components (gears, yellow-belts, red belts, and lubrican) should be made on a "just in time", 0-buffer solution if at all possible.
Yellow-belts and Gears are furthermore used in other items: such as underground belts, splitters (for belts), or inserters / assembly machines / automated turrets (gears). Buffering up gears "at your belt factory" starves your other factories (ie: buffering up 1000 gears at the belt-factory means that your turret-factory will be starved and idle)
If anything, buffer-free is more resilient than buffers when we think of the biter attacks. But this is a "gamey" aspect of the game. Not really representative of real life. (Its not like the items inside of a real-life warehouse just disappear into /dev/null under random circumstances)