namespace HStation.WinFrmUI
|
{
|
/// <summary>
|
/// 精度流量视图
|
/// </summary>
|
public class SimulationPrintAccuracyFlowViewModel
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public SimulationPrintAccuracyFlowViewModel() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
public SimulationPrintAccuracyFlowViewModel(List<SimulationPrintAccuracyItemViewModel> allItemList)
|
{
|
var items = allItemList?.Where(x => x.EvaluateError.HasValue).ToList();
|
if (items == null || items.Count < 1)
|
{
|
return;
|
}
|
var flowList = items
|
.Where(x => x.PropName == HydroVisualCalcuProp.CalcuQ
|
|| x.PropName == HydroVisualCalcuProp.CalcuFlow).ToList();
|
if (flowList == null || flowList.Count < 1)
|
{
|
return;
|
}
|
this.AvgError = Math.Round(flowList.Average(x => x.EvaluateError.Value), 1);
|
}
|
|
/// <summary>
|
/// 平均误差
|
/// </summary>
|
public double? AvgError { get; set; }
|
}
|
}
|