Private room
InteractivePrivateRoom
Bases: InteractiveGroup
Interactive version of PrivateRoom for disease modeling.
Source code in june/groups/private_room.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
|
get_processed_beta(betas, beta_reductions)
Returns the processed contact intensity for private rooms. Private rooms are abstract spaces that don't follow venue rules or regional compliance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
betas
|
|
required | |
beta_reductions
|
|
required |
Source code in june/groups/private_room.py
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
|
get_processed_contact_matrix(contact_matrix)
Process contact matrix for private rooms. Since private rooms typically have close contact, we use a single subgroup with high contact rates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
contact_matrix
|
|
required |
Source code in june/groups/private_room.py
150 151 152 153 154 155 156 157 158 159 160 |
|
get_spec()
Override to return 'sexual_encounter' instead of 'private_room'.
Source code in june/groups/private_room.py
144 145 146 147 148 |
|
PrivateRoom
Bases: Group
A private room that can hold people. Each private room has a single subgroup containing its owner (the person who has sexual partners).
Source code in june/groups/private_room.py
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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
is_full
property
Check if the private room is at maximum capacity.
n_occupants
property
Get the number of people in the private room.
occupants
property
Get all people in the private room.
owner
property
Get the Person object who owns this private room.
__init__(owner_id, max_occupancy=1, area=None, super_area=None)
Create a PrivateRoom.
Parameters
owner_id : int The ID of the person who owns this private room max_occupancy : int, optional Maximum number of people that can be in this private room (default: 1) area : Area, optional The area where this private room is located (same as owner's area) super_area : SuperArea, optional The super area where this private room is located (same as owner's super area)
Source code in june/groups/private_room.py
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 |
|
add(person)
Add a person to the private room.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
person
|
|
required |
Source code in june/groups/private_room.py
63 64 65 66 67 68 69 70 71 72 73 |
|
get_interactive_group(people_from_abroad=None)
Get an interactive version of this private room for disease modeling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
people_from_abroad
|
(Default value = None) |
None
|
Source code in june/groups/private_room.py
54 55 56 57 58 59 60 61 |
|
get_spec()
Override to return 'sexual_encounter' instead of 'private_room'.
Source code in june/groups/private_room.py
96 97 98 99 100 |
|
PrivateRooms
Bases: Supergroup
A collection of private rooms.
Source code in june/groups/private_room.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
n_occupants
property
Get the total number of occupants across all private rooms.
occupancy_rate
property
Get the overall occupancy rate across all private rooms.
total_capacity
property
Get the total capacity across all private rooms.
__init__(private_rooms)
Create a collection of private rooms.
Parameters
private_rooms : List[PrivateRoom] List of private room instances
Source code in june/groups/private_room.py
108 109 110 111 112 113 114 115 116 117 |
|