Our machine learning solution stems from roof drainage systems. It warrants that large buildings like stadiums or shopping malls do not collapse during heavy rainfalls. While the hydraulics form a system with given pipe diameters can readily be simulated, only heuristic algorithms are known to figure out the diameters. A brute force approach is not feasible, since a large system ends up with trillions of possibilities.