using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.Calculation.DispatchAna.Model { /// /// 机泵基本信息 /// public class MachineDetail { /// /// /// public long PumpID { get; set; } /// /// /// public long MachineID { get; set; } /// /// /// public string MachineName { get; set; } /// /// 泵型号 /// public string PumpCode { get; set; }// /// /// /// public bool IsFrequency { get; set; } /// /// /// public double Ratedn { get; set; } /// /// 最大 /// public IStation.Model.CurveExpress MaxCurveInfoQH;// /// /// 最大 /// public IStation.Model.CurveExpress MaxCurveInfoQP;// /// /// /// /// /// public MachineDetail(IStation.Model.Product engine, IStation.Model.Product pump) { this.MachineID = engine.ID; this.PumpID = pump.ID; this.MachineName = engine.Name; this.PumpCode = pump.Code; if (string.IsNullOrEmpty(this.PumpCode)) this.PumpCode = pump.ID + "|" + engine.ID;//保证为空时 不会影响同型号判断 this.IsFrequency = pump.RatedParas.IsFrequency; this.Ratedn = pump.RatedParas.N; } /// /// /// /// /// /// public MachineDetail(IStation.Model.Product engine, IStation.Model.Product pump, IStation.Model.PumpCurve pump_curve) : this(engine, pump) { this.MachineID = engine.ID; this.PumpID = pump.ID; this.MachineName = engine.Name; this.PumpCode = pump.Code; if (string.IsNullOrEmpty(this.PumpCode)) this.PumpCode = pump.ID + "|" + engine.ID;//保证为空时 不会影响同型号判断 this.IsFrequency = pump.RatedParas.IsFrequency; this.Ratedn = pump.RatedParas.N; if (pump_curve != null && pump_curve.CurveInfo != null) { this.MaxCurveInfoQH = pump_curve.CurveInfo.CurveQH; this.MaxCurveInfoQP = pump_curve.CurveInfo.CurveQP; } } /// /// /// /// /// public double CalcSpeedByFrequence(double Frq) { if (!IsFrequency) return Ratedn; return Math.Round(Ratedn * Frq / 50.0, 1); } } }