Agent Based Model of the Spread of a Virus - PowerPoint PPT Presentation

About This Presentation
Title:

Agent Based Model of the Spread of a Virus

Description:

Agent Based Model of the Spread of a Virus. Matt Wade. Purpose. To determine if staying home because you are sick and might spread the disease ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 11
Provided by: tjh5
Learn more at: https://www.tjhsst.edu
Category:
Tags: agent | based | model | spread | virus | wade

less

Transcript and Presenter's Notes

Title: Agent Based Model of the Spread of a Virus


1
  • Agent Based Model of the Spread of a Virus
  • Matt Wade

2
Purpose
  • To determine if staying home because you are sick
    and might spread the disease is a valid excuse

3
Inputs
  • Number of sick and healthy agents
  • Type of sickness
  • Infectiousness of the sickness
  • Number of different classes
  • Length of sickness

4
Outputs
  • Number of infections and recoveries
  • Number of sick and healthy agents
  • Picture showing location of each agent and status

5
Current State
  • Current GUI
  • Will eventually have picture below with locations
    of agents
  • Will also have more options and ability to add
    multiple agents at once

6
First Version of checkinfection()?
Inside of for loops
if(healthyagents.get(x).getPos()sickagents.get(y
).getPos())? if(Math.random()lt(sickagents.get(y
).getInfectionPercent()))? if(inArray(posinfe
cted,tempnuminfected,x)false)? posinfecte
dtempnuminfectedx tempnuminfected num
infections //switched agent from healthy to
sick here
7
Fixed checkinfection()?
Inside of the first for loop for checkinfection()?
for(int x0xlttempnuminfectedx)
System.out.println("stuff") sickagents.add(n
ew SickAgent(numclasses,healthyagents.get(posinfe
ctedx).getSchedule(),period)) healthyagents.re
move(posinfectedx) numhealthy-- numsick
for(int yxylttempnuminfectedy)? if(posinfect
edygtposinfectedx)? posinfectedy--
8
checkrecovery()?
public void checkrecovery()? for(int
x0xltnumsickx)? if(sickagents.get(x).getI
nfectionTime()0)? healthyagents.add(new
HealthyAgent(numclasses,sickagents.get(x).getSch
edule(),period)) sickagents.remove(x) numrec
overies numsick-- numhealthy
9
SickAgent
public SickAgent(int numclasses) schedulenew
int8 for(int x0 xlt8x)?
schedulex(int)(Math.random()numclasses
) myposschedule0
infectionpercent5 infectiontime82

10
Results
  • According to my program in its current state
    everyone will be pretty much permanently sick
  • When starting with 30 healthy and 1 sick agent
    they were all sick within 4 steps
  • Arbitrarily choosing the chance of infection does
    not give good results
Write a Comment
User Comments (0)
About PowerShow.com