What is a belt compressor?
A belt compressor packs several partly filled belts into as few completely full belts as possible, with at most one last belt for the remainder. It is the layout for the far end of a mining outpost: five belts arriving at 300 items/min each, and you would rather ship three full Mk4 belts than five half-empty ones.
It is not a balancer, and it is not solved like one. A balancer divides a flow into equal shares; a compressor stacks flows onto a line until the belt is physically full and diverts the rest, which is a completely different — and far cheaper — arrangement of buildings.
How many full belts will I get?
The total divided by the belt rate, rounded down. It is not searched for, it follows from conservation: five inputs of 300 items/min total 1500 items/min, and on a Conveyor Belt Mk.4 at 480 items/min that is 3 full belts, plus a fourth carrying the remaining 60 items/min.
| Inputs | Belt | Total | Full belts | Last belt |
|---|
| 5 × 300 items/min | Mk4, 480 items/min | 1500 items/min | 3 | 60 items/min |
| 100 + 200 + 300 + 400 items/min | Mk4, 480 items/min | 1000 items/min | 2 | 40 items/min |
| 300 + 250 + 230 items/min | Mk4, 480 items/min | 780 items/min | 1 | 300 items/min |
| 7 × 480 items/min | Mk4, 480 items/min | 3360 items/min | 7 | none |
| 3 × 300 items/min | Mk6, 1200 items/min | 900 items/min | 0 | 900 items/min |
The count is arithmetic. All of the work is in the topology, and that is where this problem stops resembling a balancer.
Why a cascade and not an exact tree?
Because cutting a total into equal parts brings out the prime factors of the demand, and every factor above 3 costs a loopback. Compressing five belts of 300 items/min onto Mk4 would mean cutting one input in a ratio of 3/5 — a prime factor above 3, so a return belt, so dozens of buildings for a job the belt does by itself.
Saturating a belt does for free what exact arithmetic pays dearly for. Measured, in buildings:
| Case | Cascade | Exact tree |
|---|
| 5 × 300 items/min on Mk4 | 6 buildings | 72 buildings |
| 5 × 120 items/min on Mk2 | 0 buildings | 70 buildings |
| 7 × 480 items/min on Mk4 | 0 buildings | 168 buildings |
The rows at zero are the direct pairing: when an input already carries the belt rate there is nothing to build at all, and that was the case the exact solver missed most plainly — 168 buildings for seven belts that were already full.
The lines are filled in two regimes, and the order matters. An exact fit is tried first: if some subset of the remaining inputs completes the line to the rate, nothing is cut — that is what finds 250 + 230 = 480 items/min and builds a single merger. Only from the first line that does not land exactly does the cumulative pass take over, laying the inputs end to end and cutting them at the line boundaries.
The rates are still calculated and not simulated: each line takes the smaller of what is available and the belt rate, in order. That is an exact greedy pass, not a steady state observed after the fact.
Why is the Smart Splitter on the inputs, not the outputs?
Because a belt never carries more than its rate and a Splitter has a single input, so no building can ever receive a full belt plus the surplus and divide the difference. The diversion has to happen upstream: the Any output feeds the line being filled, and the Overflow output receives only what no longer fits on it.
An ordinary Splitter cannot do this job — it is round-robin, it favours nothing. The Smart Splitter is the only building that says “this line first, the remainder elsewhere”, which is exactly the rule a cascade needs. On the plan it is marked SS rather than S, and its Overflow face carries a doubled notch.
What does the last, partial belt mean?
It is an output, not a surplus. It is the n-th belt of the compression, simply not filled to the rate, so it is labelled OUT n PARTIAL and you branch it wherever you like.
It does have to be kept moving, which is why the plan draws it dashed and warns about it: if it backs up, the Overflow face upstream stops accepting and the cascade behind it changes behaviour. And when there is no full belt in front of it, it is not partial at all — three inputs of 300 items/min on a Mk6 make one output at 900 items/min, which is the answer rather than a leftover, and it costs one merger.
Frequently asked questions
What do Any and Overflow do?
They are two of the output filters of a Smart Splitter. Any accepts everything it can, so it is the priority output and it feeds the line being filled; Overflow receives only what the Any side can no longer take, which happens exactly when that line has reached the belt rate. On the plan the two are told apart by the shape of the notch — wide for the priority output, doubled for Overflow — and never by colour, because a filter is something you set when you place the building.
Can one input be cut twice?
No, and that follows from how the lines are filled rather than from a check. The inputs are laid end to end and cut at the line boundaries; since one input fits on one belt, its interval is shorter than the gap between two boundaries and can contain at most one of them. A greedy largest-that-fits order does not have that property: it once left a 240 items/min remainder in front of a line with 180 items/min of room and cut an already-cut input again, which would need a Smart Splitter with two Overflow outputs.
Does it work below belt capacity?
Yes, and it is still compression. Three arrivals of 300 items/min on a Mk6 saturate nothing, but they do all fit on one belt: zero full belts is not a dead end, it is a single output at 900 items/min for the cost of one merger. That output is a destination and not an overflow, because there is no series of full belts in front of it.