Question
PLEASE WRITE OUT THE CODE , WITH COMMENTS Your program must adhere to the following constraints: ? The disease model parameters must be read in
PLEASE WRITE OUT THE CODE , WITH COMMENTS
Your program must adhere to the following constraints:
? The disease model parameters must be read in from a user defined file.
The file will be organized as follows:
o Initial number of Susceptibles
o Initial number of Infectious
o Initial number of Recovered
o Percentage of the population to be vaccinated
o Contact Rate
o Transmission Probability
o Infectious Period
o Number of simulations to run
? Each person must be represented as an individual agent, with their own health states (S,I,R)
? You may not use differential equations to model the progression of the disease
? The agents to be vaccinated should be chosen randomly, and rounded to the nearest whole number
? The infected agents should be chosen randomly and should not be vaccinated
? An agent cannot being infecting other agents until the day after they are infected
? All simulations should be run using a different random seed
? Your program should output the following:
o The disease model parameters
o The average outbreak peak, i.e. the first day with the highest number of infected
o The average outbreak stopping time, i.e. the first day when there are no infected o The average final number of susceptible agents
o The average final number of recovered agents
The output should be provided to the user in an easy to read and understand format.
? Your code must be well commented.
? You must provide a short README file which includes your name and explains how to compile and run your program.
? Additionally, you may write a makefile if you want your code to compile with additional flags
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started