sample_local_truck_destinations: Simple destination choice model for local (internal) truck...

Description Usage Arguments Details Examples

View source: R/sample_local_truck_destinations.R

Description

Simple destination choice model for local (internal) truck trips

Usage

1
2
sample_local_truck_destinations(truck_origins, skim_matrices,
  trip_length_targets, utility_parameters, save_to = NULL)

Arguments

truck_origins

Data frame containing discrete daily trips for each tour, usually produced by a trip or tour generation function

skim_matrices

Data frame containing skim distance and travel time for each origin-destination pair, usually only containing records for zone pairs that fall within user-defined threshold (i.e., excludes what would be only a long-distance trip)

utility_parameters

Data frame containing weights for distance and attractors for each truck type defined in the simulation

save_to

File name for saving the trip records with destinations appended in comma-separated value format (optional)

Details

This is a simple destination choice model that mimics a singly- constrained gravity model. It samples eligible destinations based upon the product of interzonal distance and attractions, however defined. The distances are typically limited to a certain distance (120-180 miles), beyond which are considered the realm of long-distance trips. Different weights for distance (alpha1) and attractors (alpha2) ar defined for each truck type (and can be all set to unity to eliminate such scaling), otherwise known as utility parameters. In a typical gravity model formulation we divide the product of attractions and interzonal impedance by the sum of them for all zones. Sampling rather than calculating deterministic proportions obviates the need for this step. The output from this function is the same as the input truck origins, with the destination appended. The user can optionally also save this data frame in a comma- separated value file.

Examples

1
2
sample_local_truck_destinations(truck_origins, skim_matrices,
  utility_parameters, "daily-truck-odflows.csv")

pbsag/swimctr documentation built on May 24, 2019, 10:38 p.m.