Stockpile blueprint needed

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
inick
Inserter
Inserter
Posts: 38
Joined: Thu Jun 16, 2016 7:36 pm
Contact:

Stockpile blueprint needed

Post by inick » Tue Dec 18, 2018 10:38 pm

All,

I would really like a circuit-enabled buffer/stockpile blueprint. The basic idea is that a trainload (or belt) of product comes to a point and via circuit network:
(A) If there is cargo in the train, to unload it and not put it back onto the train.
(B) if there is an empty cargo car, load the car without taking the product back out.


This sounds just like the need of an SR-latch, but I'm coming to the conclusion that having a set condition of a value of zero is never evaluating true. This part is needed for (B). I had (A) worked out long ago.

I'd prefer the solution to have vanilla entities, but I am not objecting to a modded suggestion. I'd love to hear what you brainiacs can come up with.
Please respond as needed, I'm hoping this to be an open exchange. I'm just dry, can't think of how to solve (B)


--iNick

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

Re: Stockpile blueprint needed

Post by DaveMcW » Tue Dec 18, 2018 11:39 pm

Station -> Decider combinator

Station is set to "read train contents" and "read stopped train".
Decider combinator is set to: Each ≠ 0 → N (1)

If N = 0 there is no train.
If N = 1 there is an empty train (the only signal is train ID).
If N ≥ 2 there is a loaded train.

Pi-C
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Stockpile blueprint needed

Post by Pi-C » Wed Dec 19, 2018 9:47 am

DaveMcW wrote:
Tue Dec 18, 2018 11:39 pm
Station -> Decider combinator

Station is set to "read train contents" and "read stopped train".
Decider combinator is set to: Each ≠ 0 → N (1)

If N = 0 there is no train.
If N = 1 there is an empty train (the only signal is train ID).
If N ≥ 2 there is a loaded train.
That's elegant, I've always eliminated the train ID and checked then whether any signal is not zero to find out whether a train is empty or loaded. With your solution, I can save on combinators.

That said, it seems to me the setup is not quite what inick needs. Checking for condition A (Does the train have cargo?) will work correctly. However, condition B is about single cars, not the whole train. Your method will only work for a special case (trains with only one car).

I don't know how one could *easily* check for the contents of a single car in vanilla. There is a mod, however, that looks useful, but I've not tried it yet. If you have a vanilla solution, I would be very interested in it as well. :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

inick
Inserter
Inserter
Posts: 38
Joined: Thu Jun 16, 2016 7:36 pm
Contact:

Re: Stockpile blueprint needed

Post by inick » Wed Dec 19, 2018 4:34 pm

DaveMcW wrote:
Tue Dec 18, 2018 11:39 pm
Station -> Decider combinator

Station is set to "read train contents" and "read stopped train".
Decider combinator is set to: Each ≠ 0 → N (1)

If N = 0 there is no train.
If N = 1 there is an empty train (the only signal is train ID).
If N ≥ 2 there is a loaded train.
Very creative, DaveMcW; Now I need to get my peon-size brain wrapped around how to utilize this information. Good tip, thank you.

Post Reply

Return to “Gameplay Help”

Who is online

Users browsing this forum: The Locator, xfir01