sample_daily_faf_truckloads: Sample daily truck trips from annual FAF flow database

Description Usage Arguments Details Examples

Description

Sample daily truck trips from annual FAF flow database

Usage

1
2
3
sample_daily_faf_truckloads(annual_faf_trucks,
  external_scaling_factor = 1, weeks_per_year = 50, target_week = 17,
  target_day = 4, debug_trace = FALSE)

Arguments

annual_faf_trucks

Data frame containing reformatted FAF commodity flow database with estimate of total annual truckload equivalents appended

external_scaling_factor

Asserted or estimating factor to account for FAF commodity flows that grouped into single truck movements (default is 1.0, which assumes no such factoring is carried out)

weeks_per_year

The number of weeks per year the annual flows are assumed to be spread across (default = 50)

target_week

The week of the year that the simulated flows will be extracted for (default = 17)

target_day

The day of the week the flows are sampled for (default = 4, which corresponds to Wednesday)

debug_trace

A boolean variable signifying whether extended messaging is enabled (defaults to FALSE)

Details

This function samples daily truck trips from FAF annual truckload equivalents. It samples for a Wednesday in the 17th week of the year by default, which typically falls in late April. The user can specify both the 'target_day' (where Sunday is 1, Monday is 2, ...) and 'target_week'. There are always 52 weeks/year, of course, but the user might want to specify a slightly smaller value for 'weeks_per_year' to account for major holidays when all commercial activities are lower.

An 'external_scaling_factor' can also be set that applies to inbound, outbound, and through truck flows. It defaults to 1.0 (i.e., no scaling), but can be set based upon truck intercept surveys or assertion to account for several shipments consolidated on a single truck. It might make sense to allow the user to specify a data frame with different scaling factors for each FAF region origin-destination pair of by distance band, but for now a single value is applied to all flows with one or both trip ends outside of the modeled area.

Examples

1
daily_trucks <- sample_daily_faf_truckloads(annual_faf_truckloads, 1.0)

tlumip/swimctr documentation built on May 31, 2019, 3:53 p.m.