-
Notifications
You must be signed in to change notification settings - Fork 4
/
runModel.bat
67 lines (57 loc) · 2.56 KB
/
runModel.bat
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
:: runModel.bat
:: Written by BTS, 06/24/13
:: Modified by NMP, 04/14/16 - run accessibilities after skimming
:: 08/12/16 - supply scenario as parameter to scripts
:: ----------------------------------------------------------------------------
:: Run the CMAP ABM from start to finish.
:: Call from command line, e.g.: runModel.bat > blog.txt
:: Parameters
SET projDir=Y:/{{{TEMPLATE}}}/cmap_abm
SET sampleRate=0.50
SET scen=100
:: Set Python paths
CALL EmmeConfig.bat
SET emmepy="%EMMEPATH%\Python27\python.exe"
SET py64="C:\Python27\python.exe"
:: Optional parameters for distributed skimming/assignment.
:: If enabled, call script with username and password,
:: e.g.: runModel.bat npeterson P@ssw0rd > blog.txt
REM @SET user=%1
REM @SET pwd=%2
REM SET un=cmap\%user%
REM SET IP1=\\10.10.1.52
REM SET IP2=\\10.10.1.63
:: Initialize timestamp log
if exist model_run_timestamp.txt (del model_run_timestamp.txt /Q)
@ECHO ====================================================== >> model_run_timestamp.txt
@ECHO BEGIN CMAP REGIONAL MODEL RUN - SAMPLE RATE %sampleRate% >> model_run_timestamp.txt
@ECHO Model Run Start Time: %date% %time% >> model_run_timestamp.txt
@ECHO ====================================================== >> model_run_timestamp.txt
:: Create MAZ skims
@ECHO Create MAZ skims: %date% %time% >> model_run_timestamp.txt
%py64% runMAZSkimsInitial.py
%py64% scripts/SPwrapper.py
%py64% scripts/cmapPostProcess.py
:: Create networks and skim
@ECHO Build networks: %date% %time% >> model_run_timestamp.txt
%emmepy% runBuildNetworks.py 1,1,1,1,1,1,1,1 %scen%
@ECHO Run initial skims: %date% %time% >> model_run_timestamp.txt
%emmepy% runInitialSkims.py 1,1,1,1,1,1,1,1 %scen%
:: Run accessibilities script
@ECHO Calculate accessibilities: %date% %time% >> model_run_timestamp.txt
cd accessibilities
CALL runAccessibilities.bat %scen%
copy outputs\accessibility_maz.csv ..\inputs
cd ..
:: Create TAP lines file and run CT-RAMP
@ECHO Create TAP lines: %date% %time% >> model_run_timestamp.txt
%emmepy% runTapLines.py %scen%
@ECHO Run CT-RAMP: %date% %time% >> model_run_timestamp.txt
CALL runCTRAMP-SingleProcess.bat %sampleRate%
:: Final skimming and assignments
@ECHO Run final assignments: %date% %time% >> model_run_timestamp.txt
%emmepy% runFinalAssignments.py 1,1,1,1,1,1,1,1 %scen%
@ECHO ====================================================== >> model_run_timestamp.txt
@ECHO END CMAP REGIONAL MODEL RUN >> model_run_timestamp.txt
@ECHO Model Run End Time: %date% %time% >> model_run_timestamp.txt
@ECHO ====================================================== >> model_run_timestamp.txt