tangxu
2022-10-31 8ea88fedd51e4961d0fd0aec6c2873a579fb6db8
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
using IStation.Calculation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.Application 
{
    /// <summary>
    /// 计划分析常量
    /// </summary>
    public class ShysPlanHelper
    {
        /// <summary>
        /// 站点字典
        /// </summary>
        public static StationInfo GetStationInfo(int SgFactoryId)
        {
            if (_dict == null)
                Inital();
        
            if (!_dict.ContainsKey(SgFactoryId))
            {
                return null;
            }
 
            return  _dict[SgFactoryId];
        }
        //    {1,2},//长兴泵站
        //    {2,12},//五号沟凌桥方向
        //    {3,9},//五号沟金海方向
        //    {4,3},//五号沟严桥方向1
        //    {5,5},//五号沟严桥方向2
        //    {6,4},//严桥泵站
        //    {7,6},//临江1#泵站
        //    {8,7},//临江2#泵站
        //    {9,8},//徐泾泵站
        //    {10,10},//金海泵站
        //    {11,11},//南汇北泵站
        //    {12,15},//陈行一输
        //    {13,16},//陈行二输
        //    {14,17},//泰和泵站
        //    {15,19},//金泽泵站
        //    {16,20},//松江泵站
        //    {17,21},//大桥泵站
        static Dictionary<int, StationInfo> _dict;
        private static void Inital()
        {
            _dict = new Dictionary<int, StationInfo>();
 
            // 出水总管压力, 没有数据
            //_dict.Add(15, new StationInfo(19, new IStation.Calculation.shys金泽泵站()));//NG 出水总管压力,瞬时流量没有数据 三高数据不全
            //_dict.Add(9, new StationInfo(8, new IStation.Calculation.shys徐泾泵站()));//NG 没有水池水位,进水压力高于出水压力
            //_dict.Add(6, new StationInfo(4, new IStation.Calculation.shys严桥泵站()));//NG 没有流量数据, 没有出口液位数据
            //_dict.Add(3, new StationInfo(9, new IStation.Calculation.shys五号沟金海方向()));//NG 出口压力有的是1MPa 有的3MPa  泵站根本达不到这个压力
 
            //_dict.Add(10, new StationInfo(10, new IStation.Calculation.shys金海泵站()));//NG 管路一 进口压力:0.1259MPa,出口压力:0.2135MPa,约8.8m扬程,流量要求:11596, 泵额定扬程为47m,变频也无法得到如此低的扬程
            //_dict.Add(12, new StationInfo(15, new IStation.Calculation.shys陈行一输()));//NG 没有提供 _0402010503030202003 三号管出口流量值
            //_dict.Add(7, new StationInfo(6, new IStation.Calculation.shys临江1号泵房())); //NG 没有提供 流量 ,无法计算
            //_dict.Add(11, new StationInfo(11, new IStation.Calculation.shys南汇北泵站()));//NG 管路一 进口压力: 6MPa , 不可能达到这么高压力
            //_dict.Add(16, new StationInfo(20, new IStation.Calculation.shys松江泵站()));//NG 没有提供 出水总管压力 和流量 ,无法计算
            //_dict.Add(17, new StationInfo(21, new IStation.Calculation.shys大桥泵站())); // NG 没有提供 流量 ,无法计算
 
            // _dict.Add(14, new StationInfo(17, new IStation.Calculation.shys泰和泵站()));//NG  管路二调度方案无法计算,请确认数据是否合理,进口压力:0.12395039999999999MPa,出口压力:0.14949020652770995MPa,流量要求:4180.51220703125"
 
 
#if (DEBUG)
            _dict.Add(1, new StationInfo(2, new IStation.Calculation.shys长兴泵站()));//OK
            _dict.Add(2, new StationInfo(12, new IStation.Calculation.shys五号沟凌桥方向()));//ok
            _dict.Add(4, new StationInfo(3, new IStation.Calculation.shys五号沟严桥方向1()));//OK
            _dict.Add(5, new StationInfo(5, new IStation.Calculation.shys五号沟严桥方向2()));//OK
            _dict.Add(13, new StationInfo(16, new IStation.Calculation.shys陈行二输()));//ok
            _dict.Add(8, new StationInfo(7, new IStation.Calculation.shys临江2号泵房()));//ok
#else
            _dict.Add(1, new StationInfo(2, new IStation.Calculation.shys长兴泵站()));//OK
            _dict.Add(2, new StationInfo(12, new IStation.Calculation.shys五号沟凌桥方向()));//ok
            _dict.Add(4, new StationInfo(3, new IStation.Calculation.shys五号沟严桥方向1()));//OK
            _dict.Add(5, new StationInfo(5, new IStation.Calculation.shys五号沟严桥方向2()));//OK
            _dict.Add(13, new StationInfo(16, new IStation.Calculation.shys陈行二输()));//ok
            _dict.Add(8, new StationInfo(7, new IStation.Calculation.shys临江2号泵房()));//ok
#endif
        }
 
        /// <summary>
        /// 
        /// </summary>
        public class StationInfo
        {
            /// <summary>
            /// 
            /// </summary>
            /// <param name="id"></param>
            /// <param name="calc"></param>
            public StationInfo(long id, PlanAnaBaseCalculator calc)
            {
                ID = id;
                Calculator = calc;
            }
 
 
            /// <summary>
            /// 
            /// </summary>
            public long ID { get; set; }
 
            /// <summary>
            /// 
            /// </summary>
            public PlanAnaBaseCalculator Calculator { get; set; }
        }
 
 
    }
}