Learn R Programming

epanet2toolkit (version 1.0.8)

ENgettimeparam: Get the value of one or more specific analysis time parameters.

Description

ENgettimeparam retrieves the value of one or more specific analysis time parameters.

Usage

ENgettimeparam(paramcode)

Value

A named integer with the value of the specified time parameter.

Arguments

paramcode

A character string or integer specifying the parameter code (see below).

Details

Time parameter codes consist of the following constants:

EN_DURATION0Simulation duration
EN_HYDSTEP1Hydraulic time step
EN_QUALSTEP2Water quality time step
EN_PATTERNSTEP3Time pattern time step
EN_PATTERNSTART4Time pattern start time
EN_REPORTSTEP5Reporting time step
EN_REPORTSTART6Report starting time
EN_RULESTEP7Time step for evaluating rule-based controls
EN_STATISTIC8Type of time series post-processing used:
0 = none
1 = averaged
2 = minimums
3 = maximums
4 = ranges
EN_PERIODS9Number of reporting periods saved to 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") 
ENopen(inp, "Net1.rpt")
ENgettimeparam("EN_DURATION")
ENgettimeparam("EN_HYDSTEP")
ENclose()

Run the code above in your browser using DataLab