Learn R Programming

swmmr (version 0.7.0)

run_swmm: Initiate a simulation run

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

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: linux: "/usr/bin/swmm5" darwin: "/Applications/swmm5" windows: "C:/Program Files (x86)/EPA SWMM 5.1/swmm5.exe"

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.

Examples

Run this code
# NOT RUN {
 
# }
# NOT RUN {
result <- run_swmm("model.inp")
# }

Run the code above in your browser using DataLab