Urban-Analytics-Technology-Platform / acbm

activity-based modelling pipeline (for transport demand models)
https://hackmd.io/w-m_OKaDT3GGBfSqFPpBjA
Apache License 2.0
4 stars 1 forks source link

Task 2b: Primary Locations (Work) #12

Closed Hussein-Mahfouz closed 2 months ago

Hussein-Mahfouz commented 6 months ago

How do you add work locations for the SPC after each individual has been mapped to an individual in the NTS? We start with the input data (let's call it spc_activity_chains). Each individual now has:

A potential workflow could include:

1. From spc_activity_chains, filter all individuals with TripPurpose = work

2. Identify spatial distribution of different jobs

  1. Use the businessRegistry.csv.gz file produced in the spc project link to documentation. It has a breakdown of business units by sic1d2007

    3. Determine feasible locations (zones) of workplace

  2. Calculate travel time matrix by mode at the zone level. This can be done with a routing engine like r5r
  3. For each person in spc_activity_chains, identify zones that are reachable within a buffer time of TripTotalTime (e.g. TripTotalTime +- 15 minutes)

    • The actual time should be based on the Mode used by the person
    • The assumption is that work trips are home based. In step [1], we could focus only on trips where TripPurpFrom = Home

4. Choose a zone from feasible zones

  1. For each person, the probability of commuting to a zone from the feasible zones is proportional to the number of jobs in the zone that match their sic1d2007 
  2. We loop over each person in spc_activity_chains. Once they are assigned to zone i, we reduce the number of jobs from sic1d2007 in zone i by 1. This ensures that we don't overassign people to zones. Sample without replacement
  3. The assignment of people to zones needs to be constrained by the census flow data

5. Choose a specific workplace

  1. Same logic as step 4, but we need a spatial dataset of work locations. Options:
    • Workplaces created in SPC link. I think this makes most sense to start with but I should understand better how it was created
    • osmox: I think all workplaces are the same. No disaaggregation by sector
    • ONS POI data. Need to check if they allow free access to academics

Notes

Step 4 / 5

Other

Hussein-Mahfouz commented 6 months ago

notes from meeting with @stuartlynn re handling people travelling together:

sgreenbury commented 5 months ago

From discussion of options on matching people to workplaces (and other locations):

Hussein-Mahfouz commented 5 months ago

How to constrain the flows to the census commuting data. From A dynamic microsimulation model for epidemics (dyme paper) section 2.4.2:

we initially adopt a stylized approach constructing ‘virtual workplaces’ which rely on the 2011 UK Census commuting origin-destination tables at the MSOA level for individuals with a fixed workplace. The UKTUS data includes a Standard Industry Classification (SIC) code for everyone in the dataset.Matching data from the UKTUS to SPENSER baseline data via the PSM process and the UKTUS we were able to assign to each of our synthetic resident workers an employer industry among the 21 divisions from the Standard Industry Classification (SIC) 2007. We assume that all workers have an equal ex ante probability to commute to all destinations independently from the SIC to which they belong. We build the set of possible destinations by multiplying the number of MSOAs in the study area, M = 107, to that of the SIC divisions, S = 21, obtaining 2,247 options. We then populate these virtual workplaces with synthetic workers based on their reference SIC and their Census relative probability to commute from Mi to any Mj, with j = 1...i...J, thus including the MSOA in which the worker resides.

sgreenbury commented 4 months ago

@BZ-BowenZhang: as discussed Friday, just adding some further detail on ideas for two options for the workplace locations, feel free to let me know if helpful to discuss further at all.

Aim: to assign a workplace location to a given person's schedule after matching NTS to SPC and measure the consistency/validity with observed data sources and modelling.

A. Current SPC approach

B. Alternative approach with feasible zones

Validation and comparisons