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