Skip to content

Commit b05d080

Browse files
committed
update python test, rm t_next_damp comment
1 parent 7e8e4e1 commit b05d080

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

cpp/models/ode_secir/model.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,6 @@ class Simulation : public BaseT
302302
FP delay_npi_implementation;
303303
FP t = BaseT::get_result().get_last_time();
304304
while (t < tmax) {
305-
// FP t_next_damp = t;
306-
// for (auto&& mat : contact_patterns.get_cont_freq_mat()) {
307-
// for (auto&& damp : mat.get_dampings()) {
308-
// FP t_damp = damp.get_time().get();
309-
// if(t_damp > t && t_damp <
310-
// }
311-
// }
312-
313305
if (t > 0) {
314306
delay_npi_implementation = FP(dyn_npis.get_implementation_delay());
315307
}

pycode/memilio-simulation/tests/test_dynamic_npis.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ def test_dynamic_npis(self):
3232
""" """
3333
model = Model(0)
3434
dynamic_npis = model.parameters.DynamicNPIsInfectedSymptoms
35-
dynamic_npis.interval = 3.0
35+
dynamic_npis.implementation_delay = 3.0
36+
dynamic_npis.directive_begin = 1.0
37+
dynamic_npis.directive_end = 10.0
3638
dynamic_npis.duration = 14.0
3739
dynamic_npis.base_value = 100000
38-
self.assertEqual(dynamic_npis.interval, 3.0)
40+
self.assertEqual(dynamic_npis.implementation_delay, 3.0)
41+
self.assertEqual(dynamic_npis.directive_begin, 1.0)
42+
self.assertEqual(dynamic_npis.directive_end, 10.0)
3943
self.assertEqual(dynamic_npis.duration, 14.0)
4044
self.assertEqual(dynamic_npis.base_value, 100000)
4145
self.assertEqual(len(dynamic_npis.threshold), 0)

0 commit comments

Comments
 (0)