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
farcast
Burner Inserter
Burner Inserter
Posts: 15
Joined: Fri Jul 06, 2018 8:25 am
Contact:

Dynamic Sushi Controller

Post by farcast » Fri Nov 29, 2019 7:49 am

Example Sushi Mall.png
Example Sushi Mall.png (502.62 KiB) Viewed 183 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.
  • You won't have integer overflow problems as long as

    Code: Select all

    abs(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.
  • It is unnecessary to increase cycle time when lengthening the bus if factory outputs have buffer chests.
  • 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 for higher-than-yellow-belt speeds until you get the first non-stack inserter capacity bonus.
  • 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 items get 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.
Efficient inefficient design.

Post Reply

Return to “Combinator Creations”

Who is online

Users browsing this forum: No registered users