lixiaojun
2025-02-17 f4a5f0c3fc24136294eec0153ec0605529243388
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 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; }
    }
}