Image below shows my unloading/waiting area. Basically, the 4 vertical tracks are where the trains will go to unload their cargo. They are all named identical so the trains will go to the first available one. Once done unloading, they go to a designated waiting area to the south (the 4 horizontal), where they will wait for their signal to go green before proceeding. Each waiting lane is for a specific ore (Iron, Copper, Coal, Stone). Whenever things get low, the appropriate signal goes green, the train goes to pick up goods.
My problem comes with the unloading portion. The rule for the train is to wait until cargo is empty. Where this occasionally becomes a problem is when the chests aren't unloading fast enough. The previous train would be gone already, the next train comes up that lane and can't unload its cargo since the chests are still (partially) full. Here's the image, my idea on how to solve this is below.
What I am wanting to figure out is if there's a way to keep track of the total amount of items in the unloading chests, per row, so that I can turn a signal on/off at the entrance, hence redirecting a train to an empty unloading area. I am currently using red wiring to figure out the total of each ores through the system, for the south waiting area. That's fairly easy, I tell the signal based on specific ore and amount. Is there a way to use a similar method to find out the total amount of items in 4 chests for the unloading area, keeping in mind that a chest can contain (and often will) more than one type of item?
thanks!
Train Unloading
Re: Train Unloading
Sure, but what condition can I use on the signal? My current ones would be like "Turn signal red if Iron Ore > 10k". Is there a way I can make it say "Turn signal red if number of all items, whichever they are > 1k" ?DaveMcW wrote:Use green wire to count the 4 chests?
Re: Train Unloading
You need an arithemetic combinator to add them up.
Each + 0 → A
Then the condition is simply:
A > 1k
Each + 0 → A
Then the condition is simply:
A > 1k
Re: Train Unloading
Thanks Dave! I got it to work. I probably made it way more complicated than it needs to be, but at least it's functional for now, until I get a chance to read/view some good tutorials on it.
Thanks again, much appreciated!
Thanks again, much appreciated!