Create a program that will model an epidemic on a very small population (size 20-25) using the Graph library in perl. Your program should call Graphviz to render a contact graph and a transmission graph.
Guidelines:
Constants:
Population size (N)
Average contacts per person, per day (C)
Transmission rate (TR)
Days latent (DL)
Days infectious (DI)
Percent immune (PI) - these people may have natural immunity or may have been vaccinated
Begin the epidemic with one individual in the infectious state, PI * N people in the removed state (or you may want to include a separate state for immune individuals), and all others in the susceptible state.
Continue the simulation until there are no individuals in the infectious or latent state.
Each day:
Make contacts until total contact limit per day (N*C) is reached.
You decide whether contacts should be totally random, limited to immediate neighbors, or a hybrid approach.
Keep a count of the contacts made. Every contact counts twice, once for each person.
When a contact between two people occurs, if an edge does not already exist in the contact graph, create an edge. If you choose to, you can increase the edge weight each time a contact is made between two individuals and include the edge weight when Graphviz renders the contact graph.
If an infected person contacts a susceptible (or vice versa), the disease should transfer with probability, TR. If transfer occurs, the state of the susceptible individual should change to latent.
Count the number of individuals in each state and update the states if necessary.
Determine if the simulation should continue.
Deliverables:
Upload your WELL-DOCUMENTED code to D2L.
Upload a copy of contact graph and transmission graph of a simulation in which at least 5 individuals became infected. You may produce two separate graphs or one graph that uses color to indicate the transmission path (e.g., color the nodes and edges red).
Hi, i'm a +3 years experience Java-Javascript developer, i'v writen some utilities using perl for system administration. Last semester i took a course about simulation, learn how to use several simulation softwares(netlogo, anylogoc, gpss) and wrote a couple of simulations.
I will write a software that simulates a spreading disease. The software will run until it finds there are no individuals in the infectious and latent state. The posible states are:
- susceptible state
- immune state
- latent state
After DI days the infected individuals will become infected
- infectious state
After DL days the infected individuals will die.
When the simulation is finish it will show the graph of contacts and the disease graph. The spreading will be random(anybody can infect anybody).