A Factorio Case Study in Industrial Efficiency.

Storyline - Context of this Case Study

The initial scenario for this case study is as follows: You are consultants in a consulting firm and I am the factory owner. I want the factory to function better and run more efficiently. That means, of course, that I have full control over the factory. I can show you everything and explain it to you. If you need data, we can go to the accounting or controlling department and get it from there. I can also provide you with this data. If technical documents are required, such as circuit diagrams, that is also not a problem. We can find out everything. 

The goal is, of course, very clear: the factory has fixed assets, which are now here, and I want to achieve maximum output. This means that the highest-quality product we manufacture is the utility science pack. These are very expensive and are produced on a assembling-machine-3 with the highest acceleration. This means that this machine should run as well as possible.

list of all item in the production (excel file)

On the other hand, we also have current assets, of course. This means that there is material in all machines and in the buffers in front of the machines. And, of course, this material should be kept to a minimum. This means that we naturally want to avoid waste in the ongoing process. The supply is guaranteed. This means that we have an infinite supply of raw materials in this factory. 

Naive Setup
Screenshot in original size here
This is the saved Game

Establishing the Baseline: Throughput Extremes

First, we need to know the extremes we're dealing with. I've created a very simple setup. This means that for every material I need, there is a machine ready to produce the corresponding product. This is forwarded to the next machine, and at the end, the utility-science-pack are produced.

This simple setup results in a certain throughput, which represents the lower limit. After all, we need to know where we are starting from. I am now making this data available here. On the one hand, this is a text file showing the fixed assets, i.e., all the infrastructure that is available. Everything that is consumed or produced in the factory in terms of units also has a price, of course. This is also included in the text file.

Then I have the blueprint for you. The layout of the factory as it currently looks. Finally, That's the complete infrastructure. And from that, I calculated the fixed assets, which are listed here in this text file. I created a map by taking a screenshot at maximum resolution; so you can see everything. You can download the individual files. They are freely available.

With this simple setup, only 0.2 utility-science-packs are produced per minute.

Upper Bound: The Theoretical Maximum Throughput

The other extreme is perfect production. So what is actually possible with a assembling-machine-3 equipped with four maximum speed modules. This means that the machine runs at 200 percent capacity. However, it then requires 280 percent more energy.

So what can be produced? The machine is supplied with materials from endless sources. This means that low density structure, blue processor boards, and flying robot frames are delivered and placed in the machine with fast inserters. I then count utility-science-packs produced. If you let this run through, you will see that 33 packs are produced per minute.

the maximum production of
utility-science-packs
Obviously, output fluctuates even if the supply
of intermediate products is perfect.

However, there is also a secondary finding. You might think that the production ist continous. No, that is not the case, of course, because the machine processes piece by piece. This means that some are inserted, processed, and then removed again. This means that the throughput jumps up and down.

Yo see the statistical graph for production and the three input materials. First finding: It is not continuous. It goes up and down. That's not so surprising.

The Realistic Case: The Optimization Challenge

Setup for 7.7/min
Screenshot in original size here
The factory owner is not completely stupid, of course, but has realized that this needs to be set up sensibly. There is a better setup. This one produces 7.7 research packages per minute. Far better than 0.2 bat far awy from the maximum That is our starting point, which we want to optimize. 

In addition to the map, I am also providing you with the costs of the facility. The logging protocol starts after a complete reset. This means that all buffers and machines are empty and there is nothing in the conveyor belts and grippers. All counters are set to zero, the statistics are deleted, and the protocol starts completely from scratch.

I then let it run for more than three and a half hours. This results in over 13,000 data records, in which a complete inventory of all supply chests (input buffers) involved is available.

If you look at the layout, you can see that the chests are numbered. For example, C04 is the supply buffer. C04 stands for Chest 4. The logging protocol then records what is in it every second.

Then there are the machines, numbered from M01 to the machine that produces the research packages. For each machine, the logging protocol documents what it is currently doing. It is running, waiting for material, or similar. It also documents how many units it has already produced since the simulation started.

Basis-Mod 2.0.72
Bottelneck 0.12.1
Connectionbox 2.1.3
Creative Mod 2.1.5
Even Picker Dollies 2.7.2
Inserter Configuration 1.1.2
Logistics Simulation Logger 0.6.2
Nixie Tubes 2.0.9
Puschbuton 2.0.5
Spawn Belt 1.0.78
Text Plates 0.7.2
Of course, the effort involved is not limited to the use of materials. We can observe this very clearly and, above all, we can use our mathematical intuition to calculate it. But the production of every material costs energy and causes environmental pollution. This cannot be prevented. That is why all the protocols also track how much energy was consumed and how environmental pollution is developing every second.

Of course, it would be obvious to simply install a few mods, say extremelyfast conveyors or whatever, some other cheats to generate maximum throughput. Of course, that's not allowed. 

One note: Of course, I want it to be as realistic as possible, i.e., a real factory. There are some things that play a role in Factorio and are often used, but are not possible here.

On the one hand, there are the logistics robots. We use conveyor belts. What also doesn't exist are towers for effect transfer. And nothing should be left on the belts, according to the motto: box gone, and then the belt is a buffer, but the items always stand. The belt continues to run underneath. That means you would have to implement it like a real accumulation conveyor.

For the sake of simplicity, the following applies: there is an endless supply of electricity. There are construction robots. This corresponds to the infrastructure department. You have a construction crew that rebuilds things. 

I have documented the current configuration. The only cheat is the creative mode, which I need so that I have an infinite supply. Otherwise, please don't cheat around with it. This configuration is the permitted one. In addition, my mod has also been extensively tested in this configuration.

Expected Outcome and Optimization Objective

So what is expected? We follow the minimax principle. We want to achieve maximum output of utility-science-packs, as these are the highest-value products manufactured on the most expensive assembling-machine-3. The ideal scenario, of course, is for this machine to run continuously and produce the maximum output.

The problem with this is that the easiest way to achieve this would be to simply push very hard. This means producing an infinite amount of material at all stages and pushing it in relentlessly. This is very often done in factories. Of course, we don't want that here; instead, the factory owner wants to minimize effort. This means that only as much production capacity as is really needed is made available, and preferably the most cost-effective, because it has to be paid for.

There should be no material lying around anywhere. The supply buffers should therefore be as small as possible and nothing should be left on the conveyor belts. In reality, it would also be destroyed if the belt continued to run. Of course, environmental pollution should be minimal. This can only be achieved if we also consume as little energy as possible.

Back in the late 80s, I used to play Soko Ban a lot,
which was early logistics optimization game.
You had to move boxes to the right place
with as few moves as possible.

We have already invested quite a bit in our current factory. Of course, someone might say, “Okay, let's do things differently now.” We'll tear down this machine and put up a new one. Yes, then the demolished machine is gone and the costs for this must be borne. But it may also be that someone says, “Yes, then we'll rebuild and move it.” Machines can be moved, but that ultimately means more work. We do it in such a way that for every field moved, one-twentieth of the machine must be paid for the conversion costs.

The same applies to inserters: one-twentieth must be paid for each move. Conveyor belts cannot be moved because they are firmly anchored to the floor. This means that if we tear them down, they are gone and we have to put up new ones. Of course, we try to work with slow conveyor belts as much as possible and not just with express belts, which are as fast and as expensive as possible.

In other words, the renovation also has to be paid for. This is the case with every consulting project. What good is it to me if I have a great solution that requires me to tear down the entire factory? That's not possible, of course. So the goal is to achieve the maximum solution set with exactly the right investments. I'm excited to see what the outcome will be.

A few tips for you

First, download the Data, import them into Excel, and get an overview of the trends. This allows you to see what is contained in the buffers. You can even synchronize this with the machines in terms of time.

The idea here is to use Goldratt's Theory of Constraints. I wrote a short article explaining this for the logistics practocal work. The idea is to observe the buffers and use their behavior to determine what needs to be changed. For example, machines may need to be faster or slower—things that can be changed. If more data is needed, that's no problem either. The simulation can continue to run. To create a log, you install the simulation logger

Of course, I´m also happy to discuss things. If someone says, “I need some kind of feature,” then I think about how I can incorporate it. That will then happen relatively quickly, thanks to AI. This is also an important point: you should discuss things.

Transparency note: 

I dictated this text in German to an AI, then improved it with DeepL Write, and finally translated it into English with DeepL. The mod was created with ChatGPT and Claude. I dictated or requested the functions, then checked the code, and refined it until it was functional, also based on feedback I received via Reddit and Discord, for which I am very grateful. Oh yes, the Factorio forum was also involved, of course.

My goal is to develop a realistic scenario for the “Logistics Data Analysis” course. This scenario should contain data. Students should analyze it independently. We will then not only discuss the results in a presentation. We will also test specifically whether the analysis results are valid. We will test whether the suggestions for improvement really lead to a good result.



Blog: , Seite:
Version: 1.4 April 2025, Kontakt: E-Mail Martin Wölker
Pirmasens, Germany, 2018-, ausgelesen am: , Licence CC BY


Kommentare