Skip to content

Commit 7ee365c

Browse files
committed
FIX: Update path
1 parent 9ce28c4 commit 7ee365c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

exercises/exercise09.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _(mo):
2121
2222
Today, the German federal health authority RKI announced that the recently observed sharp increase in ICU case numbers following acute respiratory infections is caused by a new lineage of the influenza virus. It was first sequenced at the University Hospital of Cologne and has consequently been named *Influenza B/Colognia/314/2026*. Following its detection, laboratories across Germany rushed to test stored samples from recent patients, giving us a reasonably complete picture of ICU admissions and deaths to date.
2323
24-
The oldest sample identified came from an 80-year-old man from Cologne who died on 2026-02-29. His family reported that he first felt ill shortly after excessively celebrating Carnival on Rose Monday, which fell on 2026-02-16 this year.
24+
The first patients felt ill shortly after excessively celebrating Carnival on Rose Monday, which fell on 2026-02-16 this year.
2525
2626
The RKI has today published all available data and called on modellers worldwide to estimate disease parameters and forecast the further course of the outbreak.
2727
""")
@@ -183,6 +183,8 @@ def set_contact_matrices(model, damping_start, damping_value):
183183
mio.read_mobility_plain(minimum_file),
184184
)
185185

186+
contact_matrices[0].add_damping(mio.Damping(coeffs=damping_value, t=damping_start))
187+
186188
# TODO: Add a damping to contact_matrices[0] using mio.Damping(...).
187189
# The damping should apply a 6×6 matrix filled with damping_value
188190
# uniformly across all age groups, starting at time damping_start.
@@ -268,10 +270,14 @@ def set_mobility(graph):
268270

269271
coeff_ij = (mobility_matrix[i, j] / total_i) * np.ones(num_groups)
270272
coeff_ji = (mobility_matrix[j, i] / total_j) * np.ones(num_groups)
273+
coeff_ij[-1] = 0
274+
coeff_ji[-1] = 0
271275

272276
# TODO: Set the Dead compartment's mobility coefficient to 0 for
273277
# both directions — deceased individuals should not commute.
274278

279+
graph.add_edge(i, j, )
280+
275281
# TODO: Add directed edges in both directions to the graph.
276282
# Use graph.add_edge()
277283

0 commit comments

Comments
 (0)