package com.se.nsl.domain.dto;
|
|
import com.se.nsl.config.PropertiesConfig;
|
import com.se.nsl.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;
|
}
|
}
|