Avoiding inserter filter count limit.

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.
NoQ
Inserter
Inserter
Posts: 46
Joined: Mon Jan 09, 2017 2:01 pm
Contact:

Avoiding inserter filter count limit.

Post by NoQ »

Not sure if nobody noticed or too obvious to post.

It's well-known that filter inserter may have at most 5 filters (picking any of the five items listed), and stack filter inserter may have at most 1 filter at a time.

By setting filter inserters to "set filters" circuit network operation mode, and feeding them N possible filters one-by-one in a loop (for one tick each), it's possible to go far beyond the limit by sacrificing a bit of inserting speed.

Once picking up an item, the inserter would proceed to put it to the destination tile regardless of changed filters. So for N filters, we sacrifice at most (N-1) game tick (around (N/2) on average) per item (or per stack of items) of speed.

The trick requires (N+2) combinators to perform; you can re-use those for multiple inserters though. 2 combinators are necessary to produce a timer signal T that loops from 1 to N, incrementing on every game frame, and N combinators perform "if signal T is equal to constant n, output n'th item signal".

The output mode for these N inserters may either be 1, or "input count". In the former case, the inserters under control of these combinators operate as statically configured inserters with a fixed set of filters. In the latter case, you can additionally pass item signals to the combinators (signals similar to what you'd pass to a normal inserter to configure filters), and then the whole system would also have dynamically configurable filters.

On the screenshot, N is equal to 4, and i'm programming stack filter inserters (those in white boxes on the left) to take the necessary goods from a train, as long as the station requests them. The station then sorts incoming goods through a "baggage carousel" pattern, and sees how many goods has in its temporary buffer and requests more if necessary, with an additional latch (a pair of combinators per kind of goods, not in the white box). Signals from these latches configure filter inserters again, and additionally request trains to actually come to the station. Stack filter inserters definitely outperform regular filter inserters with 4 continuous signals in this setup, so i'm quite happy with those.

I did not try to program regular filter inserters this way, so that to feed them with a moving window of 5 signals out of N on each frame; it should still be O(N) inserters though.
Screen Shot 2017-03-24 at 2.31.07 PM.png
Screen Shot 2017-03-24 at 2.31.07 PM.png (1.34 MiB) Viewed 2904 times
A blueprint of the combinators in the white box. The red input is enabling or disabling particular goods, and the green output is what you plug into your inserters.

Code: Select all

H4sIAAAAAAAA/8WWb2+bMBDGv0rEazOFf9mkzt9i76rJovalOw186DBVI8R3n4FUSro4hajL8orofM+dfw+HbWhTkS6rjZI9WIcOoZV9b8saZKTJtq60LtZU
P6EtHXEkGmr9KrKyf5VxKg5yOwi/0DFV6gl+lS9ILPs9Vg54lGrx2ZaV7N2h8ZIvyK4rq0jMFeZg/CMaNTrrZCLQGniVyTBMshb0WMwLPUZJ9FP2zwzga8/N
HhQamQqNrDt0059h/InjBgxoNMDh/hPff7z9UlzawjFZ+YjBYxN75Nap5Vua+cncP9ZNyWMHMvoeCepc060Rag5qAqT2TLVC67Ol4w5upSROQvlpaAL/GKUL
VJIzlWQV+TuBT8/AywB4dFC/qXjUje+bGG7hzmDOeOVhXrt31MXftFdkX/EsDzu/u310tvcxMFltIDLZz7IvCxvw7aJjV+YjW+5Ydrst2f/4oC2bK6/4CZYs
GJsVs7ELz8bXVdzT+3DPVnNvHdl/PQvFx56syL5iVxG268rMeHT6dzzfSGK0LbB/OLevCN1j3kRrMqBor8gfDuWUlSw9eYtwZzUY7OoYKq/CqOOGKnh3Q8l9
Z4FSHxw2cyXUU0offkMuvNrDyS3sgcF1bDfqAaz5A6lm+r0vCgAA
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: Avoiding inserter filter count limit.

Post by Yoyobuae »

A four combinator solution for up to 15 items (15 more items can be added with a single additional combinator though):
VIDEO
https://www.reddit.com/r/factorio/comme ... s/depm5j6/
NoQ
Inserter
Inserter
Posts: 46
Joined: Mon Jan 09, 2017 2:01 pm
Contact:

Re: Avoiding inserter filter count limit.

Post by NoQ »

W... Woohoo! Wow. Cool. Thanks.

It even works with regular filter inserters.

Making it pass a dynamic list of filters to the inserter would be a bit harder but possible, at least as long as we expect only a few kinds of signals, just turning on and off (need to put signals in the right order and compute number of signals).
Post Reply

Return to “Combinator Creations”