namespace IStation.Algorithm
{
///
/// 调度分析辅助类 Model
///
public partial class AnalysisHelper
{
///
/// 分析泵
///
public class AnaPump
{
///
///
///
public AnaPump() { }
///
///
///
///
public AnaPump(Model.Pump rhs)
{
this.Flag = rhs.Flag;
this.Name = rhs.Name;
this.Code = rhs.Code;
this.IsBp = rhs.IsBp;
this.Qr = rhs.Qr;
this.Hr = rhs.Hr;
this.Nr = rhs.Nr;
this.Pr = rhs.Pr;
this.Er = rhs.Er;
if (rhs.CurveQH != null && rhs.CurveQP != null)
{
this.CurveQH = rhs.CurveQH.Clone();
this.CurveQP = rhs.CurveQP.Clone();
this.AllowCalc = true;
}
this.CalcFrequencyItems(50, 50, 50, 0.1);
}
///
///
///
///
///
///
///
///
public AnaPump(Model.Pump rhs, double freDef, double freMin, double freMax, double freSpace) : this(rhs)
{
this.CalcFrequencyItems(freDef, freMin, freMax, freSpace);
}
///
///
///
public int Flag { get; set; }
///
///
///
public string Code { get; set; }
///
///
///
public string Name { get; set; }
///
///
///
public double Qr { get; set; }
///
///
///
public double Hr { get; set; }
///
///
///
public double Nr { get; set; }
///
///
///
public double Pr { get; set; }
///
///
///
public double Er { get; set; }
///
///
///
public bool IsBp { get; set; }
///
///
///
public Curve.CurveExpress CurveQH { get; set; }
///
///
///
public Curve.CurveExpress CurveQP { get; set; }
///
///
///
public List AnaFrequencyItems { get; set; }
///
///
///
public bool AllowCalc { get; set; }
void CalcFrequencyItems(double freDef, double freMin, double freMax, double freSpace)
{
if (!this.AllowCalc)
return;
this.AnaFrequencyItems = new List();
for (double fre = freMax; fre >= freMin; fre -= freSpace)
{
var freItem = new AnaPumpFre();
freItem.Frequency = Math.Round(fre, 1);
freItem.CurveQH = Curve.PumpCalculateHelper.CalculateSimilarQH(this.CurveQH, freDef, fre);
freItem.CurveQP = Curve.PumpCalculateHelper.CalculateSimilarQP(this.CurveQP, freDef, fre);
this.AnaFrequencyItems.Add(freItem);
}
}
}
///
/// 分析泵变频项
///
public class AnaPumpFre
{
///
///
///
public double Frequency { get; set; }
///
///
///
public Curve.CurveExpress CurveQH { get; set; }
///
///
///
public Curve.CurveExpress CurveQP { get; set; }
}
}
}