Merge remote-tracking branch 'upstream/dev' into dev-swig-redux
This commit is contained in:
@@ -5,7 +5,7 @@ Attribute VB_Name = "Module1"
|
||||
'Declarations of functions in the EPANET PROGRAMMERs TOOLKIT
|
||||
'(EPANET2.DLL)
|
||||
|
||||
'Last updated on 4/3/07
|
||||
'Last updated on 01/08/2019
|
||||
|
||||
' These are codes used by the DLL functions
|
||||
Public Const EN_ELEVATION = 0 ' Node parameters
|
||||
@@ -50,15 +50,16 @@ Public Const EN_HEADLOSS = 10
|
||||
Public Const EN_STATUS = 11
|
||||
Public Const EN_SETTING = 12
|
||||
Public Const EN_ENERGY = 13
|
||||
Public Const EN_LINKQUAL = 14 'ES
|
||||
Public Const EN_LINKQUAL = 14
|
||||
Public Const EN_LINKPATTERN = 15
|
||||
Public Const EN_EFFICIENCY = 16
|
||||
Public Const EN_HEADCURVE = 17
|
||||
Public Const EN_EFFICIENCYCURVE = 18
|
||||
Public Const EN_PRICEPATTERN = 19
|
||||
Public Const EN_STATE = 20
|
||||
Public Const EN_CONST_POWER = 21
|
||||
Public Const EN_SPEED = 22
|
||||
|
||||
Public Const EN_PUMP_STATE = 16
|
||||
Public Const EN_PUMP_EFFIC = 17
|
||||
Public Const EN_PUMP_POWER = 18
|
||||
Public Const EN_PUMP_HCURVE = 19
|
||||
Public Const EN_PUMP_ECURVE = 20
|
||||
Public Const EN_PUMP_ECOST = 21
|
||||
Public Const EN_PUMP_EPAT = 22
|
||||
|
||||
Public Const EN_DURATION = 0 ' Time parameters
|
||||
Public Const EN_HYDSTEP = 1
|
||||
@@ -76,13 +77,13 @@ Public Const EN_QTIME = 12
|
||||
Public Const EN_HALTFLAG = 13
|
||||
Public Const EN_NEXTEVENT = 14
|
||||
|
||||
Public Const EN_ITERATIONS = 0
|
||||
Public Const EN_ITERATIONS = 0 ' Run statistics
|
||||
Public Const EN_RELATIVEERROR = 1
|
||||
Public Const EN_MAXHEADERROR = 2
|
||||
Public Const EN_MAXFLOWCHANGE = 3
|
||||
Public Const EN_MASSBALANCE = 4
|
||||
|
||||
Public Const EN_NODECOUNT = 0 'Component counts
|
||||
Public Const EN_NODECOUNT = 0 ' Component counts
|
||||
Public Const EN_TANKCOUNT = 1
|
||||
Public Const EN_LINKCOUNT = 2
|
||||
Public Const EN_PATCOUNT = 3
|
||||
@@ -114,7 +115,7 @@ Public Const EN_MASS = 1
|
||||
Public Const EN_SETPOINT = 2
|
||||
Public Const EN_FLOWPACED = 3
|
||||
|
||||
Public Const EN_HW = 0 ' Head loss formula
|
||||
Public Const EN_HW = 0 ' Head loss formulas
|
||||
Public Const EN_DW = 1
|
||||
Public Const EN_CM = 2
|
||||
|
||||
@@ -132,7 +133,7 @@ Public Const EN_CMD = 9
|
||||
Public Const EN_DDA = 0 ' Demand driven analysis
|
||||
Public Const EN_PDA = 1 ' Pressure driven analysis
|
||||
|
||||
Public Const EN_TRIALS = 0 ' Misc. options
|
||||
Public Const EN_TRIALS = 0 ' Hydraulic options
|
||||
Public Const EN_ACCURACY = 1
|
||||
Public Const EN_TOLERANCE = 2
|
||||
Public Const EN_EMITEXPON = 3
|
||||
@@ -141,172 +142,216 @@ Public Const EN_HEADERROR = 5
|
||||
Public Const EN_FLOWCHANGE = 6
|
||||
Public Const EN_DEMANDDEFPAT = 7
|
||||
Public Const EN_HEADLOSSFORM = 8
|
||||
Public Const EN_GLOBALEFFIC = 9
|
||||
Public Const EN_GLOBALPRICE = 10
|
||||
Public Const EN_GLOBALPATTERN = 11
|
||||
Public Const EN_DEMANDCHARGE = 12
|
||||
|
||||
Public Const EN_LOWLEVEL = 0 ' Control types
|
||||
Public Const EN_LOWLEVEL = 0 ' Control types
|
||||
Public Const EN_HILEVEL = 1
|
||||
Public Const EN_TIMER = 2
|
||||
Public Const EN_TIMEOFDAY = 3
|
||||
|
||||
Public Const EN_AVERAGE = 1 'Time statistic types
|
||||
Public Const EN_AVERAGE = 1 ' Time statistic types
|
||||
Public Const EN_MINIMUM = 2
|
||||
Public Const EN_MAXIMUM = 3
|
||||
Public Const EN_RANGE = 4
|
||||
|
||||
Public Const EN_MIX1 = 0 'Tank mixing models
|
||||
Public Const EN_MIX1 = 0 ' Tank mixing models
|
||||
Public Const EN_MIX2 = 1
|
||||
Public Const EN_FIFO = 2
|
||||
Public Const EN_LIFO = 3
|
||||
|
||||
Public Const EN_NOSAVE = 0 ' Save-results-to-file flag
|
||||
Public Const EN_NOSAVE = 0 ' Save-results-to-file flag
|
||||
Public Const EN_SAVE = 1
|
||||
Public Const EN_INITFLOW = 10 ' Re-initialize flow flag
|
||||
Public Const EN_SAVE_AND_INIT = 11
|
||||
|
||||
Public Const EN_INITFLOW = 10 ' Re-initialize flow flag
|
||||
Public Const EN_CONST_HP = 0 ' Constant horsepower pump curve
|
||||
Public Const EN_POWER_FUNC = 1 ' Power function pump cuve
|
||||
Public Const EN_CUSTOM = 2 ' User-defined custom pump curve
|
||||
Public Const EN_NOCURVE = 3 ' No pump curve
|
||||
|
||||
Public Const EN_CONST_HP = 0 ' constant horsepower
|
||||
Public Const EN_POWER_FUNC = 1 ' power function
|
||||
Public Const EN_CUSTOM = 2 ' user-defined custom curve
|
||||
Public Const EN_NOCURVE = 3 ' no curve
|
||||
|
||||
Public Const EN_V_CURVE = 0 ' volume curve
|
||||
Public Const EN_P_CURVE = 1 ' pump curve
|
||||
Public Const EN_E_CURVE = 2 ' efficiency curve
|
||||
Public Const EN_H_CURVE = 3 ' head loss curve
|
||||
Public Const EN_G_CURVE = 4 ' General\default curve
|
||||
Public Const EN_VOLUME_CURVE = 0 ' Volume curve
|
||||
Public Const EN_PUMP_CURVE = 1 ' Pump curve
|
||||
Public Const EN_EFFIC_CURVE = 2 ' Efficiency curve
|
||||
Public Const EN_HLOSS_CURVE = 3 ' Head loss curve
|
||||
Public Const EN_GENERIC_CURVE = 4 ' Generic curve
|
||||
|
||||
Public Const EN_UNCONDITIONAL = 0 ' Unconditional object deletion
|
||||
Public Const EN_CONDITIONAL = 1 ' Conditional object deletion
|
||||
|
||||
Public Const EN_NO_REPORT = 0 ' No status report
|
||||
Public Const EN_NORMAL_REPORT = 1 ' Normal status report
|
||||
Public Const EN_FULL_REPORT = 2 ' Full status report
|
||||
|
||||
Public Const EN_R_NODE = 6 ' Rule objects
|
||||
Public Const EN_R_LINK = 7
|
||||
Public Const EN_R_SYSTEM = 8
|
||||
|
||||
Public Const EN_R_DEMAND = 0 ' Rule variables
|
||||
Public Const EN_R_HEAD = 1
|
||||
Public Const EN_R_GRADE = 2
|
||||
Public Const EN_R_LEVEL = 3
|
||||
Public Const EN_R_PRESSURE = 4
|
||||
Public Const EN_R_FLOW = 5
|
||||
Public Const EN_R_STATUS = 6
|
||||
Public Const EN_R_SETTING = 7
|
||||
Public Const EN_R_POWER = 8
|
||||
Public Const EN_R_TIME = 9
|
||||
Public Const EN_R_CLOCKTIME = 10
|
||||
Public Const EN_R_FILLTIME = 11
|
||||
Public Const EN_R_DRAINTIME = 12
|
||||
|
||||
Public Const EN_R_EQ = 0 ' Rule operators
|
||||
Public Const EN_R_NE = 1
|
||||
Public Const EN_R_LE = 2
|
||||
Public Const EN_R_GE = 3
|
||||
Public Const EN_R_LT = 4
|
||||
Public Const EN_R_GT = 5
|
||||
Public Const EN_R_IS = 6
|
||||
Public Const EN_R_NOT = 7
|
||||
Public Const EN_R_BELOW = 8
|
||||
Public Const EN_R_ABOVE = 9
|
||||
|
||||
Public Const EN_R_IS_OPEN = 1 ' Rule status types
|
||||
Public Const EN_R_IS_CLOSED = 2
|
||||
Public Const EN_R_IS_ACTIVE = 3
|
||||
|
||||
'These are the external functions that comprise the DLL
|
||||
|
||||
'System Functions
|
||||
Declare Function ENgetversion Lib "epanet2.dll" (value As Long) As Long
|
||||
Declare Function ENepanet Lib "epanet2.dll" (ByVal F1 As String, ByVal F2 As String, ByVal F3 As String, ByVal F4 As Any) As Long
|
||||
Declare Function ENinit Lib "epanet2.dll" (ByVal rptFile As String, ByVal binOutFile As String, ByVal UnitsType As Long, ByVal HeadlossFormula As Long) As Long
|
||||
Declare Function ENopen Lib "epanet2.dll" (ByVal F1 As String, ByVal F2 As String, ByVal F3 As String) As Long
|
||||
Declare Function ENsaveinpfile Lib "epanet2.dll" (ByVal F As String) As Long
|
||||
Declare Function ENepanet Lib "epanet2.dll" (ByVal inpFile As String, ByVal rptFile As String, ByVal outFile As String, ByVal pviewprog As Any) As Long
|
||||
Declare Function ENinit Lib "epanet2.dll" (ByVal rptFile As String, ByVal outFile As String, ByVal unitsType As Long, ByVal headlossType As Long) As Long
|
||||
Declare Function ENopen Lib "epanet2.dll" (ByVal inpFile As String, ByVal rptFile As String, ByVal outFile As String) As Long
|
||||
Declare Function ENsaveinpfile Lib "epanet2.dll" (ByVal filename As String) As Long
|
||||
Declare Function ENclose Lib "epanet2.dll" () As Long
|
||||
|
||||
'Hydraulic Analysis Functions
|
||||
Declare Function ENsolveH Lib "epanet2.dll" () As Long
|
||||
Declare Function ENsaveH Lib "epanet2.dll" () As Long
|
||||
Declare Function ENopenH Lib "epanet2.dll" () As Long
|
||||
Declare Function ENinitH Lib "epanet2.dll" (ByVal SaveFlag As Long) As Long
|
||||
Declare Function ENrunH Lib "epanet2.dll" (T As Long) As Long
|
||||
Declare Function ENnextH Lib "epanet2.dll" (Tstep As Long) As Long
|
||||
Declare Function ENinitH Lib "epanet2.dll" (ByVal initFlag As Long) As Long
|
||||
Declare Function ENrunH Lib "epanet2.dll" (currentTime As Long) As Long
|
||||
Declare Function ENnextH Lib "epanet2.dll" (tStep As Long) As Long
|
||||
Declare Function ENcloseH Lib "epanet2.dll" () As Long
|
||||
Declare Function ENsavehydfile Lib "epanet2.dll" (ByVal F As String) As Long
|
||||
Declare Function ENusehydfile Lib "epanet2.dll" (ByVal F As String) As Long
|
||||
Declare Function ENsavehydfile Lib "epanet2.dll" (ByVal filename As String) As Long
|
||||
Declare Function ENusehydfile Lib "epanet2.dll" (ByVal filename As String) As Long
|
||||
|
||||
'Water Quality Analysis Functions
|
||||
Declare Function ENsolveQ Lib "epanet2.dll" () As Long
|
||||
Declare Function ENopenQ Lib "epanet2.dll" () As Long
|
||||
Declare Function ENinitQ Lib "epanet2.dll" (ByVal SaveFlag As Long) As Long
|
||||
Declare Function ENrunQ Lib "epanet2.dll" (T As Long) As Long
|
||||
Declare Function ENnextQ Lib "epanet2.dll" (Tstep As Long) As Long
|
||||
Declare Function ENstepQ Lib "epanet2.dll" (Tleft As Long) As Long
|
||||
Declare Function ENinitQ Lib "epanet2.dll" (ByVal saveFlag As Long) As Long
|
||||
Declare Function ENrunQ Lib "epanet2.dll" (currentTime As Long) As Long
|
||||
Declare Function ENnextQ Lib "epanet2.dll" (tStep As Long) As Long
|
||||
Declare Function ENstepQ Lib "epanet2.dll" (timeLeft As Long) As Long
|
||||
Declare Function ENcloseQ Lib "epanet2.dll" () As Long
|
||||
|
||||
'Reporting Functions
|
||||
Declare Function ENwriteline Lib "epanet2.dll" (ByVal S As String) As Long
|
||||
Declare Function ENwriteline Lib "epanet2.dll" (ByVal line As String) As Long
|
||||
Declare Function ENreport Lib "epanet2.dll" () As Long
|
||||
Declare Function ENresetreport Lib "epanet2.dll" () As Long
|
||||
Declare Function ENsetreport Lib "epanet2.dll" (ByVal S As String) As Long
|
||||
Declare Function ENsetstatusreport Lib "epanet2.dll" (ByVal code As Long) As Long
|
||||
Declare Function ENgetcount Lib "epanet2.dll" (ByVal code As Long, value As Long) As Long
|
||||
Declare Function ENgeterror Lib "epanet2.dll" (ByVal ErrCode As Long, ByVal ErrMsg As String, ByVal N As Long) As Long
|
||||
Declare Function ENgetstatistic Lib "epanet2.dll" (ByVal code As Long, ByRef value As Single) As Long
|
||||
Declare Function ENsetreport Lib "epanet2.dll" (ByVal format As String) As Long
|
||||
Declare Function ENsetstatusreport Lib "epanet2.dll" (ByVal level As Long) As Long
|
||||
Declare Function ENgetcount Lib "epanet2.dll" (ByVal object As Long, count As Long) As Long
|
||||
Declare Function ENgeterror Lib "epanet2.dll" (ByVal errcode As Long, ByVal errmsg As String, ByVal maxLen As Long) As Long
|
||||
Declare Function ENgetstatistic Lib "epanet2.dll" (ByVal type_ As Long, ByRef value As Single) As Long
|
||||
|
||||
'Analysis Options Functions
|
||||
Declare Function ENgetoption Lib "epanet2.dll" (ByVal code As Long, value As Single) As Long
|
||||
Declare Function ENsetoption Lib "epanet2.dll" (ByVal code As Long, ByVal value As Single) As Long
|
||||
Declare Function ENgetflowunits Lib "epanet2.dll" (code As Long) As Long
|
||||
Declare Function ENsetflowunits Lib "epanet2.dll" (ByVal code As Long) As Long
|
||||
Declare Function ENgettimeparam Lib "epanet2.dll" (ByVal code As Long, value As Long) As Long
|
||||
Declare Function ENsettimeparam Lib "epanet2.dll" (ByVal code As Long, ByVal value As Long) As Long
|
||||
Declare Function ENgetqualtype Lib "epanet2.dll" (QualCode As Long, TraceNode As Long) As Long
|
||||
Declare Function ENgetqualinfo Lib "epanet2.dll" (QualCode As Long, ByVal ChemName As String, ByVal ChemUnits As String, TraceNode As Long) As Long
|
||||
Declare Function ENsetqualtype Lib "epanet2.dll" (ByVal QualCode As Long, ByVal ChemName As String, ByVal ChemUnits As String, ByVal TraceNode As String) As Long
|
||||
Declare Function ENgetoption Lib "epanet2.dll" (ByVal option_ As Long, value As Single) As Long
|
||||
Declare Function ENsetoption Lib "epanet2.dll" (ByVal option_ As Long, ByVal value As Single) As Long
|
||||
Declare Function ENgetflowunits Lib "epanet2.dll" (units As Long) As Long
|
||||
Declare Function ENsetflowunits Lib "epanet2.dll" (ByVal units As Long) As Long
|
||||
Declare Function ENgettimeparam Lib "epanet2.dll" (ByVal param As Long, value As Long) As Long
|
||||
Declare Function ENsettimeparam Lib "epanet2.dll" (ByVal param As Long, ByVal value As Long) As Long
|
||||
Declare Function ENgetqualinfo Lib "epanet2.dll" (qualType As Long, ByVal chemName As String, ByVal chemUnits As String, traceNode As Long) As Long
|
||||
Declare Function ENgetqualtype Lib "epanet2.dll" (qualType As Long, traceNode As Long) As Long
|
||||
Declare Function ENsetqualtype Lib "epanet2.dll" (ByVal qualType As Long, ByVal chemName As String, ByVal chemUnits As String, ByVal traceNode As String) As Long
|
||||
|
||||
'Basic Node Functions
|
||||
'Node Functions
|
||||
Declare Function ENaddnode Lib "epanet2.dll" (ByVal id As String, ByVal nodeType As Long) As Long
|
||||
Declare Function ENdeletenode Lib "epanet2.dll" (ByVal linkIndex As Long, ByVal actionCode As Long) As Long
|
||||
Declare Function ENdeletenode Lib "epanet2.dll" (ByVal index As Long, ByVal actionCode As Long) As Long
|
||||
Declare Function ENgetnodeindex Lib "epanet2.dll" (ByVal id As String, index As Long) As Long
|
||||
Declare Function ENgetnodeid Lib "epanet2.dll" (ByVal index As Long, ByVal id As String) As Long
|
||||
Declare Function ENsetnodeid Lib "epanet2.dll" (ByVal index As Long, ByVal newid As String) As Long
|
||||
Declare Function ENgetnodetype Lib "epanet2.dll" (ByVal index As Long, code As Long) As Long
|
||||
Declare Function ENgetnodevalue Lib "epanet2.dll" (ByVal index As Long, ByVal code As Long, value As Single) As Long
|
||||
Declare Function ENsetnodevalue Lib "epanet2.dll" (ByVal index As Long, ByVal code As Long, ByVal value As Single) As Long
|
||||
Declare Function ENgetcoord Lib "epanet2.dll" (ByVal index As Long, X As Single, Y As Single) As Long
|
||||
Declare Function ENsetcoord Lib "epanet2.dll" (ByVal index As Long, ByVal X As Single, ByVal Y As Single) As Long
|
||||
Declare Function ENgetnodetype Lib "epanet2.dll" (ByVal index As Long, nodeType As Long) As Long
|
||||
Declare Function ENgetnodevalue Lib "epanet2.dll" (ByVal index As Long, ByVal property As Long, value As Single) As Long
|
||||
Declare Function ENsetnodevalue Lib "epanet2.dll" (ByVal index As Long, ByVal property As Long, ByVal value As Single) As Long
|
||||
Declare Function ENsetjuncdata Lib "epanet2.dll" (ByVal index As Long, ByVal elev As Single, ByVal dmnd As Single, ByVal dmndpat As String) As Long
|
||||
Declare Function ENsettankdata Lib "epanet2.dll" (ByVal index As Long, ByVal elev As Single, ByVal initlvl As Single, ByVal minlvl As Single, ByVal maxlvl As Single, ByVal diam As Single, ByVal minvol As Single, ByVal volcurve As String) As Long
|
||||
Declare Function ENgetcoord Lib "epanet2.dll" (ByVal index As Long, x As Single, y As Single) As Long
|
||||
Declare Function ENsetcoord Lib "epanet2.dll" (ByVal index As Long, ByVal x As Single, ByVal y As Single) As Long
|
||||
|
||||
'Nodal Demand Functions
|
||||
Declare Function ENgetdemandmodel Lib "epanet2.dll" (mtype As Long, pmin As Single, preq As Single, pexp As Single) As Long
|
||||
Declare Function ENsetdemandmodel Lib "epanet2.dll" (ByVal mtype As Long, ByVal pmin As Single, ByVal preq As Single, ByVal pexp As Single) As Long
|
||||
Declare Function ENgetnumdemands Lib "epanet2.dll" (ByVal index As Long, numDemands As Long) As Long
|
||||
Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal index As Long, ByVal DemandIndex As Long, value As Single) As Long
|
||||
Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal index As Long, ByVal DemandIndex As Long, ByVal BaseDemand As Single) As Long
|
||||
Declare Function ENgetdemandpattern Lib "epanet2.dll" (ByVal index As Long, ByVal DemandIndex As Long, PatIndex As Long) As Long
|
||||
Declare Function ENsetdemandpattern Lib "epanet2.dll" (ByVal index As Long, ByVal DemandIndex As Long, ByVal PatIndex As Long) As Long
|
||||
Declare Function ENgetdemandname Lib "epanet2.dll" (ByVal index As Long, ByVal DemandIndex As Long, ByVal demandName As String) As Long
|
||||
Declare Function ENsetdemandname Lib "epanet2.dll" (ByVal nodeIndex As Long, ByVal DemandIndex As Long, ByVal demandName As String) As Long
|
||||
Declare Function ENgetdemandmodel Lib "epanet2.dll" (type_ As Long, pmin As Single, preq As Single, pexp As Single) As Long
|
||||
Declare Function ENsetdemandmodel Lib "epanet2.dll" (ByVal type_ As Long, ByVal pmin As Single, ByVal preq As Single, ByVal pexp As Single) As Long
|
||||
Declare Function ENgetnumdemands Lib "epanet2.dll" (ByVal nodeIndex As Long, numDemands As Long) As Long
|
||||
Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal nodeIndex As Long, ByVal demandIndex As Long, value As Single) As Long
|
||||
Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal nodeIndex As Long, ByVal demandIndex As Long, ByVal BaseDemand As Single) As Long
|
||||
Declare Function ENgetdemandpattern Lib "epanet2.dll" (ByVal nodeIndex As Long, ByVal demandIndex As Long, patIndex As Long) As Long
|
||||
Declare Function ENsetdemandpattern Lib "epanet2.dll" (ByVal nodeIndex As Long, ByVal demandIndex As Long, ByVal patIndex As Long) As Long
|
||||
Declare Function ENgetdemandname Lib "epanet2.dll" (ByVal nodeIndex As Long, ByVal demandIndex As Long, ByVal demandName As String) As Long
|
||||
Declare Function ENsetdemandname Lib "epanet2.dll" (ByVal nodeIndex As Long, ByVal demandIndex As Long, ByVal demandName As String) As Long
|
||||
|
||||
'Basic Link Functions
|
||||
'Link Functions
|
||||
Declare Function ENaddlink Lib "epanet2.dll" (ByVal id As String, ByVal linkType As Long, ByVal fromNode As String, ByVal toNode As String) As Long
|
||||
Declare Function ENdeletelink Lib "epanet2.dll" (ByVal linkIndex As Long, ByVal actionCode As Long) As Long
|
||||
Declare Function ENdeletelink Lib "epanet2.dll" (ByVal index As Long, ByVal actionCode As Long) As Long
|
||||
Declare Function ENgetlinkindex Lib "epanet2.dll" (ByVal id As String, index As Long) As Long
|
||||
Declare Function ENgetlinkid Lib "epanet2.dll" (ByVal index As Long, ByVal id As String) As Long
|
||||
Declare Function ENsetlinkid Lib "epanet2.dll" (ByVal index As Long, ByVal newid As String) As Long
|
||||
Declare Function ENgetlinktype Lib "epanet2.dll" (ByVal index As Long, code As Long) As Long
|
||||
Declare Function ENsetlinktype Lib "epanet2.dll" (index As Long, ByVal code As Long) As Long
|
||||
Declare Function ENgetlinktype Lib "epanet2.dll" (ByVal index As Long, linkType As Long) As Long
|
||||
Declare Function ENsetlinktype Lib "epanet2.dll" (index As Long, ByVal linkType As Long, ByVal actionCode As Long) As Long
|
||||
Declare Function ENgetlinknodes Lib "epanet2.dll" (ByVal index As Long, node1 As Long, node2 As Long) As Long
|
||||
Declare Function ENsetlinknodes Lib "epanet2.dll" (ByVal index As Long, ByVal node1 As Long, ByVal node2 As Long) As Long
|
||||
Declare Function ENgetlinkvalue Lib "epanet2.dll" (ByVal index As Long, ByVal code As Long, value As Single) As Long
|
||||
Declare Function ENsetlinkvalue Lib "epanet2.dll" (ByVal index As Long, ByVal code As Long, ByVal value As Single) As Long
|
||||
Declare Function ENgetlinkvalue Lib "epanet2.dll" (ByVal index As Long, ByVal property As Long, value As Single) As Long
|
||||
Declare Function ENsetlinkvalue Lib "epanet2.dll" (ByVal index As Long, ByVal property As Long, ByVal value As Single) As Long
|
||||
Declare Function ENsetpipedata Lib "epanet2.dll" (ByVal index As Long, ByVal length As Single, ByVal diam As Single, ByVal rough As Single, ByVal mloss As Single) As Long
|
||||
|
||||
'Pump Functions
|
||||
Declare Function ENgetheadcurveindex Lib "epanet2.dll" (ByVal pumpIndex As Long, curveIndex As Long) As Long
|
||||
Declare Function ENsetheadcurveindex Lib "epanet2.dll" (ByVal pumpIndex As Long, ByVal curveIndex As Long) As Long
|
||||
Declare Function ENgetpumptype Lib "epanet2.dll" (ByVal index As Long, PumpType As Long) As Long
|
||||
Declare Function ENgetheadcurveindex Lib "epanet2.dll" (ByVal linkIndex As Long, curveIndex As Long) As Long
|
||||
Declare Function ENsetheadcurveindex Lib "epanet2.dll" (ByVal linkIndex As Long, ByVal curveIndex As Long) As Long
|
||||
Declare Function ENgetpumptype Lib "epanet2.dll" (ByVal linkIndex As Long, pumpType As Long) As Long
|
||||
|
||||
'Time Pattern Functions
|
||||
Declare Function ENaddpattern Lib "epanet2.dll" (ByVal id As String) As Long
|
||||
Declare Function ENgetpatternindex Lib "epanet2.dll" (ByVal id As String, index As Long) As Long
|
||||
Declare Function ENgetpatternid Lib "epanet2.dll" (ByVal index As Long, ByVal id As String) As Long
|
||||
Declare Function ENgetpatternlen Lib "epanet2.dll" (ByVal index As Long, L As Long) As Long
|
||||
Declare Function ENgetpatternvalue Lib "epanet2.dll" (ByVal index As Long, ByVal Period As Long, value As Single) As Long
|
||||
Declare Function ENsetpatternvalue Lib "epanet2.dll" (ByVal index As Long, ByVal Period As Long, ByVal value As Single) As Long
|
||||
Declare Function ENgetpatternlen Lib "epanet2.dll" (ByVal index As Long, len_ As Long) As Long
|
||||
Declare Function ENgetpatternvalue Lib "epanet2.dll" (ByVal index As Long, ByVal period As Long, value As Single) As Long
|
||||
Declare Function ENsetpatternvalue Lib "epanet2.dll" (ByVal index As Long, ByVal period As Long, ByVal value As Single) As Long
|
||||
Declare Function ENgetaveragepatternvalue Lib "epanet2.dll" (ByVal index As Long, value As Single) As Long
|
||||
Declare Function ENsetpattern Lib "epanet2.dll" (ByVal index As Long, F As Any, ByVal N As Long) As Long
|
||||
Declare Function ENsetpattern Lib "epanet2.dll" (ByVal index As Long, values As Any, ByVal len_ As Long) As Long
|
||||
|
||||
'Data Curve Functions
|
||||
Declare Function ENaddcurve Lib "epanet2.dll" (ByVal id As String) As Long
|
||||
Declare Function ENgetcurveindex Lib "epanet2.dll" (ByVal id As String, index As Long) As Long
|
||||
Declare Function ENgetcurveid Lib "epanet2.dll" (ByVal index As Long, ByVal id As String) As Long
|
||||
Declare Function ENgetcurvelen Lib "epanet2.dll" (ByVal index As Long, L As Long) As Long
|
||||
Declare Function ENgetcurvetype Lib "epanet2.dll" (ByVal curveIndex As Long, CurveType As Long) As Long
|
||||
Declare Function ENgetcurvevalue Lib "epanet2.dll" (ByVal index As Long, ByVal Ptn As Long, X As Single, Y As Single) As Long
|
||||
Declare Function ENsetcurvevalue Lib "epanet2.dll" (ByVal index As Long, ByVal Ptn As Long, ByVal X As Single, ByVal Y As Single) As Long
|
||||
Declare Function ENgetcurve Lib "epanet2.dll" (ByVal curveIndex As Long, ByVal CurveID As String, nValues As Long, xValues As Any, yValues As Any) As Long
|
||||
Declare Function ENsetcurve Lib "epanet2.dll" (ByVal index As Long, X As Any, Y As Any, ByVal N As Long) As Long
|
||||
Declare Function ENgetcurvelen Lib "epanet2.dll" (ByVal index As Long, len_ As Long) As Long
|
||||
Declare Function ENgetcurvetype Lib "epanet2.dll" (ByVal index As Long, type_ As Long) As Long
|
||||
Declare Function ENgetcurvevalue Lib "epanet2.dll" (ByVal curveIndex As Long, ByVal pointIndex As Long, x As Single, y As Single) As Long
|
||||
Declare Function ENsetcurvevalue Lib "epanet2.dll" (ByVal curveIndex As Long, ByVal pointIndex As Long, ByVal x As Single, ByVal y As Single) As Long
|
||||
Declare Function ENgetcurve Lib "epanet2.dll" (ByVal index As Long, ByVal id As String, nPoints As Long, xValues As Any, yValues As Any) As Long
|
||||
Declare Function ENsetcurve Lib "epanet2.dll" (ByVal index As Long, xValues As Any, yValues As Any, ByVal nPoints As Long) As Long
|
||||
|
||||
'Simple Control Functions
|
||||
Declare Function ENaddcontrol Lib "epanet2.dll" (Cindex As Long, ByVal Ctype As Long, ByVal Lindex As Long, ByVal setting As Single, ByVal Nindex As Long, ByVal Level As Single) As Long
|
||||
Declare Function ENdeletecontrol Lib "epanet2.dll" (ByVal Cindex As Long) As Long
|
||||
Declare Function ENgetcontrol Lib "epanet2.dll" (ByVal Cindex As Long, Ctype As Long, Lindex As Long, setting As Single, Nindex As Long, Level As Single) As Long
|
||||
Declare Function ENsetcontrol Lib "epanet2.dll" (ByVal Cindex As Long, ByVal Ctype As Long, ByVal Lindex As Long, ByVal setting As Single, ByVal Nindex As Long, ByVal Level As Single) As Long
|
||||
Declare Function ENaddcontrol Lib "epanet2.dll" (ByVal type_ As Long, ByVal linkIndex As Long, ByVal setting As Single, ByVal nodeIndex As Long, ByVal level As Single, index As Long) As Long
|
||||
Declare Function ENdeletecontrol Lib "epanet2.dll" (ByVal index As Long) As Long
|
||||
Declare Function ENgetcontrol Lib "epanet2.dll" (ByVal index As Long, type_ As Long, linkIndex As Long, setting As Single, nodeIndex As Long, level As Single) As Long
|
||||
Declare Function ENsetcontrol Lib "epanet2.dll" (ByVal index As Long, ByVal type_ As Long, ByVal linkIndex As Long, ByVal setting As Single, ByVal nodeIndex As Long, ByVal level As Single) As Long
|
||||
|
||||
'Rue-Based Control Functions
|
||||
'Rule-Based Control Functions
|
||||
Declare Function ENaddrule Lib "epanet2.dll" (ByVal rule As String) As Long
|
||||
Declare Function ENdeleterule Lib "epanet2.dll" (ByVal index As Long) As Long
|
||||
Declare Function ENgetrule Lib "epanet2.dll" (ByVal index As Long, nPremises As Long, nTrueActions As Long, nFalseActions As Long, priority As Single) As Long
|
||||
Declare Function ENgetruleID Lib "epanet2.dll" (ByVal indexRule As Long, ByVal id As String) As Long
|
||||
Declare Function ENgetrule Lib "epanet2.dll" (ByVal index As Long, nPremises As Long, nThenActions As Long, nElseActions As Long, priority As Single) As Long
|
||||
Declare Function ENgetruleID Lib "epanet2.dll" (ByVal index As Long, ByVal id As String) As Long
|
||||
Declare Function ENsetrulepriority Lib "epanet2.dll" (ByVal index As Long, ByVal priority As Single) As Long
|
||||
Declare Function ENgetpremise Lib "epanet2.dll" (ByVal indexRule As Long, ByVal indexPremise As Long, logop As Long, object As Long, indexObj As Long, variable As Long, relop As Long, status As Long, value As Single) As Long
|
||||
Declare Function ENsetpremise Lib "epanet2.dll" (ByVal indexRule As Long, ByVal indexPremise As Long, ByVal logop As Long, ByVal object As Long, ByVal indexObj As Long, ByVal variable As Long, ByVal relop As Long, ByVal status As Long, ByVal value As Single) As Long
|
||||
Declare Function ENsetpremiseindex Lib "epanet2.dll" (ByVal indexRule As Long, ByVal indexPremise As Long, ByVal indexObj As Long) As Long
|
||||
Declare Function ENsetpremisestatus Lib "epanet2.dll" (ByVal indexRule As Long, ByVal indexPremise As Long, ByVal status As Long) As Long
|
||||
Declare Function ENsetpremisevalue Lib "epanet2.dll" (ByVal indexRule As Long, ByVal indexPremise As Long, ByVal value As Single) As Long
|
||||
Declare Function ENgetthenaction Lib "epanet2.dll" (ByVal indexRule As Long, ByVal indexAction As Long, indexLink As Long, status As Long, setting As Single) As Long
|
||||
Declare Function ENsetthenaction Lib "epanet2.dll" (ByVal indexRule As Long, ByVal indexAction As Long, ByVal indexLink As Long, ByVal status As Long, ByVal setting As Single) As Long
|
||||
Declare Function ENgetelseaction Lib "epanet2.dll" (ByVal indexRule As Long, ByVal indexAction As Long, indexLink As Long, status As Long, setting As Single) As Long
|
||||
Declare Function ENsetelseaction Lib "epanet2.dll" (ByVal indexRule As Long, ByVal indexAction As Long, ByVal indexLink As Long, ByVal status As Long, ByVal setting As Single) As Long
|
||||
Declare Function ENgetpremise Lib "epanet2.dll" (ByVal ruleIndex As Long, ByVal premiseIndex As Long, logop As Long, object As Long, objIndex As Long, variable As Long, relop As Long, status As Long, value As Single) As Long
|
||||
Declare Function ENsetpremise Lib "epanet2.dll" (ByVal ruleIndex As Long, ByVal premiseIndex As Long, ByVal logop As Long, ByVal object As Long, ByVal objIndex As Long, ByVal variable As Long, ByVal relop As Long, ByVal status As Long, ByVal value As Single) As Long
|
||||
Declare Function ENsetpremiseindex Lib "epanet2.dll" (ByVal ruleIndex As Long, ByVal premiseIndex As Long, ByVal objIndex As Long) As Long
|
||||
Declare Function ENsetpremisestatus Lib "epanet2.dll" (ByVal ruleIndex As Long, ByVal premiseIndex As Long, ByVal status As Long) As Long
|
||||
Declare Function ENsetpremisevalue Lib "epanet2.dll" (ByVal ruleIndex As Long, ByVal premiseIndex As Long, ByVal value As Single) As Long
|
||||
Declare Function ENgetthenaction Lib "epanet2.dll" (ByVal ruleIndex As Long, ByVal actionIndex As Long, linkIndex As Long, status As Long, setting As Single) As Long
|
||||
Declare Function ENsetthenaction Lib "epanet2.dll" (ByVal ruleIndex As Long, ByVal actionIndex As Long, ByVal linkIndex As Long, ByVal status As Long, ByVal setting As Single) As Long
|
||||
Declare Function ENgetelseaction Lib "epanet2.dll" (ByVal ruleIndex As Long, ByVal actionIndex As Long, linkIndex As Long, status As Long, setting As Single) As Long
|
||||
Declare Function ENsetelseaction Lib "epanet2.dll" (ByVal ruleIndex As Long, ByVal actionIndex As Long, ByVal linkIndex As Long, ByVal status As Long, ByVal setting As Single) As Long
|
||||
|
||||
1021
include/epanet2.h
1021
include/epanet2.h
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
'Declarations of functions in the EPANET PROGRAMMERs TOOLKIT
|
||||
'(EPANET2.DLL) for use with VB.Net.
|
||||
|
||||
'Last updated on 7/19/15 - LR
|
||||
'Last updated on 01/08/2019
|
||||
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Text
|
||||
@@ -55,15 +55,16 @@ Public Const EN_HEADLOSS = 10
|
||||
Public Const EN_STATUS = 11
|
||||
Public Const EN_SETTING = 12
|
||||
Public Const EN_ENERGY = 13
|
||||
Public Const EN_LINKQUAL = 14 'ES
|
||||
Public Const EN_LINKQUAL = 14
|
||||
Public Const EN_LINKPATTERN = 15
|
||||
Public Const EN_EFFICIENCY = 16
|
||||
Public Const EN_HEADCURVE = 17
|
||||
Public Const EN_EFFICIENCYCURVE = 18
|
||||
Public Const EN_PRICEPATTERN = 19
|
||||
Public Const EN_STATE = 20
|
||||
Public Const EN_CONST_POWER = 21
|
||||
Public Const EN_SPEED = 22
|
||||
|
||||
Public Const EN_PUMP_STATE = 16
|
||||
Public Const EN_PUMP_EFFIC = 17
|
||||
Public Const EN_PUMP_POWER = 18
|
||||
Public Const EN_PUMP_HCURVE = 19
|
||||
Public Const EN_PUMP_ECURVE = 20
|
||||
Public Const EN_PUMP_ECOST = 21
|
||||
Public Const EN_PUMP_EPAT = 22
|
||||
|
||||
Public Const EN_DURATION = 0 ' Time parameters
|
||||
Public Const EN_HYDSTEP = 1
|
||||
@@ -75,7 +76,7 @@ Public Const EN_REPORTSTART = 6
|
||||
Public Const EN_RULESTEP = 7
|
||||
Public Const EN_STATISTIC = 8
|
||||
Public Const EN_PERIODS = 9
|
||||
Public Const EN_STARTTIME = 10 'ES
|
||||
Public Const EN_STARTTIME = 10
|
||||
Public Const EN_HTIME = 11
|
||||
Public Const EN_QTIME = 12
|
||||
Public Const EN_HALTFLAG = 13
|
||||
@@ -119,7 +120,7 @@ Public Const EN_MASS = 1
|
||||
Public Const EN_SETPOINT = 2
|
||||
Public Const EN_FLOWPACED = 3
|
||||
|
||||
Public Const EN_HW = 0 ' Head loss formula
|
||||
Public Const EN_HW = 0 ' Head loss formulas
|
||||
Public Const EN_DW = 1
|
||||
Public Const EN_CM = 2
|
||||
|
||||
@@ -137,7 +138,7 @@ Public Const EN_CMD = 9
|
||||
Public Const EN_DDA = 0 ' Demand driven analysis
|
||||
Public Const EN_PDA = 1 ' Pressure driven analysis
|
||||
|
||||
Public Const EN_TRIALS = 0 ' Misc. options
|
||||
Public Const EN_TRIALS = 0 ' Hydraulic options
|
||||
Public Const EN_ACCURACY = 1
|
||||
Public Const EN_TOLERANCE = 2
|
||||
Public Const EN_EMITEXPON = 3
|
||||
@@ -146,172 +147,218 @@ Public Const EN_HEADERROR = 5
|
||||
Public Const EN_FLOWCHANGE = 6
|
||||
Public Const EN_DEMANDDEFPAT = 7
|
||||
Public Const EN_HEADLOSSFORM = 8
|
||||
Public Const EN_GLOBALEFFIC = 9
|
||||
Public Const EN_GLOBALPRICE = 10
|
||||
Public Const EN_GLOBALPATTERN = 11
|
||||
Public Const EN_DEMANDCHARGE = 12
|
||||
|
||||
Public Const EN_LOWLEVEL = 0 ' Control types
|
||||
Public Const EN_LOWLEVEL = 0 ' Control types
|
||||
Public Const EN_HILEVEL = 1
|
||||
Public Const EN_TIMER = 2
|
||||
Public Const EN_TIMEOFDAY = 3
|
||||
|
||||
Public Const EN_AVERAGE = 1 'Time statistic types
|
||||
Public Const EN_AVERAGE = 1 ' Time statistic types
|
||||
Public Const EN_MINIMUM = 2
|
||||
Public Const EN_MAXIMUM = 3
|
||||
Public Const EN_RANGE = 4
|
||||
|
||||
Public Const EN_MIX1 = 0 'Tank mixing models
|
||||
Public Const EN_MIX1 = 0 ' Tank mixing models
|
||||
Public Const EN_MIX2 = 1
|
||||
Public Const EN_FIFO = 2
|
||||
Public Const EN_LIFO = 3
|
||||
|
||||
Public Const EN_NOSAVE = 0 ' Save-results-to-file flag
|
||||
Public Const EN_NOSAVE = 0 ' Save-results-to-file flag
|
||||
Public Const EN_SAVE = 1
|
||||
Public Const EN_INITFLOW = 10 ' Re-initialize flow flag
|
||||
Public Const EN_INITFLOW = 10 ' Re-initialize flow flag
|
||||
Public Const EN_SAVE_AND_INIT = 11
|
||||
|
||||
Public Const EN_CONST_HP = 0 ' constant horsepower
|
||||
Public Const EN_POWER_FUNC = 1 ' power function
|
||||
Public Const EN_CUSTOM = 2 ' user-defined custom curve
|
||||
Public Const EN_CONST_HP = 0 ' Constant horsepower pump curve
|
||||
Public Const EN_POWER_FUNC = 1 ' Power function pump curve
|
||||
Public Const EN_CUSTOM = 2 ' User-defined custom pump curve
|
||||
Public Const EN_NOCURVE = 3 ' No pump curve
|
||||
|
||||
Public Const EN_V_CURVE = 0 ' volume curve
|
||||
Public Const EN_P_CURVE = 1 ' pump curve
|
||||
Public Const EN_E_CURVE = 2 ' efficiency curve
|
||||
Public Const EN_H_CURVE = 3 ' head loss curve
|
||||
Public Const EN_G_CURVE = 4 ' General\default curve
|
||||
Public Const EN_VOLUME_CURVE = 0 ' Volume curve
|
||||
Public Const EN_PUMP_CURVE = 1 ' Pump curve
|
||||
Public Const EN_EFFIC_CURVE = 2 ' Efficiency curve
|
||||
Public Const EN_HLOSS_CURVE = 3 ' Head loss curve
|
||||
Public Const EN_GENERIC_CURVE = 4 ' Generic curve
|
||||
|
||||
Public Const EN_UNCONDITIONAL = 0 ' Unconditional object deletion
|
||||
Public Const EN_CONDITIONAL = 1 ' Conditional object deletion
|
||||
|
||||
Public Const EN_NO_REPORT = 0 ' No status report
|
||||
Public Const EN_NORMAL_REPORT = 1 ' Normal status report
|
||||
Public Const EN_FULL_REPORT = 2 ' Full status report
|
||||
|
||||
Public Const EN_R_NODE = 6 ' Rule objects
|
||||
Public Const EN_R_LINK = 7
|
||||
Public Const EN_R_SYSTEM = 8
|
||||
|
||||
Public Const EN_R_DEMAND = 0 ' Rule variables
|
||||
Public Const EN_R_HEAD = 1
|
||||
Public Const EN_R_GRADE = 2
|
||||
Public Const EN_R_LEVEL = 3
|
||||
Public Const EN_R_PRESSURE = 4
|
||||
Public Const EN_R_FLOW = 5
|
||||
Public Const EN_R_STATUS = 6
|
||||
Public Const EN_R_SETTING = 7
|
||||
Public Const EN_R_POWER = 8
|
||||
Public Const EN_R_TIME = 9
|
||||
Public Const EN_R_CLOCKTIME = 10
|
||||
Public Const EN_R_FILLTIME = 11
|
||||
Public Const EN_R_DRAINTIME = 12
|
||||
|
||||
Public Const EN_R_EQ = 0 ' Rule operators
|
||||
Public Const EN_R_NE = 1
|
||||
Public Const EN_R_LE = 2
|
||||
Public Const EN_R_GE = 3
|
||||
Public Const EN_R_LT = 4
|
||||
Public Const EN_R_GT = 5
|
||||
Public Const EN_R_IS = 6
|
||||
Public Const EN_R_NOT = 7
|
||||
Public Const EN_R_BELOW = 8
|
||||
Public Const EN_R_ABOVE = 9
|
||||
|
||||
Public Const EN_R_IS_OPEN = 1 ' Rule status types
|
||||
Public Const EN_R_IS_CLOSED = 2
|
||||
Public Const EN_R_IS_ACTIVE = 3
|
||||
|
||||
'These are the external functions that comprise the DLL
|
||||
|
||||
'System Functions
|
||||
Declare Function ENgetversion Lib "epanet2.dll" (ByRef Value As Int32) As Int32
|
||||
Declare Function ENepanet Lib "epanet2.dll" (ByVal F1 As String, ByVal F2 As String, ByVal F3 As String, ByVal F4 As String) As Int32
|
||||
Declare Function ENinit Lib "epanet2.dll" (ByVal rptFile As String, ByVal binOutFile As String, ByVal UnitsType As Int32, ByVal HeadlossFormula As Int32) As Int32
|
||||
Declare Function ENopen Lib "epanet2.dll" (ByVal F1 As String, ByVal F2 As String, ByVal F3 As String) As Int32
|
||||
Declare Function ENsaveinpfile Lib "epanet2.dll" (ByVal F As String) As Int32
|
||||
Declare Function ENgetversion Lib "epanet2.dll" (value As Int32) As Int32
|
||||
Declare Function ENepanet Lib "epanet2.dll" (ByVal inpFile As String, ByVal rptFile As String, ByVal outFile As String, ByVal pviewprog As Any) As Int32
|
||||
Declare Function ENinit Lib "epanet2.dll" (ByVal rptFile As String, ByVal outFile As String, ByVal unitsType As Int32, ByVal headlossType As Int32) As Int32
|
||||
Declare Function ENopen Lib "epanet2.dll" (ByVal inpFile As String, ByVal rptFile As String, ByVal outFile As String) As Int32
|
||||
Declare Function ENsaveinpfile Lib "epanet2.dll" (ByVal filename As String) As Int32
|
||||
Declare Function ENclose Lib "epanet2.dll" () As Int32
|
||||
|
||||
'Hydraulic Analysis Functions
|
||||
'Hydraulic Analysis Functions
|
||||
Declare Function ENsolveH Lib "epanet2.dll" () As Int32
|
||||
Declare Function ENsaveH Lib "epanet2.dll" () As Int32
|
||||
Declare Function ENopenH Lib "epanet2.dll" () As Int32
|
||||
Declare Function ENinitH Lib "epanet2.dll" (ByVal SaveFlag As Int32) As Int32
|
||||
Declare Function ENrunH Lib "epanet2.dll" (ByRef T As Int32) As Int32
|
||||
Declare Function ENnextH Lib "epanet2.dll" (ByRef Tstep As Int32) As Int32
|
||||
Declare Function ENinitH Lib "epanet2.dll" (ByVal initFlag As Int32) As Int32
|
||||
Declare Function ENrunH Lib "epanet2.dll" (currentTime As Int32) As Int32
|
||||
Declare Function ENnextH Lib "epanet2.dll" (tStep As Int32) As Int32
|
||||
Declare Function ENcloseH Lib "epanet2.dll" () As Int32
|
||||
Declare Function ENsavehydfile Lib "epanet2.dll" (ByVal F As String) As Int32
|
||||
Declare Function ENusehydfile Lib "epanet2.dll" (ByVal F As String) As Int32
|
||||
Declare Function ENsavehydfile Lib "epanet2.dll" (ByVal filename As String) As Int32
|
||||
Declare Function ENusehydfile Lib "epanet2.dll" (ByVal filename As String) As Int32
|
||||
|
||||
'Water Quality Analysis Functions
|
||||
Declare Function ENsolveQ Lib "epanet2.dll" () As Int32
|
||||
Declare Function ENopenQ Lib "epanet2.dll" () As Int32
|
||||
Declare Function ENinitQ Lib "epanet2.dll" (ByVal SaveFlag As Int32) As Int32
|
||||
Declare Function ENrunQ Lib "epanet2.dll" (ByRef T As Int32) As Int32
|
||||
Declare Function ENnextQ Lib "epanet2.dll" (ByRef Tstep As Int32) As Int32
|
||||
Declare Function ENstepQ Lib "epanet2.dll" (ByRef Tleft As Int32) As Int32
|
||||
Declare Function ENinitQ Lib "epanet2.dll" (ByVal saveFlag As Int32) As Int32
|
||||
Declare Function ENrunQ Lib "epanet2.dll" (currentTime As Int32) As Int32
|
||||
Declare Function ENnextQ Lib "epanet2.dll" (tStep As Int32) As Int32
|
||||
Declare Function ENstepQ Lib "epanet2.dll" (timeLeft As Int32) As Int32
|
||||
Declare Function ENcloseQ Lib "epanet2.dll" () As Int32
|
||||
|
||||
'Reporting Functions
|
||||
Declare Function ENwriteline Lib "epanet2.dll" (ByVal S As String) As Int32
|
||||
'Reporting Functions
|
||||
Declare Function ENwriteline Lib "epanet2.dll" (ByVal line As String) As Int32
|
||||
Declare Function ENreport Lib "epanet2.dll" () As Int32
|
||||
Declare Function ENresetreport Lib "epanet2.dll" () As Int32
|
||||
Declare Function ENsetreport Lib "epanet2.dll" (ByVal S As String) As Int32
|
||||
Declare Function ENsetstatusreport Lib "epanet2.dll" (ByVal Code As Int32) As Int32
|
||||
Declare Function ENgetcount Lib "epanet2.dll" (ByVal Code As Int32, ByRef Value As Int32) As Int32
|
||||
Declare Function ENgeterror Lib "epanet2.dll" (ByVal ErrCode As Int32, ByVal ErrMsg As StringBuilder, ByVal N As Int32) As Int32
|
||||
Declare Function ENgetstatistic Lib "epanet2.dll" (ByVal code As Int32, ByRef value As Single) As Int32
|
||||
Declare Function ENsetreport Lib "epanet2.dll" (ByVal format As String) As Int32
|
||||
Declare Function ENsetstatusreport Lib "epanet2.dll" (ByVal level As Int32) As Int32
|
||||
Declare Function ENgetcount Lib "epanet2.dll" (ByVal object As Int32, count As Int32) As Int32
|
||||
Declare Function ENgeterror Lib "epanet2.dll" (ByVal errcode As Int32, ByVal errmsg As String, ByVal maxLen As Int32) As Int32
|
||||
Declare Function ENgetstatistic Lib "epanet2.dll" (ByVal type_ As Int32, ByRef value As Single) As Int32
|
||||
|
||||
'Analysis Options Functions
|
||||
Declare Function ENgetoption Lib "epanet2.dll" (ByVal Code As Int32, ByRef Value As Single) As Int32
|
||||
Declare Function ENsetoption Lib "epanet2.dll" (ByVal Code As Int32, ByVal Value As Single) As Int32
|
||||
Declare Function ENgetflowunits Lib "epanet2.dll" (ByRef Code As Int32) As Int32
|
||||
Declare Function ENsetflowunits Lib "epanet2.dll" (ByVal code As Int32) As Int32
|
||||
Declare Function ENgettimeparam Lib "epanet2.dll" (ByVal Code As Int32, ByRef Value As Int32) As Int32
|
||||
Declare Function ENsettimeparam Lib "epanet2.dll" (ByVal Code As Int32, ByVal Value As Int32) As Int32
|
||||
Declare Function ENgetqualtype Lib "epanet2.dll" (ByRef QualCode As Int32, ByRef TraceNode As Int32) As Int32
|
||||
Declare Function ENgetqualinfo Lib "epanet2.dll" (ByRef QualCode As Int32, ByVal ChemName As String, ByVal ChemUnits As String, ByRef TraceNode As Int32) As Int32
|
||||
Declare Function ENsetqualtype Lib "epanet2.dll" (ByVal QualCode As Int32, ByVal ChemName As String, ByVal ChemUnits As String, ByVal TraceNode As String) As Int32
|
||||
Declare Function ENgetoption Lib "epanet2.dll" (ByVal option As Int32, value As Single) As Int32
|
||||
Declare Function ENsetoption Lib "epanet2.dll" (ByVal option As Int32, ByVal value As Single) As Int32
|
||||
Declare Function ENgetflowunits Lib "epanet2.dll" (units As Int32) As Int32
|
||||
Declare Function ENsetflowunits Lib "epanet2.dll" (ByVal units As Int32) As Int32
|
||||
Declare Function ENgettimeparam Lib "epanet2.dll" (ByVal param As Int32, value As Int32) As Int32
|
||||
Declare Function ENsettimeparam Lib "epanet2.dll" (ByVal param As Int32, ByVal value As Int32) As Int32
|
||||
Declare Function ENgetqualinfo Lib "epanet2.dll" (qualType As Int32, ByVal chemName As String, ByVal chemUnits As String, traceNode As Int32) As Int32
|
||||
Declare Function ENgetqualtype Lib "epanet2.dll" (qualType As Int32, traceNode As Int32) As Int32
|
||||
Declare Function ENsetqualtype Lib "epanet2.dll" (ByVal qualType As Int32, ByVal chemName As String, ByVal chemUnits As String, ByVal traceNode As String) As Int32
|
||||
|
||||
'Basic Node Functions
|
||||
'Node Functions
|
||||
Declare Function ENaddnode Lib "epanet2.dll" (ByVal id As String, ByVal nodeType As Int32) As Int32
|
||||
Declare Function ENdeletenode Lib "epanet2.dll" (ByVal linkIndex As Long) As Long
|
||||
Declare Function ENgetnodeindex Lib "epanet2.dll" (ByVal ID As String, ByRef Index As Int32) As Int32
|
||||
Declare Function ENgetnodeid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32
|
||||
Declare Function ENdeletenode Lib "epanet2.dll" (ByVal index As Int32, ByVal actionCode As Int32) As Int32
|
||||
Declare Function ENgetnodeindex Lib "epanet2.dll" (ByVal id As String, index As Int32) As Int32
|
||||
Declare Function ENgetnodeid Lib "epanet2.dll" (ByVal index As Int32, ByVal id As String) As Int32
|
||||
Declare Function ENsetnodeid Lib "epanet2.dll" (ByVal index As Int32, ByVal newid As String) As Int32
|
||||
Declare Function ENgetnodetype Lib "epanet2.dll" (ByVal Index As Int32, ByRef Code As Int32) As Int32
|
||||
Declare Function ENgetnodevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByRef Value As Single) As Int32
|
||||
Declare Function ENsetnodevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByVal Value As Single) As Int32
|
||||
Declare Function ENgetcoord Lib "epanet2.dll" (ByVal Index As Int32, ByRef X As Single, ByRef Y As Single) As Int32
|
||||
Declare Function ENsetcoord Lib "epanet2.dll" (ByVal Index As Int32, ByVal X As Single, ByVal Y As Single) As Int32
|
||||
|
||||
Declare Function ENgetnodetype Lib "epanet2.dll" (ByVal index As Int32, nodeType As Int32) As Int32
|
||||
Declare Function ENgetnodevalue Lib "epanet2.dll" (ByVal index As Int32, ByVal property As Int32, value As Single) As Int32
|
||||
Declare Function ENsetnodevalue Lib "epanet2.dll" (ByVal index As Int32, ByVal property As Int32, ByVal value As Single) As Int32
|
||||
Declare Function ENsetjuncdata Lib "epanet2.dll" (ByVal index As Int32, ByVal elev As Single, ByVal dmnd As Single, ByVal dmndpat As String) As Int32
|
||||
Declare Function ENsettankdata Lib "epanet2.dll" (ByVal index As Int32, ByVal elev As Single, ByVal initlvl As Single, ByVal minlvl As Single, ByVal maxlvl As Single, ByVal diam As Single, ByVal minvol As Single, ByVal volcurve As String) As Int32
|
||||
Declare Function ENgetcoord Lib "epanet2.dll" (ByVal index As Int32, x As Single, y As Single) As Int32
|
||||
Declare Function ENsetcoord Lib "epanet2.dll" (ByVal index As Int32, ByVal x As Single, ByVal y As Single) As Int32
|
||||
|
||||
'Nodal Demand Functions
|
||||
Declare Function ENgetdemandmodel Lib "epanet2.dll" (ByRef mtype As Int32, ByRef pmin As Single, ByRef preq As Single, ByRef pexp As Single) As Int32
|
||||
Declare Function ENsetdemandmodel Lib "epanet2.dll" (ByVal mtype As Int32, ByVal pmin As Single, ByVal preq As Single, ByVal pexp As Single) As Int32
|
||||
Declare Function ENgetnumdemands Lib "epanet2.dll" (ByVal Index As Int32, ByRef numDemands As Int32) As Int32 'ES
|
||||
Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByRef BaseDemand As Single) As Int32 'ES
|
||||
Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByVal BaseDemand As Single) As Int32 'ES
|
||||
Declare Function ENgetdemandpattern Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByRef PatIndex As Int32) As Int32 'ES
|
||||
Declare Function ENsetdemandpattern Lib "epanet2.dll" (ByVal index As Int32, ByVal DemandIndex As Int32, ByVal PatIndex As Int32) As Int32
|
||||
Declare Function ENgetdemandname Lib "epanet2.dll" (ByVal index As Int32, ByVal DemandIndex As Int32, ByVal demandName As String) As Int32
|
||||
Declare Function ENsetdemandname Lib "epanet2.dll" (ByVal nodeIndex As Int32, ByVal DemandIndex As Int32, ByVal demandName As String) As Int32
|
||||
Declare Function ENgetdemandmodel Lib "epanet2.dll" (type_ As Int32, pmin As Single, preq As Single, pexp As Single) As Int32
|
||||
Declare Function ENsetdemandmodel Lib "epanet2.dll" (ByVal type_ As Int32, ByVal pmin As Single, ByVal preq As Single, ByVal pexp As Single) As Int32
|
||||
Declare Function ENgetnumdemands Lib "epanet2.dll" (ByVal nodeIndex As Int32, numDemands As Int32) As Int32
|
||||
Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal nodeIndex As Int32, ByVal demandIndex As Int32, value As Single) As Int32
|
||||
Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal nodeIndex As Int32, ByVal demandIndex As Int32, ByVal BaseDemand As Single) As Int32
|
||||
Declare Function ENgetdemandpattern Lib "epanet2.dll" (ByVal nodeIndex As Int32, ByVal demandIndex As Int32, patIndex As Int32) As Int32
|
||||
Declare Function ENsetdemandpattern Lib "epanet2.dll" (ByVal nodeIndex As Int32, ByVal demandIndex As Int32, ByVal patIndex As Int32) As Int32
|
||||
Declare Function ENgetdemandname Lib "epanet2.dll" (ByVal nodeIndex As Int32, ByVal demandIndex As Int32, ByVal demandName As String) As Int32
|
||||
Declare Function ENsetdemandname Lib "epanet2.dll" (ByVal nodeIndex As Int32, ByVal demandIndex As Int32, ByVal demandName As String) As Int32
|
||||
|
||||
'Basic Link Functions
|
||||
'Link Functions
|
||||
Declare Function ENaddlink Lib "epanet2.dll" (ByVal id As String, ByVal linkType As Int32, ByVal fromNode As String, ByVal toNode As String) As Int32
|
||||
Declare Function ENdeletelink Lib "epanet2.dll" (ByVal nodeIndex As Long) As Long
|
||||
Declare Function ENgetlinkindex Lib "epanet2.dll" (ByVal ID As String, ByRef Index As Int32) As Int32
|
||||
Declare Function ENgetlinkid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32
|
||||
Declare Function ENdeletelink Lib "epanet2.dll" (ByVal index As Int32, ByVal actionCode As Int32) As Int32
|
||||
Declare Function ENgetlinkindex Lib "epanet2.dll" (ByVal id As String, index As Int32) As Int32
|
||||
Declare Function ENgetlinkid Lib "epanet2.dll" (ByVal index As Int32, ByVal id As String) As Int32
|
||||
Declare Function ENsetlinkid Lib "epanet2.dll" (ByVal index As Int32, ByVal newid As String) As Int32
|
||||
Declare Function ENgetlinktype Lib "epanet2.dll" (ByVal Index As Int32, ByRef Code As Int32) As Int32
|
||||
Declare Function ENsetlinktype Lib "epanet2.dll" (ByRef index As Int32, ByVal code As Int32) As Int32
|
||||
Declare Function ENgetlinknodes Lib "epanet2.dll" (ByVal Index As Int32, ByRef Node1 As Int32, ByRef Node2 As Int32) As Int32
|
||||
Declare Function ENgetlinktype Lib "epanet2.dll" (ByVal index As Int32, linkType As Int32) As Int32
|
||||
Declare Function ENsetlinktype Lib "epanet2.dll" (index As Int32, ByVal linkType As Int32, ByVal actionCode As Int32) As Int32
|
||||
Declare Function ENgetlinknodes Lib "epanet2.dll" (ByVal index As Int32, node1 As Int32, node2 As Int32) As Int32
|
||||
Declare Function ENsetlinknodes Lib "epanet2.dll" (ByVal index As Int32, ByVal node1 As Int32, ByVal node2 As Int32) As Int32
|
||||
Declare Function ENgetlinkvalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByRef Value As Single) As Int32
|
||||
Declare Function ENsetlinkvalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByVal Value As Single) As Int32
|
||||
|
||||
Declare Function ENgetlinkvalue Lib "epanet2.dll" (ByVal index As Int32, ByVal property As Int32, value As Single) As Int32
|
||||
Declare Function ENsetlinkvalue Lib "epanet2.dll" (ByVal index As Int32, ByVal property As Int32, ByVal value As Single) As Int32
|
||||
Declare Function ENsetpipedata Lib "epanet2.dll" (ByVal index As Int32, ByVal length As Single, ByVal diam As Single, ByVal rough As Single, ByVal mloss As Single) As Int32
|
||||
|
||||
'Pump Functions
|
||||
Declare Function ENgetheadcurveindex Lib "epanet2.dll" (ByVal Index As Int32, ByVal CurveIndex As int32) As Int32 'ES
|
||||
Declare Function ENsetheadcurveindex Lib "epanet2.dll" (ByVal pumpIndex As Int32, ByVal curveIndex As Int32) As Int32
|
||||
Declare Function ENgetpumptype Lib "epanet2.dll" (ByVal Index As Int32, ByRef PumpType As Int32) As Int32 'ES
|
||||
|
||||
'Time Pattern Functions
|
||||
Declare Function ENaddpattern Lib "epanet2.dll" (ByVal ID As String) As Int32
|
||||
Declare Function ENgetpatternindex Lib "epanet2.dll" (ByVal ID As String, ByRef Index As Int32) As Int32
|
||||
Declare Function ENgetpatternid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32
|
||||
Declare Function ENgetpatternlen Lib "epanet2.dll" (ByVal Index As Int32, ByRef L As Int32) As Int32
|
||||
Declare Function ENgetpatternvalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Period As Int32, ByRef Value As Single) As Int32
|
||||
Declare Function ENsetpatternvalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Period As Int32, ByVal Value As Single) As Int32
|
||||
Declare Function ENgetaveragepatternvalue Lib "epanet2.dll" (ByVal index As Int32, ByRef value As Single) As Int32
|
||||
Declare Function ENsetpattern Lib "epanet2.dll" (ByVal Index as Int32, ByRef F as Single, ByVal N as Int32) as Int32
|
||||
|
||||
Declare Function ENgetheadcurveindex Lib "epanet2.dll" (ByVal linkIndex As Int32, curveIndex As Int32) As Int32
|
||||
Declare Function ENsetheadcurveindex Lib "epanet2.dll" (ByVal linkIndex As Int32, ByVal curveIndex As Int32) As Int32
|
||||
Declare Function ENgetpumptype Lib "epanet2.dll" (ByVal linkIndex As Int32, pumpType As Int32) As Int32
|
||||
|
||||
'Time Pattern Functions
|
||||
Declare Function ENaddpattern Lib "epanet2.dll" (ByVal id As String) As Int32
|
||||
Declare Function ENgetpatternindex Lib "epanet2.dll" (ByVal id As String, index As Int32) As Int32
|
||||
Declare Function ENgetpatternid Lib "epanet2.dll" (ByVal index As Int32, ByVal id As String) As Int32
|
||||
Declare Function ENgetpatternlen Lib "epanet2.dll" (ByVal index As Int32, len_ As Int32) As Int32
|
||||
Declare Function ENgetpatternvalue Lib "epanet2.dll" (ByVal index As Int32, ByVal period As Int32, value As Single) As Int32
|
||||
Declare Function ENsetpatternvalue Lib "epanet2.dll" (ByVal index As Int32, ByVal period As Int32, ByVal value As Single) As Int32
|
||||
Declare Function ENgetaveragepatternvalue Lib "epanet2.dll" (ByVal index As Int32, value As Single) As Int32
|
||||
Declare Function ENsetpattern Lib "epanet2.dll" (ByVal index As Int32, values As Any, ByVal len_ As Int32) As Int32
|
||||
|
||||
'Data Curve Functions
|
||||
Declare Function ENaddcurve Lib "epanet2.dll" (ByVal ID As String) As Int32
|
||||
Declare Function ENgetcurveindex Lib "epanet2.dll" (ByVal ID As String, ByRef Index As Int32) As Int32
|
||||
Declare Function ENgetcurveid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32
|
||||
Declare Function ENgetcurvelen Lib "epanet2.dll" (ByVal Index As Int32, ByRef L As Int32) As Int32
|
||||
Declare Function ENgetcurvetype Lib "epanet2.dll" (ByVal curveIndex As Int32, ByRef CurveType As Int32) As Int32
|
||||
Declare Function ENgetcurvevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Pnt As Int32, ByRef X As Single, ByRef Y As Single) As Int32
|
||||
Declare Function ENsetcurvevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Pnt As Int32, ByVal X As Single, ByVal Y As Single) As Int32
|
||||
Declare Function ENgetcurve Lib "epanet2.dll" (ByVal CurveIndex As Int32, ByRef nValues As Int32, ByRef xValues As Single, ByRef yValues As Single) As Int32 'ES
|
||||
Declare Function ENsetcurve Lib "epanet2.dll" (ByVal Index as Int32, ByRef X as Single, ByRef Y as Single, ByVal N as Int32) as Int32
|
||||
Declare Function ENaddcurve Lib "epanet2.dll" (ByVal id As String) As Int32
|
||||
Declare Function ENgetcurveindex Lib "epanet2.dll" (ByVal id As String, index As Int32) As Int32
|
||||
Declare Function ENgetcurveid Lib "epanet2.dll" (ByVal index As Int32, ByVal id As String) As Int32
|
||||
Declare Function ENgetcurvelen Lib "epanet2.dll" (ByVal index As Int32, len_ As Int32) As Int32
|
||||
Declare Function ENgetcurvetype Lib "epanet2.dll" (ByVal index As Int32, type_ As Int32) As Int32
|
||||
Declare Function ENgetcurvevalue Lib "epanet2.dll" (ByVal curveIndex As Int32, ByVal pointIndex As Int32, x As Single, y As Single) As Int32
|
||||
Declare Function ENsetcurvevalue Lib "epanet2.dll" (ByVal curveIndex As Int32, ByVal pointIndex As Int32, ByVal x As Single, ByVal y As Single) As Int32
|
||||
Declare Function ENgetcurve Lib "epanet2.dll" (ByVal index As Int32, ByVal id As String, nPoints As Int32, xValues As Any, yValues As Any) As Int32
|
||||
Declare Function ENsetcurve Lib "epanet2.dll" (ByVal index As Int32, xValues As Any, yValues As Any, ByVal nPoints As Int32) As Int32
|
||||
|
||||
'Simple Control Functions
|
||||
Declare Function ENaddcontrol Lib "epanet2.dll" (ByRef Cindex As Int32, ByVal Ctype As Int32, ByVal Lindex As Int32, ByVal setting As Single, ByVal Nindex As Int32, ByVal Level As Single) As Int32
|
||||
Declare Function ENdeletecontrol Lib "epanet2.dll" (ByVal Cindex as Int32) As Int32
|
||||
Declare Function ENgetcontrol Lib "epanet2.dll" (ByVal Cindex As Int32, ByRef CtlType As Int32, ByRef Lindex As Int32, ByRef Setting As Single, ByRef Nindex As Int32, ByRef Level As Single) As Int32
|
||||
Declare Function ENsetcontrol Lib "epanet2.dll" (ByVal Cindex As Int32, ByVal CtlType As Int32, ByVal Lindex As Int32, ByVal Setting As Single, ByVal Nindex As Int32, ByVal Level As Single) As Int32
|
||||
Declare Function ENaddcontrol Lib "epanet2.dll" (ByVal type_ As Int32, ByVal linkIndex As Int32, ByVal setting As Single, ByVal nodeIndex As Int32, ByVal level As Single, index As Int32) As Int32
|
||||
Declare Function ENdeletecontrol Lib "epanet2.dll" (ByVal index As Int32) As Int32
|
||||
Declare Function ENgetcontrol Lib "epanet2.dll" (ByVal index As Int32, type_ As Int32, linkIndex As Int32, setting As Single, nodeIndex As Int32, level As Single) As Int32
|
||||
Declare Function ENsetcontrol Lib "epanet2.dll" (ByVal index As Int32, ByVal type_ As Int32, ByVal linkIndex As Int32, ByVal setting As Single, ByVal nodeIndex As Int32, ByVal level As Single) As Int32
|
||||
|
||||
'Rule-Based Control Functions
|
||||
Declare Function ENaddrule Lib "epanet2.dll" (ByVal rule As String) as Int32
|
||||
'Rule-Based Control Functions
|
||||
Declare Function ENaddrule Lib "epanet2.dll" (ByVal rule As String) As Int32
|
||||
Declare Function ENdeleterule Lib "epanet2.dll" (ByVal index As Int32) As Int32
|
||||
Declare Function ENgetrule Lib "epanet2.dll" (ByVal index As Int32, ByRef nPremises As Int32, ByRef nTrueActions As Int32, ByRef nFalseActions As Int32, ByRef priority As Single) As Int32
|
||||
Declare Function ENgetruleID Lib "epanet2.dll" (ByVal indexRule As Int32, ByVal id As StringBuilder) As Int32
|
||||
Declare Function ENgetrule Lib "epanet2.dll" (ByVal index As Int32, nPremises As Int32, nThenActions As Int32, nElseActions As Int32, priority As Single) As Int32
|
||||
Declare Function ENgetruleID Lib "epanet2.dll" (ByVal index As Int32, ByVal id As String) As Int32
|
||||
Declare Function ENsetrulepriority Lib "epanet2.dll" (ByVal index As Int32, ByVal priority As Single) As Int32
|
||||
Declare Function ENgetpremise Lib "epanet2.dll" (ByVal indexRule As Int32, ByVal indexPremise As Int32, ByRef logop As Int32, ByRef object As Int32, ByRef indexObj As Int32, ByRef variable As Int32, ByRef relop As Int32, ByRef status As Int32, ByRef value As Single) As Int32
|
||||
Declare Function ENsetpremise Lib "epanet2.dll" (ByVal indexRule As Int32, ByVal indexPremise As Int32, ByVal logop As Int32, ByVal object As Int32, ByVal indexObj As Int32, ByVal variable As Int32, ByVal relop As Int32, ByVal status As Int32, ByVal value As Single) As Int32
|
||||
Declare Function ENsetpremiseindex Lib "epanet2.dll" (ByVal indexRule As Int32, ByVal indexPremise As Int32, ByVal indexObj As Int32) As Int32
|
||||
Declare Function ENsetpremisestatus Lib "epanet2.dll" (ByVal indexRule As Int32, ByVal indexPremise As Int32, ByVal status As Int32) As Int32
|
||||
Declare Function ENsetpremisevalue Lib "epanet2.dll" (ByVal indexRule As Int32, ByVal indexPremise As Int32, ByVal value As Single) As Int32
|
||||
Declare Function ENgetthenaction Lib "epanet2.dll" (ByVal indexRule As Int32, ByVal indexAction As Int32, ByRef indexLink As Int32, ByRef status As Int32, ByRef setting As Single) As Int32
|
||||
Declare Function ENsetthenaction Lib "epanet2.dll" (ByVal indexRule As Int32, ByVal indexAction As Int32, ByVal indexLink As Int32, ByVal status As Int32, ByVal setting As Single) As Int32
|
||||
Declare Function ENgetelseaction Lib "epanet2.dll" (ByVal indexRule As Int32, ByVal indexAction As Int32, ByRef indexLink As Int32, ByRef status As Int32, ByRef setting As Single) As Int32
|
||||
Declare Function ENsetelseaction Lib "epanet2.dll" (ByVal indexRule As Int32, ByVal indexAction As Int32, ByVal indexLink As Int32, ByVal status As Int32, ByVal setting As Single) As Int32
|
||||
Declare Function ENgetpremise Lib "epanet2.dll" (ByVal ruleIndex As Int32, ByVal premiseIndex As Int32, logop As Int32, object As Int32, objIndex As Int32, variable As Int32, relop As Int32, status As Int32, value As Single) As Int32
|
||||
Declare Function ENsetpremise Lib "epanet2.dll" (ByVal ruleIndex As Int32, ByVal premiseIndex As Int32, ByVal logop As Int32, ByVal object As Int32, ByVal objIndex As Int32, ByVal variable As Int32, ByVal relop As Int32, ByVal status As Int32, ByVal value As Single) As Int32
|
||||
Declare Function ENsetpremiseindex Lib "epanet2.dll" (ByVal ruleIndex As Int32, ByVal premiseIndex As Int32, ByVal objIndex As Int32) As Int32
|
||||
Declare Function ENsetpremisestatus Lib "epanet2.dll" (ByVal ruleIndex As Int32, ByVal premiseIndex As Int32, ByVal status As Int32) As Int32
|
||||
Declare Function ENsetpremisevalue Lib "epanet2.dll" (ByVal ruleIndex As Int32, ByVal premiseIndex As Int32, ByVal value As Single) As Int32
|
||||
Declare Function ENgetthenaction Lib "epanet2.dll" (ByVal ruleIndex As Int32, ByVal actionIndex As Int32, linkIndex As Int32, status As Int32, setting As Single) As Int32
|
||||
Declare Function ENsetthenaction Lib "epanet2.dll" (ByVal ruleIndex As Int32, ByVal actionIndex As Int32, ByVal linkIndex As Int32, ByVal status As Int32, ByVal setting As Single) As Int32
|
||||
Declare Function ENgetelseaction Lib "epanet2.dll" (ByVal ruleIndex As Int32, ByVal actionIndex As Int32, linkIndex As Int32, status As Int32, setting As Single) As Int32
|
||||
Declare Function ENsetelseaction Lib "epanet2.dll" (ByVal ruleIndex As Int32, ByVal actionIndex As Int32, ByVal linkIndex As Int32, ByVal status As Int32, ByVal setting As Single) As Int32
|
||||
|
||||
End Module
|
||||
|
||||
1653
include/epanet2_2.h
1653
include/epanet2_2.h
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,15 @@
|
||||
/** @file epanet2_enums.h
|
||||
*/
|
||||
/*
|
||||
******************************************************************************
|
||||
Project: OWA EPANET
|
||||
Version: 2.2
|
||||
Module: epanet2_enums.h
|
||||
Description: enums shared between API versions
|
||||
Description: enumerations of symbolic constants used by the API functions
|
||||
Authors: see AUTHORS
|
||||
Copyright: see AUTHORS
|
||||
License: see LICENSE
|
||||
Last Updated: 11/29/2018
|
||||
Last Updated: 01/14/2019
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@@ -21,111 +23,139 @@
|
||||
#define EN_MAXID 31 //!< Max. # characters in ID name
|
||||
#define EN_MAXMSG 255 //!< Max. # characters in message text
|
||||
|
||||
/// Node property codes
|
||||
/// Node properties
|
||||
/**
|
||||
These node properties can be accessed with @ref EN_getnodevalue and
|
||||
@ref EN_setnodevalue. Those marked as read only are computed values that can
|
||||
only be retrieved.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_ELEVATION = 0, //!< Elevation
|
||||
EN_BASEDEMAND = 1, //!< Junction baseline demand, from last demand category
|
||||
EN_PATTERN = 2, //!< Junction baseline demand pattern
|
||||
EN_EMITTER = 3, //!< Junction emitter coefficient
|
||||
EN_BASEDEMAND = 1, //!< Primary demand baseline value
|
||||
EN_PATTERN = 2, //!< Primary demand time pattern index
|
||||
EN_EMITTER = 3, //!< Emitter flow coefficient
|
||||
EN_INITQUAL = 4, //!< Initial quality
|
||||
EN_SOURCEQUAL = 5, //!< Quality source strength
|
||||
EN_SOURCEPAT = 6, //!< Quality source pattern
|
||||
EN_SOURCETYPE = 7, //!< Qualiy source type
|
||||
EN_TANKLEVEL = 8, //!< Tank water level
|
||||
EN_DEMAND = 9, //!< Current simulated demand
|
||||
EN_HEAD = 10, //!< Current hydraulic head
|
||||
EN_PRESSURE = 11, //!< Current pressure
|
||||
EN_QUALITY = 12, //!< Current quality
|
||||
EN_SOURCEMASS = 13, //!< Current source mass inflow
|
||||
EN_INITVOLUME = 14, //!< Tank initial volume
|
||||
EN_MIXMODEL = 15, //!< Tank mixing model
|
||||
EN_MIXZONEVOL = 16, //!< Tank mixing zone volume
|
||||
EN_SOURCEPAT = 6, //!< Quality source pattern index
|
||||
EN_SOURCETYPE = 7, //!< Quality source type (see @ref EN_SourceType)
|
||||
EN_TANKLEVEL = 8, //!< Current computed tank water level (read only)
|
||||
EN_DEMAND = 9, //!< Current computed demand (read only)
|
||||
EN_HEAD = 10, //!< Current computed hydraulic head (read only)
|
||||
EN_PRESSURE = 11, //!< Current computed pressure (read only)
|
||||
EN_QUALITY = 12, //!< Current computed quality (read only)
|
||||
EN_SOURCEMASS = 13, //!< Current computed quality source mass inflow (read only)
|
||||
EN_INITVOLUME = 14, //!< Tank initial volume (read only)
|
||||
EN_MIXMODEL = 15, //!< Tank mixing model (see @ref EN_MixingModel)
|
||||
EN_MIXZONEVOL = 16, //!< Tank mixing zone volume (read only)
|
||||
EN_TANKDIAM = 17, //!< Tank diameter
|
||||
EN_MINVOLUME = 18, //!< Tank minimum volume
|
||||
EN_VOLCURVE = 19, //!< Tank volume curve
|
||||
EN_VOLCURVE = 19, //!< Tank volume curve index
|
||||
EN_MINLEVEL = 20, //!< Tank minimum level
|
||||
EN_MAXLEVEL = 21, //!< Tank maximum level
|
||||
EN_MIXFRACTION = 22, //!< Tank mixing fraction
|
||||
EN_TANK_KBULK = 23, //!< Tank bulk decay coefficient
|
||||
EN_TANKVOLUME = 24, //!< Tank current volume
|
||||
EN_MAXVOLUME = 25 //!< Tank maximum volume
|
||||
EN_TANKVOLUME = 24, //!< Current computed tank volume (read only)
|
||||
EN_MAXVOLUME = 25 //!< Tank maximum volume (read only)
|
||||
} EN_NodeProperty;
|
||||
|
||||
/// Link property codes
|
||||
/// Link properties
|
||||
/**
|
||||
These link properties can be accessed with @ref EN_getlinkvalue and @ref EN_setlinkvalue.
|
||||
Those marked as read only are computed values that can only be retrieved.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_DIAMETER = 0, //!< Pipe/valve diameter
|
||||
EN_LENGTH = 1, //!> Pipe length
|
||||
EN_ROUGHNESS = 2, //!> Pipe roughness coefficient
|
||||
EN_MINORLOSS = 3, //!> Pipe/valve minor loss coefficient
|
||||
EN_INITSTATUS = 4, //!> Initial status (e.g., OPEN/CLOSED)
|
||||
EN_INITSETTING = 5, //!> Initial pump speed or valve setting
|
||||
EN_KBULK = 6, //!> Bulk chemical reaction coefficient
|
||||
EN_KWALL = 7, //!> Pipe wall chemical reaction coefficient
|
||||
EN_FLOW = 8, //!> Current link flow rate
|
||||
EN_VELOCITY = 9, //!> Current link flow velocity
|
||||
EN_HEADLOSS = 10, //!> Current head loss across link
|
||||
EN_STATUS = 11, //!> Current link status
|
||||
EN_SETTING = 12, //!> Current link setting
|
||||
EN_ENERGY = 13, //!> Current pump energy usage
|
||||
EN_LINKQUAL = 14, //!> Current link quality
|
||||
EN_LINKPATTERN = 15, //!> Pump speed time pattern
|
||||
EN_EFFICIENCY = 16, //!> Current pump efficiency
|
||||
EN_HEADCURVE = 17, //!> Pump head v. flow curve
|
||||
EN_EFFICIENCYCURVE = 18, //!> Pump efficiency v. flow curve
|
||||
EN_PRICEPATTERN = 19, //!> Pump energy price time pattern
|
||||
EN_STATE = 20, //!> Current pump status
|
||||
EN_CONST_POWER = 21, //!> Horsepower of constant horsepower pump
|
||||
EN_SPEED = 22 //!> Current pump speed setting
|
||||
EN_LENGTH = 1, //!< Pipe length
|
||||
EN_ROUGHNESS = 2, //!< Pipe roughness coefficient
|
||||
EN_MINORLOSS = 3, //!< Pipe/valve minor loss coefficient
|
||||
EN_INITSTATUS = 4, //!< Initial status (see @ref EN_LinkStatusType)
|
||||
EN_INITSETTING = 5, //!< Initial pump speed or valve setting
|
||||
EN_KBULK = 6, //!< Bulk chemical reaction coefficient
|
||||
EN_KWALL = 7, //!< Pipe wall chemical reaction coefficient
|
||||
EN_FLOW = 8, //!< Current computed flow rate (read only)
|
||||
EN_VELOCITY = 9, //!< Current computed flow velocity (read only)
|
||||
EN_HEADLOSS = 10, //!< Current computed head loss (read only)
|
||||
EN_STATUS = 11, //!< Current link status (see @ref EN_LinkStatusType)
|
||||
EN_SETTING = 12, //!< Current link setting
|
||||
EN_ENERGY = 13, //!< Current computed pump energy usage (read only)
|
||||
EN_LINKQUAL = 14, //!< Current computed link quality (read only)
|
||||
EN_LINKPATTERN = 15, //!< Pump speed time pattern index
|
||||
EN_PUMP_STATE = 16, //!< Current computed pump state (read only) (see @ref EN_PumpStateType)
|
||||
EN_PUMP_EFFIC = 17, //!< Current computed pump efficiency (read only)
|
||||
EN_PUMP_POWER = 18, //!< Pump constant power rating
|
||||
EN_PUMP_HCURVE = 19, //!< Pump head v. flow curve index
|
||||
EN_PUMP_ECURVE = 20, //!< Pump efficiency v. flow curve index
|
||||
EN_PUMP_ECOST = 21, //!< Pump average energy price
|
||||
EN_PUMP_EPAT = 22 //!< Pump energy price time pattern index
|
||||
} EN_LinkProperty;
|
||||
|
||||
/// Time parameter codes
|
||||
/// Time parameters
|
||||
/**
|
||||
These time parameters are accessed using @ref EN_gettimeparam and@ref EN_settimeparam.
|
||||
All times are expressed in seconds The parameters marked as read only are
|
||||
computed values that can only be retrieved.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_DURATION = 0, //!> Total simulation duration
|
||||
EN_HYDSTEP = 1, //!> Hydraulic time step
|
||||
EN_QUALSTEP = 2, //!> Water quality time step
|
||||
EN_PATTERNSTEP = 3, //!> Time pattern period
|
||||
EN_PATTERNSTART = 4, //!> Time when time patterns begin
|
||||
EN_REPORTSTEP = 5, //!> Reporting time step
|
||||
EN_REPORTSTART = 6, //!> Time when reporting starts
|
||||
EN_RULESTEP = 7, //!> Rule evaluation time step
|
||||
EN_STATISTIC = 8, //!> Reporting statistic code
|
||||
EN_PERIODS = 9, //!> Number of reporting time periods
|
||||
EN_STARTTIME = 10, //!> Simulation starting time of day
|
||||
EN_HTIME = 11, //!> Elapsed time of current hydraulic solution
|
||||
EN_QTIME = 12, //!> Elapsed time of current quality solution
|
||||
EN_HALTFLAG = 13, //!> Flag indicating if simulation halted
|
||||
EN_NEXTEVENT = 14, //!> Next time until a tank becomes empty or full
|
||||
EN_NEXTEVENTIDX = 15 //!> Index of next tank that becomes empty or full
|
||||
} EN_TimeProperty;
|
||||
EN_DURATION = 0, //!< Total simulation duration
|
||||
EN_HYDSTEP = 1, //!< Hydraulic time step
|
||||
EN_QUALSTEP = 2, //!< Water quality time step
|
||||
EN_PATTERNSTEP = 3, //!< Time pattern period
|
||||
EN_PATTERNSTART = 4, //!< Time when time patterns begin
|
||||
EN_REPORTSTEP = 5, //!< Reporting time step
|
||||
EN_REPORTSTART = 6, //!< Time when reporting starts
|
||||
EN_RULESTEP = 7, //!< Rule-based control evaluation time step
|
||||
EN_STATISTIC = 8, //!< Reporting statistic code (see @ref EN_StatisticType)
|
||||
EN_PERIODS = 9, //!< Number of reporting time periods (read only)
|
||||
EN_STARTTIME = 10, //!< Simulation starting time of day
|
||||
EN_HTIME = 11, //!< Elapsed time of current hydraulic solution (read only)
|
||||
EN_QTIME = 12, //!< Elapsed time of current quality solution (read only)
|
||||
EN_HALTFLAG = 13, //!< Flag indicating if the simulation was halted (read only)
|
||||
EN_NEXTEVENT = 14, //!< Shortest time until a tank becomes empty or full (read only)
|
||||
EN_NEXTEVENTTANK = 15 //!< Index of tank with shortest time to become empty or full (read only)
|
||||
} EN_TimeParameter;
|
||||
|
||||
/// Analysis statistic codes
|
||||
/// 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 @ref EN_getstatistic.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_ITERATIONS = 0, //!< Number of hydraulic iterations
|
||||
EN_RELATIVEERROR = 1, //!< Sum of all flow changes / total flow
|
||||
EN_ITERATIONS = 0, //!< Number of hydraulic iterations taken
|
||||
EN_RELATIVEERROR = 1, //!< Sum of link flow changes / sum of link flows
|
||||
EN_MAXHEADERROR = 2, //!< Largest head loss error for links
|
||||
EN_MAXFLOWCHANGE = 3, //!< Largest flow change in links
|
||||
EN_MASSBALANCE = 4 //!< Water quality mass balance ratio
|
||||
EN_MASSBALANCE = 4 //!< Cumulative water quality mass balance ratio
|
||||
} EN_AnalysisStatistic;
|
||||
|
||||
/// Object count codes
|
||||
/// Types of objects to count
|
||||
/**
|
||||
These options tell @ref EN_getcount which type of object to count.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_NODECOUNT = 0, //!< Number of nodes (Juntions + Tanks + Reservoirs)
|
||||
EN_TANKCOUNT = 1, //!< Number of tanks and Reservoirs
|
||||
EN_LINKCOUNT = 2, //!< Number of links (Pipes + Pumps + Valves)
|
||||
EN_NODECOUNT = 0, //!< Number of nodes (junctions + tanks + reservoirs)
|
||||
EN_TANKCOUNT = 1, //!< Number of tanks and reservoirs
|
||||
EN_LINKCOUNT = 2, //!< Number of links (pipes + pumps + valves)
|
||||
EN_PATCOUNT = 3, //!< Number of time patterns
|
||||
EN_CURVECOUNT = 4, //!< Number of curves
|
||||
EN_CURVECOUNT = 4, //!< Number of data curves
|
||||
EN_CONTROLCOUNT = 5, //!< Number of simple controls
|
||||
EN_RULECOUNT = 6 //!< Number of rule-based controls
|
||||
} EN_CountType;
|
||||
|
||||
/// Node type codes
|
||||
/// Types of nodes
|
||||
/**
|
||||
These are the different types of nodes that can be returned by calling @ref EN_getnodetype.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_JUNCTION = 0, //!< Junction node
|
||||
EN_RESERVOIR = 1, //!< Reservoir node
|
||||
EN_TANK = 2 //!< Storage tank node
|
||||
} EN_NodeType;
|
||||
|
||||
/// Link type codes
|
||||
/// Types of links
|
||||
/**
|
||||
These are the different types of links that can be returned by calling @ref EN_getlinktype.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_CVPIPE = 0, //!< Pipe with check valve
|
||||
EN_PIPE = 1, //!< Pipe
|
||||
@@ -138,7 +168,36 @@ typedef enum {
|
||||
EN_GPV = 8 //!< General purpose valve
|
||||
} EN_LinkType;
|
||||
|
||||
/// Water quality analysis types
|
||||
/// Link status
|
||||
/**
|
||||
One of these values is returned when @ref EN_getlinkvalue is used to retrieve a link's
|
||||
initial status (EN_INITSTATUS) or its current status (EN_STATUS). These options are
|
||||
also used with @ref EN_setlinkvalue to set values for these same properties.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_CLOSED = 0,
|
||||
EN_OPEN = 1
|
||||
} EN_LinkStatusType;
|
||||
|
||||
/// Pump states
|
||||
/**
|
||||
One of these codes is returned when @ref EN_getlinkvalue is used to retrieve a pump's
|
||||
current operating state (EN_PUMP_STATE). EN_PUMP_XHEAD indicates that the pump has been
|
||||
shut down because it is being asked to deliver more than its shutoff head. EN_PUMP_XFLOW
|
||||
indicates that the pump is being asked to deliver more than its maximum flow.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_PUMP_XHEAD = 0, //!< Pump closed - cannot supply head
|
||||
EN_PUMP_CLOSED = 2, //!< Pump closed
|
||||
EN_PUMP_OPEN = 3, //!< Pump open
|
||||
EN_PUMP_XFLOW = 5 //!< Pump open - cannot supply flow
|
||||
} EN_PumpStateType;
|
||||
|
||||
/// Types of water quality analyses
|
||||
/**
|
||||
These are the different types of water quality analyses that EPANET can run. They
|
||||
are used with @ref EN_getqualinfo, @ref EN_getqualtype, and @ref EN_setqualtype.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_NONE = 0, //!< No quality analysis
|
||||
EN_CHEM = 1, //!< Chemical fate and transport
|
||||
@@ -146,71 +205,124 @@ typedef enum {
|
||||
EN_TRACE = 3 //!< Source tracing analysis
|
||||
} EN_QualityType;
|
||||
|
||||
/// Water quality source types
|
||||
/// Types of water quality sources
|
||||
/**
|
||||
These are the options for EN_SOURCETYPE, the type of external water quality
|
||||
source assigned to a node. They are used in @ref EN_getnodevalue and @ref EN_setnodevalue.
|
||||
The EN_SOURCEQUAL property is used in these functions to access a source's strength
|
||||
and EN_SOURCEPATTERN to access a time pattern applied to the source.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_CONCEN = 0, //!< Concentration inflow source
|
||||
EN_MASS = 1, //!< Mass inflow source
|
||||
EN_SETPOINT = 2, //!< Concentration setpoint source
|
||||
EN_FLOWPACED = 3 //!< Concentration flow paced source
|
||||
EN_CONCEN = 0, //!< Concentration of any external inflow entering a node
|
||||
EN_MASS = 1, //!< Injects a given mass/minute into a node
|
||||
EN_SETPOINT = 2, //!< Sets the concentration leaving a node to a given value
|
||||
EN_FLOWPACED = 3 //!< Adds a given value to the concentration leaving a node
|
||||
} EN_SourceType;
|
||||
|
||||
/// Head loss formulas
|
||||
/// Head loss formula choices
|
||||
/**
|
||||
These are the choices for the EN_HEADLOSSFORM option in @ref EN_getoption and
|
||||
@ref EN_setoption. They are also used for the head loss type argument in @ref EN_init.
|
||||
Each head loss formula uses a different type of roughness coefficient (EN_ROUGHNESS)
|
||||
that can be set with @ref EN_setlinkvalue.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_HW = 0, //!< Hazen-Williams
|
||||
EN_DW = 1, //!< Darcy-Weisbach
|
||||
EN_CM = 2 //!< Chezy-Manning
|
||||
} EN_HeadLossType;
|
||||
|
||||
/// Flow units types
|
||||
/// Flow units choices
|
||||
/**
|
||||
These choices for flow units are used with @ref EN_getflowunits and @ref EN_setflowunits.
|
||||
They are also used for the flow units type argument in @ref EN_init. If flow units are
|
||||
expressed in US Customary units (EN_CFS through EN_AFD) then all other quantities are
|
||||
in US Customary units. Otherwise they are in metric units.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_CFS = 0,
|
||||
EN_GPM = 1,
|
||||
EN_MGD = 2,
|
||||
EN_IMGD = 3,
|
||||
EN_AFD = 4,
|
||||
EN_LPS = 5,
|
||||
EN_LPM = 6,
|
||||
EN_MLD = 7,
|
||||
EN_CMH = 8,
|
||||
EN_CMD = 9
|
||||
EN_CFS = 0, //!< Cubic feet per second
|
||||
EN_GPM = 1, //!< Gallons per minute
|
||||
EN_MGD = 2, //!< Million gallons per day
|
||||
EN_IMGD = 3, //!< Imperial million gallons per day
|
||||
EN_AFD = 4, //!< Acre-feet per day
|
||||
EN_LPS = 5, //!< Liters per second
|
||||
EN_LPM = 6, //!< Liters per minute
|
||||
EN_MLD = 7, //!< Million liters per day
|
||||
EN_CMH = 8, //!< Cubic meters per hour
|
||||
EN_CMD = 9 //!< Cubic meters per day
|
||||
} EN_FlowUnits;
|
||||
|
||||
/// Demand model types
|
||||
/// Types of demand models
|
||||
/**
|
||||
These choices for representing consumer demands are used with @ref EN_getdemandmodel
|
||||
and @ref EN_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.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_DDA = 0, //!< Demand driven analysis
|
||||
EN_PDA = 1 //!< Pressure driven analysis
|
||||
} EN_DemandModel;
|
||||
|
||||
/// Simulation Option codes
|
||||
/// Simulation options
|
||||
/**
|
||||
These options specify hydraulic convergence criteria, choice of head loss formula, and
|
||||
several other parameters applied on a network-wide basis. They are accessed using the
|
||||
@ref EN_getoption and @ref EN_setoption functions.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_TRIALS = 0, //!> Maximum hydraulic trials allowed
|
||||
EN_ACCURACY = 1, //!> Hydraulic convergence accuracy
|
||||
EN_TOLERANCE = 2, //!> Water quality tolerance
|
||||
EN_EMITEXPON = 3, //!> Exponent for emitter head loss formula
|
||||
EN_DEMANDMULT = 4, //!> Global demand multiplier
|
||||
EN_HEADERROR = 5, //!> Maximum allowable head loss error
|
||||
EN_FLOWCHANGE = 6, //!> Maximum allowable flow change
|
||||
EN_DEMANDDEFPAT = 7, //!> Default demand time pattern
|
||||
EN_HEADLOSSFORM = 8 //!> Head loss formula code
|
||||
EN_TRIALS = 0, //!< Maximum hydraulic trials allowed
|
||||
EN_ACCURACY = 1, //!< Maximum total relative flow change for hydraulic convergence
|
||||
EN_TOLERANCE = 2, //!< Water quality tolerance
|
||||
EN_EMITEXPON = 3, //!< Exponent in emitter discharge formula
|
||||
EN_DEMANDMULT = 4, //!< Global demand multiplier
|
||||
EN_HEADERROR = 5, //!< Maximum head loss error for hydraulic convergence
|
||||
EN_FLOWCHANGE = 6, //!< Maximum flow change for hydraulic convergence
|
||||
EN_DEFDEMANDPAT = 7, //!< Index of the default demand time pattern
|
||||
EN_HEADLOSSFORM = 8, //!< Head loss formula (see @ref EN_HeadLossType)
|
||||
EN_GLOBALEFFIC = 9, //!< Global pump efficiency (percent)
|
||||
EN_GLOBALPRICE = 10, //!< Global energy price per KWH
|
||||
EN_GLOBALPATTERN = 11, //!< Index of a global energy price pattern
|
||||
EN_DEMANDCHARGE = 12 //!< Energy charge per max. KW usage
|
||||
} EN_Option;
|
||||
|
||||
/// Simple control types
|
||||
/// Types of simple controls
|
||||
/**
|
||||
These are the different types of simple (single statement) controls that can be applied
|
||||
to network links. They are used as an argument to @ref EN_addcontrol,@ref EN_getcontrol,
|
||||
and @ref EN_setcontrol.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_LOWLEVEL = 0,
|
||||
EN_HILEVEL = 1,
|
||||
EN_TIMER = 2,
|
||||
EN_TIMEOFDAY = 3
|
||||
EN_LOWLEVEL = 0, //!< Act when pressure or tank level drops below a setpoint
|
||||
EN_HILEVEL = 1, //!< Act when pressure or tank level rises above a setpoint
|
||||
EN_TIMER = 2, //!< Act at a prescribed elapsed amount of time
|
||||
EN_TIMEOFDAY = 3 //!< Act at a particular time of day
|
||||
} EN_ControlType;
|
||||
|
||||
/// Reporting statistic types
|
||||
/// 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
|
||||
@ref EN_report. An option can be chosen by using `STATISTIC option` as the argument
|
||||
to @ref EN_setreport.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_AVERAGE = 1, //!> Report average value over simulation period
|
||||
EN_MINIMUM = 2, //!> Report minimum value over simulation period
|
||||
EN_MAXIMUM = 3, //!> Report maximum value over simulation period
|
||||
EN_RANGE = 4 //!> Report maximum - minimum over simulation period
|
||||
EN_SERIES = 0, //!< Report all time series points
|
||||
EN_AVERAGE = 1, //!< Report average value over simulation period
|
||||
EN_MINIMUM = 2, //!< Report minimum value over simulation period
|
||||
EN_MAXIMUM = 3, //!< Report maximum value over simulation period
|
||||
EN_RANGE = 4 //!< Report maximum - minimum over simulation period
|
||||
} EN_StatisticType;
|
||||
|
||||
/// 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 the EN_MIXMODEL property of a Tank node using
|
||||
@ref EN_getnodevalue and @ref EN_setnodevalue.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_MIX1 = 0, //!< Complete mix model
|
||||
EN_MIX2 = 1, //!< 2-compartment model
|
||||
@@ -219,14 +331,20 @@ typedef enum {
|
||||
} EN_MixingModel;
|
||||
|
||||
/// Hydraulic initialization options
|
||||
/**
|
||||
These options are used to initialize a new hydraulic analysis when @ref EN_initH is called.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_NOSAVE = 0, //!> Don't save hydraulics; don't re-initialize flows
|
||||
EN_SAVE = 1, //!> Save hydraulics to file, don't re-initialize flows
|
||||
EN_INITFLOW = 10, //!> Don't save hydraulics; re-initialize flows
|
||||
EN_SAVE_AND_INIT = 11 //!> Save hydraulics; re-initialize flows
|
||||
} EN_SaveOption;
|
||||
EN_NOSAVE = 0, //!< Don't save hydraulics; don't re-initialize flows
|
||||
EN_SAVE = 1, //!< Save hydraulics to file, don't re-initialize flows
|
||||
EN_INITFLOW = 10, //!< Don't save hydraulics; re-initialize flows
|
||||
EN_SAVE_AND_INIT = 11 //!< Save hydraulics; re-initialize flows
|
||||
} EN_InitHydOption;
|
||||
|
||||
/// Pump curve types
|
||||
/// Types of pump curves
|
||||
/**
|
||||
@ref EN_getpumptype returns one of these values when it is called.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_CONST_HP = 0, //!< Constant horsepower
|
||||
EN_POWER_FUNC = 1, //!< Power function
|
||||
@@ -234,72 +352,85 @@ typedef enum {
|
||||
EN_NOCURVE = 3 //!< No curve
|
||||
} EN_PumpType;
|
||||
|
||||
/// Data curve types
|
||||
/// Types of data curves
|
||||
/**
|
||||
These are the different types of physical relationships that a data curve could
|
||||
represent as returned by calling @ref EN_getcurvetype.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_V_CURVE = 0, //!< Tank volume curve
|
||||
EN_P_CURVE = 1, //!< Pump characteristic curve
|
||||
EN_E_CURVE = 2, //!< Pump efficiency curve
|
||||
EN_H_CURVE = 3, //!< Valve head loss curve
|
||||
EN_G_CURVE = 4 //!< General\default curve
|
||||
EN_VOLUME_CURVE = 0, //!< Tank volume v. depth curve
|
||||
EN_PUMP_CURVE = 1, //!< Pump head v. flow curve
|
||||
EN_EFFIC_CURVE = 2, //!< Pump efficiency v. flow curve
|
||||
EN_HLOSS_CURVE = 3, //!< Valve head loss v. flow curve
|
||||
EN_GENERIC_CURVE = 4 //!< Generic curve
|
||||
} EN_CurveType;
|
||||
|
||||
/// Deletion action types
|
||||
/// Deletion action codes
|
||||
/**
|
||||
These codes are used in @ref EN_deletenode and @ref EN_deletelink to indicate what action
|
||||
should be taken if the node or link being deleted appears in any simple or rule-based
|
||||
controls.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_UNCONDITIONAL = 0, //!> Delete all controls that contain object
|
||||
EN_CONDITIONAL = 1 //!> Cancel object deletion if contained in controls
|
||||
EN_UNCONDITIONAL = 0, //!< Delete all controls that contain object
|
||||
EN_CONDITIONAL = 1 //!< Cancel object deletion if contained in controls
|
||||
} EN_ActionCodeType;
|
||||
|
||||
/// Rule object codes
|
||||
/// 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 @ref EN_setstatusreport function.
|
||||
*/
|
||||
typedef enum {
|
||||
EN_R_NODE = 6,
|
||||
EN_R_LINK = 7,
|
||||
EN_R_SYSTEM = 8
|
||||
EN_NO_REPORT = 0, //!< No status reporting
|
||||
EN_NORMAL_REPORT = 1, //!< Normal level of status reporting
|
||||
EN_FULL_REPORT = 2 //!< Full level of status reporting
|
||||
} EN_StatusReport;
|
||||
|
||||
/// Network objects used in rule-based controls
|
||||
typedef enum {
|
||||
EN_R_NODE = 6, //!< Clause refers to a node
|
||||
EN_R_LINK = 7, //!< Clause refers to a link
|
||||
EN_R_SYSTEM = 8 //!< Clause refers to a system parameter (e.g., time)
|
||||
} EN_RuleObject;
|
||||
|
||||
/// Rule variable codes
|
||||
/// Object variables used in rule-based controls
|
||||
typedef enum {
|
||||
EN_R_DEMAND = 0,
|
||||
EN_R_HEAD = 1,
|
||||
EN_R_GRADE = 2,
|
||||
EN_R_LEVEL = 3,
|
||||
EN_R_PRESSURE = 4,
|
||||
EN_R_FLOW = 5,
|
||||
EN_R_STATUS = 6,
|
||||
EN_R_SETTING = 7,
|
||||
EN_R_POWER = 8,
|
||||
EN_R_TIME = 9,
|
||||
EN_R_CLOCKTIME = 10,
|
||||
EN_R_FILLTIME = 11,
|
||||
EN_R_DRAINTIME = 12
|
||||
EN_R_DEMAND = 0, //!< Nodal demand
|
||||
EN_R_HEAD = 1, //!< Nodal hydraulic head
|
||||
EN_R_GRADE = 2, //!< Nodal hydraulic grade
|
||||
EN_R_LEVEL = 3, //!< Tank water level
|
||||
EN_R_PRESSURE = 4, //!< Nodal pressure
|
||||
EN_R_FLOW = 5, //!< Link flow rate
|
||||
EN_R_STATUS = 6, //!< Link status
|
||||
EN_R_SETTING = 7, //!< Link setting
|
||||
EN_R_POWER = 8, //!< Pump power output
|
||||
EN_R_TIME = 9, //!< Elapsed simulation time
|
||||
EN_R_CLOCKTIME = 10, //!< Time of day
|
||||
EN_R_FILLTIME = 11, //!< Time to fill a tank
|
||||
EN_R_DRAINTIME = 12 //!< Time to drain a tank
|
||||
} EN_RuleVariable;
|
||||
|
||||
/// Rule operator types
|
||||
/// Comparison operators used in rule-based controls
|
||||
typedef enum {
|
||||
EN_R_EQ = 0,
|
||||
EN_R_NE = 1,
|
||||
EN_R_LE = 2,
|
||||
EN_R_GE = 3,
|
||||
EN_R_LT = 4,
|
||||
EN_R_GT = 5,
|
||||
EN_R_IS = 6,
|
||||
EN_R_NOT = 7,
|
||||
EN_R_BELOW = 8,
|
||||
EN_R_ABOVE = 9
|
||||
EN_R_EQ = 0, //!< Equal to
|
||||
EN_R_NE = 1, //!< Not equal
|
||||
EN_R_LE = 2, //!< Less than or equal to
|
||||
EN_R_GE = 3, //!< Greater than or equal to
|
||||
EN_R_LT = 4, //!< Less than
|
||||
EN_R_GT = 5, //!< Greater than
|
||||
EN_R_IS = 6, //!< Is equal to
|
||||
EN_R_NOT = 7, //!< Is not equal to
|
||||
EN_R_BELOW = 8, //!< Is below
|
||||
EN_R_ABOVE = 9 //!< Is above
|
||||
} EN_RuleOperator;
|
||||
|
||||
/// Rule status types
|
||||
/// Link status codes used in rule-based controls
|
||||
typedef enum {
|
||||
EN_R_IS_OPEN = 1,
|
||||
EN_R_IS_CLOSED = 2,
|
||||
EN_R_IS_ACTIVE = 3
|
||||
EN_R_IS_OPEN = 1, //!< Link is open
|
||||
EN_R_IS_CLOSED = 2, //!< Link is closed
|
||||
EN_R_IS_ACTIVE = 3 //!< Control valve is active
|
||||
} EN_RuleStatus;
|
||||
|
||||
/// Status report types
|
||||
typedef enum {
|
||||
EN_NO_REPORT = 0,
|
||||
EN_NORMAL_REPORT = 1,
|
||||
EN_FULL_REPORT = 2
|
||||
} EN_StatusReport;
|
||||
|
||||
|
||||
#endif //EPANET2_ENUMS_H
|
||||
|
||||
Reference in New Issue
Block a user