Resource Deficit Management System
Posted: Tue Mar 25, 2025 1:33 pm
I just wanted to share my findings and see if anyone is interested to discuss in more detail.
The problem statement
Consumption of final products during gameplay consists of defence, science, and expansion needs. Priority of those needs varies depending on the situation. Typical game cycles alternate emergencies, where one has urgent consumption needs and calm periods, when consumption is low. These ups and downs in consumption needs happen for defence, science, and expansion at different times. This means reserves should be created.
But in what sequence reserves should be restocked after usage? What if reserves are insufficient during an emergency? I.e in the case of a deficit, is the actual production sequence aligned with real priority? That proves to be typically hard to achieve.
Typical ways to manage production sequence are:
- Physically limit stockpile space to force production of an item to stop when filled up.
- Physically limit availability of ingredients to assemblers.
--- Hard-wire priority of ingredients distribution into mechanics: splitters, belts, inserters.
--- Manually temporarily tweak the ingredients distribution mechanics in urgent cases: cut the belt, turn the inserter, etc.
- Optimise the physical number of assemblers for each product and ensure ingredients are always available in sufficient quantities.
- Some situational circuit networks are used, which is usually not scalable as an approach with the size and complexity of the factory.
The problem is that
- The typical approach does not allow for differentiation of importance between urgent needs and reserves creation. I.e. assuming defence is generally more important, creating long-term reserves of ammo would be prioritised by the belts and chests over the urgent need for extra minig drills for a new outpost in case of a deficit.
- Prioritisation to manage deficit is inflexible: adjusting distribution mechanics of ingredients is tedious and prone to errors. Increasingly so the bigger the factory. Worse than that, the logistic network practically lacks prioritisation features.
- Completely avoiding deficit by always having excess production capacity is both suboptimal and requires meticulous advance planning skills.
--- When relied upon, the cost of being too late is high, because expansion of capacity is an expansion project itself that may be starved before it begins.
The solution
Idea
- Create a comprehensive, scalable, transparent, and simple circuit network control system for production management.
- Be inspired by market forces that drive production decisions in the real world and optimise resource allocations. We will use priority instead of market price.
- Do it in the vanilla game (no mods required, although some quality-of-life features are allowed).
In detail
- Let’s assign every item a priority level. Let’s make production decisions upon a priority differential of an item compared to the priority of its ingredients, the highest of them. One simple way to assign a priority is to do it based on stock (reserves). If an item is low on stock relative to the target, the priority is higher; if abundantly above target - lower.
- Supply and demand will automatically balance: when the priority goes up, some consumers stop (their relative priority goes negative), and some producers are started (their relative priority becomes positive). The opposite happens when the price goes down.
- The ingredients flow to consumers that sustain higher priorities.
- By defining target amounts of items, players can dynamically set goals that will propagate by affecting priorities. Increasing the target amount of a product (with unchanged reserve amount) immediately increases the priority. When the reserve target is fulfilled - the priority goes down, allowing less urgent consumers to resume working.
- Since the proposed approach is to directly control production machines, the only requirements for logistics are:
--- enough throughput to deliver from reserves to all consumers
--- enough throughput to deliver from all producers to reserves
- The above means the roboport logistics network is compatible!
Implementation
- Dedicated circuit network to compute expected relative priority for each recipe based on inputs of reserve amounts from the factory and target amounts from the player.
- Reserve storages for all ingredients and products embedded in delivery routes: logistic network, chests, belts, and tanks.
- Communication to deliver reserve amount readings to the input wire of the priorities computer.
- Communication to connect the relative priority output wire to production machines.
- Production machines should be configured to produce when a priority signal on their recipe is > 0.
Implementation Hints
- Reserve storages are ideally placed in between the exit from producing machines and the first consumer. Belt -> Insterters -> chests -> Inserters -> belt. With logistic network integration, a chest can be upgraded to a Passive Provider.
- In case of multiple production sites for the same item, it’s worthwhile adding redistribution channels. For instance, a requester chest -> Inserter -> belt right after storage. Enable it only when the storage is empty.
- The size of reserves for ingredients should be sufficient so that they sustain consumption at full speed for a minute with zero production. It will ensure moderate price volatility and the absence of feedback loops and oscillations.
- If a whole factory block is aimed at producing a single item, it can be configured to turn on/off based on priority differential of its aggregated recipe.
List of blueprints:
- Priority differential computer. Input wires: targets signal, storages signal, an orphan assembler machine. Output wire: priority differential, the orphan assembler machine. The computer is hard-wired to know recipes of everything except assembler. It needs to be connected to a real assembler machine to read recipe ingredients for it.
- Radar-based multichannel transmitter. Input wire: signal, config: channel number.
- Radar-based multichannel receiver. Output wire: signal, config: channel number.
- Bonus: assembler production block that produced top 3 priority items by requesting ingredients from logistics network.
Let me know if anyone is interested - I will prepare and upload blueprints.
The problem statement
Consumption of final products during gameplay consists of defence, science, and expansion needs. Priority of those needs varies depending on the situation. Typical game cycles alternate emergencies, where one has urgent consumption needs and calm periods, when consumption is low. These ups and downs in consumption needs happen for defence, science, and expansion at different times. This means reserves should be created.
But in what sequence reserves should be restocked after usage? What if reserves are insufficient during an emergency? I.e in the case of a deficit, is the actual production sequence aligned with real priority? That proves to be typically hard to achieve.
Typical ways to manage production sequence are:
- Physically limit stockpile space to force production of an item to stop when filled up.
- Physically limit availability of ingredients to assemblers.
--- Hard-wire priority of ingredients distribution into mechanics: splitters, belts, inserters.
--- Manually temporarily tweak the ingredients distribution mechanics in urgent cases: cut the belt, turn the inserter, etc.
- Optimise the physical number of assemblers for each product and ensure ingredients are always available in sufficient quantities.
- Some situational circuit networks are used, which is usually not scalable as an approach with the size and complexity of the factory.
The problem is that
- The typical approach does not allow for differentiation of importance between urgent needs and reserves creation. I.e. assuming defence is generally more important, creating long-term reserves of ammo would be prioritised by the belts and chests over the urgent need for extra minig drills for a new outpost in case of a deficit.
- Prioritisation to manage deficit is inflexible: adjusting distribution mechanics of ingredients is tedious and prone to errors. Increasingly so the bigger the factory. Worse than that, the logistic network practically lacks prioritisation features.
- Completely avoiding deficit by always having excess production capacity is both suboptimal and requires meticulous advance planning skills.
--- When relied upon, the cost of being too late is high, because expansion of capacity is an expansion project itself that may be starved before it begins.
The solution
Idea
- Create a comprehensive, scalable, transparent, and simple circuit network control system for production management.
- Be inspired by market forces that drive production decisions in the real world and optimise resource allocations. We will use priority instead of market price.
- Do it in the vanilla game (no mods required, although some quality-of-life features are allowed).
In detail
- Let’s assign every item a priority level. Let’s make production decisions upon a priority differential of an item compared to the priority of its ingredients, the highest of them. One simple way to assign a priority is to do it based on stock (reserves). If an item is low on stock relative to the target, the priority is higher; if abundantly above target - lower.
- Supply and demand will automatically balance: when the priority goes up, some consumers stop (their relative priority goes negative), and some producers are started (their relative priority becomes positive). The opposite happens when the price goes down.
- The ingredients flow to consumers that sustain higher priorities.
- By defining target amounts of items, players can dynamically set goals that will propagate by affecting priorities. Increasing the target amount of a product (with unchanged reserve amount) immediately increases the priority. When the reserve target is fulfilled - the priority goes down, allowing less urgent consumers to resume working.
- Since the proposed approach is to directly control production machines, the only requirements for logistics are:
--- enough throughput to deliver from reserves to all consumers
--- enough throughput to deliver from all producers to reserves
- The above means the roboport logistics network is compatible!
Implementation
- Dedicated circuit network to compute expected relative priority for each recipe based on inputs of reserve amounts from the factory and target amounts from the player.
- Reserve storages for all ingredients and products embedded in delivery routes: logistic network, chests, belts, and tanks.
- Communication to deliver reserve amount readings to the input wire of the priorities computer.
- Communication to connect the relative priority output wire to production machines.
- Production machines should be configured to produce when a priority signal on their recipe is > 0.
Implementation Hints
- Reserve storages are ideally placed in between the exit from producing machines and the first consumer. Belt -> Insterters -> chests -> Inserters -> belt. With logistic network integration, a chest can be upgraded to a Passive Provider.
- In case of multiple production sites for the same item, it’s worthwhile adding redistribution channels. For instance, a requester chest -> Inserter -> belt right after storage. Enable it only when the storage is empty.
- The size of reserves for ingredients should be sufficient so that they sustain consumption at full speed for a minute with zero production. It will ensure moderate price volatility and the absence of feedback loops and oscillations.
- If a whole factory block is aimed at producing a single item, it can be configured to turn on/off based on priority differential of its aggregated recipe.
List of blueprints:
- Priority differential computer. Input wires: targets signal, storages signal, an orphan assembler machine. Output wire: priority differential, the orphan assembler machine. The computer is hard-wired to know recipes of everything except assembler. It needs to be connected to a real assembler machine to read recipe ingredients for it.
- Radar-based multichannel transmitter. Input wire: signal, config: channel number.
- Radar-based multichannel receiver. Output wire: signal, config: channel number.
- Bonus: assembler production block that produced top 3 priority items by requesting ingredients from logistics network.
Let me know if anyone is interested - I will prepare and upload blueprints.