Dynamic Sushi Controller

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Post Reply
Posts: 21
Joined: Fri Jul 06, 2018 8:25 am

Dynamic Sushi Controller

Post by farcast »

Example Sushi Mall v1_8.jpg
Example Sushi Mall v1_8.jpg (767.91 KiB) Viewed 79 times
Here is a circuit that automatically adjusts the ratio of items placed on a sushi bus to match what's being consumed.

How to use it:
  • "C" is the cycle time in ticks. Turn this constant combinator on to start the factory.
  • "I" is the number of items the bus can move in a cycle. The higher this is, the more precise the ratios are.
  • "S" is the smoothing factor for the rolling average circuit. Must be negative. Bigger number = slower reaction time. A simple rule of thumb is to think that it multiplies cycle time.
  • If you have ambitions for a 200 blue belt sushi bus, this is how high the settings can go before you'll run into integer overflow problems:

    Code: Select all

    |S * I * 128| < 2,147,483,648
  • Everything that takes from the bus is set to pulse read and connected with red wire.
  • Everything that puts items on the bus is connected with green wire, set to pulse read and enable when ITEM <= 0.
  • Cycle time doesn't need to have any relation to the length of the bus if factory outputs have buffer chests, but if the bus is very long, then it can get backed up if the ratio of consumed items changes too quickly. This can be remedied by using a larger value for "S".
  • Items that reach the end of the production line get stored in a warehouse.
  • The warehouse blueprint is tile-able, for easy expansion.
  • The warehouse has throughput issues until you get the first non-stack inserter capacity bonus. Changing some of the fast inserters to regular inserters may help until then.
  • The production line output, warehouse output, and item injections should be lane balanced and merged before connecting to the start of the production line.
What it does:
  • Production is split up into Cycles.
  • At least one of every item is placed on the belt every cycle. These act as probes to kick-start production when the factory stops being idle.
  • It counts how many of each item gets consumed every cycle, and the result is saved to vanatteveldt's rolling average calculator. It's modified to be tied to the cycle clock, so it progresses once per cycle instead of every tick.
  • The rolling average is then used to calculate how much of the set items-per-cycle is used for each item.
  • Cycles are further split into 128 steps. This is to ensure an even distribution of items across the bus.
  • Excess production is accounted for, and subtracted from the items-per-cycle in the next next cycle (timing restrictions mean it can't take effect immediately). This also serves to reserve item slots for probes.
  • It prioritizes using items stored in the warehouse.
Example of the core idea
Change log
Last edited by farcast on Sun Aug 16, 2020 8:54 am, edited 2 times in total.
Efficient inefficient design.

Posts: 21
Joined: Fri Jul 06, 2018 8:25 am

Re: Dynamic Sushi Controller

Post by farcast »

I finally completed the No Spoon achievement, and I used a sushi factory to do it!
No Spoon Sushi.jpg
No Spoon Sushi.jpg (161.59 KiB) Viewed 892 times
More Pictures
I did some calculations to figure out if it was even possible before I started.
Thanks to Kirk McDonald for providing a wonderful calculator.

Starting conditions:

Two red belt sushi bus, no modules except four production 3 modules in the rocket silo.
furnace products, green circuits, gears, sulfur, and rocket fuel produced outside the sushi factory.
copper wire produced and used on site, pulling copper plates from the bus.
fluids transported with pipes.
Everything else that uses items pulls those items from the bus.


red, green, & blue science
130 Science Per Minute

+ purple or yellow science
39 SPM

+ purple and yellow science
23 SPM

minimum time to build a rocket after the silo is built
23 minutes

I knew from testing that SPM can get within 5% of predicted values... given enough time, and as long as demand doesn't change too much. I thought it should still be possible despite this, and I was right!
Efficient inefficient design.

Post Reply

Return to “Combinator Creations”

Who is online

Users browsing this forum: No registered users