Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transit 2050 tm15110 #70

Draft
wants to merge 16 commits into
base: transit_2050_ppa
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# travel-model-one
The Metropolitan Transportation Commission (MTC) maintains a simulation model of typical weekday travel to assist in regional planning activities. MTC makes the software and scripts necessary to implement the model as well as detailed model results available to the public. Users of the model and/or the model's results are entirely responsible for the outcomes, interpretations, and conclusions they reach from the information. Users of the MTC model or model results shall in no way imply MTC's support or review of their findings or analyses.

This transit_2050_tm15110 branch is based on TM1.5.1.10. Updates were made to run on Azure VMs as part of the Transit 2050 work. Branch was rebased ontop of https://github.com/BayAreaMetro/travel-model-one/tree/transit_2050_ppa on Jan 26, 2024.

## Model Versions
The following model versions are available in the repository:

Expand Down
48 changes: 24 additions & 24 deletions model-files/RunCoreSummaries.bat
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,22 @@ if %NEED_SUMMARY% GTR 0 (
echo.

:: convert the summaries to tde for just this dir
for %%X in ("%TARGET_DIR%\core_summaries\*.rdata") DO (
if not exist "%TARGET_DIR%\core_summaries\%%~nX.tde" (
python "%CODE_DIR%\RdataToTableauExtract.py" "%TARGET_DIR%\core_summaries" "%TARGET_DIR%\core_summaries" %%~nxX
if %ERRORLEVEL% GTR 0 goto done
@REM for %%X in ("%TARGET_DIR%\core_summaries\*.rdata") DO (
@REM if not exist "%TARGET_DIR%\core_summaries\%%~nX.tde" (
@REM python "%CODE_DIR%\RdataToTableauExtract.py" "%TARGET_DIR%\core_summaries" "%TARGET_DIR%\core_summaries" %%~nxX
@REM if %ERRORLEVEL% GTR 0 goto done

echo.
)
)
@REM echo.
@REM )
@REM )

:: convert the avgload5period.csv
if not exist "%TARGET_DIR%\core_summaries\avgload5period.tde" (
python "%CODE_DIR%\csvToTableauExtract.py" "%TARGET_DIR%\hwy\iter%ITER%" "%TARGET_DIR%\core_summaries" avgload5period.csv
if %ERRORLEVEL% GTR 0 goto done
@REM if not exist "%TARGET_DIR%\core_summaries\avgload5period.tde" (
@REM python "%CODE_DIR%\csvToTableauExtract.py" "%TARGET_DIR%\hwy\iter%ITER%" "%TARGET_DIR%\core_summaries" avgload5period.csv
@REM if %ERRORLEVEL% GTR 0 goto done

echo.
)
@REM echo.
@REM )

:: create trn\trnline.csv
if not exist "%TARGET_DIR%\trn\trnline.csv" (
Expand All @@ -74,18 +74,18 @@ if not exist "%TARGET_DIR%\trn\trnline.csv" (
)

:: convert the transit files
if not exist "%TARGET_DIR%\core_summaries\trnline.tde" (
FOR %%H in (EA AM MD PM EV) DO (
FOR %%J in (loc lrf exp hvy com) DO (
rem walk -> transit -> walk
python "%CODE_DIR%\csvToTableauExtract.py" --header "name,mode,owner,frequency,line time,line dist,total boardings,passenger miles,passenger hours,path id" --output trnline.tde --join "%CODE_DIR%\reference-transit-modes.csv" --append "%TARGET_DIR%\trn\TransitAssignment.iter%ITER%" "%TARGET_DIR%\core_summaries" trnline%%H_wlk_%%J_wlk.csv
rem drive -> transit -> walk
python "%CODE_DIR%\csvToTableauExtract.py" --header "name,mode,owner,frequency,line time,line dist,total boardings,passenger miles,passenger hours,path id" --output trnline.tde --join "%CODE_DIR%\reference-transit-modes.csv" --append "%TARGET_DIR%\trn\TransitAssignment.iter%ITER%" "%TARGET_DIR%\core_summaries" trnline%%H_drv_%%J_wlk.csv
rem walk -> transit -> drive
python "%CODE_DIR%\csvToTableauExtract.py" --header "name,mode,owner,frequency,line time,line dist,total boardings,passenger miles,passenger hours,path id" --output trnline.tde --join "%CODE_DIR%\reference-transit-modes.csv" --append "%TARGET_DIR%\trn\TransitAssignment.iter%ITER%" "%TARGET_DIR%\core_summaries" trnline%%H_wlk_%%J_drv.csv
)
)
)
@REM if not exist "%TARGET_DIR%\core_summaries\trnline.tde" (
@REM FOR %%H in (EA AM MD PM EV) DO (
@REM FOR %%J in (loc lrf exp hvy com) DO (
@REM rem walk -> transit -> walk
@REM python "%CODE_DIR%\csvToTableauExtract.py" --header "name,mode,owner,frequency,line time,line dist,total boardings,passenger miles,passenger hours,path id" --output trnline.tde --join "%CODE_DIR%\reference-transit-modes.csv" --append "%TARGET_DIR%\trn\TransitAssignment.iter%ITER%" "%TARGET_DIR%\core_summaries" trnline%%H_wlk_%%J_wlk.csv
@REM rem drive -> transit -> walk
@REM python "%CODE_DIR%\csvToTableauExtract.py" --header "name,mode,owner,frequency,line time,line dist,total boardings,passenger miles,passenger hours,path id" --output trnline.tde --join "%CODE_DIR%\reference-transit-modes.csv" --append "%TARGET_DIR%\trn\TransitAssignment.iter%ITER%" "%TARGET_DIR%\core_summaries" trnline%%H_drv_%%J_wlk.csv
@REM rem walk -> transit -> drive
@REM python "%CODE_DIR%\csvToTableauExtract.py" --header "name,mode,owner,frequency,line time,line dist,total boardings,passenger miles,passenger hours,path id" --output trnline.tde --join "%CODE_DIR%\reference-transit-modes.csv" --append "%TARGET_DIR%\trn\TransitAssignment.iter%ITER%" "%TARGET_DIR%\core_summaries" trnline%%H_wlk_%%J_drv.csv
@REM )
@REM )
@REM )

endlocal

Expand Down
31 changes: 26 additions & 5 deletions model-files/RunModel.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ call CTRAMP\runtime\SetPath.bat
Cluster "%COMMPATH%\CTRAMP" 1-48 Starthide Exit

:: Set the IP address of the host machine which sends tasks to the client machines
set HOST_IP_ADDRESS=10.6.0.4
if %computername%==azmdlppw06 set HOST_IP_ADDRESS=10.6.0.4
if %computername%==azmdlppw07 set HOST_IP_ADDRESS=10.0.0.4
if %computername%==azmdlppw08 set HOST_IP_ADDRESS=10.0.0.4
if %computername%==azmdlppw09 set HOST_IP_ADDRESS=10.0.0.4
if %computername%==AZMDLPPW10 set HOST_IP_ADDRESS=10.0.0.4
if %computername%==AZMDLPPW11 set HOST_IP_ADDRESS=10.0.0.4
if %computername%==AZMDLPPW12 set HOST_IP_ADDRESS=10.0.0.4
if %computername%==AZMDLPPW13 set HOST_IP_ADDRESS=10.6.0.5
if %computername%==MODEL-GRTM set HOST_IP_ADDRESS=10.120.0.23
if %computername%==MODEL2-A set HOST_IP_ADDRESS=192.168.1.206
if %computername%==MODEL2-B set HOST_IP_ADDRESS=192.168.1.207
if %computername%==MODEL2-C set HOST_IP_ADDRESS=192.168.1.208
Expand Down Expand Up @@ -217,7 +227,7 @@ runtpp CTRAMP\scripts\skims\NonMotorizedSkims.job
if ERRORLEVEL 2 goto done

:: Step 4.5: Build initial transit files
set PYTHONPATH=%USERPROFILE%\Documents\GitHub\NetworkWrangler;%USERPROFILE%\Documents\GitHub\NetworkWrangler\_static
::set PYTHONPATH=%USERPROFILE%\Documents\GitHub\NetworkWrangler;%USERPROFILE%\Documents\GitHub\NetworkWrangler\_static
python CTRAMP\scripts\skims\transitDwellAccess.py NORMAL NoExtraDelay Simple complexDwell %COMPLEXMODES_DWELL% complexAccess %COMPLEXMODES_ACCESS%
if ERRORLEVEL 2 goto done

Expand All @@ -228,7 +238,7 @@ if ERRORLEVEL 2 goto done
::
:: ------------------------------------------------------------------------------------------------------

: iter0
:iter0

:: Set the iteration parameters
set ITER=0
Expand All @@ -246,13 +256,16 @@ set PREV_WGT=0.00
call CTRAMP\RunIteration.bat
if ERRORLEVEL 2 goto done

:: called again due to python2 not getting activated in conda env...
call CTRAMP\runtime\SetPath.bat

:: ------------------------------------------------------------------------------------------------------
::
:: Step 7: Prepare for iteration 1 and execute RunIteration batch file
::
:: ------------------------------------------------------------------------------------------------------

: iter1
:iter1

:: Set the iteration parameters
set ITER=1
Expand All @@ -270,13 +283,16 @@ if ERRORLEVEL 1 goto done
call CTRAMP\RunIteration.bat
if ERRORLEVEL 2 goto done

:: called again due to python2 not getting activated in conda env...
call CTRAMP\runtime\SetPath.bat

:: ------------------------------------------------------------------------------------------------------
::
:: Step 8: Prepare for iteration 2 and execute RunIteration batch file
::
:: ------------------------------------------------------------------------------------------------------

: iter2
:iter2

:: Set the iteration parameters
set ITER=2
Expand All @@ -294,6 +310,8 @@ if ERRORLEVEL 1 goto done
call CTRAMP\RunIteration.bat
if ERRORLEVEL 2 goto done

:: called again due to python2 not getting activated in conda env...
call CTRAMP\runtime\SetPath.bat

:: ------------------------------------------------------------------------------------------------------
::
Expand All @@ -319,6 +337,9 @@ if ERRORLEVEL 1 goto done
call CTRAMP\RunIteration.bat
if ERRORLEVEL 2 goto done

:: called again due to python2 not getting activated in conda env...
call CTRAMP\runtime\SetPath.bat

:: Shut down java
C:\Windows\SysWOW64\taskkill /f /im "java.exe"

Expand Down Expand Up @@ -386,7 +407,7 @@ if ERRORLEVEL 2 goto done

:: Extract key files
call extractkeyfiles
c:\windows\system32\Robocopy.exe /E extractor "%M_DIR%\OUTPUT"
@REM c:\windows\system32\Robocopy.exe /E extractor "%M_DIR%\OUTPUT"

: cleanup

Expand Down
Loading