Skip to contents

Add trips that do not get assigned any physical activity component, can be used as proxy for vehicle distances.

Usage

add_ghost_trips(
  raw_trip_set,
  trip_mode = "bus_driver",
  distance_ratio = BUS_TO_PASSENGER_RATIO * DISTANCE_SCALAR_PT,
  reference_mode = "bus",
  prop_male = 1,
  agerange_male = "18, 65",
  agerange_female = "18, 65",
  scenario = NA
)

Arguments

raw_trip_set

data frame of trips

trip_mode

which mode to add

distance_ratio

fraction of reference distance to use to calculate new mode distance

reference_mode

name of reference mode

prop_male

proportion of newly added mode that are assigned to males

agerange_male

age range of males associated with newly added mode

agerange_female

age range of female drivers associated with newly added mode

scenario

name of scenario for which mode is to be added

Value

data frame of trips

Details

This function creates trips based on distance relative to another (reference) mode, without altering the baseline population. I.e. it adds trips that do not get assigned any physical activity component. This function can be used to add e.g. car_driver and bus_driver trips which are used as proxy for vehicle distances needed for the injury and the CO2 pathways. It can also used to add truck and commercial motorcycle trips that are not included in any travel surveys. As needed for the injury pathway, these newly added trips are assigned as trips made by a males or females based on the proportion of males given as input parameter. The age ranges of males and females taking those newly added trips can also be defined.

The new mode distance is equally split by the number of people times the number of trips per people to be added. This is used as the distance for new male trips. As the proportion of female trips tends to be very low, the distance calculated for male trips is split by 10 and using a 10th of the distance for male trips, 10 times as many female trips are added compared with the very low number of female trips that would have been added had the same distance been used as for male trips. E.g. if the number of people to be added is 100 with 1 trip per person and 98 those trips are made by males, then we add 98 male trips but 10 * 2 = 20 female trips with a 10th of the distance of male trips. This is to ensure a better representation of the demographics of female trips whilst keeping the number of newly added trips as small as possible to reduce the run time of the model.

The function performs the following steps:

  • set up the number of people (with regards to males) and trips per per person to be added

  • find the total distance of the reference mode

  • find the age ranges for male and female trips

  • find the number of male and female participants

  • calculate the total distance of the new mode to be added based on the reference distance and find the speed of the new mode

  • for male trips:

    • define the distance range for each male trip to be added, assume that each trip is of equal length

    • add new male trips sampling from the given age range (add_trips.R)

    • add age and distance categories plus scenario name

  • repeat for female trips (assuming female trips are a 10th of the distance of male trips and adding proportionally 10 times as many female trips)