Any simple & cheap way to isolate a chest read signal?
-
- Filter Inserter
- Posts: 665
- Joined: Wed Sep 16, 2020 12:45 pm
- Contact:
Any simple & cheap way to isolate a chest read signal?
I'd like to use the read contents of a chest to make a decision based on the collective total content of other chests
eg: disable inserter if it's chest contents it's pulling from is below the average of all the other chests, in some (perhaps very lame) attempt to balance train offloading. But I can't see a simple and cheap way to do this as the signal from the chest gets conflated with the other signals. eg, iron ore signal on the network always seems to be the total of all the chests. this is useful for finding the average, but not so useful for making a decision for a single inserter.
Another approach I was going to try was disabling the inserter if it's chest contents is above the contents of the first insert (the one at the far right). Not sure either approach will work but I was wondering if there was a simple way to balance without using multiple combinators.
Any thoughts from combinator experts out there?
Here is a picture of my avatar looking stumped.
eg: disable inserter if it's chest contents it's pulling from is below the average of all the other chests, in some (perhaps very lame) attempt to balance train offloading. But I can't see a simple and cheap way to do this as the signal from the chest gets conflated with the other signals. eg, iron ore signal on the network always seems to be the total of all the chests. this is useful for finding the average, but not so useful for making a decision for a single inserter.
Another approach I was going to try was disabling the inserter if it's chest contents is above the contents of the first insert (the one at the far right). Not sure either approach will work but I was wondering if there was a simple way to balance without using multiple combinators.
Any thoughts from combinator experts out there?
Here is a picture of my avatar looking stumped.
- Attachments
-
- Screenshot 2021-01-15 163103.png (1.06 MiB) Viewed 5053 times
Last edited by blazespinnaker on Sat Jan 16, 2021 12:35 am, edited 1 time in total.
OptimaUPS Mod, pm for info.
Re: Any simple & cheap way to isolate a chest read signal?
Use an arithmetic combinator to compute the average, and send that out on a different channel. Use one color wire to connect to all the chests to get the total, and the other color wire to connect each chest to its inserter.
-
- Filter Inserter
- Posts: 665
- Joined: Wed Sep 16, 2020 12:45 pm
- Contact:
Re: Any simple & cheap way to isolate a chest read signal?
ohhhh right. Doh. I should have known that. Not enough time is my excuse, but really I am just lazy.
Thank you very much sir. Sorry for the silly question, folks. I'd delete the thread if I could.
edit: hmm, no, that doesn't seem to work or maybe there is some implicit way I'm missing. There doesn't seem to be a way to select the signal coming from a specific color wire / channel in the enable condition. They are both outputting iron ore, though one signal is reddish and the other is greenish.
The problem is that the arithmetic combinator is sending along the ore signal as well as the computed average.
I'll play around with it a bit more. Perhaps there is something about the order in which I do it. Maybe I'll read the wiki. That feels like cheating tho.
OptimaUPS Mod, pm for info.
Re: Any simple & cheap way to isolate a chest read signal?
Output the average as a different signal (red, green, a letter, whatever). Then enable the inserter if (for instance) the letter A signal (from the combinator) is greater than or less than the ore signal (from the chest).
To be really specific. Use red wire to wire from each chest to the next and then to the input of the arithmetic combinator. Set the combinator to compute "ore" divided by the number of chests, and output the result on the "A" channel. Use red wire to then wire from the output of the combinator to the inserters. Use green wire to wire each inserter to its chest to keep the signals separate. The red wires to the chests and the red wires to the inserters should form separate networks (check the network number), and the green wires between the chests and the inserters should also be separate networks (one network per each chest/inserter combo. Set the inserter to enable on "A" < "ore".
To be really specific. Use red wire to wire from each chest to the next and then to the input of the arithmetic combinator. Set the combinator to compute "ore" divided by the number of chests, and output the result on the "A" channel. Use red wire to then wire from the output of the combinator to the inserters. Use green wire to wire each inserter to its chest to keep the signals separate. The red wires to the chests and the red wires to the inserters should form separate networks (check the network number), and the green wires between the chests and the inserters should also be separate networks (one network per each chest/inserter combo. Set the inserter to enable on "A" < "ore".
Re: Any simple & cheap way to isolate a chest read signal?
This is known, as far as I know, after the guy who came up with it : MadZuri.
You usually want to use the >= or <= setting on the Inserters, not just < or >, because if they are all exactly the same, at the average, then they won’t operate.
You usually want to use the >= or <= setting on the Inserters, not just < or >, because if they are all exactly the same, at the average, then they won’t operate.
-
- Filter Inserter
- Posts: 665
- Joined: Wed Sep 16, 2020 12:45 pm
- Contact:
Re: Any simple & cheap way to isolate a chest read signal?
Yeah, looks like it's described on the wiki. the trick appears to be comparing against the logistics signal to compare < 1 And divide by negative # of chests. Neat.
https://wiki.factorio.com/Tutorial:Combinator_tutorial
https://wiki.factorio.com/Tutorial:Combinator_tutorial
OptimaUPS Mod, pm for info.
-
- Filter Inserter
- Posts: 665
- Joined: Wed Sep 16, 2020 12:45 pm
- Contact:
Re: Any simple & cheap way to isolate a chest read signal?
Yes, this is what I did exactly when you first mentioned it. The problem is that Ore was being sent as a signal to the inserter alongside the A signal on the same network as the red wires. However, after scrapping and redoing everything, the Ore signal is no longer being sent on the red wire. Perhaps I had an errant wire connected somewhere. It now works, really well in fact.Trific wrote: ↑Sat Jan 16, 2021 1:29 am Output the average as a different signal (red, green, a letter, whatever). Then enable the inserter if (for instance) the letter A signal (from the combinator) is greater than or less than the ore signal (from the chest).
To be really specific. Use red wire to wire from each chest to the next and then to the input of the arithmetic combinator. Set the combinator to compute "ore" divided by the number of chests, and output the result on the "A" channel. Use red wire to then wire from the output of the combinator to the inserters. Use green wire to wire each inserter to its chest to keep the signals separate. The red wires to the chests and the red wires to the inserters should form separate networks (check the network number), and the green wires between the chests and the inserters should also be separate networks (one network per each chest/inserter combo. Set the inserter to enable on "A" < "ore".
Thanks for your patience, Trific.
Fwiw, I wasn't able to get madzuo's approach to work. But, I wouldn't take that as authoritative given my track record here.
- Attachments
-
- Screenshot 2021-01-15 202442.png (657.95 KiB) Viewed 4982 times
OptimaUPS Mod, pm for info.
Re: Any simple & cheap way to isolate a chest read signal?
LOL at that wiring. My networks certainly got a lot neater once I realized that what was connected to what didn't matter if they were in the same network. 90% is defining network isolation boundaries and deciding what each signal inside each network will represent. 10% is remembering that if you bring two networks together on the same input, that implicit add will bite you if you didn't want them added.
-
- Filter Inserter
- Posts: 665
- Joined: Wed Sep 16, 2020 12:45 pm
- Contact:
Re: Any simple & cheap way to isolate a chest read signal?
Ah, feedback appreciated. I wonder if there is an underground electric line mod.
- Attachments
-
- Screenshot 2021-01-15 231630.png (455.24 KiB) Viewed 4924 times
OptimaUPS Mod, pm for info.
Re: Any simple & cheap way to isolate a chest read signal?
Here is the "original" MadZuri loader, with a stacksize tweak I found to help with throughput. (counters not included in blueprint. (Magic lamp)
Re: Any simple & cheap way to isolate a chest read signal?
The lamp signs look neat and way better as the smart displays.
To what value exactly did you tweak the stack size?
Re: Any simple & cheap way to isolate a chest read signal?
i found this combo to be able to almost consume a blue belt per wagon.
-
- Filter Inserter
- Posts: 665
- Joined: Wed Sep 16, 2020 12:45 pm
- Contact:
Re: Any simple & cheap way to isolate a chest read signal?
I ended up removing it, sadly, as it behaved poorly under impaired load. Fun experiment though. Will try some others.
I am not particularly optimistic, but very hopeful there is a cool, simple and effective way to balance loading / unloading. Thanks to all that chimed in.
I am not particularly optimistic, but very hopeful there is a cool, simple and effective way to balance loading / unloading. Thanks to all that chimed in.
OptimaUPS Mod, pm for info.
Re: Any simple & cheap way to isolate a chest read signal?
Instead of 6 iron chests, use one wagon. Place it on independent piece of track, it balances itself.
- NotRexButCaesar
- Smart Inserter
- Posts: 1133
- Joined: Sun Feb 16, 2020 12:47 am
- Contact:
Re: Any simple & cheap way to isolate a chest read signal?
Place cars or tanks maybe?
Ⅲ—Crevez, chiens, si vous n'étes pas contents!
Re: Any simple & cheap way to isolate a chest read signal?
I use a belt balancer before a loading station, and a belt balancer after an unload station. I do not attempt to balance the chests feeding any one cargo wagon; I rely on the belt balancer to balance the material going to each cargo wagon only.blazespinnaker wrote: ↑Sat Jan 16, 2021 9:19 pm I ended up removing it, sadly, as it behaved poorly under impaired load. Fun experiment though. Will try some others.
I am not particularly optimistic, but very hopeful there is a cool, simple and effective way to balance loading / unloading. Thanks to all that chimed in.
If I’ve got 6 belts of ore coming from a mine, and I’m using 8 cargo wagon long trains, I’ll use a pair of 8x8 balancers in an attempt to make the entire contraption a universal balancer (does not matter how many inputs are starved, or outputs are blocked, all incoming material is split evenly among all available outputs). I have not done the math to see how accurate it is, but just eyeballing it seems to work well.
My thought process is this. If I’m getting each cargo wagon the same amount of material, then I’m not speeding one wagon filling at the expense of another taking a longer time to fill. If I’ve got one belt for two wagons, I’d rather fill both wagons with half a belt, than fill one with a full belt and then fill the other. For the offload, I’d rather make sure that all the wagons get unloaded so long as at least one output belt is not backed up.
This also allows me to use a single Arithmetic Combinator to set the Train Limit at stations. I simply wire all of the loading chests together, to the input of the Arithmetic Combinator. Each / (capacity of train), output Each. A 2 cargo wagon train carrying green circuits would be Each / 8000, output Each, for example. Train stop is Enabled when the item (Iron Ore, Green Circuits, etc.) > 0, and the Train Limit is set to that same signal. This technique is good for any single cargo (IE - not a mixed cargo) moved in bulk. I use it for ores a lot.
No, I’m not ensuring that the 6 chests loading the cargo wagon are evenly loaded. I don’t really see much of a point in doing that. I care more about the cargo wagon than the chests feeding it, or fed from it. If nothing else, then I hope this encourages you to think outside the box.