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

Trip toll cap #69

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1d6603e
initial analysis looking at toll trip frequency
FlaviaTsang Jan 27, 2024
c253169
analysis using trips.rdata, to confirm tables in Calc_tollRoadUsers_n…
FlaviaTsang Jan 27, 2024
11ad2ac
minor fix - variable name changed from "person" to "tollRoadUsers"
FlaviaTsang Jan 29, 2024
d96a297
look at diffs between a genuine daily toll cap and a pseudo daily tol…
FlaviaTsang Jan 29, 2024
b6c09bd
Add toll cap to UECs (tour and trip mode choice) + add new params to …
FlaviaTsang Jan 29, 2024
b8a5cc7
propagate the new params to hwyParam.block
FlaviaTsang Jan 31, 2024
6852cac
R script to summarize the test run results after running just core
FlaviaTsang Jan 31, 2024
dfe39a3
incorporating trip toll cap in the summary script CoreSummaries.R
FlaviaTsang Feb 2, 2024
db9d88c
Partial updates - still need to differentiate the two subgroups withi…
FlaviaTsang Feb 5, 2024
25fb8c1
initial edits to incorporate min_vtoll in HwySkims.job (updates comin…
FlaviaTsang Feb 9, 2024
cb58053
set minimum toll, except when vtoll is 0 as it indicates no toll path
FlaviaTsang Feb 9, 2024
a677071
Propagate min_vtoll from params.properties --> runtimeconfiguration.p…
FlaviaTsang Feb 11, 2024
964ab59
updated details in comments re. ACTC min toll
FlaviaTsang Feb 13, 2024
a41f77e
update properties file for NGF NoProject
FlaviaTsang Feb 13, 2024
8de8800
updating the properties file for RTP2025, for 2023 model year for now
FlaviaTsang Feb 13, 2024
0356797
renaming the properties file with "min_vtoll =" (this is needed to re…
FlaviaTsang Apr 11, 2024
2d8afdc
Merge pull request #72 from BayAreaMetro/min_vtoll
FlaviaTsang Apr 11, 2024
6d41f4e
fix a typo in existing code (unrelated to trip toll cap implementation)
FlaviaTsang Apr 11, 2024
04a0ce2
updates to include toll cap
FlaviaTsang Apr 12, 2024
0f38904
make sure the two scripts are copied to %CODE_DIR%
FlaviaTsang Apr 12, 2024
2b9aeb4
adding RunNextGenFwysMetrics.bat to RunModel
FlaviaTsang Apr 12, 2024
1a0741d
commit initial properties file for 2035
FlaviaTsang Apr 12, 2024
38d1ed7
committing an initial setupmodel for NGFr2 All Lane Tolling
FlaviaTsang Apr 12, 2024
badd9e2
add a destination for the copying command
FlaviaTsang Apr 12, 2024
7ef5928
error out if HhldIncCutOff_forQ2subset is not equal to 60000
FlaviaTsang Apr 12, 2024
27fac9a
added comments (60000 is the only acceptable value for hhldinc_cutoff )
FlaviaTsang Apr 12, 2024
e9b107e
add min_vtoll = xx.xx to hwyParam.block (to resolve merge conflict)
FlaviaTsang Apr 12, 2024
1ee3c3d
Merge branch 'MinVtoll_TollCap' into TripTollCap
FlaviaTsang Apr 12, 2024
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
5 changes: 5 additions & 0 deletions model-files/RunModel.bat
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,11 @@ if ERRORLEVEL 2 goto done
call RunScenarioMetrics
if ERRORLEVEL 2 goto done

if %PROJECT%==NGF (
call RunNextGenFwysMetrics.bat
if ERRORLEVEL 2 goto done
)

:: ------------------------------------------------------------------------------------------------------
::
:: Step 17: Directory clean up
Expand Down
Binary file modified model-files/model/ModeChoice.xls
Binary file not shown.
Binary file modified model-files/model/TripModeChoice.xls
Binary file not shown.
5 changes: 5 additions & 0 deletions model-files/runtime/mtcTourBased.properties
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,11 @@ Means_Based_Fare_Q1Factor = set_by_RuntimeConfiguration.py
Means_Based_Fare_Q2Factor = set_by_RuntimeConfiguration.py
Means_Based_Cordon_Fare_Q1Factor = set_by_RuntimeConfiguration.py
Means_Based_Cordon_Fare_Q2Factor = set_by_RuntimeConfiguration.py

TripTollCap_Q1 = set_by_RuntimeConfiguration.py
TripTollCap_firstXpercentOfQ2 = set_by_RuntimeConfiguration.py
hhldinc_cutoff = set_by_RuntimeConfiguration.py

Adjust_TNCsingle_TourMode = set_by_RuntimeConfiguration.py
Adjust_TNCshared_TourMode = set_by_RuntimeConfiguration.py
Adjust_TNCsingle_TripMode = set_by_RuntimeConfiguration.py
Expand Down
9 changes: 9 additions & 0 deletions model-files/scripts/block/hwyParam.block
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,12 @@ Means_Based_Tolling_Q1Factor = xx.xx ; a factor between 0 to 1 indicati
Means_Based_Tolling_Q2Factor = xx.xx ; a factor between 0 to 1 indicating the toll discount by income group
Means_Based_Cordon_Tolling_Q1Factor = xx.xx ; a factor between 0 to 1 indicating the cordon toll discount by income group
Means_Based_Cordon_Tolling_Q2Factor = xx.xx ; a factor between 0 to 1 indicating the cordon toll discount by income group

; set by RuntimeConfiguration.py -- Minimum value toll, in 2000 cents
min_vtoll = xx.xx

; set by RuntimeConfiguration.py -- Trip toll cap (aka pseudo monthly toll cap)
; these factors are not used in assignment; they are only used in summarization (e.g., sumAutoTimes.job and CoreSummaries.R)
TripTollCap_Q1 = xxxx.xx ; trip toll cap for household income group Q1, in 2000 cents
TripTollCap_firstXpercentOfQ2 = xxxx.xx ; trip toll cap for the first X% of household income group Q2, in 2000 cents
hhldinc_cutoff = xxxxx ; the hhld inc cutoff for the 2nd tier that receives the toll cap - a number between 30000 and 60000 in 2000$
30 changes: 24 additions & 6 deletions model-files/scripts/core_summaries/CoreSummaries.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if (JUST_MES=="1") {
# read means-based cost factors
MBT_factors <- readLines(file.path(TARGET_DIR,"ctramp/scripts/block/hwyParam.block"))
MBF_factors <- readLines(file.path(TARGET_DIR,"ctramp/scripts/block/trnParam.block"))
TollCap_factors <- readLines(file.path(TARGET_DIR,"ctramp/scripts/block/hwyParam.block"))

MBT_Q1_line <- grep("Means_Based_Tolling_Q1Factor",MBT_factors,value=TRUE)
MBT_Q1_string <- substr(MBT_Q1_line,32,39)
Expand All @@ -48,6 +49,20 @@ MBF_Q2_line <- grep("Means_Based_Fare_Q2Factor",MBF_factors,value=TRUE)
MBF_Q2_string <- substr(MBF_Q2_line,29,36)
MBF_Q2_factor <- as.numeric(MBF_Q2_string)

TollCap_Q1_line <- grep("TripTollCap_Q1", TollCap_factors,value=TRUE)
TollCap_Q1_string <- substr(TollCap_Q1_line,19,22)
TollCap_Q1_InCents <- as.numeric(TollCap_Q1_string)
TollCap_Q2subset_line <- grep("TripTollCap_firstXpercentOfQ2", TollCap_factors,value=TRUE)
TollCap_Q2subset_string <- substr(TollCap_Q2subset_line,34,39)
TollCap_Q2subset_InCents <- as.numeric(TollCap_Q2subset_string)
TollCap_Q2subsetCutOff_line <- grep("hhldinc_cutoff", TollCap_factors,value=TRUE)
TollCap_Q2subsetCutOff_string <- substr(TollCap_Q2subsetCutOff_line,18,22)
TollCap_Q2subsetCutOff <- as.numeric(TollCap_Q2subsetCutOff_string)


print(paste("Trip toll cap for household income group Q1, in 2000 cents:", TollCap_Q1_InCents))
print(paste("Trip toll cap for the first X% of household income group Q2, in 2000 cents:", TollCap_Q2subset_InCents))
print(paste("The household income cutoff for the subset of Q2 household that receives the toll cap:", TollCap_Q2subsetCutOff))

# write results in TARGET_DIR/core_summaries
if (!file.exists(RESULTS_DIR)) {
Expand Down Expand Up @@ -329,16 +344,19 @@ add_cost <- function(this_timeperiod, input_trips_or_tours, reverse_od = FALSE)
# assign cost value if we can to new column cost2
relevant <- relevant %>%
mutate(cost2 = (costMode == 1) * da +
(costMode == 2 & incQ == 1) * daToll * MBT_Q1_factor +
(costMode == 2 & incQ == 2) * daToll * MBT_Q2_factor +
(costMode == 2 & incQ == 1) * pmin(daToll, TollCap_Q1_InCents) * MBT_Q1_factor +
(costMode == 2 & incQ == 2 & income < TollCap_Q2subsetCutOff) * pmin(daToll, TollCap_Q2subset_InCents) * MBT_Q2_factor +
(costMode == 2 & incQ == 2 & income >= TollCap_Q2subsetCutOff) * daToll * MBT_Q2_factor +
(costMode == 2 & incQ >= 3) * daToll +
(costMode == 3) * s2 +
(costMode == 4 & incQ == 1) * s2Toll * MBT_Q1_factor +
(costMode == 4 & incQ == 2) * s2Toll * MBT_Q2_factor +
(costMode == 4 & incQ == 1) * pmin(s2Toll, TollCap_Q1_InCents) * MBT_Q1_factor +
(costMode == 4 & incQ == 2 & income < TollCap_Q2subsetCutOff) * pmin(s2Toll, TollCap_Q2subset_InCents) * MBT_Q2_factor +
(costMode == 4 & incQ == 2 & income >= TollCap_Q2subsetCutOff) * s2Toll * MBT_Q2_factor +
(costMode == 4 & incQ >= 3) * s2Toll +
(costMode == 5) * s3 +
(costMode == 6 & incQ == 1) * s3Toll* MBT_Q1_factor +
(costMode == 6 & incQ == 2) * s3Toll* MBT_Q2_factor +
(costMode == 6 & incQ == 1) * pmin(s3Toll, TollCap_Q1_InCents)* MBT_Q1_factor +
(costMode == 6 & incQ == 2 & income < TollCap_Q2subsetCutOff) * pmin(s3Toll, TollCap_Q2subset_InCents) * MBT_Q2_factor +
(costMode == 6 & incQ == 2 & income >= TollCap_Q2subsetCutOff) * s3Toll* MBT_Q2_factor +
(costMode == 6 & incQ >= 3) * s3Toll +
(costMode == 7) * 0.0 +
(costMode == 8) * 0.0 +
Expand Down
42 changes: 39 additions & 3 deletions model-files/scripts/preprocess/RuntimeConfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
* Means Based Fare (Q1 and Q2) factors
+ They will be propagated to CTRAMP\\scripts\\block\\trnParam.block
CTRAMP\\runtime\\mtcTourBased.properties
* Trip toll cap (aka pseudo monthly toll cap)
+ They will be propagated to CTRAMP\\scripts\\block\\hwyParam.block
CTRAMP\\runtime\\mtcTourBased.properties
* HSR Interregional trips disable flag
+ It will be propagated to CTRAMP\\scripts\\block\\trnParam.block
* Host IP - where the household manager, matrix manager and JPPF Server run
Expand Down Expand Up @@ -93,7 +96,7 @@ def check_tazdata():
tazdata_file = os.path.join("INPUT", "landuse", "tazData.csv")
tazdata_df = pandas.read_csv(tazdata_file)
tazdata_cols = list(tazdata_df.columns)

# check if the CORDON and CORDONCOST columns are in tazdata
assert("CORDON" in tazdata_cols)
assert("CORDONCOST" in tazdata_cols)
Expand All @@ -109,15 +112,15 @@ def check_tazdata():
print("No cordons found in tollclasses")
return

for i in cordon_toll:
for i in cordon_toll:
tollam_da = float(toll_df.loc[(toll_df.tollclass == i)]['tollam_da'])
try:
CORDONCOST = float(tazdata_df.loc[tazdata_df.CORDON == i].groupby('CORDON').agg({'CORDONCOST':'mean'})['CORDONCOST'])/100
except:
CORDONCOST = None # Handle errors occur when some tollclass from tolls.csv don't exist in tazData.csv

if tollam_da != CORDONCOST:
print("ERROR: tollclass "+ str(i)+" from toll.csv tollam_da DOESN'T match with tazData.csv CORDONCOST")
print("ERROR: tollclass "+ str(i)+" from toll.csv tollam_da DOESN'T match with tazData.csv CORDONCOST")
assert tollam_da == CORDONCOST, "ERROR: tollclass "+ str(i)+" from toll.csv tollam_da DOESN'T matches with tazData.csv CORDONCOST"
else:
print("tollclass "+ str(i)+" from toll.csv tollam_da matches with tazData.csv CORDONCOST")
Expand Down Expand Up @@ -243,6 +246,18 @@ def config_mobility_params(params_filename, params_contents, for_logsums, replac
MeansBasedCordonFareQ1Factor = float(get_property(params_filename, params_contents, "Means_Based_Cordon_Fare_Q1Factor"))
MeansBasedCordonFareQ2Factor = float(get_property(params_filename, params_contents, "Means_Based_Cordon_Fare_Q2Factor"))

# toll cap
TripTollCapQ1Factor = float(get_property(params_filename, params_contents, "TripTollCap_Q1"))
TripTollCapFirstXpcOfQ2Factor = float(get_property(params_filename, params_contents, "TripTollCap_firstXpercentOfQ2"))
HhldIncCutOff_forQ2subset = float(get_property(params_filename, params_contents, "hhldinc_cutoff"))

# We decided to disable the feature to apply the trip toll cap to a subset of Q2
# in order to minimize the time and effort required to modify the summarization script sumautotimes.job
# see: https://app.asana.com/0/0/1206291367285833/1207048219216893/f
# raise an assertion error if HhldIncCutOff_forQ2subset is not equal to 60000
if HhldIncCutOff_forQ2subset != 60000:
raise AssertionError("The feature to apply the toll cap to a subset of Q2 is disabled; hhldinc_cutoff in the properties file has to be equal to 60000.")

# WFH factors
WFHFullTimeWorkerFactor = float(get_property(params_filename, params_contents, "WFH_FullTimeWorker_Factor"))
WFHPartTimeWorkerFactor = float(get_property(params_filename, params_contents, "WFH_PartTimeWorker_Factor"))
Expand Down Expand Up @@ -319,6 +334,11 @@ def config_mobility_params(params_filename, params_contents, for_logsums, replac
replacements[filepath]["(\nMeans_Based_Cordon_Fare_Q1Factor[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % MeansBasedCordonFareQ1Factor
replacements[filepath]["(\nMeans_Based_Cordon_Fare_Q2Factor[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % MeansBasedCordonFareQ2Factor

# toll cap
replacements[filepath]["(\nTripTollCap_Q1[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % TripTollCapQ1Factor
replacements[filepath]["(\nTripTollCap_firstXpercentOfQ2[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % TripTollCapFirstXpcOfQ2Factor
replacements[filepath]["(\nhhldinc_cutoff[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % HhldIncCutOff_forQ2subset

# WFH factors
replacements[filepath]["(\nCDAP.WFH.FullTimeWorker.Factor[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % WFHFullTimeWorkerFactor
replacements[filepath]["(\nCDAP.WFH.PartTimeworker.Factor[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % WFHPartTimeWorkerFactor
Expand Down Expand Up @@ -399,6 +419,15 @@ def config_auto_opcost(params_filename, params_contents, for_logsums, replacemen
filepath = os.path.join("CTRAMP","runtime","logsums.properties")
replacements[filepath]["(\nAuto.Operating.Cost[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % auto_opc


# find the minimum value toll
MinimumValueToll = float(get_property(params_filename, params_contents, "min_vtoll"))

# put them into the CTRAMP\scripts\block\hwyParam.block
filepath = os.path.join("CTRAMP","scripts","block","hwyParam.block")
replacements[filepath]["(\nmin_vtoll[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % MinimumValueToll


# put it into the UECs
config_uec("%.2f" % auto_opc)

Expand Down Expand Up @@ -442,6 +471,9 @@ def config_auto_opcost(params_filename, params_contents, for_logsums, replacemen
MeansBasedFareQ2Factor = float(get_property(params_filename, params_contents, "Means_Based_Fare_Q2Factor"))
MeansBasedCordonFareQ1Factor = float(get_property(params_filename, params_contents, "Means_Based_Cordon_Fare_Q1Factor"))
MeansBasedCordonFareQ2Factor = float(get_property(params_filename, params_contents, "Means_Based_Cordon_Fare_Q2Factor"))
TripTollCapQ1Factor = float(get_property(params_filename, params_contents, "TripTollCap_Q1"))
TripTollCapFirstXpcOfQ2Factor = float(get_property(params_filename, params_contents, "TripTollCap_firstXpercentOfQ2"))
HhldIncCutOff_forQ2subset = float(get_property(params_filename, params_contents, "hhldinc_cutoff"))
HSRInterregionalDisable = int(get_property(params_filename, params_contents, "HSR_Interregional_Disable"))

# put the av pce factors into the CTRAMP\scripts\block\hwyParam.block
Expand All @@ -465,6 +497,10 @@ def config_auto_opcost(params_filename, params_contents, for_logsums, replacemen
replacements[filepath]["(\nMeans_Based_Cordon_Tolling_Q1Factor[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % MeansBasedCordonTollsQ1Factor
replacements[filepath]["(\nMeans_Based_Cordon_Tolling_Q2Factor[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % MeansBasedCordonTollsQ2Factor

replacements[filepath]["(\nTripTollCap_Q1[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % TripTollCapQ1Factor
replacements[filepath]["(\nTripTollCap_firstXpercentOfQ2[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % TripTollCapFirstXpcOfQ2Factor
replacements[filepath]["(\nhhldinc_cutoff[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % HhldIncCutOff_forQ2subset

# put the means based fare discount factors into CTRAMP\scripts\block\trnParam.block
filepath = os.path.join("CTRAMP","scripts","block","trnParam.block")
replacements[filepath]["(\nMeans_Based_Fare_Q1Factor[ \t]*=[ \t]*)(\S*)"] = r"\g<1>%.2f" % MeansBasedFareQ1Factor
Expand Down
68 changes: 60 additions & 8 deletions model-files/scripts/skims/HwySkims.job
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ loop period = 1, 5

; give each period thread more threads to work with
;DistributeIntrastep processid = 'ctramp', processlist = 1-4, commpath = '%COMMPATH%', saveprn = f

; block file containing highway parameters
read file=ctramp\scripts\block\hwyparam.block

; drive alone skim
mati[1] = skims\DA_@token_period@.tpp
Expand Down Expand Up @@ -405,7 +408,14 @@ loop period = 1, 5
mw[4] = mi.1.TOLLTIMEDA
mw[5] = mi.1.TOLLDISTDA
mw[6] = mi.1.TOLLBTOLLDA
mw[7] = mi.1.TOLLVTOLLDA
; set minimum toll, except when vtoll is 0 as it indicates no toll path
jloop
if (mi.1.TOLLVTOLLDA[j]=0)
mw[7][j] = 0
else
mw[7][j] = max(mi.1.TOLLVTOLLDA[j], min_vtoll)
endif
endjloop

; shared ride 2
mw[8] = mi.2.TIMES2
Expand All @@ -414,16 +424,30 @@ loop period = 1, 5
mw[11] = mi.2.TOLLTIMES2
mw[12] = mi.2.TOLLDISTS2
mw[13] = mi.2.TOLLBTOLLS2
mw[14] = mi.2.TOLLVTOLLS2

; set minimum toll, except when vtoll is 0 as it indicates no toll path
jloop
if (mi.2.TOLLVTOLLS2[j]=0)
mw[14][j] = 0
else
mw[14][j] = max(mi.2.TOLLVTOLLS2[j], min_vtoll)
endif
endjloop

; shared ride 3+
mw[15] = mi.3.TIMES3
mw[16] = mi.3.DISTS3
mw[17] = mi.3.BTOLLS3
mw[18] = mi.3.TOLLTIMES3
mw[19] = mi.3.TOLLDISTS3
mw[20] = mi.3.TOLLBTOLLS3
mw[21] = mi.3.TOLLVTOLLS3
; set minimum toll, except when vtoll is 0 as it indicates no toll path
jloop
if (mi.3.TOLLVTOLLS3[j]=0)
mw[21][j] = 0
else
mw[21][j] = max(mi.3.TOLLVTOLLS3[j], min_vtoll)
endif
endjloop

; very small trucks
mw[22] = mi.4.TIMEVSM
Expand All @@ -432,7 +456,14 @@ loop period = 1, 5
mw[25] = mi.4.TOLLTIMEVSM
mw[26] = mi.4.TOLLDISTVSM
mw[27] = mi.4.TOLLBTOLLVSM
mw[28] = mi.4.TOLLVTOLLVSM
; set minimum toll, except when vtoll is 0 as it indicates no toll path
jloop
if (mi.4.TOLLVTOLLVSM[j]=0)
mw[28][j] = 0
else
mw[28][j] = max(mi.4.TOLLVTOLLVSM[j], min_vtoll)
endif
endjloop

; small trucks
mw[29] = mi.5.TIMESML
Expand All @@ -441,7 +472,14 @@ loop period = 1, 5
mw[32] = mi.5.TOLLTIMESML
mw[33] = mi.5.TOLLDISTSML
mw[34] = mi.5.TOLLBTOLLSML
mw[35] = mi.5.TOLLVTOLLSML
; set minimum toll, except when vtoll is 0 as it indicates no toll path
jloop
if (mi.5.TOLLVTOLLSML[j]=0)
mw[35][j] = 0
else
mw[35][j] = max(mi.5.TOLLVTOLLSML[j], min_vtoll)
endif
endjloop

; medium trucks
mw[36] = mi.6.TIMEMED
Expand All @@ -450,7 +488,14 @@ loop period = 1, 5
mw[39] = mi.6.TOLLTIMEMED
mw[40] = mi.6.TOLLDISTMED
mw[41] = mi.6.TOLLBTOLLMED
mw[42] = mi.6.TOLLVTOLLMED
; set minimum toll, except when vtoll is 0 as it indicates no toll path
jloop
if (mi.6.TOLLVTOLLMED[j]=0)
mw[42][j] = 0
else
mw[42][j] = max(mi.6.TOLLVTOLLMED[j], min_vtoll)
endif
endjloop

; large trucks
mw[43] = mi.7.TIMELRG
Expand All @@ -459,7 +504,14 @@ loop period = 1, 5
mw[46] = mi.7.TOLLTIMELRG
mw[47] = mi.7.TOLLDISTLRG
mw[48] = mi.7.TOLLBTOLLLRG
mw[49] = mi.7.TOLLVTOLLLRG
; set minimum toll, except when vtoll is 0 as it indicates no toll path
jloop
if (mi.7.TOLLVTOLLLRG[j]=0)
mw[49][j] = 0
else
mw[49][j] = max(mi.7.TOLLVTOLLLRG[j], min_vtoll)
endif
endjloop

endrun

Expand Down
8 changes: 8 additions & 0 deletions utilities/NextGenFwys/RunNextGenFwysMetrics.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ set CODE_DIR=.\CTRAMP\scripts\metrics
:: for testing
:: set CODE_DIR=E:\GitHub\travel-model-one\utilities\NextGenFwys\metrics

if not exist %CODE_DIR%\extract_cost_skims.job (
copy X:\travel-model-one-master\utilities\NextGenFwys\metrics\extract_cost_skims.job %CODE_DIR%
)

if not exist %CODE_DIR%\travel-cost-by-income-driving-households.r (
copy X:\travel-model-one-master\utilities\NextGenFwys\metrics\travel-cost-by-income-driving-households.r %CODE_DIR%
)

:: Location of the model files
set TARGET_DIR=%CD%

Expand Down
Loading