Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
But since you seem to just want hints about the circuit network instead of a pre-made solution, here is how you can setup a "test" site to fiddle with things:
Get 2 chests and a filter inserter (stack or not doesn't matter) as well as wires, as many decider combinators as you want "filters".
There is also an advanced version that will allow you to precisely insert an exact amount , but when combining it with the filters it can rapidly grow out of hands in term of complexity so I'll leave that out (if you still want to tackle it you will need more decider combinators as well as arithmetic combinators with the amount you want as a constant in the first slot, minus the content of the chest that serves as an output).
Anyway, you want to wire the receiving chest into the decider combinator, set it to "whatever item you want" inferior to the amount you want, then set the output of the combinator to the filter inserter and set it to "set filters".
You do that for each item you want, then put items in the input chest to see if it works.
With just that it will often put a bit more than the quantity requested because of the hand size but as long as you set the amount low enough that it wouldn't pose problems even if each item got to 6 over that amount you will be fine.
In real uses you will probably be using this to pre-fill the chests that will then fill the wagons since you can just use filter on wagons to ensure that each item has enough space.
I don't know if this type of answer is enough for you, so feel free to say it if something is not clear enough (or if something is wrong of course since I have been known to make mistakes with things like this).
One thing is you don't need a lot of decider combinators. Use 1 arithmetic combinator and 1 constant combinator.
The train stop is wired to the input of the arithmetic combinator. The A.C. is set to Each * -1, so it will output the negative amount of each thing that's on the train.
The output of the A.C. is connected to the filter inserters (which are set to "set filters". The output of the constant combinator is also connected to the filter inserters. The C.C. lets you set a bunch of channels for the amount of each item you want.
These 2 signals (the + one from the C.C. and the - one from the A.C.) will combine to equal "the amount that still needs to be loaded".
The inserter will respond to whichever signal is largest, which is the item the train needs the most of.
If sometimes having up to 6 extra of some items (do to the inserter stack size bonus) is objectionable, you can force the inserter to only move 1 item at a time, but this will of course slow down your loading time significantly.
I'll go play around a little with your suggestions and probably will come back with some questions.
Havent thought of the red inserters, regulated filter inserters seem to be more elegant so I'll give it a try.
Just to clarify:
"... you want to wire the receiving chest into the decider combinator, set it to "whatever item you want" inferior to the amount you want,..."
by "inferior" you mean "<" right?
Greetings
By the way, both solutions have their pros and cons, so try both and see what works best for you (and if you use mine you might also want to add a little something to make sure you don't refill the chests while the train is being loaded, adding the train's content is usually enough but if you want even more precision you would need to also read the inserters from the chests to the train)
One thing though Fel, I'm afraid I don't understand how the chests beeing refilled while a train is loading might cause problems. Isn't that a problem for unloading trains, because when loading trains the data that control the inserters come from the train and not the chests...?
I have built a setup with A.C. and everything worked fine while I was testing. Ofcourse I was only testing with a train in station set to impossible departure condition (I guess you know where this is going).
So satisfied with the result I let it go and run its errands and after a few cycles... overflow...
I believe this is the cause:
"...The problem is that everytime the train arrives the inserter is active because it takes one tick to registrate the train contents..."
source:
https://steamcommunity.com/app/427520/discussions/0/1741090847742352042/#c1741090847742584874
I tested it by letting a train with no "need to refill" go to that station and all inserters do one swing regardless, so I guess this is it.
The solution they found would not work for me because it involves enabling/disabling the inserters. I use filter inserters, network sets the filter but does not let me enable/disable it with say a second signal....
How would you go on and solve this?
I noticed the trend to solve overflow issues (caused by this and by inserter stack size) by setting up something to remove excess goods from the cargowagons as part of the loading procedure. Seems a bit crude to me though...
You have two solutions available to you, the first is to add a decider comparator with the signal from "read stopped train" sent by the train stop superior to (">") 0 and with the output "everything" to input count.
If all of the filters are empty it shouldn't be trying to put things before the signals are calculated and the filters set properly.
(EDIT because I posted too soon...)
The second solution is to use a roboport, preferably not connected to any other network that covers a single logistics chest that has inserters connecting it to a normal chest in addition to the train stop.
The inserters are wired to fill the logistics chest when a train is at the stop and to empty it when there is no train, you only need 1 item to do that role.
That way you can use the logistics network as the enable condition for your inserters.
It adds a small delay so I'm not sure how well it will work but it's worth a try.
I squeezed a Decider inbetween the Station and the A.C., made it to check for T>0 and output everything from input when true. This failed though and I think it's because the inserters then get only a positive signal from the Constant Combinator and do their one swing before the negative signal arrives from the Decider / A.C.
So the result is the same, one unwanted swing...
...this gives me a thought though, I could then put one more decider between the C.C. and the inserter, only forward that signal when train is there, too. Ofcourse it involves setting up many Deciders.
The roboport thing sounds interesting but the station is fed by the logistic network so I simply can't isolate it.
Well, I have ideas to play around with, thanx for the input mate!
The roboport thing can work while being in an already existing network, but the item you will have to pick would be one that you are certain will not be in any other place in that network.
One Decider at station taking the train ID and turning it into let's say T=1, one additional Decider between every C.C. and inserter, only forwarding the requests of the C.C. when T=1.
The Decider after or before the A.C. (Wich I tried initially) can even be scraped because that signal with it's negative values will have no effect on it's own on the inserters it seems.
This works like a charm now, with inserter stack forced to 10 (ofc at unloading, too), no more overflow, even without reserved slots and even on not maxed out wagons.
The D.C. will block the signals from getting to the inserters unless a train is there. Even if the train was completely emptied, I think the loco's fuel should still be read by the circuit.