🚰 Water-Distribution Pipe Sizing

A branched network carries known demand flows through eight pipes from a pumped source. We choose each pipe's diameter. Head loss follows a Hazen-Williams form, so a wider pipe loses less head and needs less pumping, but costs more material. The optimum trades pipe capital against lifetime pumping cost, widening the high-flow trunk pipes more than the low-flow branches. Score is material plus pumping cost, to minimise. 8-D problem.

Algorithm

Total cost—
Designs tried0
Best so far—

Leaderboard

AlgorithmCostEvals
— no runs yet —

What's happening

The JS objective is a line-for-line port of example_applications/water_distribution and agrees to floating-point tolerance. Each bar's height is the pipe diameter and its width hints at the flow it carries; the trunk pipes (high flow, left) want to be widest.