cvanwynsberghe / pyworld3

The World3 model revisited in Python
Other
299 stars 30 forks source link

Missing requirement for cbr in Population #5

Closed iancostalves closed 2 years ago

iancostalves commented 2 years ago
    @requires(["cbr"], ["pop"])
    def _update_cbr(self, k, jk):
        """
        From step k requires: POP
        """
        self.cbr[k] = 1000 * self.b[jk] / self.pop[k]

I believe the function _update_cbr in the Population class is missing the requirement for the birth rate

cvanwynsberghe commented 2 years ago

The requires decorator is intended to tackle dependencies at index k and kl. Other ones (j, jk) are not needed because they are computed already.