Skip to content

Commit

Permalink
Merge pull request #34 from BayAreaMetro/calib1.5.2
Browse files Browse the repository at this point in the history
Merge updated calibration into master
  • Loading branch information
lmz committed May 22, 2020
2 parents 941589a + 54e563f commit fc1060f
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 43 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.Rproj.user
.Rhistory
.RData
~$*
core/cmf/**/build
core/models/**/build
core/projects/**/build
Expand Down
8 changes: 4 additions & 4 deletions config/params_2015.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

# Units = year 2000 cents per mile
AutoOpCost = 18.29
SmTruckOpCost = 37.15
LrTruckOpCost = 55.10
BusOpCost = 55.10
AutoOpCost = 13.73
SmTruckOpCost = 27.46
LrTruckOpCost = 41.19
BusOpCost = 41.19

# Telecommute adjustments
# Typically the telecommute constant is a negative number
Expand Down
Binary file modified model-files/model/ModeChoice.xls
Binary file not shown.
Binary file modified model-files/model/TM1.5.1 version/ModeChoice_TM1.5.1.xls
Binary file not shown.
Binary file modified model-files/model/TripModeChoice.xls
Binary file not shown.
2 changes: 1 addition & 1 deletion utilities/calibration/02_auto_ownership_TM.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ LOOKUP_COUNTY$county_name <- as.character(LOOKUP_COUNTY$county_name)



input.pop.households <- read.table(file = file.path(TARGET_DIR,"INPUT","popsyn","hhFile.calib.2015.csv"),
input.pop.households <- read.table(file = file.path(TARGET_DIR,"INPUT","popsyn","hhFile.2015.csv"),
header=TRUE, sep=",") %>% select(HHID, TAZ, PERSONS)

tazData <- read.table(file=file.path(TARGET_DIR,"INPUT","landuse","tazData.csv"), header=TRUE, sep=",")
Expand Down
2 changes: 1 addition & 1 deletion utilities/calibration/11_tour_mode_choice_TM.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ WORKBOOK_BLANK <- file.path(CODE_DIR, "workbook_templates","11_TourModeChoice_bl
calib_workbook <- loadWorkbook(file=WORKBOOK_BLANK)
calib_sheets <- getSheets(calib_workbook)

input.pop.households <- read.table(file = file.path(TARGET_DIR,"INPUT","popsyn","hhFile.calib.2015.csv"),
input.pop.households <- read.table(file = file.path(TARGET_DIR,"INPUT","popsyn","hhFile.2015.csv"),
header=TRUE, sep=",") %>%
select(HHID, TAZ, PERSONS, hworkers)

Expand Down
6 changes: 3 additions & 3 deletions utilities/calibration/copy_output.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
SETLOCAL EnableDelayedExpansion

set MODEL_DIR=\\MODEL2-D\Model2D-Share\TM152_Calibration\2015_TM152_calib07
set TARGET_DIR=M:\Development\Travel Model One\Calibration\Version 1.5.2\2015_TM152_IPA_07
set MODEL_DIR=\\MODEL2-D\Model2D-Share\Projects\2015_TM152_IPA_16
set TARGET_DIR=M:\Development\Travel Model One\Calibration\Version 1.5.2\2015_TM152_IPA_16
set CODE_DIR=X:\travel-model-one-calib1.5.2\utilities\calibration
rem start at 00 when INPUT or skims are updated
set CALIB_ITER=13
set CALIB_ITER=00

echo CALIB_ITER=%CALIB_ITER%

Expand Down
40 changes: 20 additions & 20 deletions utilities/calibration/updateUEC.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ if (SUBMODEL=="DestinationChoice") {
"othdiscr" =c( "constants",36, 3, 64),
"workbased" =c( "constants",40, 3, 64),

"cbd_work" =c( "CBD_SF", 9, 3, 8),
"cbd_university"=c( "CBD_SF", 9, 9, 14),
"cbd_school" =c( "CBD_SF", 9, 15, 20),
"cbd_escort" =c( "CBD_SF", 9, 21, 26),
"cbd_shopping" =c( "CBD_SF", 9, 21, 26),
"cbd_eatout" =c( "CBD_SF", 9, 27, 32),
"cbd_othmaint" =c( "CBD_SF", 9, 21, 26),
"cbd_social" =c( "CBD_SF", 9, 27, 32),
"cbd_othdiscr" =c( "CBD_SF", 9, 27, 32),
"cbd_workbased" =c( "CBD_SF", 9, 33, 38))
"cbd_work" =c( "CBD_SF", 9, 3, 10),
"cbd_university"=c( "CBD_SF", 9, 11, 18),
"cbd_school" =c( "CBD_SF", 9, 19, 26),
"cbd_escort" =c( "CBD_SF", 9, 27, 34),
"cbd_shopping" =c( "CBD_SF", 9, 27, 34),
"cbd_eatout" =c( "CBD_SF", 9, 35, 42),
"cbd_othmaint" =c( "CBD_SF", 9, 27, 34),
"cbd_social" =c( "CBD_SF", 9, 35, 42),
"cbd_othdiscr" =c( "CBD_SF", 9, 35, 42),
"cbd_workbased" =c( "CBD_SF", 9, 43, 50))

COPY_DST <- list("work" =c( "Work", 5, 408, 469),
"university" =c("University", 5, 408, 469),
Expand All @@ -161,16 +161,16 @@ if (SUBMODEL=="DestinationChoice") {
"othdiscr" =c( "OthDiscr", 5, 408, 469),
"workbased" =c( "WorkBased", 5, 411, 472),

"cbd_work" =c( "Work", 5, 470, 475),
"cbd_university"=c("University", 5, 470, 475),
"cbd_school" =c( "School", 5, 470, 475),
"cbd_escort" =c( "Escort", 5, 470, 475),
"cbd_shopping" =c( "Shopping", 5, 470, 475),
"cbd_eatout" =c( "EatOut", 5, 470, 475),
"cbd_othmaint" =c( "OthMaint", 5, 470, 475),
"cbd_social" =c( "Social", 5, 470, 475),
"cbd_othdiscr" =c( "OthDiscr", 5, 470, 475),
"cbd_workbased" =c( "WorkBased", 5, 473, 478))
"cbd_work" =c( "Work", 5, 470, 477),
"cbd_university"=c("University", 5, 470, 477),
"cbd_school" =c( "School", 5, 470, 477),
"cbd_escort" =c( "Escort", 5, 470, 477),
"cbd_shopping" =c( "Shopping", 5, 470, 477),
"cbd_eatout" =c( "EatOut", 5, 470, 477),
"cbd_othmaint" =c( "OthMaint", 5, 470, 477),
"cbd_social" =c( "Social", 5, 470, 477),
"cbd_othdiscr" =c( "OthDiscr", 5, 470, 477),
"cbd_workbased" =c( "WorkBased", 5, 473, 480))

CONFIG <- list(CALIB_WORKBOOK, COPY_SRC, COPY_DST)

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ F_INPUT_SURVEY_DIR = "M:/Data/OnBoard/Data and Reports/_data Standardized"
F_INPUT_LEGACY_RDATA = file.path(F_INPUT_SURVEY_DIR, "survey_legacy.RData")
F_INPUT_STANDARD_RDATA = file.path(F_INPUT_SURVEY_DIR, "survey_standard.RData")

F_VALIDATION_DIR = "M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_06/OUTPUT/validation"
F_VALIDATION_DIR = "." # OUTPUT/validation
F_INPUT_RIDERSHIP = "M:/Data/Transit/2015 Ridership/transit ridership growth database.xlsx"
F_INPUT_ESTIMATED = "M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_06/OUTPUT/trn/trnline.csv"
F_INPUT_ESTIMATED = "../trn/trnline.csv"

F_INPUT_MUNI_APC = "M:/Data/Transit/Muni APC Through Time/consolidated-database.csv"

Expand Down
4 changes: 2 additions & 2 deletions utilities/prepare-validation-data/Roadways to Caltrans.twb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<connection class='federated'>
<named-connections>
<named-connection caption='Roadways to Caltrans' name='hyper.0a5uweq07wotl9181m3kq0yeapk0'>
<connection authentication='auth-none' author-locale='en_US' class='hyper' db-format='dataengine' dbname='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_04/OUTPUT/validation/Roadways to Caltrans.tde' default-settings='yes' sslmode='' username='tableau_internal_user' workgroup-auth-mode='as-is' />
<connection authentication='auth-none' author-locale='en_US' class='hyper' db-format='dataengine' dbname='Roadways to Caltrans.tde' default-settings='yes' sslmode='' username='tableau_internal_user' workgroup-auth-mode='as-is' />
</named-connection>
</named-connections>
<relation connection='hyper.0a5uweq07wotl9181m3kq0yeapk0' name='Extract' table='[Extract].[Extract]' type='table' />
Expand Down Expand Up @@ -593,7 +593,7 @@
<connection class='federated'>
<named-connections>
<named-connection caption='Roadways to Caltrans_wide' name='hyper.0chslro0l3kzep12ggobi0uj41rs'>
<connection authentication='auth-none' author-locale='en_US' class='hyper' db-format='dataengine' dbname='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_04/OUTPUT/validation/Roadways to Caltrans_wide.tde' default-settings='yes' sslmode='' username='tableau_internal_user' workgroup-auth-mode='as-is' />
<connection authentication='auth-none' author-locale='en_US' class='hyper' db-format='dataengine' dbname='Roadways to Caltrans_wide.tde' default-settings='yes' sslmode='' username='tableau_internal_user' workgroup-auth-mode='as-is' />
</named-connection>
</named-connections>
<relation connection='hyper.0chslro0l3kzep12ggobi0uj41rs' name='Extract' table='[Extract].[Extract]' type='table' />
Expand Down
14 changes: 7 additions & 7 deletions utilities/prepare-validation-data/Roadways to PeMS.twb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<SortTagCleanup />
<WindowsPersistSimpleIdentifiers />
</document-format-change-manifest>
<repository-location id='RoadwaystoPeMS_2015_TM152_IPA_04' path='/workbooks' revision='1.1' />
<repository-location id='RoadwaystoPeMS' path='/workbooks' revision='1.1' />
<preferences>
<preference name='ui.encoding.shelf.height' value='24' />
<preference name='ui.shelf.height' value='26' />
Expand Down Expand Up @@ -38,7 +38,7 @@
<connection class='federated'>
<named-connections>
<named-connection caption='Roadways to PeMS_wide' name='hyper.1dc8o801nixxz81933end1vk8njc'>
<connection authentication='auth-none' author-locale='en_US' class='hyper' db-format='dataengine' dbname='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_04/OUTPUT/validation/Roadways to PeMS_wide.tde' default-settings='yes' sslmode='' username='tableau_internal_user' workgroup-auth-mode='as-is' />
<connection authentication='auth-none' author-locale='en_US' class='hyper' db-format='dataengine' dbname='Roadways to PeMS_wide.tde' default-settings='yes' sslmode='' username='tableau_internal_user' workgroup-auth-mode='as-is' />
</named-connection>
</named-connections>
<relation connection='hyper.1dc8o801nixxz81933end1vk8njc' name='Extract' table='[Extract].[Extract]' type='table' />
Expand Down Expand Up @@ -461,7 +461,7 @@
<column-instance column='[2015 Observed]' derivation='Sum' name='[sum:2015 Observed:qk]' pivot='key' type='quantitative' />
<column-instance column='[2016 Observed]' derivation='Sum' name='[sum:2016 Observed:qk]' pivot='key' type='quantitative' />
<extract count='-1' enabled='false' units='records'>
<connection access_mode='readonly' authentication='auth-none' author-locale='en_US' class='hyper' dbname='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_04/OUTPUT/validation/Roadways to PeMS_wide Extract.hyper' default-settings='yes' schema='Extract' sslmode='' tablename='Extract' update-time='02/20/2020 05:58:09 PM' username='tableau_internal_user'>
<connection access_mode='readonly' authentication='auth-none' author-locale='en_US' class='hyper' dbname='Roadways to PeMS_wide Extract.hyper' default-settings='yes' schema='Extract' sslmode='' tablename='Extract' update-time='02/20/2020 05:58:09 PM' username='tableau_internal_user'>
<relation name='Extract' table='[Extract].[Extract]' type='table' />
<refresh increment-key='' incremental-updates='false'>
<refresh-event add-from-file-path='Roadways to PeMS_wide Extract' increment-value='%null%' refresh-type='create' rows-inserted='11049' timestamp-start='2020-02-20 17:58:09.631' />
Expand Down Expand Up @@ -1003,7 +1003,7 @@
<connection class='federated'>
<named-connections>
<named-connection caption='Roadways to PeMS Extract' name='M:\Application\Model One\RTP2021\IncrementalProgress\2015_TM151_IPA_00\OUTPUT\validation\Roadways to PeMS.tdeleaf'>
<connection authentication='auth-none' author-locale='en_US' class='hyper' db-format='dataengine' dbname='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_04/OUTPUT/validation/Roadways to PeMS.tde' default-settings='yes' sslmode='' username='tableau_internal_user' workgroup-auth-mode='as-is' />
<connection authentication='auth-none' author-locale='en_US' class='hyper' db-format='dataengine' dbname='Roadways to PeMS.tde' default-settings='yes' sslmode='' username='tableau_internal_user' workgroup-auth-mode='as-is' />
</named-connection>
</named-connections>
<relation connection='M:\Application\Model One\RTP2021\IncrementalProgress\2015_TM151_IPA_00\OUTPUT\validation\Roadways to PeMS.tdeleaf' name='Extract (Extract.Extract)' table='[Extract].[Extract]' type='table' />
Expand Down Expand Up @@ -1441,7 +1441,7 @@
</groupfilter>
</group>
<extract count='-1' enabled='false' units='records'>
<connection access_mode='readonly' authentication='auth-none' author-locale='en_US' class='hyper' dbname='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_04/OUTPUT/validation/Roadways to PeMS Extract.hyper' default-settings='yes' schema='Extract' sslmode='' tablename='Extract' update-time='02/20/2020 05:58:17 PM' username='tableau_internal_user'>
<connection access_mode='readonly' authentication='auth-none' author-locale='en_US' class='hyper' dbname='Roadways to PeMS Extract.hyper' default-settings='yes' schema='Extract' sslmode='' tablename='Extract' update-time='02/20/2020 05:58:17 PM' username='tableau_internal_user'>
<relation name='Extract' table='[Extract].[Extract]' type='table' />
<refresh increment-key='' incremental-updates='false'>
<refresh-event add-from-file-path='Roadways to PeMS Extract' increment-value='%null%' refresh-type='create' rows-inserted='46670' timestamp-start='2020-02-20 17:58:17.903' />
Expand Down Expand Up @@ -2088,7 +2088,7 @@
<connection class='federated'>
<named-connections>
<named-connection caption='avgload5period' name='textscan.0oek21218h1ymb1eweh2y0oepqj9'>
<connection class='textscan' directory='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_04/OUTPUT/validation' filename='avgload5period.csv' password='' server='' workgroup-auth-mode='as-is' />
<connection class='textscan' directory='.' filename='avgload5period.csv' password='' server='' workgroup-auth-mode='as-is' />
</named-connection>
</named-connections>
<relation connection='textscan.0oek21218h1ymb1eweh2y0oepqj9' name='avgload5period.csv' table='[avgload5period#csv]' type='table'>
Expand Down Expand Up @@ -2562,7 +2562,7 @@
<connection class='federated'>
<named-connections>
<named-connection caption='auto_times' name='textscan.002ygtv1jwtei5136in3q18icoyn'>
<connection class='textscan' directory='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_04/OUTPUT/metrics' filename='auto_times.csv' password='' server='' workgroup-auth-mode='as-is' />
<connection class='textscan' directory='../metrics' filename='auto_times.csv' password='' server='' workgroup-auth-mode='as-is' />
</named-connection>
</named-connections>
<relation connection='textscan.002ygtv1jwtei5136in3q18icoyn' name='auto_times.csv' table='[auto_times#csv]' type='table'>
Expand Down
6 changes: 3 additions & 3 deletions utilities/prepare-validation-data/Transit Validation.twb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<connection class='federated'>
<named-connections>
<named-connection caption='observed_and_estimated_ridership' name='textscan.0nr78lj0zpqupo1bini040v4ppw0'>
<connection class='textscan' directory='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_00/OUTPUT/validation' filename='observed_and_estimated_ridership.csv' password='' server='' workgroup-auth-mode='as-is' />
<connection class='textscan' directory='.' filename='observed_and_estimated_ridership.csv' password='' server='' workgroup-auth-mode='as-is' />
</named-connection>
</named-connections>
<relation connection='textscan.0nr78lj0zpqupo1bini040v4ppw0' name='observed_and_estimated_ridership.csv' table='[observed_and_estimated_ridership#csv]' type='table'>
Expand Down Expand Up @@ -228,7 +228,7 @@
<connection class='federated'>
<named-connections>
<named-connection caption='muni_observed' name='textscan.0t9bgx21w1gykl1fjesyl0hwgax9'>
<connection class='textscan' directory='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_00/OUTPUT/validation' filename='muni_observed.csv' password='' server='' workgroup-auth-mode='as-is' />
<connection class='textscan' directory='.' filename='muni_observed.csv' password='' server='' workgroup-auth-mode='as-is' />
</named-connection>
</named-connections>
<relation connection='textscan.0t9bgx21w1gykl1fjesyl0hwgax9' name='muni_observed.csv' table='[muni_observed#csv]' type='table'>
Expand Down Expand Up @@ -300,7 +300,7 @@
<connection class='federated'>
<named-connections>
<named-connection caption='trnline' name='textscan.0irp40u0119v8i12tzbms1vgttyq'>
<connection class='textscan' directory='M:/Development/Travel Model One/Calibration/Version 1.5.2/2015_TM152_IPA_00/OUTPUT/trn' filename='trnline.csv' password='' server='' workgroup-auth-mode='as-is' />
<connection class='textscan' directory='../trn' filename='trnline.csv' password='' server='' workgroup-auth-mode='as-is' />
</named-connection>
</named-connections>
<relation connection='textscan.0irp40u0119v8i12tzbms1vgttyq' name='trnline.csv' table='[trnline#csv]' type='table'>
Expand Down

0 comments on commit fc1060f

Please sign in to comment.