lixiaojun
2025-02-19 aaac84e4ed86d089c01c5b180e4249db73cc78d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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; }
    }
}