Supply Grid - Automatic restocking of outposts

Smart setups of railway stations, intelligent routing, solutions to complex train-routing problems.
Please provide - only if it makes sense of course - a blueprint of your creation.
Post Reply
AlexAegis
Inserter
Inserter
Posts: 41
Joined: Sat Jun 04, 2016 10:25 pm
Contact:

Supply Grid - Automatic restocking of outposts

Post by AlexAegis »

Supply Grid
Reddit post / Video
supply grid.jpg
supply grid.jpg (1.84 MiB) Viewed 2388 times
It's a doubly time-multiplexed global, train based item requester system!
For what?
Restocking outposts with ammo/repair packs/fuel/bots (or any item) and keeping them loaded with a set amount of them without adding extra trains and messing with train routing.

Do you want to supply your outposts easily? Just put a terminal down, set a channel, set an available id and set the items you need in the requester combinator, a train will shortly come to you with all the item's your outpost needs.

###### Only restocks a station if it's supply is below a user defined percentage so it won't do unnecessary 1 item deliveries.
Usage
Set up a central repository using the Bay blueprint.
- Each bay has to have it's B value set to a unique number, preferably starting from 1.
- Each bay's station has to be named by this B value. (Example station name: Bay 7)
- Each bay's Big electric pole has to connect to a global green grid (every terminal and bay has to be connected together with green cables)
- Each bay can load items separately, the convenient solution is running belts under them. (You can put buffer chests before the loading inserters to speed up loading)
- Each bay represents a single channel, each channel can only have 1 train. (That's why we using multiply channels)
- Each train will have the same route for each bay
- Bay X - leave when green > 0
- Terminal X - leave when inventory empty (or inactivity, it's up to you)
Set up a single MUX somewhere on the global green grid, and configure it! You'll might have to update it's configuration later!
(the MUX blueprint can fit around a single Big Electric Pole, you can put it anywhere)

- The MUX has a T value. Don't touch it, it has to be 1.
- The MUX has a M value (M as Modulo) This determines how many station can fit into a single channel which is M - 2 because a terminals id can't be 0 and a multiple of M
- The MUX has a N value which determines how many channels there are.
- The MUX has an S value which determines the speed of the iteration. The lower the faster. S value 1 means that the a MUX tick for each in-game tick. (Note that the system can't operate on a low S value. As the system needs multiple in-game ticks to process a MUX tick. The default S value is 6. I've seen errors at 5. (The error is that the bay is unable to save the request, thus it's doing nothing, changing S back to 6 solves this immediately)

Example configuration:
You have 7 channels and while most of them uses 4-5 terminals one of them uses 9. So your M is 11 (max terminal in a channel + 2) and your N is 7.

###### Reading all the inputs will happen faster if you try to keep these values down, you can always check how many ticks is needed to rotate through all the terminals in the MUX because it calculates an L (as in limit) signal which is the upper limit of ticks in one rotation (and multiply it by 6 because processing a "tick" takes multiple real in-game ticks), so in the previous example it would take 11 * 7 = 77; 77 * 6 = 462; 462/ 60 = ~8 seconds to rotate through all of them. Which means that in worst case scenario, when the train gets back into the bay it takes at most ~8 seconds to receive it's next request and start loading.

Note that both N and M can be larger than what you currently need, and smaller than what you've set up (those stations that are "out of bounds" will simple be ignored)
Set up terminals
These will be at your outposts. It has two configurable values, and a request panel.

- The C value is the channel this terminal is on. It will receive it's items from the bay on the same channel
- The I value is the if of the terminal within the channel. It only has to be unique within the channel.
- The P value is a percentage. It means that the terminal won't request for another supply until the total item count in the buffer is below P percentage of the requested items.

There is a constant combinator near the boxes where you can set what items you need.

There is an extra dev version with comments, the blueprint can be found here, it's not in the blueprint book because it uses modded items for the comments. The mod you need (not really necessary needed to import but the purpose of this dev version is the comments, and you can only ready them with this mod) is Attach Notes

There is another extra blueprint for the screnario (The one shown in the video / screenshot)

Note: Sadly there is a bunch of signals bleeding to the global green grid, it doesn't mess up with this contraption but if you use other signals on a global grid you might want to know about these P I T F W E 1 K M J, and if there is a request, that as a negative value.

If you have any improvements pm me on reddit I'll update the blueprint, but as for now I consider this as finished.

Post Reply

Return to “Railway Setups”