ENsetnodevalue | R Documentation |
ENsetnodevalue
sets parameter value for one node.
ENsetnodevalue(index, paramcode = NULL, value = NULL)
index |
An integer vector, the node index. |
paramcode |
An integer vector, the parameter code (see Details below). |
value |
A numeric vector, the new value of the parameter. |
Nodes are indexed starting from 1 in the order in which they were entered into the
[NODES]
section of the EPANET input file.
Node parameter codes consist of the following constants:
EN_ELEVATION | 0 | Elevation |
EN_BASEDEMAND | 1 | Base demand |
EN_PATTERN | 2 | Demand pattern index |
EN_EMITTER | 3 | Emitter coeff. |
EN_INITQUAL | 4 | Initial quality |
EN_SOURCEQUAL | 5 | Source quality |
EN_SOURCEPAT | 6 | Source pattern index |
EN_SOURCETYPE | 7 | Source type (see note below) |
EN_TANKLEVEL | 8 | Initial water level in tank |
Source types are identified with the following constants:
EN_CONCEN | 0 |
EN_MASS | 1 |
EN_SETPOINT | 2 |
EN_FLOWPACED | 3 |
See [SOURCES]
for a description of these source types.
Values are supplied in units which depend on the units used for flow rate in the EPANET input file (see Units of Measurement).
returns NULL invisibly on success or raises an error or warning.
# path to Net1.inp example file included with this package
inp <- file.path( find.package("epanet2toolkit"), "extdata","Net1.inp")
ENopen( inp, "Net1.rpt")
ENgetnodevalue(3, "EN_ELEVATION")
ENsetnodevalue(3, "EN_ELEVATION", 777)
ENgetnodevalue(3, "EN_ELEVATION")
ENclose()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.