-
Notifications
You must be signed in to change notification settings - Fork 11
Scenario Definition
Scenarios
ithim_setup_baseline_scenario
creates the baseline scenario (by adding distances and the column ''Scenario'' with entries ''Baseline'') and a scenario-generation function creates all the pre-set scenarios by changing the modes of randomly sampled trips (e.g. create_max_mode_share_scenarios
and create_all_scenarios
for Accra and Sao Paulo) or adding trips for everyone (e.g. create_walk_scenario
and create_cycle_scenario
). This is another unaccounted-for source of randomness.
ITHIM-R requires the distance data in various formats. All these are processed from one function, get_all_distances
.
Adding walk trips
First, bus journeys are augmented with a walk component (if the user input dictates it) in the function walk_to_bus_and_combine_scen
: we take the set of PT trips, which has J entries. We add J journeys with mode ''walk_to_pt'' and duration WALK_TO_BUS_TIME to the set, with trip_id and participant_id to match that of the corresponding trip in the original set.
Travel summaries
The total distance and duration matrices are calculated in dist_dur_tbls
. The distance set is the total distance travelled per mode per scenario, and the duration set is constructed analogously. The distance for bus drivers scales linearly with bus passengers, where the distance in the baseline is defined based on the bus driver distance relative to car.
Injuries
Distances are calculated for the injury module in distances_for_injury_function
, where we match mode names to those in the injury dataset, e.g. ''taxi'', ''shared_auto'', ''shared_taxi'' and ''car'' combine to form ''car'', and ''auto_rickshaw'' is added to ''motorcycle'' to represent two/three-wheeled striking vehicle. Some work is required to separate drivers from passengers; we currently assume all travellers are drivers, with the exception of ''bus''. (This is a problem for the examples of Delhi and Bangalore, whose trip sets have car travellers under the age at which driving is permitted and who therefore should not contribute to striking distance.)
We model injuries via regression by predicting the number of fatalities of each demographic group on each mode, which we calculate as a sum over all the ways in which they might have been injured (i.e., all the modes with which they might have collided).
The predictive covariates include the distances travelled by the parties and their demographic details. These requirements lead to a natural separation of the (training) dataset into two groups: a set for which we have distance data for the other party, and a set for which we do not have distance data for the other party. The former equates to a ''who hit whom'' (''whw'') matrix (albeit in a higher dimension), and will account for changes in injuries resulting of a change in strike-mode travel. The latter corresponds to causes of injury that will not change across scenarios, including ''no other vehicle'' and modes of transport that we do not consider to change, which might include trucks and buses if they are not somehow explicitly included in the trip set. We label this group ''noov'': no or other vehicle.
We model the number of injuries as a Poisson-distributed variable with an offset depending on the distance(s) and the reporting rate (https://www.overleaf.com/read/mrjtkhffzfzr). We choose this form of equation to enable (a) linearity in injuries with respect to total travel combined across modes and (b) linearity in injuries as subdivided by travellers of each mode.
We use, for Accra, the covariates ''casualty_mode*strike_mode'', ''casualty_age'', and ''casualty_gender'', to form the model matrix X. We fit the coefficients of the model using data for ten years, assuming the same travel each year, which corresponds to the baseline scenario. To incorporate the injury reporting rate, we set it as an offset, whose value is 1 in fitting the model, and as specified in making predictions. For settings where there are no demographic data (e.g. Delhi), we fit the model using ''casualty_mode'' and ''strike_mode'' alone. Predictions are made, as before, by demographic group.
-
Overarching modules
-
Overarching project domains
- Coding guidelines
- Documentation
- Scientific publications
- Dissemination
- Case studies/applications