How do you build a filter?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
TenNeon
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Aug 25, 2014 6:58 pm
Contact:

How do you build a filter?

Post by TenNeon »

I keep seeing that filter-splitters and the like are a rejected suggestion because the devs don't want to add machines that can be built with existing tools. This implies that it is physically possible to make a filter with existing tools.

I define a filter to be:
  • A device that has at least one input
  • Containing a list such that an item or number of items can be named as "filtered" and
  • A "main output" for items not on that list and
  • If an item passes into the device, and that item is the same type of item as one of the "filtered" items, that item will never exit the filter through the "main output", and
  • If an item passes into the device, and that item is not the same type of item as one of the "filtered" items, and the "main output" is not obstructed, that item will always exit the filter through the "main output".
All this said, people seem to be saying that it is possible to build a device like this using existing tools. How do you do it?
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3715
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: How do you build a filter?

Post by DaveMcW »

filter.jpg
filter.jpg (71.19 KiB) Viewed 11692 times
This will work as long as the filtered output is not full.

If you are worried about what happens when the filter is full, make the main belt a dead end and create another filter for everything not in the original filter. Then direct that to the main output.
bulldog98
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Tue Apr 08, 2014 6:40 am
Contact:

Re: How do you build a filter?

Post by bulldog98 »

Just have a look at https://forums.factorio.com/wiki/index.ph ... NwfZsj.gif for reference how to build a filter
therapist
Fast Inserter
Fast Inserter
Posts: 177
Joined: Tue May 27, 2014 7:22 pm
Contact:

Re: How do you build a filter?

Post by therapist »

:o :o :o
Image

So basically a tunnel can be glitchily used to stop the flow of one side of a belt but not the other.
This changes things.

Question: Does using the exit side of a tunnel work the same way?
TenNeon
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Aug 25, 2014 6:58 pm
Contact:

Re: How do you build a filter?

Post by TenNeon »

DaveMcW wrote:
filter.jpg
This will work as long as the filtered output is not full.

If you are worried about what happens when the filter is full, make the main belt a dead end and create another filter for everything not in the original filter. Then direct that to the main output.
A filter as I described it should not let filtered items through even (and especially) if the filtered output is full. Something that doesn't fail when backed up is one of the key properties.
As far as I am aware, it is not possible to make a secondary filter to filter for everything not in the original filter, because even if it included every other individual item in the game, it would be broken on the inclusion of any mod item.
bulldog98 wrote:Just have a look at https://forums.factorio.com/wiki/index.ph ... NwfZsj.gif for reference how to build a filter
That doesn't allow you to select an item type to be excluded- it looks like it is completely item-agnostic. While apparently useful, it isn't what I'm looking for.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3715
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: How do you build a filter?

Post by DaveMcW »

TenNeon wrote:As far as I am aware, it is not possible to make a secondary filter to filter for everything not in the original filter, because even if it included every other individual item in the game, it would be broken on the inclusion of any mod item.
I'm not sure how unknown items are getting onto your belt unless you put them there. :P
Last edited by DaveMcW on Thu Aug 28, 2014 5:51 am, edited 1 time in total.
Neoxx
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Aug 27, 2014 10:54 pm
Contact:

Re: How do you build a filter?

Post by Neoxx »

If you want to filter out specific items, pass every item through a chest, and for each chest have a smart inserter move the filtered items into another chest/belt. You may have to use a regular inserter for the output so the smart inserter always gets the first stab at the input item, so it will be slower, but it's built for function not speed.

Edit: if you want a failure state, you have to connect the input smart inserter to the filter chest, so that if the chest reaches a near full (not completely) state, the inserter shuts down and will not allow any items into the filter until more room is made in the filter chest. I'll build this later!

Edit2: Faster version: As many smart inserter as you need to filter out a full stream of items into smart chests. After those, the same number of smart inserter as 'output' connected to the filter chests set to turn off when a certain number of the filtered items has been reached. This may be more sensitive to shutting off when filtering multiple items into multiple chests, but it should be as fast as the belt it is on.

Testing: I built my second idea, which using red and green wire can only filter 2 items (on/off case for 1 item per color per inserter), but can do so at full belt capacity. For this case, I used fast belts, but it could easily scale to express belts using more inserters. 10 filtering inserters are needed to ensure all items are filtered properly.

The basic setup: Red and green wire connecting all of the output inserters and the filter chests. The filter inserters never turn off, and the output inserters turn off when the chests get too full.

I loaded up chests with everything in my inventory to give a large spread of items to test the filter. The filter was for iron and copper plates. The condition was to shut off the output if more than a combined 1000 of either item were in the chests. This number can be increased to half of a steel chest of each item without the filter failing. Why? Because you need to have every filter inserter be able to have room to move a full load of a single filtered item, and you cannot ensure every chest has enough room for these items unless less the sum contains less than half of a single chest. This may not be perfect, but it is fool proof.
Image

The filter running the first test. It is working flawlessly! None of the filtered items are getting through to the output, and only the filtered items are filtered.
Image

The second test ensured there were enough inserters to remove every item (10 are needed for fast belts), and that the fail-safe buffer was working as intended. There are enough of each filtered item to cause the fail-safe to trip, and the batteries are there to show it in action.
Image

The fail-safe has tripped, and the output inserters are no longer operating. In essence, the system says "Whoa! These chests are getting full. To make sure we don't get completely full and miss filter items, let's stop the output until we get more room in the chests."
Image
User avatar
DerivePi
Filter Inserter
Filter Inserter
Posts: 505
Joined: Thu May 29, 2014 4:51 pm
Contact:

Re: How do you build a filter?

Post by DerivePi »

I would suggest a strategy of filtering everything and not differentiate between some items to be filtered and other items that are passed through. I tried creating a "filter" for specific items, and I believe it is possible. However, the balancing required to remove all of 1 or 2 items from a belt is tedious and not prone to flexibility. I believe a "sorter" , which filters everything, is more appropriate.

The main advantages of filtering everything are:
- The "delivery" belt can be formed into a circuit. Items can be missed on the first go round when the filters are overloaded, and collected when the items re-cycle on the "delivery" belt.
- Items can be inserted anywhere on the "delivery" belt. Whether you are importing raw items to the local factory from the station or exporting finished items to the train station, the "sorter" can receive both kinds of items and deliver them as designated
- The number of smart inserters used to filter each item(s) can be sized to the amount of processing available at the local factory and not to the maximum influx flow from new deliveries. For instance, if you have a standard belt leading to your Iron Smelters, then you only need 6 smart inserters to filter those items off of the "sorter" even if the "delivery" belt is an express belt with a capacity of 15+ smart inserters. Also, for small quantity items, like Effectivity, Speed and Productivity modules, you only need 1 smart inserter filter. Again, overflow will re-cycle so some items can be missed without significant consequence (just takes longer to sort).

As with the "filter," the "sorter" also needs to have logic attached to prevent overflow. As with Neoxx's example, I do this with smart chests that receive the filtered items off of the "delivery" belt. I connect the wire to the mining facility upstream, and use it to prevent the overflowing item from being loaded onto the train wagons. Only 1 chest for each filtered item needs to be connected to check for overflow.

The main disadvantage of filtering everything is that you have to have a smart inserter "filter" set for every item you want processed. If you think about though, you need to do this at some point anyhow.
User avatar
Khyron
Fast Inserter
Fast Inserter
Posts: 178
Joined: Fri May 30, 2014 5:47 pm
Contact:

Re: How do you build a filter?

Post by Khyron »

@TenNeon
I would say it's not strictly possible to create a filter/sorter that meets the requirements you've set out. Smart Inserters use a whitelist and there's no blacklist functionality in the game. Consequently, any mechanism simulating a blacklist by taking the complement of the whitelist is vulnerable to the whitelist path becoming backlogged. That's why all of Neoxx's solutions don't meet your requirements.

But we don't need a filter of this complexity, so it's a moot point. Basically, there's no sensible reason to put more than one type of item on each side of a belt. So any notional blacklist should consist of at most 1 kind of item, which we can functionally implement with a second whitelist. And in fact since a smart inserter supports 5 filtered items, a very basic two path filter (shown below) can accommodate a minimum of 6 types of item on one belt.

Image
Up to five whitelisted item types are moved to the right belt, Up to five blacklisted item types are moved to the left belt. The system can't fail and each side can continue to operate even when the other side is backlogged.
TenNeon wrote:As far as I am aware, it is not possible to make a secondary filter to filter for everything not in the original filter, because even if it included every other individual item in the game, it would be broken on the inclusion of any mod item.
Obviously this would be taking it to an absurd level if you want to include every kind of item in the game on one belt plus items from mods. But there's nothing stopping you from adding as many smart inserters on the blacklist side of the filter as is required to manually create the complement to the real whitelist. It's not easy, nor is it sensible but it is possible. I don't think it fairly meets your original requirements though, it would be too tedious to set up so I don't regard this as a proper solution.
Post Reply

Return to “Gameplay Help”