tangxu
2022-10-08 6b437da7145139fda9cbff0acaa5b8e2295d11cd
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IStation.Calculation.DispatchAna;
using IStation.Numerics;
 
namespace IStation.Calculation
{
    /// <summary>
    /// 调度分析计算器工厂
    /// </summary>
    public class DispatchAnalyCalculatorFactory
    {
        /// <summary>
        /// 计算工具
        /// </summary>
        public enum eCalcTool
        {
            /// <summary>
            /// 
            /// </summary>
            General = 0,
            /// <summary>
            /// 
            /// </summary>
            EPT = 1
        }
        /// <summary>
        /// 创建计算器(当前调度信息)
        /// </summary>
        public static IGetCurrentRecord CreateGetCurrentRecord(
            long CorpID, string ObjectType, long ObjectID )
        {
            if (ObjectType == IStation.ObjectType.Station)
            {
                IGetCurrentRecord calc = null;
                if (CorpID == 4)
                {//上海 原水
                    if (ObjectID == 2)
                    {
                        calc = new IStation.Calculation.DispatchAna.Calculator_Current_SHYS_长兴岛();
                    }
                }
 
 
 
 
                if (calc == null)
                {
                    var general =   new IStation.Calculation.DispatchAna.Calculator_Current_Gneral();
                    calc = general;
                }
                return calc;
            }
 
 
 
            return null;
        }
 
        /// <summary>
        /// 创建计算器(最优方案计算)
        /// </summary>
        public static IOptAnaCalc CreateOptAnaCalculator(
            long CorpID, string ObjectType, long ObjectID, eCalcTool? CalcTool)  
        {
            if (ObjectType == IStation.ObjectType.Station)
            {
                IOptAnaCalc calc = null;
                if (CorpID == 4)
                {//上海 原水
                    if (ObjectID == 2)
                    {
                        calc = new IStation.Calculation.DispatchAna.Calculator_OptAna_SHYS_长兴岛();
                    }
                }
 
                if (calc == null)
                {
                    var general = new IStation.Calculation.DispatchAna.Calculator_OptAna_General();
                    calc = general;
                }
 
 
                return calc;
            }
 
 
 
            return null;
        }
 
 
        /// <summary>
        /// 创建计算器(最优方案计算)
        /// </summary>
        public static IKeepStatusCalc CreateKeepStatusCalculator(
            long CorpID, string ObjectType, long ObjectID, eCalcTool? CalcTool)
        {
            if (ObjectType == IStation.ObjectType.Station)
            {
                IKeepStatusCalc calc = null;
                if (CorpID == 4)
                {//上海 原水
                    if (ObjectID == 2)
                    {
                        calc = new IStation.Calculation.DispatchAna.Calculator_KeepStatus_SHYS_长兴岛();
                    }
                }
 
                if (calc == null)
                {
                    var general = new IStation.Calculation.DispatchAna.Calculator_KeepStatus_General();
                    calc = general;
                }
 
 
                return calc;
            }
 
 
 
            return null;
        }
 
 
 
    }
}