This function runs a swmm inp file. If rpt and out files are not specified files are automatically created in the same directory of the inp file.
run_swmm(inp, rpt = NULL, out = NULL, exec = NULL, stdout = "", wait = TRUE)
Name and path to an input file.
Name and path to a report file.
Name and path to an out file.
Name and path to swmm5 executable. If not manually set, the following paths are looked up when package gets loaded: windows: "C:/Program Files (x86)/EPA SWMM 5.X.XXX/swmm5.exe" not windows: "/usr/local/bin/swmm5" , "/usr/bin/swmm5"
where output to stdout
or
stderr
should be sent. Possible values are ""
, to the R
console (the default), NULL
or FALSE
(discard output),
TRUE
(capture the output in a character vector) or a
character string naming a file.
a logical (not NA
) indicating whether the R
interpreter should wait for the command to finish, or run it
asynchronously. This will be ignored (and the interpreter will
always wait) if stdout = TRUE
or stderr = TRUE
. When
running the command asynchronously, no output will be displayed on
the Rgui
console in Windows (it will be dropped, instead).
The path to a swmm5 executable is read by calling 'getOption("swmmr.exec")'.
# NOT RUN {
# }
# NOT RUN {
result <- run_swmm("model.inp")
# }
Run the code above in your browser using DataLab