Package ‘hcmr’ March 23, 2016 Type Package Title Highway Capacity Manual Calculation Version 1.0.0 Date 2015-09-16 Author Kyle Ward Maintainer Kyle Ward Description Uses link-level attributes to calculate HCM capacities (hourly service volumes). License MIT + file LICENSE Imports dplyr (>= 0.4.3) LazyData true Suggests knitr, rmarkdown, ggplot2, tidyr (>= 0.3.1), readr (>= 0.1.1) VignetteBuilder knitr RoxygenNote 5.0.1 NeedsCompilation no
R topics documented: arterialPBFFS . . . . . arterial_speedConstant bptsfCoeffTbl . . . . . freewayLC . . . . . . freewayMSF . . . . . . hcmr . . . . . . . . . . hcm_arterial . . . . . . hcm_calculate . . . . . hcm_collector . . . . . hcm_freeway . . . . . hcm_ftCheck . . . . . hcm_local . . . . . . . hcm_mlHighway . . . hcm_tlHighway . . . . hwylinks . . . . . . . . mlHighwayAPD . . . mlHighwayMSF . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 1
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
2 3 3 4 4 5 5 6 7 8 9 10 11 12 12 13 14
2
arterialPBFFS tlHighwayATS . . tlHighwayEtATS . tlHighwayEtPTSF . tlHighwayFgATS . tlHighwayFgPTSF tlHighwayFnpATS tlHighwayFnpPTSF tlHighwayPTSF . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
Index
arterialPBFFS
14 15 15 16 16 17 17 18 19
Arterial Percent of Base Free-flow Speed
Description This function takes volume, capacity, and other parameters and returns the LOS based on PBFFS. Usage arterialPBFFS(vol, L, c, Sfo, Sf, LOS, at, lanes, med, terrain, C, gC, P, tr, delay) Arguments vol
Volume (veh/hr)
L
Segment length (ft)
c
Ultimate capacity
Sfo
Base free-flow speed (mph)
Sf
Free-flow speed (mph)
LOS
Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D.
at
Area type field; one of c("Urban", "Suburban", "Rural"). Default is Suburban
lanes
Number of through lanes for single direction.
med
Median treatment; one of c("Restrictive","Non-Restrictive", "None"). Restrictive median treatments do not allow left turns except at designated locations, Non-Restrictive treatments have a center two-way-left-turn lane, and None implies that there is no median treatment at all (a double yellow line). Default is Restrictive.
terrain
Terrain type, either "level","rolling" (default), or "mountain".
C
Cycle Length (sec)
gC
Effective green time to cycle length ratio
P
Proportion arriving during green
tr
Running time
delay
T/F whether to return the control delay
arterial_speedConstant
3
arterial_speedConstant Arterial - Speed Constant Lookup
Description A lookup table that provides speed constants based on posted speed limits. Usage arterial_speedConstant Format A data frame with 7 observations SpeedLimit Posted speed limit on the link SpeedConstant Speed constant to use Source Exhibit 17-11 HCM 2010
bptsfCoeffTbl
Two-Lane Highway - Base Percent Time Spent Following
Description A lookup table the provides alpha and beta values based on the demand flow rate. Usage bptsfCoeffTbl Format A data frame with 8 observations DemandFlowRate Demand Flow Rate a alpha to use b beta to use Source Exhibit 15-20 HCM 2010
4
freewayMSF
freewayLC
Freeway - Lateral Clearance Adjustment
Description A lookup table that provides the lateral clearance adjustment to FFS based on lanes and clearnace. Usage freewayLC Format A data frame with 28 observations RightLateralClearance Right-side lateral clearance DirectionalLanes Lanes in one direction flc Adjustment factor Source Exhibit 11-9 HCM 2010
freewayMSF
Freeway - Maximum Service Flow Rate
Description A lookup table that provides maximum service flow rates for LOS D and E based on free-flow speed. Usage freewayMSF Format A data frame with 5 observations FFS Free-flow Speed LOSD Maximum service flow rate while maintaining LOS D LOSE Maximum service flow rate while maintaining LOS E Source Exhibit 11-17 HCM 2010
hcmr
5
hcmr: A package to compute link capacities and freeflow speeds
hcmr
Description The primary function for users is hcm_calculate
hcm_arterial
HCM Arterial Function
Description This function takes link-level attributes and default values to calculate hourly flow rates for arterial segments. For arterials, the returned free-flow speed is actually the "running speed", which includes signal delay. Usage hcm_arterial(speed = FALSE, LOS = "E", type = "m", at = 2, lanes = 1, sl = 45, med = "None", terrain = "rolling") Arguments speed
Estimated free flow speed (TRUE), or estimated capacity (FALSE, default).
LOS
Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D.
type
Whether the road is a principal or minor arterial.
at
Area type field; one of c("Urban", "Suburban", "Rural"). Default is Suburban
lanes
Number of through lanes for single direction.
sl
Posted speed limit in miles per hour.
med
Median treatment; one of c("Restrictive","Non-Restrictive", "None"). Restrictive median treatments do not allow left turns except at designated locations, Non-Restrictive treatments have a center two-way-left-turn lane, and None implies that there is no median treatment at all (a double yellow line). Default is Restrictive.
terrain
Terrain type, either "level","rolling" (default), or "mountain".
Details This section documents some of the assumptions used by the function. Factors determined by the at. • Intersection spacing (mi): Urban: 0.3; Suburban: 0.6; Rural: 1.5 • Proportion with curb: Urban: 1; Suburban: 0.7; Rural: 0
6
hcm_calculate • Access point density (per mile) Urban: 25; Suburban: 16; Rural: 8 Assumed platoon ratios • Urban Principal: 0.60 • Urban Minor: 0.50 • Other Principal: 0.60 • Other Minor: 0.50 Assumed proportion of green time • Urban Principal: 0.70 • Urban Minor: 0.60 • Other Principal: 0.70 • Other Minor: 0.60 Assumed cycle length (sec) • Urban Principal: 120 • Urban Minor: 90 • Other Principal: 150 • Other Minor: 120 Factors determined by the med. • Proportion with median: Restrictive: 0.8; NonRestrictive: 0.37; None: 0
Examples ## Not run: hcm_arterial(LOS = "E") ## End(Not run)
hcm_calculate
Highway Capacity Calculation Function
Description Calculates the Highway Capacity Manual (2010) free flow speed or capacity based on link attributes. Usage hcm_calculate(ft = "Freeway", at = "Suburban", sl = 65, med = "Restrictive", lanes = 2, terrain = "rolling", LOS = "E", speed = FALSE)
hcm_collector
7
Arguments ft
Facility type field. Must be one of c("Freeway", "MLHighway","TLHighway", "PrArterial", "M See Details. Default is Freeway.
at
Area type field; one of c("Urban", "Suburban", "Rural"). Default is Suburban
sl
Posted speed limit in miles per hour.
med
Median treatment; one of c("Restrictive","Non-Restrictive", "None"). Restrictive median treatments do not allow left turns except at designated locations, Non-Restrictive treatments have a center two-way-left-turn lane, and None implies that there is no median treatment at all (a double yellow line). Default is Restrictive.
lanes
Number of through lanes for single direction.
terrain
Terrain type, either "level","rolling" (default), or "mountain".
LOS
Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D.
speed
Estimated free flow speed (TRUE), or estimated capacity (FALSE, default).
Details This function is a vectorized wrapper to hcm_ftCheck, which determines which HCM methodology to apply based on the labeled ft field. Though this function uses several default values if they are not supplied, these defaults may be overridden in the individual facility type calculators. Value If speed == FALSE(default), the HCM 2010 link capacity in vehicles per hour. Otherwise, the HCM 2010 link free flow speed in miles per hour.
hcm_collector
Collector Function (not HCM based)
Description This function takes basic link-level attributes and returns speed or hourly flow rate (veh/hr). Usage hcm_collector(speed = FALSE, LOS = "E", at = 2, lanes = 1, sl = 35) Arguments speed
Estimated free flow speed (TRUE), or estimated capacity (FALSE, default).
LOS
Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D.
at
Area type field; one of c("Urban", "Suburban", "Rural"). Default is Suburban
lanes
Number of through lanes for single direction.
sl
Posted speed limit in miles per hour.
8
hcm_freeway
Details This section documents some of the assumptions used by the function. Factors determined by the at. • Posted to free-flow speed adjustment: Urban: sl - 0.50 * sl + 8.5 Suburban: sl - .25 * sl + 3.25 Rural: sl • LOS D capacities per lane Urban: 650 Suburban: 750 Rural: 750 LOS E capacities are the LOS D + 100 Examples hcm_collector(LOS = "E")
hcm_freeway
HCM Freeway Function
Description This function takes link-level attributes and default values to calculate hourly flow rates for freeway segments. Usage hcm_freeway(speed = FALSE, LOS = "E", at = 2, lanes = 2, terrain = "rolling") Arguments speed
Estimated free flow speed (TRUE), or estimated capacity (FALSE, default).
LOS
Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D.
at
Area type field; one of c("Urban", "Suburban", "Rural"). Default is Suburban
lanes
Number of through lanes for single direction.
terrain
Terrain type, either "level","rolling" (default), or "mountain".
Details This section documents some of the assumptions used by the function. Factors determined by the at. • Lane width: Urban: 12’; Suburban: 12’; Rural: 11’ • Right-side lateral clearance: Urban: 4’; Suburban: 5’; Rural: 6’
hcm_ftCheck
9
• Ramp density (ramps per mile): Urban: 0.5; Suburban: 0.5; Rural: 0.25 • Proportion of Heavy Vehicles: Urban: 0.14; Suburban: 0.17; Rural: 0.20 Factors determined by the terrain. • Passenger-Car Equivalent of Heavy Vehicles: level: 1.5; rolling: 2.5; mountain: 4.5 • Passenger-Car Equivalent of Recreational Vehicles: level: 1.2; rolling: 2.0; mountain: 4.0 Source HCM Chapter 11 Examples ## Not run: hcm_freeway(LOS = "E") ## End(Not run)
hcm_ftCheck
HCM Facility Type Check
Description This function uses the facility type to select the appropriate function to perform the speed and capacity calculations. Usage hcm_ftCheck(ft = ft, at = at, sl = sl, med = med, lanes = lanes, terrain = terrain, LOS = LOS, speed = speed) Arguments ft
Facility type field. Must be one of c("Freeway", "MLHighway","TLHighway", "PrArterial", "M See Details. Default is Freeway.
at
Area type field; one of c("Urban", "Suburban", "Rural"). Default is Suburban
sl
Posted speed limit in miles per hour.
med
Median treatment; one of c("Restrictive","Non-Restrictive", "None"). Restrictive median treatments do not allow left turns except at designated locations, Non-Restrictive treatments have a center two-way-left-turn lane, and None implies that there is no median treatment at all (a double yellow line). Default is Restrictive.
lanes
Number of through lanes for single direction.
terrain
Terrain type, either "level","rolling" (default), or "mountain".
10
hcm_local LOS
Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D.
speed
Estimated free flow speed (TRUE), or estimated capacity (FALSE, default).
Local Function (not HCM based)
hcm_local
Description This function takes basic link-level attributes and returns speed or hourly flow rate (veh/hr). Usage hcm_local(speed = FALSE, LOS = "E", at = 2, lanes = 1, sl = 25) Arguments speed
Estimated free flow speed (TRUE), or estimated capacity (FALSE, default).
LOS
Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D.
at
Area type field; one of c("Urban", "Suburban", "Rural"). Default is Suburban
lanes
Number of through lanes for single direction.
sl
Posted speed limit in miles per hour.
Details Factors determined by the at. • Posted to free-flow speed adjustment: Urban: sl - 0.50 * sl + 7.5 Suburban: sl - .25 * sl + 2.25 Rural: sl - 1 • LOS D capacities per lane Urban: 600 Suburban: 700 Rural: 700 LOS E capacities are the LOS D + 100 Examples hcm_local(LOS = "E")
hcm_mlHighway
hcm_mlHighway
11
HCM Multi-Lane Highway Function
Description This function takes link-level attributes and default values to calculate hourly flow rates for multilane highway segments. Usage hcm_mlHighway(speed = FALSE, LOS = "E", at = 3, lanes = 2, sl = 55, med = "Restrictive", terrain = "rolling") Arguments speed
Estimated free flow speed (TRUE), or estimated capacity (FALSE, default).
LOS
Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D.
at
Area type field; one of c("Urban", "Suburban", "Rural"). Default is Suburban
lanes
Number of through lanes for single direction.
sl
Posted speed limit in miles per hour.
med
Median treatment; one of c("Restrictive","Non-Restrictive", "None"). Restrictive median treatments do not allow left turns except at designated locations, Non-Restrictive treatments have a center two-way-left-turn lane, and None implies that there is no median treatment at all (a double yellow line). Default is Restrictive.
terrain
Terrain type, either "level","rolling" (default), or "mountain".
Details This section documents some of the assumptions used by the function. Min/Max speed limit is 45/60 mph, and the minimum number of lanes is 2. Factors determined by the at. • Lane width: Urban: 12’; Suburban: 12’; Rural: 11’ • Lateral clearance: Urban: 12’; Suburban: 10’; Rural: 8’ • Access point density: Urban: 30; Suburban: 20; Rural: 5 • Proportion of Heavy Vehicles: Urban: 0.05; Suburban: 0.08; Rural: 0.1 Factors determined by the terrain. • Passenger-Car Equivalent of Heavy Vehicles: level: 1.5; rolling: 2.5; mountain: 4.5 • Passenger-Car Equivalent of Recreational Vehicles: level: 1.2; rolling: 2.0; mountain: 4.0
12
hwylinks
Examples hcm_mlHighway(LOS = "E")
hcm_tlHighway
HCM Two-Lane Highway Function
Description This function takes link-level attributes and default values to calculate hourly flow rates for two-lane highway segments. Usage hcm_tlHighway(speed = FALSE, LOS = "E", sl = 55, terrain = "rolling") Arguments speed
Estimated free flow speed (TRUE), or estimated capacity (FALSE, default).
LOS
Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D.
sl
Posted speed limit in miles per hour.
terrain
Terrain type, either "level","rolling" (default), or "mountain".
Details This section documents some of the assumptions used by the function. Factors determined by the terrain. • Percent no-passing zone: level: 20; rolling: 40; mountain: 60
hwylinks
Sample Table of Highway Links
Description Created using the sampleTableCreation.r script. Enumerates all combinations of highway attributes, including some that should return warnings and null values when evaluated. Usage hwylinks
mlHighwayAPD
13
Format A data frame with 4,536 observations ft Facility type at Area type sl Speed limit med Median type lanes Number of lanes (in one direction) terrain Terrain type
Source sampleTableCreation.r
mlHighwayAPD
Multi-Lane Highway - Access Point Density Adjustment
Description A lookup table that provides the adjustment based on access point density.
Usage mlHighwayAPD
Format A data frame with 41 observations APD Access point density Factor Adjustment factor
Source Exhibit 14-11 HCM 2010
14
tlHighwayATS
Multi-Lane Highway - Maximum Service Flow Rate
mlHighwayMSF
Description A lookup table that provides maximum service flow rates for LOS D and E based on free-flow speed. Usage mlHighwayMSF Format A data frame with 4 observations FFS Free-flow Speed LOSD Maximum service flow rate while maintaining LOS D LOSE Maximum service flow rate while maintaining LOS E Source Exhibit 14-17 HCM 2010
tlHighwayATS
HCM Two-Lane ATS Capacity
Description This function is used to iteratively find the volume level that translates into the specified level of service Usage tlHighwayATS(vol, FFS, phf, pnpz, Pt, Pr, terrain, LOS, pfm = 60) Arguments vol FFS phf pnpz terrain LOS
pfm fhv fg
Volume Free-flow speed Peak hour factor Percent no-passing zone Terrain type, either "level","rolling" (default), or "mountain". Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D. Percent of flow in major direction Heavy vehicles factor grade factor
tlHighwayEtATS
tlHighwayEtATS
15
Two-Lane Highway - Truck PCEs (ATS)
Description A lookup table that provides the passenger car equivalent of trucks based on demand flow rate in the analysis direction (veh/hr) and terrain when using the average-travel-speed (ATS) approach. Usage tlHighwayEtATS Format A data frame with 9 observations DemandFlowRate Volume (veh/hr) EtLevel PCE for level terrain EtRolling PCE for rolling terrain Source Exhibit 15-11 HCM 2010
tlHighwayEtPTSF
Two-Lane Highway - Truck PCEs (PTSF)
Description A lookup table that provides the passenger car equivalent of trucks based on demand flow rate in the analysis direction (veh/hr) and terrain when using the percent-time-spent-following (PTSF) approach. Usage tlHighwayEtPTSF Format A data frame with 9 observations DemandFlowRate Demand flow rate in the analysis direction EtLevel PCE of trucks on level terrain EtRolling PCE of trucks on rolling terrain Source Exhibit 15-18 HCM 2010
16
tlHighwayFgPTSF
tlHighwayFgATS
Two-Lane Highway - Grade adjustment (ATS)
Description A lookup table that provides the adjustment based on the grade and volume when using the averagetravel-speed (ATS) approach. Usage tlHighwayFgATS Format A data frame with 9 observations DemandFlowRate Demand flow rate in the analysis direction fg Grade adjustment (does not apply to level terrain) Source Exhibit 15-9 HCM 2010
tlHighwayFgPTSF
Two-Lane Highway - Grade adjustment (PTSF)
Description A lookup table that provides the adjustment based on the grade and volume when using the percenttime-spent-following (PTSF) approach. Usage tlHighwayFgPTSF Format A data frame with 9 observations DemandFlowRate Demand flow rate in the analysis direction fg Grade adjustment (does not apply to level terrain) Source Exhibit 15-16 HCM 2010
tlHighwayFnpATS
tlHighwayFnpATS
17
Two-Lane Highway - Percent no passing adjustment (ATS)
Description A lookup table that provides the adjustment based on the percent of no passing zones, opposing volume, and free-flow speed when using the average-travel-speed (ATS) approach. Usage tlHighwayFnpATS Format A data frame with 18 observations OpposingVol Volume in the opposite direction. FFS Free-flow speed. PctNoPass Percent no passing zone. fnp No-passing factor. Source Exhibit 15-15 HCM 2010
tlHighwayFnpPTSF
Two-Lane Highway - Percent no passing adjustment (PTSF)
Description A lookup table that provides the adjustment based on the percent of no passing zone and the volume when using the percent-time-spent- following (PTSF) approach. Usage tlHighwayFnpPTSF Format A data frame with 24 observations Volume Link volume. PctMajorFlow Percent major flow direction. PctNoPass Percent of no passing zone. fnp Adjustment factor. Source Exhibit 15-21 HCM 2010
18
tlHighwayPTSF
tlHighwayPTSF
HCM Two-Lane PTSF Capacity
Description This function is used to iteratively find the volume level that translates into the specified level of service Usage tlHighwayPTSF(vol, LOS, phf, Pt, Pr, pnpz, terrain, pfm = 60) Arguments vol
Volume
LOS
Specifies the Level of Service to return(NA) ("D" or "E"). Typically volume-todelay functions in assignment algorithms use LOS E, though certain planning applications prefer to look at LOS D.
phf
Peak hour factor
Pt
percent trucks
Pr
percent recreational vehicles
pnpz
Percent no-passing zone
terrain
Terrain type, either "level","rolling" (default), or "mountain".
pfm
Percent of flow in major direction
Index ∗Topic datasets arterial_speedConstant, 3 bptsfCoeffTbl, 3 freewayLC, 4 freewayMSF, 4 hwylinks, 12 mlHighwayAPD, 13 mlHighwayMSF, 14 tlHighwayEtATS, 15 tlHighwayEtPTSF, 15 tlHighwayFgATS, 16 tlHighwayFgPTSF, 16 tlHighwayFnpATS, 17 tlHighwayFnpPTSF, 17 arterial_speedConstant, 3 arterialPBFFS, 2 bptsfCoeffTbl, 3 freewayLC, 4 freewayMSF, 4 hcm_arterial, 5 hcm_calculate, 5, 6 hcm_collector, 7 hcm_freeway, 8 hcm_ftCheck, 7, 9 hcm_local, 10 hcm_mlHighway, 11 hcm_tlHighway, 12 hcmr, 5 hcmr-package (hcmr), 5 hwylinks, 12 mlHighwayAPD, 13 mlHighwayMSF, 14 tlHighwayATS, 14 tlHighwayEtATS, 15 tlHighwayEtPTSF, 15 tlHighwayFgATS, 16 tlHighwayFgPTSF, 16 tlHighwayFnpATS, 17 tlHighwayFnpPTSF, 17 tlHighwayPTSF, 18 19