I have made a Rainfall Simulation model which would run for varying hours ( like 4 hours or 6 hours as we desire).
The model will make various necessary input files and output files in one complete iteraration ( Say for the 1st hour) and again for subsequent iterations.
i have made a batch file for the 1st iteration where I can get the result for first 1 hour of rainfall. I need a batch file that would enable the simulation to run for 'N' hours through user defined input choice. N ( No of iterations) being the user defined choice. I suppose proper looping will do but I am not able to it.
My code as of now , looks like this for the first iteration ( and its working ).
Code: Select all
@echo off
mode 20,5
rem *** ALERT: Sleep for 5 seconds ***
ping -n 5 127.0.0.1 > nul
rem ***************************************
Set Path="E:\kolsim"
rem *************Start SWMM5.exe**************************
E:\kolsim\swmm_new.exe E:\kolsim\100_fe.inp E:\kolsim\kolsim\report.rpt E:\kolsim\kolsim\report.out
rem ***************************************
rem *** ALERT: Sleep for 5 seconds ***
ping -n 5 127.0.0.1 > nul
rem ***************************************
rem ******Copy Flooded Nodes****
E:\kolsim\kolsim\swmmtotx1.exe
rem ***************************************
rem *** ALERT: WAIT for 5 seconds ***
ping -n 2 127.0.0.1 > nul
rem ************************************
E:\kolsim\delete_first_line.exe
rem *** ALERT: WAIT for 2 seconds ***
ping -n 2 127.0.0.1 > nul
rem ************************************
rem ***Make Flood_nodes table*****
E:\kolsim\kolsim\floodedn_to_nodes.exe
rem ************************************
rem *****Create .bdy and .bci files*****
E:\kolsim\kolsim\create_new.exe cord.txt flooded_nodes.txt kol.bdy kol.bci
rem ************************************
rem *** ALERT: WAIT for 4 seconds ***
ping -n 4 127.0.0.1 > nul
rem ************************************
rem ****Start FLOOD SImulation***
E:\kolsim\kolsim\lisflood.exe -v koldem.dem.ascii kol.par
rem ************************************
rem *** ALERT: WAIT for 4 seconds ***
ping -n 4 127.0.0.1 > nul
rem ************************************
rem*** Rename Report File by date and time*******
ren report.rpt report-%date:~10,4%-%date:~7,2%-%date:~4,2%_%time:~0,2%hr%time:~3,2%min%time:~3,2%sec.txt
ren report.rpt report-%date:~10,4%-%date:~7,2%-%date:~4,2%_%time:~1,1%hr%time:~3,2%min%time:~3,2%sec.txt
rem******************************************************
rem ***Rename Result Folder by date and time****
pause
Please help regarding setting up a batch for the multiple simulation using user defined choice for no of simulation ( like N=4 or N=6).
Thanks.