Pipelayer

by therax

Freely route pipes underground, turning corners and running long distances, with intuitive costs.

Content
3 years ago
0.16 - 1.1
10.6K
Logistics

i A more even distribution of fluid to outputs?

4 years ago

I run into several problems with pipelayer:
- starvation: If fluid production isn't at least 100% of demand, one or more output pipes will simply not receive any fluid while others will be full.
- long startup time. If an input pipe hasn't accumulated enough fluid, no flow occurs. This happens with I feed refinery output directly into a connector.

I imagine each source attempts to distribute to one output, skipping 'full' outputs.

An alternative method:
- remove the 'input' and 'output' subtypes. All underground pipe connectors in a network are the same.
for each update:
- for each network:
- - 1: sum the fluid in the network's underground pipe connectors
- - 2: divide by the number of connectors.
- - 3: set each connector to this 'average' fluid amount.

If fluid is measured as an integer, you can store the remainder from step 2 into a single value per network, and add it back in step 1 on the next update.

This removes the magic 'pump' action from Pipelayer. If you want to increase throughput, you can still use pumps to push into and pull out of the connectors.

This fixes starvation and startup problems. All connectors will have the same amount of fluid every update with no thresholds.
This allows flow in both directions (at no performance penalty) and acts more like a series of vanilla pipes.

4 years ago
(updated 4 years ago)

The alternative method you propose was the original method I tried. It is much more predictable, much simpler to implement, and also takes several 100x more UPS on large maps, which is why I moved this much more complicated system.

If you adjust the settings (drop thresholds, decrease update interval) you should see more predictable and responsive behavior at the cost of UPS.

New response