-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathSubmit_Full_Regional_Model_SOLA.bat
More file actions
481 lines (438 loc) · 19.9 KB
/
Copy pathSubmit_Full_Regional_Model_SOLA.bat
File metadata and controls
481 lines (438 loc) · 19.9 KB
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
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
@echo off
rem Submit_Full_Regional_Model_SOLA.bat
rem Craig Heither, CMAP
rem Nick Ferguson, CMAP
rem Karly Cazzato, CMAP
@echo BATCH FILE TO SUBMIT CMAP REGIONAL TRAVEL DEMAND MODEL
@echo - 3 GLOBAL ITERATIONS
@echo - 5 AUTO TRIP PURPOSES: HW LOW INCOME, HW HIGH INCOME, HB Shop, HO, NH
@echo - SECOND ORDER LINEAR APPROXIMATION (SOLA) HIGHWAY ASSIGNMENT (7 VEHICLE CLASSES)
@echo Class 1: 1 PERSON SOV LOW VOT (ALL PURPOSES)
@echo Class 2: 1 PERSON SOV MED VOT (ALL PURPOSES)
@echo Class 3: 1 PERSON SOV HIGH VOT (ALL PURPOSES)
@echo Class 4: 2+ PERSON HOV (ALL PURPOSES)
@echo Class 5: B-PLATE + LIGHT DUTY TRUCK
@echo Class 6: MEDIUM DUTY TRUCK
@echo Class 7: HEAVY DUTY TRUCK
@echo ==================================================================
@echo.
rem Revision history
rem ----------------
rem 07/16/2020 Ferguson: Refined the Python search to use a virtual
rem environment with custom package requirements by calling
rem activate_python_env.bat.
rem 02/25/2023 Heither: Read parameters from batch_file.yaml
rem 03/23/2023 Cazzato: Run create DISTR/M01 files
rem 10/05/2023 Heither: Updated batch_file.yaml parameters, transit assignment
rem =========================================================================================
cd %~dp0
rem -- Read model run settings from batch_file.yaml --
for /f "eol=# skip=1 tokens=2 delims=:" %%z in (batch_file.yaml) do (set ver=%%z & goto break0)
:break0
for /f "eol=# skip=2 tokens=2 delims=:" %%a in (batch_file.yaml) do (set val=%%a & goto break1)
:break1
for /f "eol=# skip=5 tokens=2 delims=:" %%e in (batch_file.yaml) do (set selLinkFile=%%e & goto break2)
:break2
for /f "eol=# skip=8 tokens=2* delims=:" %%g in (batch_file.yaml) do (set transactFilePath1=%%g & set transactFilePath2=%%h & goto break3)
:break3
for /f "eol=# skip=10 tokens=2 delims=:" %%f in (batch_file.yaml) do (set transitAsmt=%%f & goto break4)
:break4
for /f "eol=# skip=12 tokens=2 delims=:" %%i in (batch_file.yaml) do (set selLineFile=%%i & goto break5)
:break5
for /f "eol=# skip=14 tokens=2 delims=:" %%j in (batch_file.yaml) do (set utilFile=%%j & goto break6)
:break6
for /f "eol=# skip=16 tokens=2 delims=:" %%k in (batch_file.yaml) do (set UrbansimFile=%%k & goto break7)
:break7
for /f "eol=# skip=18 tokens=2 delims=:" %%l in (batch_file.yaml) do (set RSPrun=%%l & goto break8)
:break8
set ver=%ver:~1,5%
set val=%val:~1,3%
set selLinkFile=%selLinkFile:~1%
set transitAsmt=%transitAsmt:~1,1%
rem Construct complete transit file path
set transactFilePath1=%transactFilePath1:~1,-1%
set transactFilePath2=%transactFilePath2:~1,-1%
set sep=:\
set transactFilePath=%transactFilePath1%%sep%%transactFilePath2%
set selLineFile=%selLineFile:~1%
set utilFile=%utilFile:~1,1%
set UrbansimFile=%UrbansimFile:~1,1%
set RSPrun=%RSPrun:~1,1%
REM -- Count number of select link files --
set tempCnt=0
for %%a in (%selLinkFile:None=%) do set /a tempCnt+=1
set a/ tempCnt=5-tempCnt
@echo %tempCnt% select link files submitted.
REM -- Get name of .emp file --
set infile=empfile.txt
cd ..
if exist %infile% (del %infile% /Q)
dir "*.emp" /b >> %infile% 2>nul
set /p file1=<%infile%
echo file1 = %file1%
call :CheckEmpty %infile%
:filepass
if exist %infile% (del %infile% /Q)
cd Database
@echo.
@echo ==================================================================================
@echo --- Model Run Settings ---
@echo Conformity version = %ver%
@echo Scenario = %val%
@echo Highway assignment select link files = %selLinkFile%
@echo Location of network transaction files = %transactFilePath%
@echo Run transit assignment = %transitAsmt%
if "%transitAsmt%" EQU "T" (@echo Transit assignment select line file = %selLineFile%)
@echo Save utility files = %utilFile%
@echo Create UrbanSim travel time file = %UrbansimFile%
@echo RSP evaluation run = %RSPrun%
@echo ==================================================================================
@echo.
set /a trnAsmt=0
if "%transitAsmt%" EQU "T" (set /a trnAsmt+=1)
set check2=%selLineFile:~0,4%
REM Remove trailing spaces from transactFilePath
set transactFilePath=%transactFilePath:~0,-1%
if "%check2%" NEQ "None" (
if not exist Select_Line\%selLineFile% (goto no_select_line_file)
)
@echo -- Verifying select link files --
uv run macros\verify_select_link.py %file1% %selLinkFile% %RSPrun% %trnAsmt%
if %ERRORLEVEL% GTR 0 (goto end)
REM Clean up prior to run
if exist cache\choice_simulator_trips_out (rmdir /S /Q cache\choice_simulator_trips_out)
if exist cache\choice_simulator_trips_out.001 (rmdir /S /Q cache\choice_simulator_trips_out.001)
if exist cache\choice_simulator_trips_out.002 (rmdir /S /Q cache\choice_simulator_trips_out.002)
del cache\logs\*.* /Q
if exist usemacro_* (del usemacro_* /Q)
if exist errors (del errors /Q)
echo.
echo Select Destination Choice-Mode Choice model run mode:
echo 1) Minimize run time (default) - resources allocated to support a single model run.
echo 2) Balanced - resources allocated to support two simultaneous model runs.
echo.
set /a jobs=38
set /a zones=10
set /a sola_threads=63
set /p choice="[SELECT A MODEL RUN MODE] "
echo.
if not "%choice%"=="" (
set choice=%choice:~0,1%
if "%choice%"=="1" (goto proceed)
if "%choice%"=="2" (
set /a jobs=11
set /a zones=7
set /a sola_threads=31
goto proceed
)
)
:proceed
@echo Model run scenario: %val%
@echo.
set /p ok="[RUN MODEL FOR SCENARIO %val%? (y/n)] "
@echo.
set ok=%ok:y=Y%
if not "%ok%"=="Y" (goto end)
@echo ==================================================================
@echo.
copy tg\fortran\TG_HHENUM_OUTPUT.TXT TG_HHENUM_OUTPUT.TXT /y
copy tg\fortran\TRIP49_PA_OUT.TXT defaults_base_year\TRIP49_PA_OUT.TXT /y
copy tg\fortran\TRIP49_PA_WFH_OUT.TXT defaults_base_year\TRIP49_PA_WFH_OUT.TXT /y
echo.
if not exist TG_HHENUM_OUTPUT.TXT (goto hhmiss)
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REM Craig Heither, 4/13/09
REM Prep steps added to ensure matrix/scenario cleanup is done
REM and highway network is skimmed prior to submitting full run.
REM Error trapping ensures macros run if matrix/scenario does not exist.
REM
REM #################################################
if exist blog.txt (del blog.txt /Q)
if exist model_run_timestamp.txt (del model_run_timestamp.txt /Q)
@ECHO ============================================================= >> model_run_timestamp.txt
@ECHO BEGIN CMAP REGIONAL MODEL RUN - SCENARIO %val% >> model_run_timestamp.txt
@ECHO Model Run Start Time: %date% %time% >> model_run_timestamp.txt
@ECHO -- Number of jobs: %jobs% -- Number of zones per job: %zones% >> model_run_timestamp.txt
@ECHO ============================================================= >> model_run_timestamp.txt
REM DETERMINE IF CONGESTED TRAVEL TIME & DISTANCE FILES EXIST TO PRE-LOAD REASONABLE CONGESTION
set /A pld=0
if exist defaults_base_year\preload_mf44.txt (set /A pld=pld+1)
if exist defaults_base_year\preload_mf45.txt (set /A pld=pld+1)
if exist defaults_base_year\preload_mf46.txt (set /A pld=pld+1)
if exist defaults_base_year\preload_mf47.txt (set /A pld=pld+1)
if exist defaults_base_year\preload_mf76.txt (set /A pld=pld+1)
if exist defaults_base_year\preload_mf77.txt (set /A pld=pld+1)
if exist defaults_base_year\per3_timau.txt (set /A pld=pld+1)
if exist defaults_base_year\per5_timau.txt (set /A pld=pld+1)
set /A preload=0
if %pld% EQU 8 (set /A preload=1)
REM PREP WORK
@ECHO Update DISTR and M01 files
CD %~dp0
CD prep_macros
REM -- Start DISTR & M01 Data Processing --
@ECHO.
@ECHO Start Time: %date% %time%
@ECHO.
if exist report.txt (del report.txt /Q)
if exist temp\nul (rmdir temp /S /Q)
if not exist temp (mkdir temp)
cd ..
if not exist tg\data\m01auto.csv (goto filemiss2)
if not exist tg\data\m01tg.txt (goto filemiss2)
if not exist tg\data\m01type.csv (goto filemiss2)
@ECHO.
@ECHO -- OBTAINING TRANSIT NETWORK DATA FROM EMME --
uv run prep_macros/distr_m01_data.py %file1% %val% >> prep_macros\report.txt
if %ERRORLEVEL% GTR 0 (goto issue)
cd prep_macros
@ECHO.
@ECHO -- CREATING FILES FOR SPATIAL ANALYSIS --
@ECHO.
rem Activate R env
call %LOCALAPPDATA%\miniconda3\condabin\conda_hook.bat
call conda activate tbm-r
Rscript create_distr_m01_files.R
if %ERRORLEVEL% GTR 0 (goto issue)
call conda deactivate
@ECHO.
@ECHO -- DISTR AND M01 FILES CREATED --
@ECHO.
@ECHO End Time: %date% %time%
@ECHO.
if exist temp\nul (rmdir temp /S /Q)
if exist report.txt (del report.txt /Q)
CD ..
@ECHO *** Cleaning up databank. ***
if exist cleanup.rpt (del cleanup.rpt)
uv run useful_macros\cleanup_for_rerun.py %val%>> cleanup.rpt
if exist reports (del reports)
REM RUN FREESKIM TO CREATE TIME, DISTANCE AND TOLL MATRICES
@ECHO.
@ECHO *** Skimming highway network. ***
uv run prep_macros\free.skim.mac.py %file1% %val%
if %ERRORLEVEL% neq 0 (goto issue)
@ECHO.
REM IF PRELOAD=1, REPLACE UNCONGESTED TIME AND DISTANCE MATRICES
if %preload% EQU 1 (@echo *** Preloading congested times and distances. ***)
if %preload% EQU 1 (uv run prep_macros\preload_congested_times_mac.py %file1% %val%)
@ECHO ==================================================================
REM - LOOP TO RUN MODEL
set /A counter=0
:while
if %counter% GTR 2 (goto loopend)
@ECHO -- Begin Transit skim Procedures: %date% %time% >> model_run_timestamp.txt
@ECHO.
@ECHO BEGINNING TRANSIT SKIM - FULL MODEL ITERATION %counter%
@ECHO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
REM AM Peak Skim
uv run macros/skim_transit.py %val% %counter% AM
if %ERRORLEVEL% neq 0 (goto issue)
uv run macros/transit_triple_indexing.py %val% AM
if %ERRORLEVEL% neq 0 (goto issue)
uv run macros/transit_skim_final_matrices.py AM
if %ERRORLEVEL% neq 0 (goto issue)
uv run macros/transit_skim_wrapup.py AM
if %ERRORLEVEL% neq 0 (goto issue)
REM Midday Skim
uv run macros/skim_transit.py %val% %counter% MD
if %ERRORLEVEL% neq 0 (goto issue)
uv run macros/transit_triple_indexing.py %val% MD
if %ERRORLEVEL% neq 0 (goto issue)
uv run macros/transit_skim_final_matrices.py MD
if %ERRORLEVEL% neq 0 (goto issue)
uv run macros/transit_skim_wrapup.py MD
if %ERRORLEVEL% neq 0 (goto issue)
@ECHO -- End of Transit Skim Procedures: %date% %time% >> model_run_timestamp.txt
@ECHO Begin Global Iteration %counter%: %date% %time% >> model_run_timestamp.txt
@ECHO PREPARING EMMEBANK - FULL MODEL ITERATION %counter%
@ECHO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
rem @ECHO on
uv run macros\init_HOVsim_databk_mac.py %val% %counter% %file1%
if %ERRORLEVEL% neq 0 (goto issue)
@ECHO -- Begin Mode-Destination Choice Procedures: %date% %time% >> model_run_timestamp.txt
@ECHO.
@ECHO RUN CMAP MODE-DESTINATION CHOICE MODEL - FULL MODEL ITERATION %counter%
@ECHO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
call conda activate cmap-modedest
cmap_modedest . --njobs %jobs% --max_zone_chunk %zones%
if %ERRORLEVEL% NEQ 0 (goto issue)
call conda deactivate
@ECHO -- End Mode-Destination Choice Procedures: %date% %time% >> model_run_timestamp.txt
@ECHO.
@ECHO -- Begin Time-of-Day Procedures: %date% %time% >> model_run_timestamp.txt
@ECHO.
@ECHO BEGINNING TOD HIGHWAY ASSIGNMENT - FULL MODEL ITERATION %counter%
@ECHO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
REM -- Loop through time-of-day procedures --
set /A tod_cntr=1
:tod_loop
REM
@ECHO --- Begin ttables.mac Period %tod_cntr%: %date% %time% >> model_run_timestamp.txt
call emme -ng 000 -m macros\ttables.mac %val% %tod_cntr% 92 93 >> blog.txt
@ECHO --- End ttables.mac Period %tod_cntr%: %date% %time% >> model_run_timestamp.txt
@ECHO --- Begin TOD_network_prep.py Period %tod_cntr%: %date% %time% >> model_run_timestamp.txt
uv run macros\TOD_network_prep.py %val% %tod_cntr% %counter% >> blog.txt
@ECHO --- End TOD_network_prep.py Period %tod_cntr%: %date% %time% >> model_run_timestamp.txt
@ECHO --- Begin assignment Period %tod_cntr%: %date% %time% >> model_run_timestamp.txt
@ECHO --- Begin assignment Period %tod_cntr%: %date% %time% ---
@ECHO -- Run TOD assignment --
uv run macros/SOLA_assignment.py %tod_cntr% %sola_threads% %counter% %RSPrun% %tempCnt% %selLinkFile% %trnAsmt%
if %ERRORLEVEL% NEQ 0 (goto issue)
@ECHO --- End assignment Period %tod_cntr%: %date% %time% >> model_run_timestamp.txt
@ECHO --- End assignment Period %tod_cntr%: %date% %time% ---
@ECHO --- Begin balance5I_7c.mac Period %tod_cntr%: %date% %time% >> model_run_timestamp.txt
@ECHO --- Balance time period volumes ---
uv run macros/balance5I_7c.py %counter% >> blog.txt
@ECHO --- End balance5I_7c.mac Period %tod_cntr%: %date% %time% >> model_run_timestamp.txt
@ECHO --- Begin time-of-day skim Period %tod_cntr%: %date% %time% >> model_run_timestamp.txt
@ECHO --- Complete time of day skims ---
uv run macros/TOD_skim.py %tod_cntr% %val%%counter%%tod_cntr% %sola_threads%
if %ERRORLEVEL% NEQ 0 (goto issue)
@ECHO -- End Time-of-Day Procedures Period %tod_cntr%: %date% %time% >> model_run_timestamp.txt
@ECHO -- End Time-of-Day Procedures for Period %tod_cntr%: %date% %time% --
set /A tod_cntr=tod_cntr+1
if %tod_cntr% LSS 9 (goto tod_loop)
:tod_end
REM -- End time-of-day loop --
@ECHO --- Begin Global Iteration MSA skims: %date% %time% >> model_run_timestamp.txt
@ECHO --- Begin Global Iteration MSA skims: %date% %time% ---
uv run macros/MSA_iteration_skims.py %file1% 3 %val%%counter%3 %counter% %sola_threads%
if %ERRORLEVEL% NEQ 0 (goto issue)
uv run macros/MSA_iteration_skims.py %file1% 5 %val%%counter%5 %counter% %sola_threads%
if %ERRORLEVEL% NEQ 0 (goto issue)
@ECHO --- End Global Iteration MSA skims: %date% %time% >> model_run_timestamp.txt
@ECHO --- End Global Iteration MSA skims: %date% %time%
@ECHO End Global Iteration %counter%: %date% %time% >> model_run_timestamp.txt
@ECHO -- End Global Iteration %counter%: %date% %time% --
set /A counter=counter+1
goto while
:loopend
@ECHO END OF FULL MODEL LOOP
@ECHO ==================================================================
@ECHO Begin Daily Accumulation Procedures: %date% %time% >> model_run_timestamp.txt
@ECHO.
@ECHO END OF FULL MODEL ITERATIONS - PREPARING DAILY ACCUMULATION SCENARIO
@ECHO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
call emme -ng 000 -m macros\Daily.Total.Asmt5I_7c.mac %val% >> blog.txt
REM Run script to complete select link analysis, if necessary
set /A counter=counter-1
if %tempCnt% EQU 0 (goto skip_sel_link)
if %trnAsmt% EQU 1 (goto skip_sel_link)
uv run macros/complete_select_link.py %file1% %val%%counter%9 %val%%counter%0 %tempCnt% %RSPrun%
if %ERRORLEVEL% NEQ 0 (goto issue)
:skip_sel_link
@ECHO End Daily Accumulation Procedures: %date% %time% >> model_run_timestamp.txt
REM Run script to write link data for MOVES emissions analysis.
uv run post_macros\punchmovesdata.py
@ECHO Link Data Written for MOVES Emissions Analysis: %date% %time% >> model_run_timestamp.txt
uv run post_macros\final_run_statistics.py
rem Run script to create input files for MOVES.
uv run post_macros\createMOVESinputfile.py
if %ERRORLEVEL% NEQ 0 (goto issue)
@echo %DATE% %TIME% - INFO - MOVES files created >> model_run_timestamp.txt
REM The following two lines delete the trip and utility files from global iterations 0 and 1 to reduce storage space. Comment them out to retain.
if exist cache\choice_simulator_trips_out.001 (rmdir /S /Q cache\choice_simulator_trips_out.001)
if exist cache\choice_simulator_trips_out.002 (rmdir /S /Q cache\choice_simulator_trips_out.002)
REM Delete utility files if flag is False.
if "%utilFile%"=="F" (del cache\choice_simulator_trips_out\choice_simulator_util_*.pq /Q)
:USskim
if "%UrbansimFile%"=="F" (goto skip_UrbanSim)
@ECHO Creating skim file for UrbanSim ...
uv run tg\scripts\urbansim_skims.py
:skip_UrbanSim
REM The following lines run transit assignment.
if "%transitAsmt%" EQU "T" (
@ECHO Begin Transit Assignment setup: %date% %time% >> model_run_timestamp.txt
REM -- Create matrices to hold TOD transit demand
if "%RSPrun%" EQU "T" (@ECHO -- Creating HBW transit demand matrices >> model_run_timestamp.txt)
uv run transit_asmt_macros/setup_transit_asmt_2_initialize_matrices.py %file1% %RSPrun%
if %ERRORLEVEL% NEQ 0 (goto issue)
REM -- Fill matrices with demand (point to conda environment)
uv run transit_asmt_macros\setup_transit_asmt_3_TOD_transit_demand.py %RSPrun%
if %ERRORLEVEL% NEQ 0 (goto issue)
@ECHO End Transit Assignment setup >> model_run_timestamp.txt
@ECHO Submit Transit Assignment >> model_run_timestamp.txt
cd transit_asmt_macros
uv run cmap_transit_assignment_runner.py %file1% 1 %val%
if %ERRORLEVEL% GTR 0 (goto issue)
cd ..
REM -- Delete transit assignment matrices
uv run transit_asmt_macros\delete_transit_skims.py %file1%
if %ERRORLEVEL% GTR 0 (goto issue)
if "%check2%" NEQ "None" (
REM -- Run select line analysis
uv run transit_asmt_macros\transit_select_line.py %file1% %val% %selLineFile%
if %ERRORLEVEL% GTR 0 (goto issue)
@ECHO -- Completed Select Line Analysis >> model_run_timestamp.txt
REM -- Summarize select line boardings
uv run transit_asmt_macros\select_line_boardings.py %file1% %val% %RSPrun% %selLineFile%
if %ERRORLEVEL% GTR 0 (goto issue)
@ECHO -- Completed Select Line Boarding Analysis >> model_run_timestamp.txt
)
@ECHO End Transit Assignment: %date% %time% >> model_run_timestamp.txt
)
goto last
REM ======================================================================
:filemiss
@ECHO
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REM Missing Files
REM Open tod_factors.xls and create files
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
goto end
:filemiss2
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO VERIFY m01auto.csv, m01tg.txt, m01type.csv EXIST in tg\data!!!
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pause
goto end
:mcmiss
@ECHO
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REM Missing M01, DISTR or Other Files
REM in Database directory
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
goto end
:hhmiss
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO HH_VTYPE_TRIPS_IN.TXT or TG_HHENUM_OUTPUT.TXT
@ECHO missing from Database folder.
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO.
goto end
:issue
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO THE LAST PROCEDURE DID NOT TERMINATE PROPERLY!
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO.
goto end
:CheckEmpty
if %~z1 == 0 (goto badfile)
goto filepass
:badfile
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO COULD NOT FIND .EMP FILE.
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO.
pause
goto end
:no_select_line_file
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO SELECT LINE FILE %selLineFile% IS SPECIFIED BUT DOES NOT EXIST.
@ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO.
pause
goto end
:last
@ECHO ====================================================== >> model_run_timestamp.txt
@ECHO END CMAP REGIONAL MODEL RUN - SCENARIO %val% >> model_run_timestamp.txt
@ECHO Model Run End Time: %date% %time% >> model_run_timestamp.txt
@ECHO ====================================================== >> model_run_timestamp.txt
@ECHO.
@ECHO END OF BATCH FILE - MODEL RUN COMPLETED
@ECHO ==================================================================
@ECHO ==================================================================
:end
pause
exit