factorio

Logistic Circuits Series:

Space Age Logistic Trains

Another year, another major Factorio update and a new blog post (Ooops). I’ve played two Space Age save games since then each 250 hours or so. Amazing improvement and addition to the base game.

Space Age brought quality items, new planets with unique logistics challenges, and circuit network improvements that required rethinking parts of my system. The introduction of legendary inserters operating faster than signal propagation and quality-tiered bots forced significant refactoring.

This write-up is a continuation and refinement of the vanilla logistic train system that I’ve been using and writing about for 6 years.

What and who is this for?

As covered extensively in the prior posts this system enables the automatic management of remote logistical networks through a train network and train system. Some of these remote networks might be the base wall defense, mining outpost, factory areas, etc with different needs.

Each of these outposts are responsible for requesting items to them, regulating the bots within their network and returning excess items back to the main base.

The items to request are set by modules within the 3 module slots in each outpost station. Theses modules consist of a train station and constant combinator which shares a signal group with the loading station allowing for dynamic and synchronized item changes at any time.

The gamestyle I prefer is to have many small logistic networks each covering a small or defined area rather than one large logistic network which has the advantage of improving the throughput of each by limiting how far each bot has to travel (in other words: the bot bandwidth delay product). The high volume of items in or out of an area is done via train. Here’s a birds eye of my Nauvis base showing this in practice:

The logistic train system consists of several parts:

Demo Video

Included in the blueprints below is a demo logistic train system with all the necessary pieces to demonstrate the dispatching of trains to satisify item requests or item trashing.

The Outpost

Let’s start with the outpost station, which has seen the most significant changes.

new-outpost.png

The outpost has the following new and old features:

The Trash Station

An annoyance with the prior versions was that I needed to keep the trash unloader at or close to my main base storage because every item in the logistic train system would have to cycle through trash -> main storage -> loading station when trains are active.

Now I’m using a layer of storage chests to keep the items local to the logistic loading stations and away from my main storage area which needs to be close to my quality grinding area.

However unloading could stall if there is insufficient space in the storage chests. As such there is an unloading timer which detects when unloading is stalled due to insufficient slots and triggers a purge of the storage chests into active provider chests.

When upgrading the trash area inserters you can and should trim the unload time to match the inserter speed.

The Loading Station

The loading station benefited most from Space Age’s circuit improvements, though legendary inserters created new timing challenges.

The introduction of global named signal groups in constant combinators has been a massive quality of life improvement. Keeping the modules and station manifests up to date is now kept in sync automatically.

Previously the modules and stations used a separate constant combinator for each wagon of the logistic train. When adapting the circuit to Space Age I realized it would be possible to use a single combinator and signal group with a value based scheme to partition the items into each wagon. Eventually I settled on placing item counts that are <= a stack into the first wagon and item count > stack into the second wagon. This has worked well so far as most (of my) logistic train item usage curves follow a L shaped curve (use thousands of rail and landfil per station but only need a few combinators, etc).

Another problem was the fast inserters. legendary inserters were operating faster than the signal updates were propagating through my loading station circuit. Inserting with a stale item or stack size signal will over insert items and overfill the wagon slots causing the loader to stall. Lots of refactoring was required to reduce the number of ticks/hops it took to calculate the next hand item and stack size for fast and exact insertion.

I used a combinator timer circuit to provide a clock signal to all loader inserters to ensure they all operate at the same time and with sufficient delay to ensure the hand and stack signals are up to date. Currently 9 ticks are needed to calculate the next hand signal. I don’t see an obvious way to improve this further. Either way it’s really fast and correct now.

Feature Requests For Factorio 2.1

Quality Improvements

Quality Wagons

It’s been said elsewhere, I would also love to see this. Wagons should match the quality improvements to chests.

Roboport Improvements

Read Roboport Network Contents

Add a fourth option to roboports to list the number, type and quality tier of the bots in the logistic network. This could be called “Read roboport network contents”.

It would be so much simpler to:

At the moment I’m multiplying the Y and T signals with negative logistic and construction bot signals per-tier.

But this doesn’t or wouldn’t expose the available v.s. total bots per quality tier which is needed elsewhere in this circuit and other circuits.

Perhaps there could be an option to output the bot network statistics by quality.

Set Robot Requests In Roboports

It would be amazing if roboports supported a set bot requests signal to allow for rapid bot upgrades. At the moment I pick a roboport and set small requests for each tier and remove the non-configured tiers. Feels like a hack though.

Also it would be nice if the roboports supported a “trash unrequested” to always leave room for non-configured tier bots to land and be removed.

Roboport Bot Request Interference

There appears to be interference between logistic bot and construction bot requests in the roboport. In the provided blueprints I had to request all logistic bots in one roboport and all construction in the other otherwise construction bot requests would not work.

Circuit Combinator Improvements

Arithmetic Combinator Multiple Outputs

Similar to the constant combinator the arithmetic combinator could support multiple outputs/calculations. In the above example a single arithmetic combinator could compute the negative bot contents signal at once:

Decider Combinator Output From Other Input Signal

In a prior version of the outpost I was attempting to use blueprint parameters to set and change the outpost bot quality. There I was converting from the Y and T signal into bot type, quality and quantity signal and it would have been great to specify the output bot signal value came from the input value of T or Y directly.

Parameters In Constant Combinator Groups

When trying to create a blueprint for a new logistic train group I used “[P0] [P1]” for the module station name, “[P0] [P1] Loader” for the loader station, and “[P0] [P1] Manifest” for the constant combinator signal group however when placing the blueprint the signal group name parameters are not changed. Typically I set P0 as the current planet and P1 as some unused letter symbol for my trains ([F]actory, [W]all, [S]eed, [M]ining, etc).

Conclusion

The system is faster and more capable than prior versions while being more compact thanks to signal groups and improved circuits. Quality items add complexity but the core design remains unchanged after 6 years. The factory grows, now across multiple planets.

Blueprints

You can download the logistic train blueprint book here.

And a simple rail blueprint book here.

Bugs & Feedback

Please raise an issue here or email mason.larobina@pm.me for any corrections or improvements.

Discussion