My first circuit network: smart FARL train loading

Post pictures and videos of your factories.
If possible, please post also the blueprints/maps of your creations!
For art/design etc. you can go to Fan Art.

Post Reply
vanatteveldt
Filter Inserter
Filter Inserter
Posts: 946
Joined: Wed Nov 25, 2015 11:44 am
Contact:

My first circuit network: smart FARL train loading

Post by vanatteveldt »

This is my first foray into circuit networks (apart from a pretty trivial indicator light on full chests).

My goal: I use the FARL mod to automatically lay track, and generally want to lay track to a new outpost. So, it would be nice if the FARL cargo wagon would always contain what is needed for a new outpost: walls, turrets, belts, splitters, chests, (3x) inserters, mines, furnaces, (2x) poles as well as rails and signals.

Failed solutions:
My first thought was simply to line the wagon with requester chests and insert them into the wagon with a slot reserved for each of the items (or more for e.g. rails) so it wouldn't overload. Unfortunately, this maximized the number of different items to the number of inserters that can reach a wagon, i.e. 2x6 or 2x7. I had more than 12 item types so that didn't work. (and of course, more than 1 cargo wagon is way too slow :))

Then I tried setting multiple item types in one requester chest, i.e. have both pole types in one chest. The problem is, that if it wants to insert the 51st medium pole, the wagon slot is full, but it still grabs the pole. So, the large poles will not be loaded in this case.

So I figured I needed to use a smart inserter connected to the (smart) train stop, and only insert if is still room. But the problem is a smart inserter can only check one condition at a time, so that would still require a dedicated inserter per item type, which means they can't insert into the wagon directly.

My solution:
What I did is insert from a line of requester chests plus smart inserters onto a belt, which is then loaded into the wagon. The inserters are set 10 below the threshold (i.e. insert if poles < 40) to allow for poles on the belt.

Image

(I need to add chests for walls, turrets, and repair packs, so the total # of types is 15)

A second problem is that if the FARL is not at the station, no signal is produced, so the inserters will think there is room. To solve this, I used the "-1 wagon" signal that a smart stop emits if there is no train to add 100k to each of the signals:
the red signal from the train stop is compared, and "1" is emitted if the train stop is -1. Then, this is multiplied by 100k from the constant combinator. This signal is fed as the green signal to the "+" combinators (red still being the raw train stop output). These combinators simply add the actual signal to the "100k" signal, to produce the normal signal if there is a train, and 100k if there is no train. These signals are output on the red wire and fed to the smart inserters.

Image


Am I making this needlessly complex? Is there a simpler way to achieve the stated goal?

Is there a smart way to get rid of the "race" condition that if e.g. >10 poles fit on the belt, the total number of poles is >50, so the belt can get filled up and the system can get into deadlock?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: My first circuit network: smart FARL train loading

Post by DaveMcW »

Use a double row of long-handed inserters, that will get you up to 24 or 28 items.

vanatteveldt
Filter Inserter
Filter Inserter
Posts: 946
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Re: My first circuit network: smart FARL train loading

Post by vanatteveldt »

A good idea, didn't think of that. So much simpler :)

I have to say the system as it is seems to function well, though, so I'm also happy with my contraption... and that I have finally used combinators!

Post Reply

Return to “Show your Creations”