11
13693261870
2024-11-11 138b959cc11dc9a73b0c766030b99ba1180d8650
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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
package com.se.simu.domain.dto;
 
import com.se.simu.config.PropertiesConfig;
import com.se.simu.helper.WebHelper;
 
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
 
@SuppressWarnings("ALL")
public class ConfigDto {
    public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
 
    private String casedir = "case";
    private String terrain_file = "DEM4548.tif";
    private String mesh_file = "tongzhou-mini.msh";
    private String studyzone_file = "studyzone_difference.shp";
    private String refinezones_file = "refinezones.shp";
    private String buildings_file = "buildings_inside.shp";
    private String nodes_file = "pipeline-demo-point.shp";
    private String links_file = "pipeline-demo-conduit.shp";
    private String junctions_file = "pipeline-demo-point-junctions.shp";
    private String raingage_file = "RainGage.dat";
    private String barrier_file = "barrier.shp";
    private String drainage_outfile = "tongzhou-mini-drainage.h5";
    private String sww_outfile = "tongzhou-mini.sww";
    private String flow_units = "LPS";
    private String infiltration = "HORTON";
    private String link_offsets = "DEPTH";
    private Double min_slope = 0.01;
    private String allow_ponding = "NO";
    private String skip_steady_state = "NO";
    private String flow_routing = "DYNWAVE";
    private String start_datetime = "06/12/2024 12:00:00";
    private String end_datetime = "06/12/2024 13:00:00";
    private String report_start_datetime = "06/12/2024 00:00:00";
    private String report_step = "00:01:00";
    private String routing_step = "00:00:10";
    private String inertial_damping = "PARTIAL";
    private String normal_flow_limited = "BOTH";
    private String force_main_equation = "H-W";
    private Integer max_trials = 20;
    private Double minimum_step = 0.1;
    private Double min_surfarea = 0.5;
    private Integer threads = 8;
    private Double Manning = 0.014;
    private Integer areas_slope = 1;
    private Integer areas_imperv = 80;
    private Double areas_n_imperv = 0.015;
    private Double areas_n_perv = 0.24;
    private Double areas_storage_imperv = 0.06;
    private Integer areas_storage_perv = 3;
    private Integer areas_pct_zero = 25;
    private Integer init_depth = 0;
    private Double friction = 0.01;
    private Double terrain_smoothing = 0.1;
    private String flow_algorithm = "DE1";
    private Integer mesh_size = 5;
    private Integer save_step = 1;
 
    public void setProperties(String dirName, Date startTime, Integer minutes, PropertiesConfig config) {
        this.casedir = dirName;
        this.terrain_file = config.getDemFile();
        this.studyzone_file = config.getZoneName();
        this.buildings_file = config.getShpNames().get(2);
        this.nodes_file = config.getShpNames().get(0);
        this.links_file = config.getShpNames().get(1);
        this.junctions_file = config.getJunctionName();
        this.raingage_file = config.getRaingage();
        this.barrier_file = config.getBarrierName();
        this.drainage_outfile = dirName + ".h5";
        this.sww_outfile = dirName + ".sww";
        this.flow_units = config.getFlowUnits();
        this.threads = WebHelper.getCpuCores();
 
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(startTime);
        //calendar.set(Calendar.HOUR_OF_DAY, 0);
        //calendar.set(Calendar.MINUTE, 0);
        //calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
 
        String start = DATE_FORMAT.format(calendar.getTime());
        calendar.add(Calendar.MINUTE, minutes);
        String end = DATE_FORMAT.format(calendar.getTime());
 
        this.start_datetime = start;
        this.report_start_datetime = start;
        this.end_datetime = end;
    }
 
    public String getCasedir() {
        return casedir;
    }
 
    public void setCasedir(String casedir) {
        this.casedir = casedir;
    }
 
    public String getTerrain_file() {
        return terrain_file;
    }
 
    public void setTerrain_file(String terrain_file) {
        this.terrain_file = terrain_file;
    }
 
    public String getMesh_file() {
        return mesh_file;
    }
 
    public void setMesh_file(String mesh_file) {
        this.mesh_file = mesh_file;
    }
 
    public String getStudyzone_file() {
        return studyzone_file;
    }
 
    public void setStudyzone_file(String studyzone_file) {
        this.studyzone_file = studyzone_file;
    }
 
    public String getRefinezones_file() {
        return refinezones_file;
    }
 
    public void setRefinezones_file(String refinezones_file) {
        this.refinezones_file = refinezones_file;
    }
 
    public String getBuildings_file() {
        return buildings_file;
    }
 
    public void setBuildings_file(String buildings_file) {
        this.buildings_file = buildings_file;
    }
 
    public String getNodes_file() {
        return nodes_file;
    }
 
    public void setNodes_file(String nodes_file) {
        this.nodes_file = nodes_file;
    }
 
    public String getLinks_file() {
        return links_file;
    }
 
    public void setLinks_file(String links_file) {
        this.links_file = links_file;
    }
 
    public String getJunctions_file() {
        return junctions_file;
    }
 
    public void setJunctions_file(String junctions_file) {
        this.junctions_file = junctions_file;
    }
 
    public String getRaingage_file() {
        return raingage_file;
    }
 
    public void setRaingage_file(String raingage_file) {
        this.raingage_file = raingage_file;
    }
 
    public String getBarrier_file() {
        return barrier_file;
    }
 
    public void setBarrier_file(String barrier_file) {
        this.barrier_file = barrier_file;
    }
 
    public String getDrainage_outfile() {
        return drainage_outfile;
    }
 
    public void setDrainage_outfile(String drainage_outfile) {
        this.drainage_outfile = drainage_outfile;
    }
 
    public String getSww_outfile() {
        return sww_outfile;
    }
 
    public void setSww_outfile(String sww_outfile) {
        this.sww_outfile = sww_outfile;
    }
 
    public String getFlow_units() {
        return flow_units;
    }
 
    public void setFlow_units(String flow_units) {
        this.flow_units = flow_units;
    }
 
    public String getInfiltration() {
        return infiltration;
    }
 
    public void setInfiltration(String infiltration) {
        this.infiltration = infiltration;
    }
 
    public String getLink_offsets() {
        return link_offsets;
    }
 
    public void setLink_offsets(String link_offsets) {
        this.link_offsets = link_offsets;
    }
 
    public Double getMin_slope() {
        return min_slope;
    }
 
    public void setMin_slope(Double min_slope) {
        this.min_slope = min_slope;
    }
 
    public String getAllow_ponding() {
        return allow_ponding;
    }
 
    public void setAllow_ponding(String allow_ponding) {
        this.allow_ponding = allow_ponding;
    }
 
    public String getSkip_steady_state() {
        return skip_steady_state;
    }
 
    public void setSkip_steady_state(String skip_steady_state) {
        this.skip_steady_state = skip_steady_state;
    }
 
    public String getFlow_routing() {
        return flow_routing;
    }
 
    public void setFlow_routing(String flow_routing) {
        this.flow_routing = flow_routing;
    }
 
    public String getStart_datetime() {
        return start_datetime;
    }
 
    public void setStart_datetime(String start_datetime) {
        this.start_datetime = start_datetime;
    }
 
    public String getEnd_datetime() {
        return end_datetime;
    }
 
    public void setEnd_datetime(String end_datetime) {
        this.end_datetime = end_datetime;
    }
 
    public String getReport_start_datetime() {
        return report_start_datetime;
    }
 
    public void setReport_start_datetime(String report_start_datetime) {
        this.report_start_datetime = report_start_datetime;
    }
 
    public String getReport_step() {
        return report_step;
    }
 
    public void setReport_step(String report_step) {
        this.report_step = report_step;
    }
 
    public String getRouting_step() {
        return routing_step;
    }
 
    public void setRouting_step(String routing_step) {
        this.routing_step = routing_step;
    }
 
    public String getInertial_damping() {
        return inertial_damping;
    }
 
    public void setInertial_damping(String inertial_damping) {
        this.inertial_damping = inertial_damping;
    }
 
    public String getNormal_flow_limited() {
        return normal_flow_limited;
    }
 
    public void setNormal_flow_limited(String normal_flow_limited) {
        this.normal_flow_limited = normal_flow_limited;
    }
 
    public String getForce_main_equation() {
        return force_main_equation;
    }
 
    public void setForce_main_equation(String force_main_equation) {
        this.force_main_equation = force_main_equation;
    }
 
    public Integer getMax_trials() {
        return max_trials;
    }
 
    public void setMax_trials(Integer max_trials) {
        this.max_trials = max_trials;
    }
 
    public Double getMinimum_step() {
        return minimum_step;
    }
 
    public void setMinimum_step(Double minimum_step) {
        this.minimum_step = minimum_step;
    }
 
    public Double getMin_surfarea() {
        return min_surfarea;
    }
 
    public void setMin_surfarea(Double min_surfarea) {
        this.min_surfarea = min_surfarea;
    }
 
    public Integer getThreads() {
        return threads;
    }
 
    public void setThreads(Integer threads) {
        this.threads = threads;
    }
 
    public Double getManning() {
        return Manning;
    }
 
    public void setManning(Double manning) {
        Manning = manning;
    }
 
    public Integer getAreas_slope() {
        return areas_slope;
    }
 
    public void setAreas_slope(Integer areas_slope) {
        this.areas_slope = areas_slope;
    }
 
    public Integer getAreas_imperv() {
        return areas_imperv;
    }
 
    public void setAreas_imperv(Integer areas_imperv) {
        this.areas_imperv = areas_imperv;
    }
 
    public Double getAreas_n_imperv() {
        return areas_n_imperv;
    }
 
    public void setAreas_n_imperv(Double areas_n_imperv) {
        this.areas_n_imperv = areas_n_imperv;
    }
 
    public Double getAreas_n_perv() {
        return areas_n_perv;
    }
 
    public void setAreas_n_perv(Double areas_n_perv) {
        this.areas_n_perv = areas_n_perv;
    }
 
    public Double getAreas_storage_imperv() {
        return areas_storage_imperv;
    }
 
    public void setAreas_storage_imperv(Double areas_storage_imperv) {
        this.areas_storage_imperv = areas_storage_imperv;
    }
 
    public Integer getAreas_storage_perv() {
        return areas_storage_perv;
    }
 
    public void setAreas_storage_perv(Integer areas_storage_perv) {
        this.areas_storage_perv = areas_storage_perv;
    }
 
    public Integer getAreas_pct_zero() {
        return areas_pct_zero;
    }
 
    public void setAreas_pct_zero(Integer areas_pct_zero) {
        this.areas_pct_zero = areas_pct_zero;
    }
 
    public Integer getInit_depth() {
        return init_depth;
    }
 
    public void setInit_depth(Integer init_depth) {
        this.init_depth = init_depth;
    }
 
    public Double getFriction() {
        return friction;
    }
 
    public void setFriction(Double friction) {
        this.friction = friction;
    }
 
    public Double getTerrain_smoothing() {
        return terrain_smoothing;
    }
 
    public void setTerrain_smoothing(Double terrain_smoothing) {
        this.terrain_smoothing = terrain_smoothing;
    }
 
    public String getFlow_algorithm() {
        return flow_algorithm;
    }
 
    public void setFlow_algorithm(String flow_algorithm) {
        this.flow_algorithm = flow_algorithm;
    }
 
    public Integer getMesh_size() {
        return mesh_size;
    }
 
    public void setMesh_size(Integer mesh_size) {
        this.mesh_size = mesh_size;
    }
 
    public Integer getSave_step() {
        return save_step;
    }
 
    public void setSave_step(Integer save_step) {
        this.save_step = save_step;
    }
}