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[] { 827, 833, 839, 845, 851 };// 流量计
|
var monitor_id_run_status_array = new long[] { 824, 830, 836, 842, 848 };//运行状态
|
var monitor_id_inlet_press_array = new long[] { 823, 823, 823, 823, 823 };//进口压力计(全是液位)
|
var monitor_id_outlet_press_array = new long[] { 825, 831, 837, 843, 849 };//出口压力
|
var monitor_id_motor_power_array = new long[] { 828, 834, 840, 846, 852 };//瞬间功率
|
var monitor_id_motor_frequence_array = new long[] { 0, 0, 0, 0, 0 };//频率(都没有监控值)
|
var monitor_id_motor_zhuansu_array = new long[] { 0, 0, 0, 0, 0 };//转速
|
|
bool is液位代替进口压力 = true;
|
|
//初始化机泵
|
this._machineCount = 5;
|
var machine_id_array = new long[] { 244, 247, 250, 253, 256 };//变频泵
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|