Learn R Programming

epanet2toolkit (version 1.0.8)

ENepanet: ENepanet

Description

runs a complete EPANET simulation

Usage

ENepanet(inpFile, rptFile, binOutFile = "")

Value

Returns NULL invisibly; called for side effect

Arguments

inpFile

name of input file

rptFile

name of report file (to be created)

binOutFile

name of optional binary output file

Examples

Run this code
# path to Net1.inp example file included with this package
inp <- file.path( find.package("epanet2toolkit"), "extdata","Net1.inp") 
print(inp)
ENepanet( inp, "Net1.rpt") 
# try opening Net1.rpt in a text editor or reading it back
# into R with the read.rpt() function in package epanetReader
myRpt <- epanetReader::read.rpt("Net1.rpt")
summary(myRpt)
# clean-up the created file 
file.remove("Net1.rpt")

Run the code above in your browser using DataLab