run_swmm: Initiate a simulation run

Description Usage Arguments Details Examples

View source: R/run_swmm.R

Description

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.

Usage

1
run_swmm(inp, rpt = NULL, out = NULL, exec = NULL, stdout = "", wait = TRUE)

Arguments

inp

Name and path to an input file.

rpt

Name and path to a report file.

out

Name and path to an out file.

exec

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"

stdout

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.

wait

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).

Details

The path to a swmm5 executable is read by calling 'getOption("swmmr.exec")'.

Examples

1
2
3
4
5
 
## Not run: 
result <- run_swmm("model.inp")

## End(Not run)

swmmr documentation built on March 2, 2020, 5:09 p.m.