Set a parameter value for a link
ENsetlinkvalue(index, paramcode, value)
of the link
number or name of parameter code, see details
new value of the parameter.
Links are indexed starting from 1.
Link parameter codes consist of the following constants:
||3||Minor loss coeff.|
||4||Initial link status (0 = closed, 1 = open)|
|Initial pump speed|
|Initial valve setting|
||6||Bulk reaction coeff.|
||7||Wall reaction coeff.|
||11||Current pump or valve status (0 = closed, 1 = open)|
||12||Current pump speed of valve setting.|
Values are supplied in units which depend on the units used for flow rate in the EPANET input file
(see Units of Measurement). Use
EN_INITSETTING to set the design value
for a link's status or setting that exists prior to the start of a simulation. Use
EN_SETTING to change these values while a simulation is being run (within the
If a control valve has its status explicitly set to
CLOSED, then to make it active again
during a simulation you must provide a new valve setting value using the
For pipes, either
EN_INITSETTING can be used to change roughness.
Returns NULL invisibly on success or raises a warning or error.
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.