using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
//using System.Threading.Tasks;
namespace Yw.WinFrmUI.Q3d
{
public class EpanetEnum
{
public enum NodeValueType
{
标高 = 0, // { Mode parameters }
基本需水量 = 1,
需水量模式 = 2,
扩散器系数 = 3,
初始物质浓度 = 4,
输入物质浓度 = 5,
浓度模式 = 6,
水源类型 = 7,
水池水位 = 8,
需水量 = 9,
绝对压力 = 10,
自由压力 = 11,
物质浓度 = 12,
物质扩散浓度 = 13,
初始容积 = 14,
多物质混合模型 = 15,
多物质混合容积 = 16,
}
public enum LinkValueType
{
管径 = 0, // { Link parameters }
管长 = 1,
海森威廉系数 = 2,
局部水头损失 = 3,
初始状态 = 4,
初始设置 = 5,
水体反应系数 = 6,
管壁反应系数 = 7,
流量 = 8,
流速 = 9,
水损 = 10,
状态 = 11,
设置 = 12,
功率 = 13,
}
public enum TimeParameter
{
/// 0 - Simulation duration
Duration = 0,
/// 1 - Hydraulic time step
HydStep = 1,
/// 2 - Water quality time step
QualStep = 2,
/// 3 - Time pattern time step
PatternStep = 3,
/// 4 - Time pattern start time
PatternStart = 4,
/// 5 - Reporting time step
ReportStep = 5,
/// 6 - Report starting time
ReportStart = 6,
/// 7 - Time step for evaluating rule-based controls
RuleStep = 7,
/// 8 - Type of time series post-processing to use (see )
Statistic = 8,
/// 9 - Periods
Periods = 9
}
/// Component counts.
///
/// The number of junctions in a network equals the number of
/// nodes minus the number of tanks and reservoirs.
///
///
/// There is no facility within the Toolkit to add to or delete
/// from the components described in the Input file.
///
public enum CountType
{
/// 0 - Nodes
Node = 0,
/// 1 - Reservoirs and tank nodes
Tank = 1,
/// 2 - Links
Link = 2,
/// 3 - Time patterns
Pattern = 3,
/// 4 - Curves
Curve = 4,
/// 5 - Simple controls
Control = 5
}
/// Node types
public enum NodeType
{
/// 0 - Junction node
Junction = 0,
/// 1 - Reservoir node
Reservoir = 1,
/// 2 - Tank node
Tank = 2
}
/// Link types
public enum LinkType
{
/// 0 - pipe with check valve
CVPipe = 0,
/// 1 - regular pipe
Pipe = 1,
/// 2 - pump
Pump = 2,
/// 3 - pressure reducing valve
PRV = 3,
/// 4 - pressure sustaining valve
PSV = 4,
/// 5 - pressure breaker valve
PBV = 5,
/// 6 - flow control valve
FCV = 6,
/// 7 - throttle control valve
TCV = 7,
/// 8 - general purpose valve
GPV = 8
}
/// Water quality analysis codes
public enum QualType
{
/// 0 - no quality analysis
None = 0,
/// 1 - analyze a chemical
Chem = 1,
/// 2 - analyze water age
Age = 2,
/// 3 - trace % of flow from a source
Trace = 3
}
/// Type of source quality input.
/// See [SOURCES] for a description of these source types.
///
/// Used in functions and
/// with
/// parameter.
///
public enum SourceType
{
/// 0 - inflow concentration
Concen = 0,
/// 1 - mass inflow booster
Mass = 1,
/// 2 - setpoint booster
SetPoint = 2,
/// 3 - flow paced booster
FlowPaced = 3
}
/// Flow units codes
///
/// Flow units are specified in the [OPTIONS] section of the EPANET Input file.
///
///
/// Flow units in liters or cubic meters implies that metric
/// units are used for all other quantities in addition to flow.
/// Otherwise US units are employed. (See Units of Measurement).
///
public enum FlowUnitsType
{
/// 0 - cubic feet per second
Cfs = 0,
/// 1 - gallons per minute
Gpm = 1,
/// 2 - million gallons per day
Mgd = 2,
/// 3 - imperial million gal. per day
Imgd = 3,
/// 4 - acre-feet per day
Afd = 4,
/// 5 - liters per second
Lps = 5,
/// 6 - liters per minute
Lpm = 6,
/// 7 - megaliters per day
Mld = 7,
/// 8 - cubic meters per hour
Cmh = 8,
/// 9 - cubic meters per day
Cmd = 9
}
/// Misc. options.
public enum MiscOption
{
/// 0 - Trials
MaxTrials = 0,
/// 1 - Accuracy
Accuracy = 1,
/// 2 - Tolerance
Tolerance = 2,
/// 3 - Emitter exponent
EmitExpon = 3,
/// 4 - Demandmult
DemandMult = 4
}
/// Control types.
///
/// For pipes, a setting of 0 means the pipe is closed
/// and 1 means it is open. For a pump, the setting contains
/// the pump's speed, with 0 meaning the pump is closed and 1
/// meaning it is open at its normal speed. For a valve, the
/// setting refers to the valve's pressure, flow, or loss
/// coefficient value, depending on valve type.
///
/// For Timer or Time-of-Day controls the nindex parameter equals 0.
///
/// See for an example of
/// using this function.
///
public enum ControlType
{
/// 0 - Low Level Control.
/// Applies when tank level or node pressure drops below specified level.
LowLevel = 0,
/// 1 - High Level Control.
/// Applies when tank level or node pressure rises above specified level.
HiLevel = 1,
/// 2 - Timer Control.
/// Applies at specific time into simulation.
Timer = 2,
/// 3 - Time-of-Day Control.
/// Applies at specific time of day.
TimeOfDay = 3
}
/// Time series statistics types.
///
/// Used as value in and
/// functions
/// with code.
///
public enum TstatType
{
/// 0 - none
None = 0,
/// 1 - time-averages
Average = 1,
/// 2 - minimum values
Minimum = 2,
/// 3 - maximum values
Maximum = 3,
/// 4 - max - min values
Range = 4
}
///
/// Tank mixing models.
/// The codes for the various tank mixing model choices are as follows:
///
public enum MixType
{
/// 0 - Single compartment, complete mix model
Mix1 = 0,
/// 1 - Two-compartment, complete mix model
Mix2 = 1,
/// 2 - Plug flow, first in, first out model
Fifo = 2,
/// 3 - Stacked plug flow, last in, first out model
Lifo = 3
}
/// Re-initialize flow flags
///
/// 2-digit flag where 1st (left) digit indicates if link flows should be re-initialized (1) or
/// not (0) and 2nd digit indicates if hydraulic results should be saved to file (1) or not (0)
///
[System.Flags]
public enum SaveOptions
{
/// None
None = 0,
/// Save-results-to-file flag
SaveToFile = 1,
/// Re-initialize flow flag
InitFlow = 10,
}
/// StatusLevel
public enum StatusLevel
{
/// None
None = 0,
/// Normal
Normal = 1,
/// Full
Full = 2
}
/// Result for link properties Initstatus and Status. (0 = closed, 1 = open)
public enum LinkStatus
{
Closed = 0,
Open = 1
}
/// Epanet error codes
public enum ErrorCode
{
/// No error
Ok = 0,
/// WARNING: System hydraulically unbalanced.
Warn1 = 1,
/// WARNING: System may be hydraulically unstable.
Warn2 = 2,
/// WARNING: System disconnected.
Warn3 = 3,
/// WARNING: Pumps cannot deliver enough flow or head.
Warn4 = 4,
/// WARNING: Valves cannot deliver enough flow.
Warn5 = 5,
/// WARNING: System has negative pressures.
Warn6 = 6,
/// System Error 101: insufficient memory available.
Err101 = 101,
/// System Error 102: no network data available.
Err102 = 102,
/// System Error 103: hydraulics not initialized.
Err103 = 103,
/// System Error 104: no hydraulics for water quality analysis.
Err104 = 104,
/// System Error 105: water quality not initialized.
Err105 = 105,
/// System Error 106: no results saved to report on.
Err106 = 106,
/// System Error 107: hydraulics supplied from external file.
Err107 = 107,
/// System Error 108: cannot use external file while hydraulics solver is active.
Err108 = 108,
/// System Error 109: cannot change time parameter when solver is active.
Err109 = 109,
/// System Error 110: cannot solve network hydraulic equations.
Err110 = 110,
/// System Error 120: cannot solve water quality transport equations.
Err120 = 120,
/// Input Error 200: one or more errors in input file.
Err200 = 200,
/// Input Error 201: syntax error in following line of [%s] section:
Err201 = 201,
/// Input Error 202: %s %s contains illegal numeric value.
Err202 = 202,
/// Input Error 203: %s %s refers to undefined node.
Err203 = 203,
/// Input Error 204: %s %s refers to undefined link.
Err204 = 204,
/// Input Error 205: %s %s refers to undefined time pattern.
Err205 = 205,
/// Input Error 206: %s %s refers to undefined curve.
Err206 = 206,
/// Input Error 207: %s %s attempts to control a CV.
Err207 = 207,
/// Input Error 208: %s specified for undefined Node %s.
Err208 = 208,
/// Input Error 209: illegal %s value for Node %s.
Err209 = 209,
/// Input Error 210: %s specified for undefined Link %s.
Err210 = 210,
/// Input Error 211: illegal %s value for Link %s.
Err211 = 211,
/// Input Error 212: trace node %.0s %s is undefined.
Err212 = 212,
/// Input Error 213: illegal option value in [%s] section:
Err213 = 213,
/// Input Error 214: following line of [%s] section contains too many characters:
Err214 = 214,
/// Input Error 215: %s %s is a duplicate ID.
Err215 = 215,
/// Input Error 216: %s data specified for undefined Pump %s.
Err216 = 216,
/// Input Error 217: invalid %s data for Pump %s.
Err217 = 217,
/// Input Error 219: %s %s illegally connected to a tank.
Err219 = 219,
/// Input Error 220: %s %s illegally connected to another valve.
Err220 = 220,
/*** Updated on 10/25/00 ***/
/// Input Error 222: %s %s has same start and end nodes.
Err222 = 222,
/// Input Error 223: not enough nodes in network
Err223 = 223,
/// Input Error 224: no tanks or reservoirs in network.
Err224 = 224,
/// Input Error 225: invalid lower/upper levels for Tank %s.
Err225 = 225,
/// Input Error 226: no head curve supplied for Pump %s.
Err226 = 226,
/// Input Error 227: invalid head curve for Pump %s.
Err227 = 227,
/// Input Error 230: Curve %s has nonincreasing x-values.
Err230 = 230,
/// Input Error 233: Node %s is unconnected.
Err233 = 233,
/// Input Error 240: %s %s refers to undefined source.
Err240 = 240,
/// Input Error 241: %s %s refers to undefined control.
Err241 = 241,
/// Input Error 250: function call contains invalid format.
Err250 = 250,
/// Input Error 251: function call contains invalid parameter code.
Err251 = 251,
/// File Error 301: identical file names.
Err301 = 301,
/// File Error 302: cannot open input file.
Err302 = 302,
/// File Error 303: cannot open report file.
Err303 = 303,
/// File Error 304: cannot open binary output file.
Err304 = 304,
/// File Error 305: cannot open hydraulics file.
Err305 = 305,
/// File Error 306: hydraulics file does not match network data.
Err306 = 306,
/// File Error 307: cannot read hydraulics file.
Err307 = 307,
/// File Error 308: cannot save results to file.
Err308 = 308,
/// File Error 309: cannot save results to report file.
Err309 = 309,
}
}
}