Skip to content

Enumerated Types

EnumerationsDescription
ActionCodeTypeDeletion action codes.
AnalysisStatisticAnalysis convergence statistics.
ControlTypeSimple control types.
CountTypeTypes of objects to count.
CurveTypeTypes of data curves.
DemandModelDemand models.
FlowUnitsFlow units.
HeadLossTypeHead loss formulas.
InitHydOptionHydraulic initialization options.
LinkPropertyLink properties.
LinkStatusTypeLink status.
LinkTypeLink types.
MixingModelTank mixing models.
NodePropertyNode properties.
NodeTypeNode Types.
ObjectTypeTypes of network objects.
OptionSimulation options.
PumpStateTypePump states.
PumpTypeTypes of pump curves.
QualityTypeTypes of water quality analyses.
RuleObjectNetwork objects used in rule-based controls.
RuleOperatorComparison operators used in rule-based controls.
RuleStatusLink status codes used in rule-based controls.
RuleVariableObject variables used in rule-based controls.
SizeLimitsSize Limts.
SourceTypeWater quality source types.
StatisticTypeReporting statistic choices.
StatusReportStatus reporting levels.
TimeParameterTime parameters.

Deletion action codes.

These codes are used in deleteNode and deleteLink to indicate what action should be taken if the node or link being deleted appears in any simple or rule-based controls or if a deleted node has any links connected to it.

Enumeration Members

MemberValueDescription
Unconditional0Delete all controls and connecing links.
Conditional1Cancel object deletion if it appears in controls or has connecting links.

Analysis convergence statistics.

These statistics report the convergence criteria for the most current hydraulic analysis and the cumulative water quality mass balance error at the current simulation time. They can be retrieved with getStatistic.

Enumeration Members

MemberValueDescription
DeficientNodes5Number of pressure deficient nodes.
DemandReduction6% demand reduction at pressure deficient nodes
Iterations0Number of hydraulic iterations taken.
MassBalance4Cumulative water quality mass balance ratio.
MaxFlowChange3Largest flow change in links.
MaxHeadError2Largest head loss error for links.
RelativeError1Sum of link flow changes / sum of link flows.

Simple control types.

These are the different types of simple (single statement) controls that can be applied to network links. They are used as an argument to addControl, getControl, and setControl.

Enumeration Members

MemberValueDescription
HiLevel1Act when pressure or tank level rises above a setpoint.
LowLevel0Act when pressure or tank level drops below a setpoint.
TimeOfDay3Act at a particular time of day.
Timer2Act at a prescribed elapsed amount of time.

Types of objects to count.

These options tell getCount which type of object to count.

Enumeration Members

MemberValueDescription
ControlCount5Number of simple controls.
CurveCount4Number of data curves.
LinkCount2Number of links (pipes + pumps + valves)
NodeCount0Number of nodes (junctions + tanks + reservoirs)
PatCount3Number of time patterns.
RuleCount6Number of rule-based controls.
TankCount1Number of tanks and reservoirs.

Types of data curves.

These are the different types of physical relationships that a data curve can represent as returned by calling getCurveType.

Enumeration Members

MemberValueDescription
EfficCurve2Pump efficiency v. flow curve.
GenericCurve4Generic curve.
HlossCurve3Valve head loss v. flow curve.
PumpCurve1Pump head v. flow curve.
VolumeCurve0Tank volume v. depth curve.

Demand models.

These choices for modeling consumer demands are used with getDemandModel and setDemandModel.

A demand driven analysis requires that a junction’s full demand be supplied in each time period independent of how much pressure is available. A pressure driven analysis makes demand be a power function of pressure, up to the point where the full demand is met.

Enumeration Members

MemberValueDescription
DDA0Demand driven analysis.
PDA1Pressure driven analysis.

Flow units.

These choices for flow units are used with getFlowUnits and setFlowUnits. They are also used for the flow units type argument in init. If flow units are expressed in US Customary units ( CFS, GPM, MGD, IMGD, AFD ) then all other quantities are in US Customary units. Otherwise they are in metric units.

Enumeration Members

MemberValueDescription
AFD4Acre-feet per day.
CFS0Cubic feet per second.
CMD9Cubic meters per day.
CMH8Cubic meters per hour.
GPM1Gallons per minute.
IMGD3Imperial million gallons per day.
LPM6Liters per minute.
LPS5Liters per second.
MGD2Million gallons per day.
MLD7Million liters per day.

Head loss formulas.

The available choices for Option.HeadlossForm in getOption and setOption. They are also used for the head loss type argument in init. Each head loss formula uses a different type of roughness coefficient ( LinkProperty.Roughness ) that can be set with setLinkValue.

Enumeration Members

MemberValueDescription
CM2Chezy-Manning.
DW1Darcy-Weisbach.
HW0Hazen-Williams.

Hydraulic initialization options.

These options are used to initialize a new hydraulic analysis when initH is called.

Enumeration Members

MemberValueDescription
InitFlow10Don’t save hydraulics; re-initialize flows.
NoSave0Don’t save hydraulics; don’t re-initialize flows.
Save1Save hydraulics to file, don’t re-initialize flows.
SaveAndInit11Save hydraulics; re-initialize flows.

Link properties.

These link properties are used with getLinkValue and setLinkValue. Those marked as read only are computed values that can only be retrieved.

Enumeration Members

MemberValueDescription
Diameter0Pipe/valve diameter.
Energy13Current computed pump energy usage (read only)
Flow8Current computed flow rate (read only)
Headloss10Current computed head loss (read only)
InitSetting5Initial pump speed or valve setting.
InitStatus4Initial status (see LinkStatusType)
KBulk6Bulk chemical reaction coefficient.
KWall7Pipe wall chemical reaction coefficient.
Length1Pipe length.
LinkPattern15Pump speed time pattern index.
LinkQual14Current computed link quality (read only)
MinorLoss3Pipe/valve minor loss coefficient.
PumpECost21Pump average energy price.
PumpECurve20Pump efficiency v. flow curve index.
PumpEffic17Current computed pump efficiency (read only)
PumpEPat22Pump energy price time pattern index.
PumpHCurve19Pump head v. flow curve index.
PumpPower18Pump constant power rating.
PumpState16Current computed pump state (read only) (see PumpStateType)
Roughness2Pipe roughness coefficient.
Setting12Current link setting.
Status11Current link status (see LinkStatusType)
Velocity9Current computed flow velocity (read only)

Link status.

One of these values is returned when getLinkValue is used to retrieve a link’s initial status (LinkProperty.InitStatus ) or its current status ( LinkProperty.Status ). These options are also used with setLinkValue to set values for these same properties.

Enumeration Members

MemberValueDescription
Closed0
Open1

Link types.

These are the different types of links that can be returned by calling getLinkType.

Enumeration Members

MemberValueDescription
CVPipe0Pipe with check valve.
FCV6Flow control valve.
GPV8General purpose valve.
PBV5Pressure breaker valve.
Pipe1Pipe.
PRV3Pressure reducing valve.
PSV4Pressure sustaining valve.
Pump2Pump.
TCV7Throttle control valve.

Tank mixing models.

These are the different types of models that describe water quality mixing in storage tanks. The choice of model is accessed with NodeProperty.MixModel property of a Tank node using getNodeValue and setNodeValue.

Enumeration Members

MemberValueDescription
FIFO2First in, first out model.
LIFO3Last in, first out model.
Mix10Complete mix model.
Mix212-compartment model

Node properties.

These node properties are used with getNodeValue and setNodeValue. Those marked as read only are computed values that can only be retrieved.

Enumeration Members

MemberValueDescription
BaseDemand1Primary demand baseline value.
CanOverFlow26Tank can overflow (= 1) or not (= 0)
Demand9Current computed demand (read only)
DemandDeficit27Amount that full demand is reduced under PDA (read only)
Elevation0Elevation.
Emitter3Emitter flow coefficient.
Head10Current computed hydraulic head (read only)
Initqual4Initial quality.
InitVolume14Tank initial volume (read only)
MaxLevel21Tank maximum level.
MaxVolume25Tank maximum volume (read only)
MinLevel20Tank minimum level.
MinVolume18Tank minimum volume.
MixFraction22Tank mixing fraction.
MixModel15Tank mixing model (see MixingModel)
MixZoneVol16Tank mixing zone volume (read only)
Pattern2Primary demand time pattern index.
Pressure11Current computed pressure (read only)
Quality12Current computed quality (read only)
SourceMass13Current computed quality source mass inflow (read only)
SourcePat6Quality source pattern index.
SourceQual5Quality source strength.
SourceType7Quality source type (see SourceType)
TankDiam17Tank diameter.
TankKBulk23Tank bulk decay coefficient.
TankLevel8Current computed tank water level (read only)
TankVolume24Current computed tank volume (read only)
VolCurve19Tank volume curve index.

Node Types.

These are the different types of nodes that can be returned by calling getNodeType.

Enumeration Members

MemberValueDescription
Junction0Junction node.
Reservoir1Reservoir node.
Tank2Storage tank node.

Types of network objects.

The types of objects that comprise a network model.

Enumeration Members

MemberValueDescription
Control4Simple controls.
Curve3Data curves.
Link1Links.
Node0Nodes.
Rule5Control rules.
TimePat2Time patterns.

Simulation options.

These constants identify the hydraulic and water quality simulation options that are applied on a network-wide basis. They are accessed using the getOption and setOption functions.

Enumeration Members

MemberValueDescription
Accuracy1Total normalized flow change for hydraulic convergence.
BulkOrder19Bulk water reaction order for pipes.
CheckFreq15Frequency of hydraulic status checks.
ConcenLimit22Limiting concentration for growth reactions.
DampLimit17Accuracy level where solution damping begins.
DemandCharge11Energy charge per max. KW usage.
DemandMult4Global demand multiplier.
Emitexpon3Exponent in emitter discharge formula.
FlowChange6Maximum flow change for hydraulic convergence.
GlobalEffic8Global pump efficiency (percent)
GlobalPattern10Index of a global energy price pattern.
GlobalPrice9Global energy price per KWH.
HeadError5Maximum head loss error for hydraulic convergence.
HeadlossForm7Head loss formula (see HeadLossType)
MaxCheck16Maximum trials for status checking.
SpDiffus18Specific diffusivity (relative to chlorine at 20 deg C)
SpGravity12Specific gravity.
SpViscos13Specific viscosity (relative to water at 20 deg C)
TankOrder21Bulk water reaction order for tanks.
Tolerance2Water quality tolerance.
Trials0Maximum trials allowed for hydraulic convergence.
Unbalanced14Extra trials allowed if hydraulics don’t converge.
WallOrder20Wall reaction order for pipes (either 0 or 1)

Pump states.

One of these codes is returned when getLinkValue is used to retrieve a pump’s current operating state ( LinkProperty.PumpState ). PumpXHead indicates that the pump has been shut down because it is being asked to deliver more than its shutoff head. PumpXFlow indicates that the pump is being asked to deliver more than its maximum flow.

Enumeration Members

MemberValueDescription
PumpClosed2Pump closed.
PumpOpen3Pump open.
PumpXFlow5Pump open - cannot supply flow.
PumpXHead0Pump closed - cannot supply head.

Types of pump curves.

getPumpType returns one of these values when it is called.

Enumeration Members

MemberValueDescription
ConstHP0Constant horsepower.
Custom2User-defined custom curve.
NoCurve3No curve.
PowerFunc1Power function.

Types of water quality analyses.

These are the different types of water quality analyses that EPANET can run. They are used with getQualityInfo, getQualityType, and setQualityType.

Enumeration Members

MemberValueDescription
Age2Water age analysis.
Chem1Chemical fate and transport.
None0No quality analysis.
Trace3Source tracing analysis.

Network objects used in rule-based controls.

Enumeration Members

MemberValueDescription
Link7Clause refers to a link.
Node6Clause refers to a node.
System8Clause refers to a system parameter (e.g., time)

Comparison operators used in rule-based controls.

Enumeration Members

MemberValueDescription
Above9Is above.
Below8Is below.
EqualTo0Equal to.
GreaterOrEqualTo3Greater than or equal to.
GreaterThan5Greater than.
Is6Is equal to.
LessOrEqualTo2Less than or equal to.
LessThan4Less than.
Not7Is not equal to.
NotEqualTo1Not equal.

Link status codes used in rule-based controls.

Enumeration Members

MemberValueDescription
IsActive3Control valve is active.
IsClosed2Link is closed.
IsOpen1Link is open.

Object variables used in rule-based controls.

Enumeration Members

MemberValueDescription
ClockTime10Time of day.
Demand0Nodal demand.
DrainTime12Time to drain a tank.
FillTime11Time to fill a tank.
Flow5Link flow rate.
Grade2Nodal hydraulic grade.
Head1Nodal hydraulic head.
Level3Tank water level.
Power8Pump power output.
Pressure4Nodal pressure.
Setting7Link setting.
Status6Link status.
Time9Elapsed simulation time.

Size Limts.

Limits on the size of character arrays used to store ID names and text messages.

Enumeration Members

MemberValueDescription
MaxId31Max. # characters in ID name.
MaxMsg255Max. # characters in message text.

Water quality source types.

These are the different types of external water quality sources that can be assigned to a node’s property ( see NodeProperty.SourceType ) and as used by getNodeValue and setNodeValue.

Enumeration Members

MemberValueDescription
Concen0Sets the concentration of external inflow entering a node.
FlowPaced3Adds a given value to the concentration leaving a node.
Mass1Injects a given mass/minute into a node.
SetPoint2Sets the concentration leaving a node to a given value.

Reporting statistic choices.

These options determine what kind of statistical post-processing should be done on the time series of simulation results generated before they are reported using report. An option can be chosen by using Statistic option as the argument to setReport.

Enumeration Members

MemberValueDescription
Average1Report average value over simulation period.
Maximum3Report maximum value over simulation period.
Minimum2Report minimum value over simulation period.
Range4Report maximum - minimum over simulation period.
Series0Report all time series points.

Status reporting levels.

These choices specify the level of status reporting written to a project’s report file during a hydraulic analysis. The level is set using the setStatusReport function.

Enumeration Members

MemberValueDescription
FullReport2Full level of status reporting.
NoReport0No status reporting.
NormalReport1Normal level of status reporting.

Time parameters.

These time-related options are used with getTimeParameter and setTimeParameter. All times are expressed in seconds The parameters marked as read only are computed values that can only be retrieved.

Enumeration Members

MemberValueDescription
Duration0Total simulation duration.
HaltFlag13Flag indicating if the simulation was halted (read only)
HTime11Elapsed time of current hydraulic solution (read only)
HydStep1Hydraulic time step.
NextEvent14Shortest time until a tank becomes empty or full (read only)
NextEventTank15Index of tank with shortest time to become empty or full (read only)
PatternStart4Time when time patterns begin.
PatternStep3Time pattern period.
Periods9Number of reporting time periods (read only)
QTime12Elapsed time of current quality solution (read only)
QualStep2Water quality time step.
ReportStart6Time when reporting starts.
ReportStep5Reporting time step.
RuleStep7Rule-based control evaluation time step.
StartTime10Simulation starting time of day.
Statistic8Reporting statistic code (see StatisticType)