Home

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:

Architecture of Distemper Model

Parameters

Parameter NameDescriptionType/Units
pSusceptibleIntakeThe probability that an animal intakes as Susceptible to the virusprobability/hour
pInfectIntakeThe probability that an animal intakes as Infected with the virus (but not Symptomatic)probability/hour
pSymptomaticIntakeThe probability that an animal intakes as Infected and Symptomatic with the virusprobability/hour
pInsusceptibleIntakeThe probability that an animal intakes as Fully Vaccinated/Insusceptibleprobability/hour
pSurviveInfectedThe probability that an animal will survive (become Insusceptible) given they are Infected (but not Symptomatic)probability/hour
pSurviveSymptomaticThe probability that an animal will survive (become Insusceptible) given they are Symptomaticprobability/hour
pDieAlternateThe probability that an animal will die of alternate causesprobability/hour
pDischargeThe probability that an animal will be discharged given it is Insusceptibleprobability/hour
pCleaningThe probability that a kennel will be cleaned given the presence of a Deceased animalprobability/hour
pSymptomaticThe probability that an animal will become symptomatic given they are Infectedprobability/hour
pDieThe probability that an animal will die given they are Symptomaticprobability/hour
refractoryPeriodThe minimum time required for particular state transitions such as Symptomatic->Deceased and Infected->Symptomatic to have a non-zero probabilitynumber of hours
infection_kernelThe probability of infection given a distance in kennel connectionslist of probabilities
infection_kernel_functionA function that determines how immunity impacts infection rate given kernel probabilities from adjacent kennelsstring lambda function
immunity_lutEither a pair of floating point values specifying an iterative exponential growth function's parameters or a lookup table of values for each hourlist of 0-1 bounded values
max_timeThe maximum time the simulation will run before ending automaticallynumber of hours
max_intakesThe maximum number of intakes before the simulation ends automaticallynumber of animals

Parameter Estimation

Meta-Parameter NameDescriptionType/UnitsHypothesized Value (or Range)
equationA time period in which to compute the meta-parameters (and, therefore, the regular parameters)hours744 (i.e. 1 month)
equationThe number of animals in a given time period, Tcount847
equationThe number of animals in a given time period, T, who came in infected with distempercount68 (from APA Data)
equationThe number of animals in a given time period, T, who came in susceptible to distempercount432 (from APA Data)
equationThe number of animals in a given time period, T, who came in confirmed fully vaccinatedcount347 (1, 2, 3)
equationThe number of animals in a given time period, T, who died due to reasons other than distempercount68
equationThe number of animals in a given time period, T, who died due to distempercount111 (Watch+Confirmed Proportion; or 178 Confirmed Proportion for stricter criteria; via APA Internal Data)
equationThe number of animals in a given time period, T, who were infected with distempercount132 (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.

equation

Parameter NameEstimation MethodType/UnitsHypothesized Value (or Range)
pSusceptibleIntakeLiterature 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?
pInfectIntake0.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 AACprobability/hour?
pSymptomaticIntakeAssumed 0probability/hour0 (assumed)
pInsusceptibleIntakeLiterature 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?
pSurviveInfectedDetermined 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/hour0 (assumed)
pSurviveSymptomaticDetermined 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 providedprobability/hour0 (assumed)
pDieAlternateDetermined via AAC average death rate extrapolated then applied to equation (1)probability/hour?
pDischargeAssumed 0probability/hour0
pCleaningAssumed 1probability/hour1
pSymptomaticDetermined 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/hour0 (assumed)
pDieDetermined 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?
refractoryPeriodAssumed 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 hours168
infection_kernelComputed from 0.0053 per day global spread probabilitiy applied to equation (1) in neighbor then inverse square law (due to diffusion) for second neighborlist of probabilities[?, ?]
infection_kernel_functionInverse 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 functionk*(1-immunity)
immunity_lutAssumed to follow linear part of Michaelis-Menten Kinetics with fit to 0 and t=0 and 0.9 at t=72list of 0-1 bounded valuesy=0.0125*t for t=0..72
max_timeN/Anumber of hours744
max_intakesN/Anumber of animalsNone

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:

Video of Graphs

Additionally, a simulation of the kennel network states can be seen here:

Video of Simulation

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: Comparison of Methods

Current Agent

The current agent performance on a single instance of a single time point of a single graph:

Model Performance