ENgetnodetype: Retrieve the node-type code

View source: R/nodes.r

ENgetnodetypeR Documentation

Retrieve the node-type code

Description

ENgetnodetype retrieves the node-type code

Usage

ENgetnodetype(nodeindex)

Arguments

nodeindex

An integer specifying the node index.

Value

integer type-code of the node.

Note

Node indexes are consecutive integers starting from 1.

Node type codes consist of the following constants:

EN_JUNCTION 0 Junction node
EN_RESERVOIR 1 Reservoir node
EN_TANK 2 Tank node

Examples

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

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