ningshuxia
2022-12-12 e81ca048ef4e9345e904b74ffffd3e8413d18a7e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
using IStation.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.EtaCalculation.SHYS.Station
{
    /// <summary>
    /// 所有泵,都是变频泵, 且都有独立的流量计 , 有 出口压力计, 有开机状态测点 ,有 独立 进口压力 
    /// </summary>
    public class EtaAnalyCalculator4南汇北泵站 : EtaAnalyCalculator泵站4都是独立流量计_有运行状态, IEtaStationAnalyCalculator
    {
        /// <summary>
        ///     
        /// </summary>
        /// <param name="context"></param>
        /// <param name="error_info"></param>
        /// <returns></returns>
        public override bool Calculate(EtaStationAnalyContextItem context, out string error_info)
        {
            if (context == null)
            {
                error_info = "上下文参数为空";
                return false ;
            }
            this._threshold_flow = 50;//如果此泵开了,  防止零点飘流, 判断流量计值是否正常 
            this._stationID = context.ID;
 
            //初始化机泵
            if (!InitialPumpList(context, out error_info))
            {
                return false ;
            }
 
            //核心分析
            return base.CalculateCore(context, out error_info);
        }
 
 
 
        #region  初始化机泵
        /// <summary>
        /// 
        /// </summary>
        /// <param name="context"></param>
        /// <param name="error_info"></param>
        /// <returns></returns>
        protected override bool InitialPumpList(Model.EtaStationAnalyContextItem context, out string error_info)
        {
            var monitor_id_pump_flow_array = new long[] { 749, 758, 767, 776, 785 };// 流量计
            var monitor_id_run_status_array = new long[] { 745, 754, 763, 772, 781 };//运行状态 
            var monitor_id_inlet_press_array = new long[] { 746, 755, 764, 773, 782 };//进口压力计
            var monitor_id_outlet_press_array = new long[] { 747, 756, 765, 774, 783 };//出口压力
            var monitor_id_motor_power_array = new long[] { 752, 761, 770, 779, 788 };//瞬间功率
            var monitor_id_motor_frequence_array = new long[] { 750, 759, 768, 777, 786 };//频率
            var monitor_id_motor_zhuansu_array = new long[] { 0, 0, 0, 0, 0 };//转速
            var is液位代替进口压力 = false;
 
            //初始化机泵
            this._machineCount = 5;
            var machine_id_array = new long[] { 169, 172, 175, 178, 181 };
 
            this._allMachineList = InitialPumpMachineList(
                context,
                machine_id_array,//机泵ID 
                monitor_id_run_status_array,//运行状态 
                monitor_id_pump_flow_array,// 流量计
                is液位代替进口压力,
                monitor_id_inlet_press_array,//进口压力计
                monitor_id_outlet_press_array,//出口压力
                monitor_id_motor_power_array,//瞬间功率
                monitor_id_motor_frequence_array,//频率
                monitor_id_motor_zhuansu_array,//转速 
                       null,//电流
                out error_info);
            if (_allMachineList == null)
            {
                IStation.LogHelper.Error(error_info);
                return false ;
            }
 
 
            error_info = null;
            return true;
        }
        #endregion
 
 
 
 
 
    }
 
 
 
 
}