using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.Calculation.DispatchAna { /// /// 泰和泵站调度方案计算器 /// public class CalculatorBase_SHYS_泰和泵站 : CalculatorOptAnaBase { /// /// 没有5号泵: 1234 67 /// static protected List machine_ids = new List() { 304,307,310,313,0,316,319 }; /// /// 进口管路压力 /// public static long _montiro_id_inlet_press = 988; /// /// 出水管管路1的压力 /// public static long _monitor_id_pipe_press1 = 989; /// /// 出水管管路1的流量 /// public static long _monitor_id_pipe_flow1 = 990; /// /// 出水管管路2的压力 /// public static long _monitor_id_pipe_press2 = 992; /// /// 出水管管路2的流量 /// public static long _monitor_id_pipe_flow2 = 993; /// /// 4和6之间阀门状态, 没有获取到 /// public static long _monitor_id_中间阀门状态_46 = 0; /// /// 6和7之间阀门状态, 没有获取到 /// public static long _monitor_id_中间阀门状态_67 = 0; /// /// /// public CalculatorBase_SHYS_泰和泵站() { _corpID = 4; _stationID = 17; } /// /// 根据流量判断阀门开关状态 /// /// /// /// /// protected void GetValveStatusByFlow( double pipe1_flow, double pipe2_flow, out bool isOpenMiddleValve46,out bool isOpenMiddleValve67) { isOpenMiddleValve46 = false; isOpenMiddleValve67 = true; if (pipe2_flow > 18000) { isOpenMiddleValve46 = true; isOpenMiddleValve67 = true; } else if (pipe2_flow > 9000) { isOpenMiddleValve46 = false; isOpenMiddleValve67 = true; } else { isOpenMiddleValve46 = true; isOpenMiddleValve67 = false; } } /// /// 根据阀门状态获取每个管路对于的机泵列表 /// /// /// /// /// protected void GetPipeMachineList( bool isOpenMiddleValve46, bool isOpenMiddleValve67, out List pipe1_machineIds, out List pipe2_machineIds) { if (isOpenMiddleValve46 && !isOpenMiddleValve67) {//7 并联 12346并联 pipe1_machineIds = new List() { machine_ids[0], machine_ids[1], machine_ids[2], machine_ids[3], machine_ids[5] }; pipe2_machineIds = new List() { machine_ids[6] }; } else if (!isOpenMiddleValve46 && isOpenMiddleValve67) {//67 并联 1234并联 pipe1_machineIds = new List() { machine_ids[0], machine_ids[1], machine_ids[2], machine_ids[3] }; pipe2_machineIds = new List() { machine_ids[5], machine_ids[6] }; } else if (!isOpenMiddleValve46 && !isOpenMiddleValve67) {//7 并联 1234并联 pipe1_machineIds = new List() { machine_ids[0], machine_ids[1], machine_ids[2], machine_ids[3] }; pipe2_machineIds = new List() { machine_ids[6] }; } else { pipe1_machineIds = new List() { machine_ids[0], machine_ids[1], machine_ids[2], machine_ids[3], machine_ids[5] }; pipe2_machineIds = new List() { machine_ids[6] }; } } } }