SciCompMod / memilio

Modular spatio-temporal models for epidemic and pandemic simulations
https://scicompmod.github.io/memilio/
Apache License 2.0
55 stars 16 forks source link

divNj creates NaN values if a subpopulation of a sociodemographic group is equal to 0 #1102

Closed HenrZu closed 2 months ago

HenrZu commented 3 months ago

Bug description

Assuming that double Nj = this->populations.get_group_total(j);returns 0. Then double divNj = 1.0 / Nj; returns NaN. This functionality is used in the secirvvs, secir and seir.

Version

Linux

To reproduce

run a simulation where the subpopulation of a age group is zero.

Relevant log output

No response

Add any relevant information, e.g. used compiler, screenshots.

No response

Checklist