# NOT RUN {
# It is possible to run without specification of argument values:
m325tracebw()
# Get isomorphic representation of district heating network graph:
nx <- pipenostics::m325testbench
nx$d <- 1e3*nx$d # convert [m] to [mm]
# When tracing large network graphs put screen log to file
output <- do.call("m325tracebw", c(as.list(nx), verbose = TRUE))
# Distinct options for opinion aggregation lead to distinct traced
# temperature and pressure:
output <- list(
mean = do.call("m325tracebw",
c(as.list(nx), verbose = FALSE, opinion = "mean")),
median = do.call("m325tracebw",
c(as.list(nx), verbose = FALSE, opinion = "median"))
)
stopifnot(
round(
subset(
output$mean,
node == 13 & aggregation == "median",
c("temperature", "pressure", "consumption")
) - subset(
output$median,
node == 13 & aggregation == "median",
c("temperature", "pressure", "consumption")
),
5
# difference between aggregation options
) == c(dt = 0.03732, dp = 0.00139, dg = 0)
)
# }
Run the code above in your browser using DataLab