Function popdat::od::disaggregate [−][src]
pub fn disaggregate(
map: &Map,
zones: HashMap<String, Polygon>,
desire_lines: Vec<DesireLine>,
opts: Options,
rng: &mut XorShiftRng,
timer: &mut Timer<'_>
) -> Vec<PersonSpec>ⓘ
Expand description
Generates a scenario from aggregated origin/destination data (DesireLines). The input describes an exact number of people, who live in one zone and work in another (possibly the same) and commute using some mode. For each of them, we just need to pick a specific home and workplace from the zones, and use the Options to pick departure times. We’ll wind up creating people who just take two trips daily: home -> work -> home.
The home and workplace may be a specific building, or they’re snapped to a map border, resulting in trips that begin and/or end off-map. The amount of the zone that overlaps with the map boundary determines this. If the zone and map boundary overlap 50% by area, then half of the people to/from this zone will pick buildings, and half will pick borders.