Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First chance to be infected logic #11

Open
misken opened this issue Dec 30, 2020 · 0 comments
Open

First chance to be infected logic #11

misken opened this issue Dec 30, 2020 · 0 comments

Comments

@misken
Copy link

misken commented Dec 30, 2020

For a SUSCEPTIBLE to become EXPOSED when checking the cellmates, it would seem that:

  • the self agent needs to either not be in isolation or be in ineffective isolation,
  • and the cellmate also needs to either not be in isolation or be in ineffective isolation,
  • and of course, the cellmate must be contagious.

However, in the code below, it doesn't appear that the cellmates isolation status is ever checked, and instead the self's isolation status is repeatedly checked (though it really only needs to be checked once before the main loop even starts). Am I missing something?

            # Isolated people should only be contagious if they do not follow proper
            # shelter-at-home measures
            for c in cellmates:
                    if c.is_contagious():
                        c.add_contact_trace(self)
                        if self.isolated and bernoulli.rvs(1 - self.model.prob_isolation_effective):
                            self.isolated_but_inefficient = True
                            infected_contact = True
                            break
                        else:
                            infected_contact = True
                            break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant