# NOT RUN {
# Let consider pipes according to network segment scheme depicted in figure
# in ?dropg help-page.
# Typical large diameters of pipes under consideration, [mm]:
d <- as.double(unique(subset(pipenostics::m325nhldata, diameter > 700)$diameter))
# Let sensor-measured consumption in the inlet of the pipe
# under consideration be proportional to d, [ton/hour]:
consumption <- .125*d
# Let consider total diameter case when total diameters of adjacent pipes are no
# more than d, [mm]:
adj <- c(450, -400, 950, -255, 1152)
# As at may be seen for the second and fourth cases they predominantly have
# recharges from network.
# Let calculate consumption on the outlet of the pipe under consideration,
# [ton/hour]
result <- consumption - dropg(adj, d, consumption)
print(result)
# [1] 75.96439 134.72222 65.70302 180.80580 78.05995
# For more clarity they may perform calculations in data.table.
# }
Run the code above in your browser using DataLab