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
|
|
|
|
|
|
}
|
|
|
|
|
}
|