Beispiel #1
0
    def __init__(self):
        super(DeterministicSEIRModel, self).__init__()

        # Assign default values
        self._output_collector = seirmo.SEIROutputCollector(
            ['S', 'E', 'I', 'R', 'Incidence'])
        self._parameters = seirmo.SEIRParameters(
            ['S0', 'E0', 'I0', 'R0', 'alpha', 'beta', 'gamma'])
 def test_set_outputsFail(self):
     testSubject = se.SEIROutputCollector(['a', 'b'])
     self.assertRaises(ValueError, testSubject.set_outputs, ['c'])
 def test_set_outputs(self):
     testSubject = se.SEIROutputCollector(['a', 'b'])
     testSubject.set_outputs(['a'])
 def test_output_names(self):
     testSubject = se.SEIROutputCollector(['a', 'b'])
     self.assertEqual(['a', 'b'], testSubject.output_names())
 def test_n_outputs(self):
     testSubject = se.SEIROutputCollector(['a', 'b'])
     self.assertEqual(2, testSubject.n_outputs())
 def test__init__(self):
     se.SEIROutputCollector([])
 def test_report(self):
     testSubject = se.SEIROutputCollector(['a', 'b'])
     self.assertRaises(NotImplementedError, testSubject.report,
                       np.zeros((2, 1)))
 def test_begin(self):
     testSubject = se.SEIROutputCollector(['a', 'b'])
     self.assertRaises(NotImplementedError, testSubject.begin)