ENgetlinktype: Retrieve the type code for a link

View source: R/links.r

ENgetlinktypeR Documentation

Retrieve the type code for a link

Description

Retrieve the type code for a link

Usage

ENgetlinktype(linkindex)

Arguments

linkindex

for which type code is requested

Value

integer type-code of the link

Note

Link indexes are consecutive integers starting from 1. Link type codes consist of the following constants:

EN_CVPIPE 0 Pipe with Check Valve
EN_PIPE 1 Pipe
EN_PUMP 2 Pump
EN_PRV 3 Pressure Reducing Valve
EN_PSV 4 Pressure Sustaining Valve
EN_PBV 5 Pressure Breaker Valve
EN_FCV 6 Flow Control Valve
EN_TCV 7 Throttle Control Valve
EN_GPV 8 General Purpose Valve

See Also

ENgetlinkindex

Examples

# path to Net1.inp example file included with this package
inp <- file.path( find.package("epanet2toolkit"), "extdata","Net1.inp")  
ENopen( inp, "Net1.rpt")
ENgetlinktype(1)
ENgetlinktype(12)
ENclose()

epanet2toolkit documentation built on Nov. 6, 2023, 9:06 a.m.