cloudflight
2024-07-27 49eb2a09634e439090d4a2b13ec7d6f911d3deaf
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
using AForge;
using System;
//using NPOI.SS.Formula.Functions;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
 
namespace Hydro.CommonBase
{
    [Serializable]
    public class CalcExt
    {
        /// <summary>
        /// 种群数量
        /// </summary>
        public int populationNum { get; set; } = 50;
 
 
        /// <summary>
        /// 搜索深度
        /// </summary>
        public int iterationNum { get; set; } = 20; 
        /// <summary>
        /// 种群数量
        /// </summary>
        public int populationNum_full { get; set; } = 50;
 
 
        /// <summary>
        /// 搜索深度
        /// </summary>
        public int iterationNum_full { get; set; } = 20;
 
        /// <summary>
        /// 搜索深度_最小
        /// </summary>
        public int iterationNum_Min { get; set; } = 1;
        /// <summary>
        /// 线程数
        /// </summary>
        public int MaxThread { get; set; } = 4;
 
       
 
        /// <summary>
        /// 是否只显示最优解
        /// </summary>
        public bool ShowOnlyBest { get; set; } = true;
 
        /// <summary>
        /// 是否优选
        /// </summary>
        public bool 是否优选方案 { get; set; } = true;
 
        /// <summary>
        /// 是否优选
        /// </summary>
        public bool 启用数据库存储 { get; set; } = false;
        /// <summary>
        /// 是否优选
        /// </summary>
        public bool 启用内存存储 { get; set; } = false;
 
 
        /// <summary>
        /// 是否使用新版本保存方式
        /// </summary>
        public bool 是否新版本保存 { get; set; } = true;
 
        public bool 是否新版本读取 { get; set; } = true;
        public bool 是否枚举 { get; set; } = false;
        public bool BreakSearchWhenOver { get; set; } = false;
 
        /// <summary>
        /// 开启水力计算
        /// </summary>
        public bool isWaterModelCalc { get; set; } = true;
 
 
        /// <summary>
        /// 开启水质计算
        /// </summary>
        public bool isQualityCalc { get; set; } = false;
 
        /// <summary>
        /// 显示详细日志
        /// </summary>
        public bool 显示详细日志 { get; set; } = false;
 
 
        /// <summary>
        /// 输出运行情况
        /// </summary>
        public bool 输出运行情况 { get; set; } = false;
 
 
        /// <summary>
        /// 输出运行情况
        /// </summary>
        public bool 自动发送指令 { get; set; } = false;
 
 
        /// <summary>
        /// 输出运行情况
        /// </summary>
        public string OrderUrl { get; set; } = "";
        /// <summary>
        /// 输出运行情况
        /// </summary>
        public string AlarmUrl { get; set; } = "";
        /// <summary>
        /// 输出运行情况
        /// </summary>
        public bool 方案择优 { get; set; } = false;
 
        /// <summary>
        /// 是否水量分配
        /// </summary>
        public bool waterdistribute { get; set; } = false;
 
        public bool 本地项目编译 { get; set; } = false;
        /// <summary>
        /// 0当量分配;1随机分配;
        /// </summary>
        public int waterdistributeMode { get; set; } = 0;
 
 
        /// <summary>
        /// 分配总水量
        /// </summary>
        public float Distribution_TotalDemand { get; set; } = 25;
 
        /// <summary>
        /// 分配总水量是否从小到大计算
        /// </summary>
        public bool isDistributionStepCalc { get; set; } = true;
 
 
        /// <summary>
        /// 分配总水量计算步长
        /// </summary>
        public float DistributionCalcStep { get; set; } = 1;
 
        /// <summary>
        /// 每个节点最多分配水量:平均值 * Distribution_OverAvgFactor
        /// </summary>
        public double Distribution_OverAvgFactor { get; set; } = 2;
 
 
        
 
        /// <summary>
        /// 当量表
        /// </summary>
        public float[] Distribution_UnitDemands { get; set; } =new float[] { 0.36f,0.54f,0.72f };
        
 
        private string[] ChildSolutions = new string[0];
 
        /// <summary>
        /// 子方案集
        /// </summary>
        public Solution[] ChildSolutionArr = new Solution[0];
 
        ///// <summary>
        ///// 子方案集线程数量
        ///// </summary>
        //public int[] ChildSolutionsThread = new int[0];
 
 
        /// <summary>
        /// 模型的计算时刻,-1则计算该模型的所有时刻,n则表示计算该模型的第n个时刻(n>=0);
        /// 最终会生成影响TimeStep和TimeDuration的值,从而决定PeriodCount的值,实际生效的为PeriodCount
        /// </summary>
        public int MultiTimes { get; set; } = 0;
        public int EPAPeriodCount { get; set; }
       
 
        /// <summary>
        /// 程序计算的步长,单位是分钟
        /// </summary>
        public int TimeStep;
        /// <summary>
        /// 程序计算的总时长,单位是分钟
        /// </summary>
        public int TimeDuration;
        /// <summary>
        /// 程序的阶段数,即程序计算的总时长/程序计算的步长
        /// </summary>
        public int PeriodCount;
       
 
        /// <summary>
        /// 开始的时间,主要用来显示,单位是分钟
        /// </summary>
        public int TimeStart { get; set; }
        public string[] Branchs { get; set; }
        
    }
 
    //public class Solution
    //{
    //    public Solution(string f,int n)
    //    {
    //        存储表名=名称 = f;
    //        并行数 = n;
    //    }
    //    [Category("1、方案信息")]
    //    [Description("方案名称")]
    //    [DisplayName("1、方案编码")]
    //    public string 名称 { get; set; }
    //    [Category("1、方案信息")]
    //    [Description("该型号子方案计算器的数量")]
    //    [DisplayName("3、并行数")]
    //    public int 并行数 { get; set; }
    //    [Category("1、方案信息")]
    //    [Description("启动/禁用")]
    //    [DisplayName("2、是否启用")]
    //    public bool 启用 { get; set; }
    //    [Category("2、存储")]
    //    [Description("存储/不存储")]
    //    [DisplayName("2、是否存储")]
 
    //    public bool 是否存储 { get; set; }
 
    //    [Category("2、存储")]
    //    [Description("方案的名称,必填;")]
    //    [DisplayName("1、方案名称")]
    //    public string 存储表名 { get; set; }
 
    //    [Category("2、存储")]
    //    [Description("文件的存储位置")]
    //    [DisplayName("3、文件存储位置")]
    //    public string 存储位置 { get; set; }
 
    //    [Category("2、存储")]
    //    [Description("一组自然数值,表示每一位向量的二进制长度,用“,”隔开")]
    //    [DisplayName("4、长度组")]
    //    public string list_Length 
    //    { 
    //        get
    //        {
            
    //            if (settings == null || settings.Length_Ds == null) return null;
    //            return string.Join(",", settings.Length_Ds);
    //        }
    //        set
    //        {
    //            try
    //            {
    //                if(value==null) return;
    //                if (settings == null) settings = new SaveSettings();
    //                settings.Length_Ds = value.Split(',').ToList().Select(n => int.Parse(n)).ToList();
    //            }
    //            catch
    //            {
 
    //            }
                
    //        }
    //    }
 
    //    [Category("2、存储")]
    //    [Description("一组Range值,表示每一位向量的范围,举例:1,2|2,3|0.3,0.4")]
    //    [DisplayName("5、范围组")]
    //    public string list_Range 
    //    {
    //        get
    //        {
    //            if (settings == null || settings.list_Range == null) return null;
    //            return string.Join("|", settings.list_Range.Select(n=>$"{n.Min},{n.Max}"));
    //        }
    //        set
    //        {
    //            try
    //            {
    //                if (value == null) return;
    //                if (settings == null) settings = new SaveSettings();
    //                settings.list_Range = value.Split('|').ToList().Select(n => new MyDoubleRange(double.Parse( n.Split(',')[0]),double.Parse( n.Split(',')[1]))).ToList();
    //            }
    //            catch
    //            {
    //            }
 
    //        }
    //    }
 
 
 
    //    [Category("2、存储")]
    //    [Description("一组Range值,表示每一位向量的范围,举例:{1,2},{2,3}")]
    //    [DisplayName("6、闪存设置")]
    //    [Browsable(false)]
    //    public SaveSettings settings { get; set; } 
 
 
 
 
    //}
 
}