Question: please in java The model configuration file will always have the following lines in the following order, though their associated values may vary o Population:

please in java

The model configuration file will always have the following lines in the following order, though their associated values may vary o Population: which represents the total number of individuals in the model o InitialInfected: which represents the initial number of infected individuals in the model o ContactRate: which represents the contact rate to the used in the model o RecoveryPeriod: which represents the number of days a individual stays infectious before recovering o PercentageVaccinated: which represents what percentage of the population will be vaccinated o See example input files Your program should prompt the user for the name of the file the model configuration information, using a JInputDialog, with an appropriate message Your program should make sure the file exists, and if it does not exist, repeatedly prompt the user for a correct filename until one is provided Your program should read in and store the population count, initial infected count, contact rate, recovery period, and percentage of vaccinated individuals in appropriate variables o The recovery period should be used to calculate the recovery rate, such that the recovery rate is (1/recovery period) o Be sure to close your input stream when finished reading After the file is read in, the initial number of infected, contact rate, recovery period, and vaccination percentage should be output to the user, using a JMessageDialog, with an appropriate message Your program should perform 5 simulations o The first simulation should have no vaccinated individuals, the second simulation should have the vaccinated percentage number of vaccinated individuals, the third simulation should have two times the vaccinated percentage number of vaccinated individuals, etc. o The number of simulations should be stored in a constant variable and that variable should be used instead of the number 5 o The full output of each simulation should be written to a separate file named Disease_out_val.txt where val is the id number of the simulation, and ids range from 1-5 Thus, you should have five separate output files after your program has completed executing, one for each simulation For each simulation your program should: o Set the initial number of susceptible (S), infectious (I), and recovered (R) individuals The initial number of susceptible individuals can be calculated by subtracting the initial number of infection and vaccinate individuals from the total number of individuals The initial number of infectious individuals is stored in the model information file The number of recovered individuals is assumed to be 0 at the beginning of the simulation The initial number of individuals in each category represents the initial configuration of the outbreak on day 0, and should be output o Because you are using differential equations in this simulation, will need to set Si-1, Ii-1, Ri-1 to the initial values of the number of susceptible individuals, infectious individuals, and recovered individuals, respectively. o In order to determine the length of the outbreak, you will need to count the number of days until the number of infectious individuals is below 0.5. For each day you should perform the following steps: Update the current number of susceptible, infectious, and recovered (S, I, R) individuals using the appropriate equation and variables Determine if the current day has the highest number of infectious individuals, and store the day and count if it does Output the day, count of susceptible, infectious, and recovered individuals, with two decimal points of precision, to the appropriate file in a regularly spaced, tabular format The goal is to make this easy to read, so you might consider using printf() or String.format() in order to make sure all of your outputs line up correctly See example output files Update the values of the previous days susceptible, infectious, and recovered individuals counts (Si-1, Ii-1, Ri-1) to the current days susceptible, infectious, and recovered individuals counts (S,I,R) Increment the day counter o Once the number of infectious individuals is below 0.5, you should output the id of the simulation, the number of days it took the outbreak to complete, the percentage of the population that was vaccinated, the peak day of infection and the number of infectious individuals on that day, with 2 decimal points of precision This should be output to both the file and to the user using a JMessageDialog See example output files No class scoped variables are allowed for this project Your code should be well documented in terms of comments. For example, good comments in general consist of a header (with your name, date, and brief description), comments for each variable, and commented blocks of code Your program source code should be named SIR.java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!