| Title: | R Package for Interfacing EPANET |
|---|---|
| Description: | Functions enabling the reading and writing of EPANET (http://www.epa.gov/nrmrl/wswrd/dw/epanet.html) input files and reading of output files. |
| Authors: | Hauke Sonnenberg [aut, cre] (ORCID: <https://orcid.org/0000-0001-9134-2871>), Michael Rustler [ctb] (ORCID: <https://orcid.org/0000-0003-0647-7726>), FAKIN [fnd], OPTIWELLS-2 [fnd], Kompetenzzentrum Wasser Berlin gGmbH (KWB) [cph] |
| Maintainer: | Hauke Sonnenberg <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-05-16 05:52:29 UTC |
| Source: | https://github.com/KWB-R/kwb.epanet |
Names of sections available in EPANET input file
availableSections(inpfile)availableSections(inpfile)
inpfile |
full path to EPANET input file |
character vector containing the names of the sections contained in the EPANET input file (without brackets)
Calculate Specific Energy Demand
calculateSpecificEnergyDemand( waterDemand, totalEnergy, COLNAMES = list(Q = "Q.m3.per.hour.sum", E = "Kw.hr.per.m3.avg", Eff = "Average.Efficiency.avg") )calculateSpecificEnergyDemand( waterDemand, totalEnergy, COLNAMES = list(Q = "Q.m3.per.hour.sum", E = "Kw.hr.per.m3.avg", Eff = "Average.Efficiency.avg") )
waterDemand |
minimum constraint for water demand |
totalEnergy |
list element "energyTotal", as retrieved by
|
COLNAMES |
list with elements Q, E, Eff, corresponding to discharge, energy demand and efficiency, respectively. Default: list(Q = "Q.m3.per.hour.sum", E = "Kw.hr.per.m3.avg", Eff = "Average.Efficiency.avg") |
list with elements Q, E, Eff, holding the column names of totalEnergy, corresponding to discharge, energy demand and efficiency, respectively. Default: list(Q = "Q.m3.per.hour.sum", E = "Kw.hr.per.m3.avg", Eff = "Average.Efficiency.avg")
Calibrate Model
calibrateModel( configuration, pipeIDs = NULL, measured, pumpsToCalibrate = NULL, parameterName = "Diameter", parameterRange, showLivePlot = TRUE, ... )calibrateModel( configuration, pipeIDs = NULL, measured, pumpsToCalibrate = NULL, parameterName = "Diameter", parameterRange, showLivePlot = TRUE, ... )
configuration |
EPANET parameterisation, e.g. as retrieved by readEpanetInputFile() |
pipeIDs |
regular expression or name of pipeID(s) to be used for calibration |
measured |
measurement data for all pumps as data.frame e.g. data.frame(pumpNames=c("pmpW1", "pmpW2"), measuredQ=c(140,190)) |
pumpsToCalibrate |
regular expression or name of pumps to be used for calibration: e.g. "pmpW1" |
parameterName |
name of ONE EPANET pipe parameters to be calibrated:
e.g. |
parameterRange |
min/max range of possible calibration parameter values:
0-1; with parameterRange*cun = newParameterValue, e.g. parameter range =
0.5 -> 50% reduction of initial value of |
showLivePlot |
current calibration status is plotted if showLivePlot=TRUE. Default: TRUE |
... |
additional parameters to be passed to fitnessAdaptedModelConfiguration() |
Check Report File For Errors
checkReportFileForErrors(reportFile)checkReportFileForErrors(reportFile)
reportFile |
full path to report file |
Create Optimisation Results Table
createOptimisationResultsTable( optimisationStrategies, averageWaterDemand, currentEnergyDemand, onlyBestSolutions = FALSE )createOptimisationResultsTable( optimisationStrategies, averageWaterDemand, currentEnergyDemand, onlyBestSolutions = FALSE )
optimisationStrategies |
average daily water demand in m3/h to be satisfied |
averageWaterDemand |
current specific energy demand |
currentEnergyDemand |
should only the best solutions be written to data.frame? Default: FALSE |
onlyBestSolutions |
return only best solutions? (default: FALSE) |
Curves To Text
curvesToText(curves)curvesToText(curves)
curves |
data frame representing |
Default Report Variables
defaultReportVariables()defaultReportVariables()
list of report variable definitions as returned by
reportVariable
Epanet Input File Lines
epanetInputFileLines(inpdat, dbg = FALSE)epanetInputFileLines(inpdat, dbg = FALSE)
inpdat |
input data to be saved in EPANET's input file format |
dbg |
if TRUE, debug messages are shown. Default: FALSE |
Example Input Files
exampleInputFiles()exampleInputFiles()
full path(s) to EPANET example input file(s)
Get Path to File in This Package
extdata_file(..., must_exist = TRUE)extdata_file(..., must_exist = TRUE)
... |
parts of the file path to be passed to |
must_exist |
if |
Get Epanet Installation Path
getEpanetInstallationPath()getEpanetInstallationPath()
Get Link Results
getLinkResults( outdat, links, vars = c("q", "v", "hl", "wq", "sta", "set", "rr", "ff") )getLinkResults( outdat, links, vars = c("q", "v", "hl", "wq", "sta", "set", "rr", "ff") )
outdat |
output data read from EPANET output file, as returned by
|
links |
names of |
vars |
acronyms of variables to be included in the returned data frame. "Q" = flow, "v" = velocity, "hl" = headloss, "wq" = avg. water quality, "sta" = status, "set" = setting, "rr" = reaction rate, "ff" = friction factor |
Get Link Timeseries From Output Data
getLinkTimeseriesFromOutputData(outdat)getLinkTimeseriesFromOutputData(outdat)
outdat |
data structure read from EPANET output file, as returned by
|
Get Names Of Curves
getNamesOfCurves(inpdat, pattern = ".*")getNamesOfCurves(inpdat, pattern = ".*")
inpdat |
imported EPANET file (as retrieved by |
pattern |
optional filter pattern (default: ".*") |
Get Names Of Junctions
getNamesOfJunctions(inpdat, pattern = ".*")getNamesOfJunctions(inpdat, pattern = ".*")
inpdat |
imported EPANET file (as retrieved by |
pattern |
optional filter pattern (default: ".*") |
Get Names Of Pipes
getNamesOfPipes(inpdat, pattern = ".*")getNamesOfPipes(inpdat, pattern = ".*")
inpdat |
imported EPANET file (as retrieved by |
pattern |
optional filter pattern (default: ".*") |
Get Names Of Pumps
getNamesOfPumps(inpdat, pattern = ".*")getNamesOfPumps(inpdat, pattern = ".*")
inpdat |
imported EPANET file (as retrieved by |
pattern |
optional filter pattern (default: ".*") |
Get Names Of Reservoirs
getNamesOfReservoirs(inpdat, pattern = ".*")getNamesOfReservoirs(inpdat, pattern = ".*")
inpdat |
imported EPANET file (as retrieved by |
pattern |
optional filter pattern (default: ".*") |
Get Names Of Tanks
getNamesOfTanks(inpdat, pattern = ".*")getNamesOfTanks(inpdat, pattern = ".*")
inpdat |
imported EPANET file (as retrieved by |
pattern |
optional filter pattern (default: ".*") |
Get Names Of Valves
getNamesOfValves(inpdat, pattern = ".*")getNamesOfValves(inpdat, pattern = ".*")
inpdat |
imported EPANET file (as retrieved by |
pattern |
optional filter pattern (default: ".*") |
Get Node Results
getNodeResults(outdat, nodes, vars = c("d", "h", "p", "wq"))getNodeResults(outdat, nodes, vars = c("d", "h", "p", "wq"))
outdat |
output data read from EPANET output file, as returned by
|
nodes |
names of |
vars |
acronyms of variables to be included in the returned data frame. "d" = demand, "h" = head, "p" = pressure, "wq" = water quality |
Get Node Timeseries From Output Data
getNodeTimeseriesFromOutputData(outdat)getNodeTimeseriesFromOutputData(outdat)
outdat |
data structure read from EPANET output file, as returned by
|
number of simulation periods, calculated from duration and hydraulic time step both of which must be given in the [TIMES] section of the EPANET configuration
getNumberOfPeriods(configuration)getNumberOfPeriods(configuration)
configuration |
EPANET configuration, as retrieved by |
Get Pipe Coordinates
getPipeCoordinates(inpdat)getPipeCoordinates(inpdat)
inpdat |
imported EPANET file (as retrieved by |
Get Pump Info
getPumpInfo(inpdat)getPumpInfo(inpdat)
inpdat |
imported EPANET file (as retrieved by |
Get time series of pump performance from EPANET result using head curves and efficiency curves as contained in EPANET input file
getPumpPerformance(inpdata, outdata, pumpnames)getPumpPerformance(inpdata, outdata, pumpnames)
inpdata |
data structure read from EPANET input file, as returned by
|
outdata |
data structure read from EPANET output file, as returned by
|
pumpnames |
vector with names of pumps for which the pump performance should be evaluated |
data frame with columns Q (discharge), H (head), Eff (efficiency), specEn (specific efficiency), En (energy)
Get section from EPANET input file
getSection(inpfile, sectionName)getSection(inpfile, sectionName)
inpfile |
full path to EPANET input file |
sectionName |
name of section to be read, for possible section names see the documentation of the EPANET Toolkit |
data frame representing the content of the section in the input file. If possible, column names are read from the section's header line
Size of binary output file in Bytes, kB (rounded), MB (rounded)
outputFileSize(configuration)outputFileSize(configuration)
configuration |
EPANET |
named vector of numeric representing output file size in bytes, kB (rounded) and MB (rounded), respectively
Plot Calibration
plotCalibration(newRes)plotCalibration(newRes)
newRes |
expects data.frame object "newRes" as input parameter (is automatically produced by calibrateModel(). Required columns: Qerror, calibrationRunNumber, pch, colors, pumpNames |
Plot Curves
plotCurves(curves, curveNames = unique(curves$ID), ...)plotCurves(curves, curveNames = unique(curves$ID), ...)
curves |
data frame containing pump |
curveNames |
names of |
... |
additional arguments passed to xyplot |
plot EPANET model network. Allows plotting of changed pipe ids, which are defined as vector in parameter "changedPipeIDs"
plotModel( inpdat, pch = 16, cex = 0.2, xlab = "", ylab = "", main = defaultMain(inpdat, 1), zoomToPumps = FALSE, changedPipeIDs = NULL, ... )plotModel( inpdat, pch = 16, cex = 0.2, xlab = "", ylab = "", main = defaultMain(inpdat, 1), zoomToPumps = FALSE, changedPipeIDs = NULL, ... )
inpdat |
EPANET input file |
pch |
Either an integer specifying a symbol or a single character to be used as the default in plotting points. See points for possible values and their interpretation (default: 16) |
cex |
A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default. This starts as 1 when a device is opened, and is reset when the layout is changed, e.g. by setting mfrow. (default: 0.2) |
xlab |
a title for the x axis (default: "") |
ylab |
a title for the y axis (default: "") |
main |
an overall title for the plot (default: kwb.epanet:::defaultMain(inpdat, 1)) |
zoomToPumps |
should plot zoomed to pumps (default: FALSE) |
changedPipeIDs |
optional, vector with changed pipe IDs (default: NULL) |
... |
additional arguments passed to plot |
Plot Optimisation Results
plotOptimisationResults( totalEnergy, name = "", pumpsToReplace = "", userConstraints, currentOperation, ... )plotOptimisationResults( totalEnergy, name = "", pumpsToReplace = "", userConstraints, currentOperation, ... )
totalEnergy |
list element energyTotal as retrieved by |
name |
name of optimisation scenario (default: "") |
pumpsToReplace |
optional vector with pump_ids to be replaced (default: "") |
userConstraints |
list of userConstraints with elements namesOfWellsWithQualityProblems, waterDemand |
currentOperation |
list of currentOperation with elements SpecificEnergy, (specific energy demand: kwh/m3) and Label ("Specific energy demand of current operation") |
... |
additional arguments passed to scatter2D |
Plot time series of discharge, head and pump performance
plotPumpPerformance(xCols, yCols, pumpPerformanceTimeSeries)plotPumpPerformance(xCols, yCols, pumpPerformanceTimeSeries)
xCols |
vector of columns contained in data.frame retrieved by getPumpPerformance() to be used as for x axis plotting, e.g. c("step", "Q") |
yCols |
vector of columns contained in data.frame retrieved by getPumpPerformance() to be used as for y axis plotting, e.g. c("Eff", "specEn", "En") |
pumpPerformanceTimeSeries |
pump performance time series as retrieved by getPumpPerformance() |
Read EPANET Input File
readEpanetInputFile(inpfile, dbg = FALSE)readEpanetInputFile(inpfile, dbg = FALSE)
inpfile |
full path to EPANET input file |
dbg |
if TRUE, debug messages are shown. Default: FALSE |
list with elements representing the different sections of the EPANET input file. The names of the list elements correspond to the names of the sections that were found in the input file. Each list element is a data frame containing the content of the corresponding section.
availableSections, readEpanetOutputFile
Read EPANET Output File
readEpanetOutputFile( outfile, read.prolog = TRUE, read.energyUse = TRUE, read.dynamicResults = TRUE, read.epilog = TRUE )readEpanetOutputFile( outfile, read.prolog = TRUE, read.energyUse = TRUE, read.dynamicResults = TRUE, read.epilog = TRUE )
outfile |
full path to EPANET output file |
read.prolog |
if TRUE, the "Prolog" section is read from the output file and contained in the output list |
read.energyUse |
if TRUE, the "Energy Use" section is read from the output file and contained in the output list |
read.dynamicResults |
if TRUE, the "Extended Period" section is read from the output file and contained in the output list |
read.epilog |
if TRUE, the "Epilog" section is read from the output file and contained in the output list |
list with elements prolog (if read.prolog = TRUE), energyUse
(if read.energyUse = TRUE), dynamicResults (if read.dynamicResults
= TRUE) and epilog (if read.epilog = TRUE), containing the
different parts of the output file, as described in the documentation of
the EPANET Toolkit.
reads an EPANET report file and returns a list with node and link data
readResultsFromReportFile(reportFile, warn = TRUE)readResultsFromReportFile(reportFile, warn = TRUE)
reportFile |
full path to report file, generated by EPANET |
warn |
if TRUE, a warning is given if no Node or Link results were found in the report file. |
list with elements nodeData containing a data frame with node results and linkData containing a data frame with link results
Replace curves in CURVES data
replaceCurves(curves, newCurves)replaceCurves(curves, newCurves)
curves |
data frame representing |
newCurves |
new curves data frame representing |
Replace Curve Section In Input File
replaceCurveSectionInInputFile(inpfile, newCurves)replaceCurveSectionInInputFile(inpfile, newCurves)
inpfile |
full path to EPANET input file |
newCurves |
modified CURVES section. Data frame as returned by
|
vector of character(s) representing the rows of the input file
Replace One Curve In CURVES Data
replaceOneCurve(curves, curveName, x, y)replaceOneCurve(curves, curveName, x, y)
curves |
data frame representing |
curveName |
name of the curve to be replaced |
x |
vector of |
y |
vector of |
data frame in which the lines corresponding to the curve named
curveName are replaced with x and y values given in
x and y, respectively
Report Energy Use
reportEnergyUse(outdat)reportEnergyUse(outdat)
outdat |
output data read from EPANET out-file |
Report variable definition for argument variables of
setReportOptions
reportVariable( name = "Elevation", yes = TRUE, below = NA, above = NA, precision = 2 )reportVariable( name = "Elevation", yes = TRUE, below = NA, above = NA, precision = 2 )
name |
|
yes |
shall the variable be importet on? |
below |
if set to a non-NA value (default: NA) only values |
above |
if set to a non-NA value (default: NA) only values |
precision |
the variable will be reported on with the given |
Run EPANET With Given Input File
runEpanet( inpfile, returnOutput = FALSE, epanet.dir = getEpanetInstallationPath(), intern = FALSE, write.output = TRUE, ..., dbg = FALSE )runEpanet( inpfile, returnOutput = FALSE, epanet.dir = getEpanetInstallationPath(), intern = FALSE, write.output = TRUE, ..., dbg = FALSE )
inpfile |
full path to EPANET input file |
returnOutput |
if TRUE, the output is read from the generated output file and returned |
epanet.dir |
path to EPANET installation directory. Default: getEpanetInstallationPath() |
intern |
a logical, indicates whether to make the output of the command an R object. |
write.output |
if TRUE, EPANET will write a binary output file, else not |
... |
further arguments passed to |
dbg |
if TRUE, debug messages are shown. Default: FALSE |
Run EPANET INP configuration
runEpanetConfiguration( inpdat, name = "tmpEpanet", returnOutput = write.output, write.output = TRUE, ..., dbg = FALSE )runEpanetConfiguration( inpdat, name = "tmpEpanet", returnOutput = write.output, write.output = TRUE, ..., dbg = FALSE )
inpdat |
input data as retrieved by |
name |
|
returnOutput |
if TRUE, the output is read from the output file (if generated, see write.output) and returned. Default: value of write.output |
write.output |
if TRUE, EPANET will write a binary output file, else not |
... |
further arguments passed to |
dbg |
if TRUE, debug messages are shown. Default: FALSE |
Run Epanet GUI
runEpanetGUI(inpfile = "", epanet.dir = getEpanetInstallationPath())runEpanetGUI(inpfile = "", epanet.dir = getEpanetInstallationPath())
inpfile |
path to EPANET input file |
epanet.dir |
EPANET directory (default: |
Run Epanet On Command Line
runEpanetOnCommandLine( inpfile, epanet.exe, intern = FALSE, write.output = TRUE, dbg = FALSE )runEpanetOnCommandLine( inpfile, epanet.exe, intern = FALSE, write.output = TRUE, dbg = FALSE )
inpfile |
path to EPANET input file |
epanet.exe |
path to EPANET executable |
intern |
a logical, indicates whether to make the output of the command an R object. (default: FALSE) |
write.output |
if TRUE, EPANET will write a binary output file, else not |
dbg |
if TRUE, debug messages are shown. Default: FALSE |
Run Optimisation Strategy
runOptimisationStrategy( configuration, newCurvesData, optimisationStrategy, operationSchemes = wellFieldOperationSchemes(getNamesOfPumps(configuration)), showLivePlot = FALSE )runOptimisationStrategy( configuration, newCurvesData, optimisationStrategy, operationSchemes = wellFieldOperationSchemes(getNamesOfPumps(configuration)), showLivePlot = FALSE )
configuration |
EPANET |
newCurvesData |
list with elements Pump (data frame with columns "ID", "X_VALUE" and "Y_VALUE") of pump curves, GlobalPumpEfficiency (data frame with columns "ID", "X_VALUE" and "Y_VALUE") and sublist PumpNamePrefix (with elements PumpCurves = "TDH" and GlobalPumpEfficiency = "Eff" ) |
optimisationStrategy |
list with elements name (name of optimisation strategy), shortName (short name of optimisation strategy) and pumpsToReplace (vector with pump-ids to be replaced, if none: "") |
operationSchemes |
possible wellfield operation schemes. Default:
wellFieldOperationSchemes(getNamesOfPumps( |
showLivePlot |
(default: FALSE) |
list with elements energyTotal and energyPerPump
Set Epanet Installation Path
setEpanetInstallationPath(epanet.dir)setEpanetInstallationPath(epanet.dir)
epanet.dir |
full path to MS Access database or ODBC database name |
Set REPORT Option in EPANET configuration
setReportOptions( configuration, pagesize = 0, file = "", status = "NO", summary = "YES", messages = "YES", energy = "NO", nodes = "NONE", links = "NONE", variables = defaultReportVariables() )setReportOptions( configuration, pagesize = 0, file = "", status = "NO", summary = "YES", messages = "YES", energy = "NO", nodes = "NONE", links = "NONE", variables = defaultReportVariables() )
configuration |
EPANET |
pagesize |
|
file |
|
status |
|
summary |
|
messages |
|
energy |
|
nodes |
|
links |
|
variables |
list of report |
Set EPANET' time-related simulation parameters. See EPANET reference for the meaning of the parameters
setTimeParameter( configuration, duration = "", hydraulic.timestep = "", quality.timestep = "", rule.timestep = "", pattern.timestep = "", pattern.start = "", report.timestep = "", report.start = "", start.clocktime = "", statistic = "" )setTimeParameter( configuration, duration = "", hydraulic.timestep = "", quality.timestep = "", rule.timestep = "", pattern.timestep = "", pattern.start = "", report.timestep = "", report.start = "", start.clocktime = "", statistic = "" )
configuration |
EPANET |
duration |
(default: "") |
hydraulic.timestep |
(default: "") |
quality.timestep |
(default: "") |
rule.timestep |
(default: "") |
pattern.timestep |
(default: "") |
pattern.start |
(default: "") |
report.timestep |
(default: "") |
report.start |
(default: "") |
start.clocktime |
(default: "") |
statistic |
(default: "") |
return configuration with modified [TIMES] parameterisation
Set Well Field Operation
setWellFieldOperation(config, operationScheme)setWellFieldOperation(config, operationScheme)
config |
EPANET |
operationScheme |
one possible wellfield operation scheme
(e.g. wellFieldOperationSchemes(getNamesOfPumps( |
config with modified well field operation rules
Show node and link properties available in EPANET output
showProperties(outdata)showProperties(outdata)
outdata |
list structure with EPANET results as retrieved by
|
Well Field Operation Schemes
wellFieldOperationSchemes( pumpNames, niceLabels = list(searchPattern = "pmp", searchReplacement = "p") )wellFieldOperationSchemes( pumpNames, niceLabels = list(searchPattern = "pmp", searchReplacement = "p") )
pumpNames |
Vector of |
niceLabels |
Optionally nice labeling. List with elements searchPattern and searchReplacement. Default: list(searchPattern = "pmp", searchReplacement = "p") |
Write Curves
writeCurves( epanetConfig, pumpCurves = NULL, efficiencyCurves = NULL, drawdownCurves = NULL, deleteOldCurves = TRUE, dbg = TRUE )writeCurves( epanetConfig, pumpCurves = NULL, efficiencyCurves = NULL, drawdownCurves = NULL, deleteOldCurves = TRUE, dbg = TRUE )
epanetConfig |
EPANET configuration, as retrieved by |
pumpCurves |
list(data = data.frame(ID, X_Value, Y_Value), label = "") |
efficiencyCurves |
list(data = data.frame(ID, X_Value, Y_Value), label = "") |
drawdownCurves |
list(data = data.frame(ID, X_Value, Y_Value), label = "") |
deleteOldCurves |
should all curves in 'epanetConfig' be deleted before writing? |
dbg |
show debug messages? (default: TRUE) |
Write Drawdown Curves
writeDrawdownCurves( epanetConfig, DD, curveNamePrefix = "dd", deleteOldCurves = FALSE, dbg = TRUE )writeDrawdownCurves( epanetConfig, DD, curveNamePrefix = "dd", deleteOldCurves = FALSE, dbg = TRUE )
epanetConfig |
EPANET configuration, as retrieved by |
DD |
data.frame(ID, X_Value, Y_Value) |
curveNamePrefix |
prefix to be used in the curve name (default: "dd") |
deleteOldCurves |
if TRUE all curves in epantetConfig$CURVES will be deleted before adding new ones (default: FALSE) |
dbg |
show debug messages? (default: TRUE) |
Modified EPANET configuration
Write Efficiency Curves
writeEfficiencyCurves( epanetConfig, Eff, curveNamePrefix = "Eff", deleteOldCurves = FALSE, dbg = TRUE )writeEfficiencyCurves( epanetConfig, Eff, curveNamePrefix = "Eff", deleteOldCurves = FALSE, dbg = TRUE )
epanetConfig |
EPANET configuration, as retrieved by |
Eff |
data.frame(ID, X_Value, Y_Value) |
curveNamePrefix |
prefix to be used in the curve name (default: "Eff") |
deleteOldCurves |
if TRUE all curves in epantetConfig$CURVES will be deleted before adding new ones (default: FALSE) |
dbg |
show debug messages? (default: TRUE) |
Modified EPANET configuration
Write Epanet Input File
writeEpanetInputFile(inpdat, inpfile, dbg = FALSE)writeEpanetInputFile(inpdat, inpfile, dbg = FALSE)
inpdat |
input data to be saved in EPANET's input file format |
inpfile |
full path to input file to be created |
dbg |
if TRUE, debug messages are shown. Default: FALSE |
Write Input File With New Curve Section
writeInputFileWithNewCurveSection( inpfile, newCurves, inpfile.new = sub("(\\.[^\\.]+)$", "_new\\1", inpfile) )writeInputFileWithNewCurveSection( inpfile, newCurves, inpfile.new = sub("(\\.[^\\.]+)$", "_new\\1", inpfile) )
inpfile |
full path to EPANET input file |
newCurves |
modified CURVES section. Data frame as returned by
|
inpfile.new |
full path to modified EPANET input file. (default: \<inpfile-without-extension_new\>.inp) |
full path to created input file
Write Pump Curves
writePumpCurves( epanetConfig, TDH, curveNamePrefix = "TDH", deleteOldCurves = FALSE, dbg = TRUE )writePumpCurves( epanetConfig, TDH, curveNamePrefix = "TDH", deleteOldCurves = FALSE, dbg = TRUE )
epanetConfig |
EPANET configuration, as retrieved by |
TDH |
data.frame(ID, X_Value, Y_Value) |
curveNamePrefix |
(default: "TDH") |
deleteOldCurves |
if TRUE all curves in epantetConfig$CURVES will be deleted before adding new ones (default: FALSE) |
dbg |
show debug messages? (default: TRUE) |
Modified EPANET configuration