Skip to content

Commit c46d207

Browse files
committed
CHG: Clarifications to tutorial 10
1 parent 950461d commit c46d207

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

exercises/exercise10.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ def create_model():
126126
# EXERCISE: Set up the ContactMatrix for each location with the correct baseline and
127127
# (where applicable) minimum values. The baselines should sum to 10 contacts/day.
128128
# Home: baseline = 4, minimum = 1 (irreducible household contacts)
129-
# School: baseline = 3
130-
# Work: baseline = 2
131-
# Other: baseline = 1
129+
# School: baseline = 3, minimum = 0
130+
# Work: baseline = 2, minimum = 0
131+
# Other: baseline = 1, minimum = 0
132132
# Hint: mio.ContactMatrix(np.array([[baseline]]), np.array([[minimum]]))
133133
# contacts[Location.Home] = ???
134134
# contacts[Location.School] = ???
@@ -177,7 +177,7 @@ def _(mo):
177177
|--------------------------|----------|-------------|--------------------------------------------|
178178
| School closure | School | 1.0 | All school contacts eliminated |
179179
| Home-office mandate | Work | 0.5 | Work contacts reduced by 50 % |
180-
| Public transport restriction | Other | 0.8 | Other contacts reduced by 80 % |
180+
| Public transport restriction and venue closures | Other | 0.8 | Other contacts reduced by 80 % |
181181
182182
The key difference from Tutorial 3 is that each `Damping` is applied to a **specific location matrix** by indexing `cont_freq_mat[location_index]` before calling `add_damping`. In Tutorial 3, `add_damping` was called on the whole group, reducing **all** contact matrices simultaneously. Home contacts are left unrestricted here, but they cannot fall below the minimum of 1 contact/day regardless.
183183
""")
@@ -191,9 +191,9 @@ def _(Damping, Location, create_model, np):
191191
model_with_npi = create_model()
192192

193193
# EXERCISE: Add the three location-specific dampings that take effect at t_npi_start:
194-
# School closure: D = 1.0 (all school contacts eliminated)
195-
# Home-office mandate: D = 0.5 (work contacts halved)
196-
# Public transport restriction: D = 0.8 (other contacts reduced by 80 %)
194+
# School closure: D = 1.0 (all School contacts eliminated)
195+
# Home-office mandate: D = 0.5 (Work contacts halved)
196+
# Public transport restriction: D = 0.8 (Other contacts reduced by 80 %)
197197
# Hint: model_with_npi.parameters.ContactPatterns.cont_freq_mat[Location.School].add_damping(
198198
# Damping(coeffs=np.ones((1, 1)) * <D>, t=t_npi_start, level=0, type=0))
199199
# ???

0 commit comments

Comments
 (0)