| | |
| | | |
| | | private String raingage; |
| | | |
| | | private String rainStation; |
| | | |
| | | private Integer rainPeriod; |
| | | |
| | | private String flowUnits; |
| | | |
| | | private String solverBat; |
| | |
| | | public void setSolverBat(String solverBat) { |
| | | this.solverBat = solverBat; |
| | | } |
| | | |
| | | public String getRainStation() { |
| | | return rainStation; |
| | | } |
| | | |
| | | public void setRainStation(String rainStation) { |
| | | this.rainStation = rainStation; |
| | | } |
| | | |
| | | public Integer getRainPeriod() { |
| | | return rainPeriod; |
| | | } |
| | | |
| | | public void setRainPeriod(Integer rainPeriod) { |
| | | this.rainPeriod = rainPeriod; |
| | | } |
| | | } |
| | |
| | | import com.se.simu.config.PropertiesConfig; |
| | | import com.se.simu.domain.dto.ConfigDto; |
| | | import com.se.simu.domain.po.DataPo; |
| | | import com.se.simu.helper.StringHelper; |
| | | import com.se.simu.helper.WebHelper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Resource |
| | | PropertiesConfig config; |
| | | |
| | | public void createRainFile() throws Exception { |
| | | public void createRainFile(DataPo data) throws Exception { |
| | | String filePath = config.getInPath() + File.separator + data.getInPath() + File.separator + config.getRaingage(); |
| | | String startTime = StringHelper.YMDHMS_FORMAT.format(data.getStartTime()); |
| | | |
| | | Rainfall rainfall = new Rainfall(); |
| | | rainfall.rainfall("D:/simu/in/RainGage.dat", "Tongzhou", "2024-09-29 00:00:00", 60, 0.5, 10); |
| | | rainfall.rainfall(filePath, config.getRainStation(), startTime, data.getDuration(), 0.5, config.getRainPeriod()); |
| | | } |
| | | |
| | | public void createConfig(DataPo data) throws IOException { |
| | |
| | | barrierName: barrier.shp |
| | | sysFields: _ext_attr,_meta_id,_attach_files,_x,_y,_z,_is_latest,_data_type,operatetime,operator,groupid,id,shape_length,shape_area |
| | | raingage: RainGage.dat |
| | | rainStation: Tongzhou |
| | | rainPeriod: 10 |
| | | # 流量单位,LPS(升/秒)、CMS(立方米/秒)、CFS(立方英尺/秒) |
| | | flowUnits: CMS |
| | | solverBat: D:\simu\uwsolver\run_solver.bat |