Learn R Programming

epanet2toolkit (version 1.0.8)

ENinitH: Initialize hydraulic engine

Description

ENinitH Initializes storage tank levels, link status and settings, and the simulation clock time prior to running a hydraulic analysis.

Usage

ENinitH(flag)

Value

Returns NULL invisibly; called for side effect

Arguments

flag

A two-digit flag indicating if hydraulic results will be saved to the hydraulics file (rightmost digit) and if link flows should be re-initialized.

Details

Call ENinitH prior to running a hydraulic analysis using ENrunH and ENnextH.ENopenH must have been called prior to calling ENinitH. Do not call ENinitH if a complete hydraulic analysis is being made with a call to ENsolveH. Values of flag have the following meanings:

00do not re-initialize flows, do not save results to file
01do not re-initialize flows, save results to file
10re-initialize flows, do not save results to file
11re-initialize flows, save results to file

Set flag to 1 (or 11) if you will be making a subsequent water quality run, using ENreport to generate a report, or using ENsavehydfile to save the binary hydraulics file.

See Also

ENopenH, ENrunH, ENnextH, ENcloseH

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")
ENopenH()
ENinitH(0)
ENrunH()
ENcloseH()
ENclose()
# clean-up the created files
file.remove("Net1.rpt") 

Run the code above in your browser using DataLab