Domain
Domain
The idea is that the world is divided in domains, which are just collections of super areas with people living/working/doing leisure in them.
If we think as domains as sets, then world is the union of all domains, and each domain can have a non-zero intersection with other domains (some people can work and live in different domains).
Domains are sent to MPI core to perform calculation, and communication between the processes is required to transfer the infection status of people.
In non-MPI mode, there is only one domain containing all super areas.
Source code in june/domains/domain.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
from_hdf5(domain_id, super_areas_to_domain_dict, hdf5_file_path, interaction_config=None, super_areas_to_region_dict=None)
classmethod
Load a domain from an HDF5 file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
domain_id
|
int
|
The ID of the domain to load. |
required |
super_areas_to_domain_dict
|
dict
|
Mapping of super areas to domain IDs. |
required |
hdf5_file_path
|
str
|
Path to the HDF5 file. |
required |
interaction_config
|
str
|
Path to the interaction configuration file. (Default value = None) |
None
|
super_areas_to_region_dict
|
dict
|
(Default value = None) |
None
|
Returns:
Name | Type | Description |
---|---|---|
Domain |
The domain object loaded from the HDF5 file. |
Source code in june/domains/domain.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|