Description Usage Arguments Details Examples
Generate local truck trips (tour segments) from pseudo-firms
1 2 3 | local_truck_generation(synthetic_firms, generation_probabilities,
random_seed = 1, max_resampling_attempts = 30,
max_resampling_threshold = 0.5, save_to = NULL)
|
synthetic_firms |
Data frame containing pseudo-firms and their typical attributes |
generation_probabilities |
Data frame containing trip generation rates expressed as probabilities, for each trip generation category used in the model |
random_seed |
Integer value of random number seed set at outset of sampling of trips generated by pseudo-firms (defaults to 1) |
max_resampling_attempts |
Integer value that controls the number of times the generation sampling will repeat if it does not finish with same number of trips calculated in aggregate for the entire study area. If this number is exceeded then the model will error. Alternatively if '1' then resampling will be turned off. |
max_resampling_threshold |
Floating point number defining how close the simulation must match aggregate number of trips for the entire modeled area (default is 0.5 percent) |
save_to |
File name for saving the trip records with destinations appended in comma-separated value format (optional) |
The trip generation function samples the number of discrete daily trips generated by each pseudo-firm, and appends that number to each synthetic firm. The mode of transport used for each trip is also sampled and added to the trip records.
1 2 3 4 5 | daily_trips <- local_truck_generation(synthetic_firms,
generation_probabilities)
daily_trips <- local_truck_generation(synthetic_firms,
generation_probabilities, random_seed = 1, max_resampling_attempts = 30,
max_resampling_threshold = 0.5, "local-truck-origins.csv")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.