#ifdef _WIN32 /*----------begin sh3h------- 输入数据结构 ---------------------------------------------- */ #include struct SInNode { DWORD ID; // 节点编号 int Index; int Delete; // 删除标志 float Elev; // 节点标高 /* 水质输入参数 */ float QualAge; // 初始水龄 float QualChroma; // 初始浓度 int IsSource; // 是否为水源点(只有基本节点有该字段,其他节点为0) // 0:不是水源点;1:水源点 int SourceType; // 水源类型(只有基本节点有该字段,其他节点为0) // 0:浓度恒定,1:质量恒定,2:流量调整',3:中途加药 int IsTrace; // 是否为追踪源(转输节点无该属性) // 0:不是追踪源;1:追踪源 float JetCoefficient; // 射流系数 }; struct SInTank { DWORD ID; // 水池编号 int Index; int Delete; // 删除标志 float Elev; // 水池标高 float InitLevel; // 水池初始水位 float MinLevel; // 水池最小水位 float MaxLevel; // 水池最大水位 float Diam; // 水池直径 float MinVol; // 水池最小保留容积 DWORD VolCurve; // 水池容积曲线编号 DWORD IsUseCurve; // 是否使用水池容积曲线(0:不使用;1:使用) /* 水质输入参数 */ float QualAge; // 初始水龄 float QualChroma; // 初始浓度 int MixingType; // 混合模式(0:完全混合,1:两相混合,2:先进先出,3:后进后出) float MixingRate; // 混合比例 float BulkCoef; // 水体反应系数 int IsSource; // 是否为水源点 int SourceType; // 水源类型 int IsTrace; // 是否为追踪源(0:不是追踪源;1:追踪源) }; struct SInReser { DWORD ID; // 水库编号 int Index; int Delete; // 删除标志 float Elev; // 水库标高 float Head; // 水库静态水位 /* 水质输入参数 */ float QualAge; // 初始水龄 float QualChroma; // 初始浓度 int IsSource; // 是否为水源点(0:不是水源点;1:水源点) int SourceType; // 水源类型(0:浓度恒定,1:质量恒定,2:流量调整',3:中途加药) int IsTrace; // 是否为追踪源(0:不是追踪源;1:追踪源) }; struct SInValve { DWORD ID; // 阀门编号 int Index; DWORD Delete; // 删除标志 DWORD Node1; // 阀门起始节点编号 DWORD Node2; // 阀门终止节点编号 float Diam; // 阀门口径 union { float Setting; // 阀门控制值 long CurveId; // 普通控制阀和节流控制阀的特征曲线编号 }; float Minorloss; // 阀门局部阻力系数 DWORD Dirction; // 阀门方向 DWORD Status; // 阀门初始状态 }; struct SInPump { DWORD ID; // 水泵编号 int Index; int Delete; // 删除标志 DWORD Node1; // 水泵起始节点编号 DWORD Node2; // 水泵终止节点编号 DWORD QHPrefix; // 65568 DWORD HeadCurve; // 流量扬程特性曲线编号 //DWORD PowerCurve; // 流量功率特性曲线编号 //DWORD EfficCurve; // 流量效率特性曲线编号 DWORD Dirction; // 水泵方向 DWORD Status; // 水泵初始状态 float Rotate; // 水泵额定转速 }; struct SInPipe { DWORD ID; // 管线编号 int Index; int Delete; // 删除标志 DWORD Node1; // 管线起始节点编号 DWORD Node2; // 管线终止节点编号 float Length; // 管线长度 float Diam; // 管线口径 float Roughness; // 管线局部阻力系数 float Minorloss; // 管线沿程阻力系数 float Status; // 管线状态 /* 水质输入参数 */ float BulkCoef; // 水体反应系数 float WallCoef; // 管壁反应系数 }; struct SObjPat { long ObjectID; // 对象编号 long PatternID; // 模式编号 float BaseValue; // 模式对应的基本值 }; struct SObjPatHead { long ObjectId; SObjPat* pValues; DWORD count; }; struct SCurveValue { //DWORD CurveID; // 曲线编号 DWORD EmptyValue; // (此字段为空) float ValueX; // 曲线X值 float ValueY; // 曲线Y值 }; struct SCurveHead { long ObjectID; DWORD ValueType; SCurveValue* pValues; DWORD count; }; struct SLayout { int LayoutID; // 层号 DWORD StartIndex; // 当前层第一个时间段的数据开始索引 int FieldCount; // 当前层字段数量 int StartID; // 当前层开始编号 DWORD DataCount; // 当前层对象个数 }; struct VFloat // 用于将字符串转换为Float的结构 { BYTE cFlag; float fValue; }; /* ---------------------------------------------- 输出数据结构 ---------------------------------------------- */ struct SOutNode { DWORD ID; // 节点编号 float Pressure; // 节点自由水压 float Head; // 节点绝对水压 float CurDemand; // 节点当前流量 /* 水质输出参数 */ float QualAge; // 动态水龄 float QualChroma; // 输出浓度 float TraceRate; // 追踪物比例 }; struct SOutReser { DWORD ID; // 水库编号 float Pressure; // 水库自由水压 float Head; // 水库绝对水压 float IODemand; // 水库进出水量 /* 水质输出参数 */ float QualAge; // 动态水龄 float QualChroma; // 输出浓度 float TraceRate; // 追踪物比例 }; struct SOutTank { DWORD ID; // 水池编号 float Head; // 水池绝对水压 float Pressure; // 水池自由水压 float Level; // 当前水位 float Demand; // 水池总水量 float IODemand; // 水池进出水量 /* 水质输出参数 */ float QualAge; // 动态水龄 float QualChroma; // 输出浓度 float TraceRate; // 追踪物比例 }; struct SOutValve { DWORD ID; // 阀门编号 float Status; // 阀门当前状态 float FlowRate; // 阀门当前流量 float Headloss; // 阀门局部水头损失 }; struct SOutPump { DWORD ID; // 水泵编号 float Status; // 水泵当前状态 float Speed; // 水泵运行转速 float Crossflow; // 水泵通过流量 float AdvHead; // 水泵提升水头 float Power; // 水泵能耗 }; struct SOutPipe { DWORD ID; // 管线编号 float Status; // 管线当前状态 float FlowRate; // 管线流量 float Velocity; // 管线流速 float Headloss; // 管线局部水头损失 float Roughness; // 管线沿程水头损失 float Grade; // 管线坡度 float PressureDiff; // 管线两个节点的(绝对)压力差 }; struct Floatlist /* Element of list of floats */ { float value; struct Floatlist* next; }; typedef struct Floatlist SFloatlist; struct Tmplist /* Element of temp list for Pattern & Curve data */ { int i; char ID[MAXID + 1]; SFloatlist* x; SFloatlist* y; struct Tmplist* next; }; typedef struct Tmplist STmplist; #endif