Awesome
Distemper Outbreak Simulation
This repo contains models for optimizing animal placement in kennels in shelters at risk of a distemper outbreak.
The model uses a non-deterministic automata to update the local status for each kennel in a simulated shelter. Intervention objects can then operate on the kennel structure at any time point in the simulation to try out organizational strategies based on visible knowledge about the simulation state. The architecture of the simulation can be seen here:
Parameters
Parameter Name | Description | Type/Units |
---|---|---|
pSusceptibleIntake | The probability that an animal intakes as Susceptible to the virus | probability/hour |
pInfectIntake | The probability that an animal intakes as Infected with the virus (but not Symptomatic) | probability/hour |
pSymptomaticIntake | The probability that an animal intakes as Infected and Symptomatic with the virus | probability/hour |
pInsusceptibleIntake | The probability that an animal intakes as Fully Vaccinated/Insusceptible | probability/hour |
pSurviveInfected | The probability that an animal will survive (become Insusceptible) given they are Infected (but not Symptomatic) | probability/hour |
pSurviveSymptomatic | The probability that an animal will survive (become Insusceptible) given they are Symptomatic | probability/hour |
pDieAlternate | The probability that an animal will die of alternate causes | probability/hour |
pDischarge | The probability that an animal will be discharged given it is Insusceptible | probability/hour |
pCleaning | The probability that a kennel will be cleaned given the presence of a Deceased animal | probability/hour |
pSymptomatic | The probability that an animal will become symptomatic given they are Infected | probability/hour |
pDie | The probability that an animal will die given they are Symptomatic | probability/hour |
refractoryPeriod | The minimum time required for particular state transitions such as Symptomatic->Deceased and Infected->Symptomatic to have a non-zero probability | number of hours |
infection_kernel | The probability of infection given a distance in kennel connections | list of probabilities |
infection_kernel_function | A function that determines how immunity impacts infection rate given kernel probabilities from adjacent kennels | string lambda function |
immunity_lut | Either a pair of floating point values specifying an iterative exponential growth function's parameters or a lookup table of values for each hour | list of 0-1 bounded values |
max_time | The maximum time the simulation will run before ending automatically | number of hours |
max_intakes | The maximum number of intakes before the simulation ends automatically | number of animals |
Parameter Estimation
Meta-Parameter Name | Description | Type/Units | Hypothesized Value (or Range) |
---|---|---|---|
A time period in which to compute the meta-parameters (and, therefore, the regular parameters) | hours | 744 (i.e. 1 month) | |
The number of animals in a given time period, T | count | 847 | |
The number of animals in a given time period, T, who came in infected with distemper | count | 68 (from APA Data) | |
The number of animals in a given time period, T, who came in susceptible to distemper | count | 432 (from APA Data) | |
The number of animals in a given time period, T, who came in confirmed fully vaccinated | count | 347 (1, 2, 3) | |
The number of animals in a given time period, T, who died due to reasons other than distemper | count | 68 | |
The number of animals in a given time period, T, who died due to distemper | count | 111 (Watch+Confirmed Proportion; or 178 Confirmed Proportion for stricter criteria; via APA Internal Data) | |
The number of animals in a given time period, T, who were infected with distemper | count | 132 (Died From Distermper/0.85 survival rate) |
Rate Averaging Equation This equation can be used to take population numbers over a time interval and convert them to probabilities per unit time in that interval.
Parameter Name | Estimation Method | Type/Units | Hypothesized Value (or Range) |
---|---|---|---|
pSusceptibleIntake | Literature Review of 1, 2, 3 to determine average rate of 1-0.41-pInfectIntake in population across 4 shelters, extrapolated to AAC data and applied to equation (1) | probability/hour | ? |
pInfectIntake | 0.08 applied to equation (1) based on APA Internal Data on distemper watch or confirm intakes between August 2018 and January 2019 post-outbreak at AAC | probability/hour | ? |
pSymptomaticIntake | Assumed 0 | probability/hour | 0 (assumed) |
pInsusceptibleIntake | Literature Review of 1, 2, 3 to determine average rate of 0.41 in population across 4 shelters, extrapolated to AAC data and applied to equation (1) | probability/hour | ? |
pSurviveInfected | Determined via examination of all distemper watch animals at APA for months of August 2018 to January 2019 post-outbreak at AAC and extrapolated to AAC population then applied to equation (1) | probability/hour | 0 (assumed) |
pSurviveSymptomatic | Determined via examination of all distemper confirmed animals at APA for months of August 2018 to January 2019 post-outbreak at AAC and extrapolated to AAC population then applied to equation (1) or 0.15 if no treatment is provided | probability/hour | 0 (assumed) |
pDieAlternate | Determined via AAC average death rate extrapolated then applied to equation (1) | probability/hour | ? |
pDischarge | Assumed 0 | probability/hour | 0 |
pCleaning | Assumed 1 | probability/hour | 1 |
pSymptomatic | Determined via comparison of distemper exposed evolution in APA animals fro August 2018 to January 2019 post-outbreak at AAC and extrapolated to AAC population then applied to equation (1) - this figure is likely an overestimate as equation (1) assumes a uniform distribution when this is likely not the case (it is likely right skewed) | probability/hour | 0 (assumed) |
pDie | Determined via 1-pSurviveSymptomatic or 0.85 applied to equation (1) depending on assumptions of treatment (i.e. the former with APA protocols and the latter without) | probability/hour | ? |
refractoryPeriod | Assumed 0 days (hypothetically if infection occurs on-site it is 7-14 days, but infection could have occurred before arrival - the simulation does not currently differentiate these situations so no refractor period will be given) | number of hours | 168 |
infection_kernel | Computed from 0.0053 per day global spread probabilitiy applied to equation (1) in neighbor then inverse square law (due to diffusion) for second neighbor | list of probabilities | [?, ?] |
infection_kernel_function | Inverse square law due to diffusion over 20 foot radius - assumed to be 2 kennel max distance for convenience (though this should be adjusted for sufficiently tight layouts) | string lambda function | k*(1-immunity) |
immunity_lut | Assumed to follow linear part of Michaelis-Menten Kinetics with fit to 0 and t=0 and 0.9 at t=72 | list of 0-1 bounded values | y=0.0125*t for t=0..72 |
max_time | N/A | number of hours | 744 |
max_intakes | N/A | number of animals | None |
Demonstration
Using some probabilities which have not been verified, we can see how the simulation performs.
Single Simulation
When run in single simulation mode, visualizations of the temporal progress of the disease can be seen. Aggregate variable graphs are shown as follows:
Additionally, a simulation of the kennel network states can be seen here:
Batch Simulation
Finally, when run in batch mode, different strategies can be compared which intervene in position. Here, animals are sorted by immunity to avoid infection of new dogs. This intervention is compared to no intervention:
Current Agent
The current agent performance on a single instance of a single time point of a single graph: