Help with train circuit controlled train unloading, interrupts from changes in inventory

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
PowderedWater
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon May 11, 2020 3:52 pm
Contact:

Help with train circuit controlled train unloading, interrupts from changes in inventory

Post by PowderedWater »

So I am working on a train request unload station for my wall supply, the desire is for the wall and turrets etc to be built from items being requested from the train in a setup like in the circuit cookbook, (Using the CC with AC and having the filter inserters filter mode set from the resulting difference.)

However I run into this problem, when the inventory of my logistics network is being calculated the removal of items ends up creating a larger request than what the train can supply, as a result of that the filter inserter never switches to the next item in the constant combinator.

Train pull in, has 150 fast inserters, the request is for 50 from the inserter circuit >
Logistics robots come and start removing fast inserters >
Fast inserters are no longer in any network as they are being transported or put down >
Inventory never reaches 50 fast inserters, filter inserters stall on item and wont proceed down the list.

This leaves me wondering how I can pass a 0 fast inserter count to the filter inserters loading the train so they change the filter to the next item in the constant combinator...

I had thought about using a clock to take a snapshot of the train inventory then try a count down but I have been unsuccessful at my attempts to rig something.

astroshak
Filter Inserter
Filter Inserter
Posts: 597
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: Help with train circuit controlled train unloading, interrupts from changes in inventory

Post by astroshak »

I never had much luck getting a filter inserter to change its filter by circuit conditions.

What I do for such building stations is a dedicated stack filter inserter per item. Defense base needs laser turrets, walls, repair packs, flamethrower turrets, pipes? The supply train will have filtered inventory for just that. The station will have slot locked passive providers, based on the number of stacks of each item I want. A Constant Combinator with the negative amount desired wired to all the passive providers, and to the station. Station set to come on when Anything < 0.

If I want 100 walls, then nothing else goes into that passive provider. That passive provider is spot locked to the one slot that the desk Ed walls will take. The Constant Combinator might only be set to -50 Walls, which would give me a buffer of 50 walls every time the train comes and tops off the chest.

The drawback is the need for one stack filter inserter per item, as well as one passive provider per item. This means there is an inherent limit of 12 items per cargo wagon, though if you need less you can use multiple stack filter inserter a and chests for one item (say, landfill for a solar or nuclear blueprint). Another drawback, if you want to call it that, is the amount that of machines need in those passive providers just sitting there waiting for a use that may not ever materialize.

I’ve found this to be more effective than trying to output only the exact demand by changing the filter of an inserter.

PowderedWater
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon May 11, 2020 3:52 pm
Contact:

Re: Help with train circuit controlled train unloading, interrupts from changes in inventory

Post by PowderedWater »

Thanks for your reply, I have considered this as a fallback but was really hoping to figure out how to negate that input if the train is empty, it doesn't seem that hard, alas I am self taught and have yet to crack this :(

PowderedWater
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon May 11, 2020 3:52 pm
Contact:

Re: Help with train circuit controlled train unloading, interrupts from changes in inventory

Post by PowderedWater »

Another thing I have been mulling was to create a clock based SR latch, where the train arrived it takes an inventory count, then uses a counter setup to count down the items removed, but that seems a bit to chew on as well

astroshak
Filter Inserter
Filter Inserter
Posts: 597
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: Help with train circuit controlled train unloading, interrupts from changes in inventory

Post by astroshak »

I think a big problem you are going to run into is that a zero signal is no signal at all.

That is good when you want to clear the filter out of the inserter, but bad when you need to do something with the absolute lack of the item at all.

Maybe have a Constant Combinator output -1 of everything you want the train to deliver, and add that to the train’s inventory? When the total item count on the train for any one item is less than zero multiply the desired item signal by zero?

Don’t really know how to go about doing that but it might be a starting point.

PowderedWater
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon May 11, 2020 3:52 pm
Contact:

Re: Help with train circuit controlled train unloading, interrupts from changes in inventory

Post by PowderedWater »

Yeah the 0 no signal thing gets in the way, but I have found that by adding the inverse of filter inserters are missing negates the signal and removes it, which is great... now just trying to figure out how to get that signal to the filter inserters once each item (was thinking of using separate combinators for that) to trigger the calculation of the inverting the remaining items not fed, and then adding them to the inserter circuit


this isnt done but its what im working with, the loader setup is the basic one in the cookbook, the circuit network on the left is where i was trying to come up with a timer based memory cell that works.... but i cant figure out how to reset it after the timer is up....


Code: Select all

0eNq9V02PmzAQ/S9zJhUYSCrUrVTtpYc9rFY5bRUhAk5iCQwyJi2K+O8d4zRLEyBASS+J/PVmPO/52ZxgGxc0E4xL8E7AwpTn4P04Qc72PIhVnywzCh4wSRMwgAeJakU0ZBEVizBNtowHMhVQGcB4RH+BZ1XGXQAVSAZctiOQamMA5ZJJRnU+daP0eZFsqcAQfZkYkKU5Lk25Co9wC5xe4p/7ycUYGFqKNPa39BAcGc7HSWcUH8eiemWuendM5NK/2cmRCVlgzyUHPWNBg/AAOkC9N/BM1UiyQNR5efAV16SFzIpJqFmJ+RVc+juRJj7jCAOeFAWtdFBOw0vqlvrZC0p5s3wsqksXMhEWTNZNoshqDJPr4Q2Ck6FoFk6vGoh/+CKT+DIfy9f6b7LIFVlPU8g6UlHKA+P7iZQJGl2X2FaHobX47kO4snsP6Q1Zmis88xAxobcDntNO247FkopBDpMfUrkvuC5jcebnYjCb4eUjw3btjFKoWW+a/Ad95lRhDF/0rivW0PGXCTpe98h3F8T5GP3eqrRDzssP/d6H6eLRneI0msj7+p2F1rf+O+JpZrpGuo0zlC23/x5Z9ZLp3JA5LIrVf1t1iWI5ztL06Xb/3dK6+Hpu2Jp5593UhfGtFYOMwnhtxbBHYfw8oHG34jijcN4bGEvzA8XtNPtWwTjDFLEap4izTzxQEi8zSGI9gySeZ5DE9xnk8NaKMVIMrXcGWk391PAa3z4G4MMtr0ldrWzL/OzaFrGq6jdK5nl3

PowderedWater
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon May 11, 2020 3:52 pm
Contact:

Re: Help with train circuit controlled train unloading, interrupts from changes in inventory

Post by PowderedWater »

.... or you can just use a regular filter inserter, didn't realize they had 4 filter spots as oppose to the 1 that the stack had.... im dumb

Post Reply

Return to “Gameplay Help”