lisphilar / covid19-sir

CovsirPhy: Python library for COVID-19 analysis with phase-dependent SIR-derived ODE models.
https://lisphilar.github.io/covid19-sir/
Apache License 2.0
109 stars 44 forks source link

[Fix] Scenario.history("Infected") does not include future phases #636

Closed lisphilar closed 3 years ago

lisphilar commented 3 years ago

Summary

Codes

import covsirphy as cs
data_loader = cs.DataLoader("input")
jhu_data = data_loader.jhu()
population_data = data_loader.population()
snl = cs.Scenario(country="Japan", province=None)
snl.register(jhu_data, population_data)
snl.trend(show_figure=False)
snl.estimate(cs.SIRF, timeout=5, timeout_iteration=5)
snl.add(days=1000)
_ = snl.history("Infected")

1000 days: an extreme example

Outputs

Figure_1

Environment

lisphilar commented 3 years ago

With #637, Figure_1