sample_faf4_tripends: Allocate interregional truck trips to origin and destination...

Description Usage Arguments Details Examples

Description

Allocate interregional truck trips to origin and destination traffic zone

Usage

1
2
3
sample_faf4_tripends(daily_trips, zonal_attractions,
  included_attractions = "Heavy", zonal_equivalencies,
  phantom_zones = NULL, makeuse_coefficients = NULL, save_to = NULL)

Arguments

daily_trips

Data frame containing the daily FAF truck flows with FAF origin and destination regions coded (dms_orig and dms_dest, respectively)

zonal_attractions

Data frame containing daily trips for each combination of zone, firm category, and truck type. At least one truck type must be included (and specified in the included_attractions parameter). If make and use coefficients are defined these corresponding firm categories are required, but otherwise can be combined into single category. If there are no trips for a given combination of zone, category, and truck type the record does not need to be coded.

included_attractions

String or list of strings containing the truck type(s) to be retained in the zonal_attractions data frame. This field is required, although you can list all of the truck types coded in the file if you really want to include all truck types. Defaults to "Heavy".

zonal_equivalencies

Data frame containing the FAF region-TAZ equivalencies. One of more records can be coded for each FAF region.

phantom_zones

Data frame containing the FAF region-TAZ equivalencies in cases where one or more FAF regions do not have corresponding TAZs coded in the network. In this case the user can code them to a nearby zone that is connected to the network. (Optional)

save_to

File name for saving the daily interregional truck trips created by this program. (Optional)

Details

This function samples traffic analysis zone (TAZ) origins and destinations within FAF regions coded on each trip record. The sampling is weighted by the number of trips estimated for each combination of zone, firm category, and truck type. Heavy truck trips are typically used as these attractors (sampling weights), although any truck type(s) can be defined. Make and use coefficients can be used to scale the attractors, and if used should be defined for every combination of firm category and commodity (SCTG) coded in the data. The program assumes that missing values are zero, so they should be made explicit otherwise. Note that make or use scaling only takes place if one or more non-zero coefficients corresponding to a given commodity are found. If make and use coefficients are not supplied the trips or frequencies coded in the zonal_attractions file are used as weights in sampling the zones within each FAF region. The resulting data frame contains the same information passed in, with origin and destination TAZ (ozone and dzone, respectively) appended to each trip record.

Examples

1
2
3
4
5
trip_ends <- sample_faf_tripends(daily_trucks, zonal_attractions,
  "Heavy", zonal_equivalencies)   # Run with minimal parameters
trip_ends <- sample_faf_tripends(daily_trucks, zonal_attractions,
  "Heavy", zonal_equivalencies, phantom_zones, makeuse_coefficients,
  "trips_with_taz_coded.csv")   # Run with all parameters

rickdonnelly/pcvmodr documentation built on May 14, 2019, 8:17 a.m.