popdat

Function distribute_population_to_homes

Source
pub fn distribute_population_to_homes(
    polygon: Polygon,
    population: usize,
    map: &Map,
    rng: &mut XorShiftRng,
) -> Vec<(BuildingID, usize)>
Expand description

Starting from some number of total people living in a polygonal area, randomly distribute them to residential buildings within that area. Returns a list of homes with the number of residents in each.