june.world.World

class june.world.World

This Class creates the world that will later be simulated. The world will be stored in pickle, but a better option needs to be found.

Note: BoxMode = Demography +- Sociology - Geography

Initializes a world given a geography and a demography. For now, households are a special group because they require a mix of both groups (we need to fix this later).

__init__()

Initializes a world given a geography and a demography. For now, households are a special group because they require a mix of both groups (we need to fix this later).

distribute_people(include_households=True)

Distributes people to buildings assuming default configurations.

to_hdf5(file_path: str, chunk_size=100000)

Saves the world to an hdf5 file. All supergroups and geography are stored as groups. Class instances are substituted by ids of the instances. To load the world back, one needs to call the generate_world_from_hdf5 function.

file_path

path of the hdf5 file

chunk_size

how many units of supergroups to process at a time. It is advise to keep it around 1e5