Page 1 of 1
Cybersyn active provider station
Posted: Tue Jan 16, 2024 8:44 am
by Nerby
Hello All,
This is my first post here, so please pardon me if I break some forum customs or use odd terms.
I'd like to implement with Cybersyn something similar to active provider chests, but with stations. My idea is that I stockpile items of different kinds at a station, and when I pass a given number of items (independent from the kind) a train comes to collect them and brings them to a receiver station that is able to handle all the different kinds.
Do you think this is possible? And if so, how?
Thanks and best regards,
Nerby
Re: Cybersyn active provider station
Posted: Tue Jan 16, 2024 1:10 pm
by mmmPI
Hello ! you are not breaking any rule or custom nor using odd terms as far as i can tell
I think you'd be more likely to receive a precise answer if you explain what kind of logic you are trying to achieve with combinators, i am not familiar with the Cybersyn mod, but i know there is a discord linked in the mod description
https://mods.factorio.com/mod/cybersyn i suppose players there would be familiar with which functionnality to use, or wether or not it is possible.
The mod is quite complex, so it may be part of your question to know what kind of logic you need in the first place, and maybe you are not worried about implementing it once you know the mod's functionality better. I think you are more likely to receive help for that second part here, at least that's the only one i can propose, and i know other players would too but i'm not sure how many of them circuits experts have used the mod. Hopefully someone that meet both criterion would come and help
Re: Cybersyn active provider station
Posted: Tue Jan 16, 2024 2:30 pm
by Nerby
My two answers:
- I know there a discord for Cybersyn, but unfortunately, I cannot join discord
- As an example, here is what I'd like to achieve. My base is using bobangel's mods, and I'm at the hydro-refining stage for mineral resource processing. Sorting the mineral chunks produces five different ores, and slag. I wnat to send those ores and slag to a central processing factory where all ores from the different mineral resources are sorted.
As far as my experiments demonstrated, it looks there is no way of achieving this, but before throwing the towel I want to double check with anyone who is more expert than me (and surely there are many
).
Re: Cybersyn active provider station
Posted: Tue Jan 16, 2024 3:00 pm
by NineNine
I don't know what the "cybersyn" mod is, but it's easy to do in Vanilla. Set the train station pickup limit to zero or 1, depending on the value from a chest. It will take exactly one wire.
Run wire from chest to train stop. If chest contents > x, set train stop limit to 1. If chest contents < x, set train stop limit to zero.
Re: Cybersyn active provider station
Posted: Tue Jan 16, 2024 6:49 pm
by Tertius
That's almost straightforward in vanilla with circuits. As NineNine wrote, the approach is to set the train limit of the station to 1 if there is enough material in the station chests for a full train, and 0 otherwise.
Since you intend to ship different materials mixed, you need to check if you have enough stacks to fill a train. Not if you have material in general, as it is if you transport only one material.
If all the items have the same stack size, it's easy:
Wire all station chests and connect them to the input of an arithmetic combinator. Set the combinator to EACH / <stack size>, where <stack size> is may be 50, if you have some kind of ore. As output set virtual signal S.
Now the combinator will divide each signal by stack size and output the sum of all results as S. It's actually 2 operations in one: first divide, then add.
So we have the amount of stacks in S. A train wagon has 40 stacks, so if your train has 4 wagons, you have 4*40=160 stacks, so you need to set the train limit to 1, if you have at least 160 stacks, or as circuit condition S >= 160. So use a decider combinator and feed it with the output of the arithmetic combinator. Set S >= 160 as formula, and output L=1. Wire this to the station and configure it to set the train limit with signal L.
That's it in general, however you need to make sure your stacks are distributed equally between all station buffer chests, so you need proper balancing to fill the chests. Otherwise, one wagon gets full while a different wagon doesn't get enough material.
If the items have a different stack sizes, it's slightly more complicated. Unfortunately, a EACH / EACH operation to divide every signal by its corresponding stack size isn't easy to build, so it's more straightforward to just use one arithmetic combinator for every material you intend to handle. Set it to <material> / <material stack size>. Wire all their outputs together, so the individual stacks are summed up, to the decider combinator I mentioned above.
Re: Cybersyn active provider station
Posted: Tue Jan 16, 2024 8:10 pm
by mmmPI
Nerby wrote: ↑Tue Jan 16, 2024 2:30 pm
- I know there a discord for Cybersyn, but unfortunately, I cannot join discord
That make sense, on that part , maybe you could try to contact someone with direct experience of the mod in the mod discussion page, or contact the mod author directly
the mod was introduced on the forum
viewtopic.php?t=104271 , i went to the discord and saw that there is a recent link for a google survey to gather feedback from users with questions like "what did you use the mod for ?" , "what difficulties did you encounter?", so i suppose your feedback would be appreciated since you are obviously ready to communicate about your use of the mod.
Nerby wrote: ↑Tue Jan 16, 2024 2:30 pm
As an example, here is what I'd like to achieve. My base is using bobangel's mods, and I'm at the hydro-refining stage for mineral resource processing. Sorting the mineral chunks produces five different ores, and slag. I wnat to send those ores and slag to a central processing factory where all ores from the different mineral resources are sorted.
That make sense too
, though , regarding your other post, i'm wondering "where" or "how" you think about passing the "given number of item". As far as i can tell from the mod description, there is a feature to make distinct network with a different ID (not "A" network ) using the combinator in the 5th mode. I think that can be used so that instead of making "active provider station", you create a "super hungry requester" in separate network, say "B" , that would be the central processing factory. Then any "provider" added on that "B" network would see its quantity instantly requested by the central processing factory. You would then only have to "pass" the number of item you want to get rid of at those provider station with a positive signal, to make them visible on the "B" network for trains to pick up and bring to the central processing factory. This without disturbing the regular/other use you make of the Cybersyn delivery system and risking some contamination of materials.
Does that sound like achieving the task you want ? If you want to "pass" the number in the central processing factory that's a different story but i understand your request as a system to get rid of things when they reach some quantity that risk clogging your mineral sorting ? I know the mineral sorting from angel bob, and i thought this could be used to make sure the central processing factory gets the "copper" from whichever "stiratite sorting" or "saphirite sorting" or any other "sorting" process that produce copper, where the provider would make it visible for the central processing factory that there is copper to pick up when it reach say "2000" but you don't want other sources of copper to interfere ?
That would be a way to mimick "active provider chest" i thought with all the risks associated,in particular that if you put too many things there, it will clog the central processing area, similar to not limiting what you put in purple chest, hence why i'm wondering where or how you think about passing the requested quantity because i can't see how one would do without somehow limiting machines. That particular network ID thing seemed familiar to me when reading the mod description, but some others i have no clue, like how to handle the number of wagon, or if it matters that it will separate trains into 2 groups requiring 2 depots as that would then ressemble what can be done in vanilla.
For the technical implementation of such logic , i could try something if that is what you wish as functionnality, and someone will probably come up with a 10 times better one
Re: Cybersyn active provider station
Posted: Wed Jan 17, 2024 1:21 pm
by Nerby
Thank you all for the replies.
For the vanilla implementation:
Tertius wrote: ↑Tue Jan 16, 2024 6:49 pm
That's almost straightforward in vanilla with circuits. As NineNine wrote, the approach is to set the train limit of the station to 1 if there is enough material in the station chests for a full train, and 0 otherwise.
The idea of using the train limit to "ask" for a traing is good. And it prompted me a way to solve another issue: I wnt to ensure that load is balanced with production, e.g. I don't want to have 30 stacks of copper, and 2 stacks each for the other ores, but e.g. 10 of copper and 5 each of the other ores. With the proper circuitry, I think I can do this:
- I use filter inserters to load the wagons
- I read the content of the wagons.
- I subtract from this (with a constant combinator wired to the same circuit) the desired quantity of each ore
- I set the inserter filter negating the result above, i.e. when the wagons haven't enoug ore, the result above is negative, and inverting it becomes a positive signal for the inserted filter
For the Cybersyn implementaton:
mmmPI wrote: ↑Tue Jan 16, 2024 8:10 pm
That make sense too
, though , regarding your other post, i'm wondering "where" or "how" you think about passing the "given number of item".
That's easy: with a constant combinator.
mmmPI wrote: ↑Tue Jan 16, 2024 8:10 pm
As far as i can tell from the mod description, there is a feature to make distinct network with a different ID (not "A" network ) using the combinator in the 5th mode. I think that can be used so that instead of making "active provider station", you create a "super hungry requester" in separate network, say "B" , that would be the central processing factory.
The idea of a voraciuos requester is a great one, and I will apply in another case in my base, thanks. However, I don't see how I can apply it with multiple items. This is because requests, AFAIK, are served one item type at a time, thus the locomotive will leave the staton as soon as it has loaded the given number of that single ore.
mmmPI wrote: ↑Tue Jan 16, 2024 8:10 pm
That would be a way to mimick "active provider chest" i thought with all the risks associated,in particular that if you put too many things there, it will clog the central processing area, similar to not limiting what you put in purple chest, hence why i'm wondering where or how you think about passing the requested quantity because i can't see how one would do without somehow limiting machines.
The clogging risk will always be present, that's why it is imperative to size correctly the central sorting factory so that it can handle the presumed throughput.
In any case, thanks for the profitable discussion.
Nerby