project/main.h #include #include #include //To read in contents of file. #include #include #include using namespace std; // XXXXXXXXXXCLASS TO HOLD VARIABLES AND FOR ALL OF THE FUNCTIONS USED FOR...

I have a group project that need to be done in the next 4-5 hours.At this point I only need something looking "decent" for partial credit since It's too late already.My part is 5 & 6, as bolded in the attached description, and I cannot modify other people codes


project/main.h #include #include #include//To read in contents of file. #include #include #include using namespace std; //------------------CLASS TO HOLD VARIABLES AND FOR ALL OF THE FUNCTIONS USED FOR OUTBREAKDATA---------------- class agent{//class agent to begin holding variables and functions for information. public://set to public otherwise class will set ALL contents to private by default. string healthState;// int infectiousDaysLeft = -1; int infectiousPeriodInfo = 0; int peakInfectionCountCloseness = 0;// (closeness) int dayofPeakInfectionCountCloseness = 0;// (closeness) int outbreakEndDayCloseness = 0;// (closeness) int peakInfectionCountDegree = 0;// (degree) int dayofPeakInfectionCountDegree = 0;// (degree) int outbreakEndDayDegree = 0;// (degree) int peakInfectionCountRandom = 0;// (random) int dayofPeakInfectionCountRandom = 0;// (random) int outbreakEndDayRandom = 0;// (random) int peakInfectionCountEqual = 0;// (equal) int dayofPeakInfectionCountEqual = 0;// (equal) int outbreakEndDayEqual = 0;// (equal) int vaccineCount = 0; int contactRateInfo = 0; int infectedAreainfo = 0; void printPopulation(vector vectorData);//prints population. void printAdjacency(vector<>> vectorData);//prints adjacency list. void vaccineDistribution(vector<>> vectorData, vector vectorData2); void printMenu(int choice);//prints menu to give user options for desired output. void degreeVaccineDistributionFunction();//Explanation for function and definition(s) in located in main.cpp . void closenessVaccineDistributionFunction(); void randomVaccineDistributionFunction(); void equalVaccineDistributionFunction(); void agentInitializationFunction(); void updateInfectedFunction(); void updateRecoveredFunction(); void sirvCounterFunction(); void distributionOutputFunction(); void finalOutputFunction(); }; __MACOSX/project/._main.h project/.DS_Store __MACOSX/project/._.DS_Store project/project_description.docx Project : Contagion Instructions For this project, you and your group will be designing and implementing a system in C or C++, that will act as a simulation engine to compare the impact of different vaccine distribution strategies on the spread of a disease. Specifically, you will be examining how prioritizing vaccine distribution across areas using closeness centrality and degree centrality compare against each other and random and equal distribution strategies. The results of these experiments should be provided to the user at the end in an easy to read format. Also, as a reminder, all of the work for this project must be the sole product of the group. You may not share code with other groups, or download solutions off the internet, as doing so will be considered cheating. If you are struggling with a concept or implementation, you are encouraged to contact the instructor or your TA’s for aid. Requirements This assignment has two parts: a wiki portion and an implementation portion. Implementation Your program must provide the following functionality and adhere to the following constraints: · Your int main() should be in its own .c/.cpp file · All .c/.cpp files, except your main.c/main.cpp, must have associated header files. You may not #include a .c/.cpp file, only header files · Allow the user to input the file containing the simulation configuration o Do NOT hardcode the filename into your program o The first line will provide the name of the file containing the region population (Do NOT prompt the user for this filename) o The second line will provide the name of the file containing the region layout (Do NOT prompt the user for this filename) o The third line will be empty o The fourth line will provide information regarding which area in the region starts with the infection o The fifth line will provide information regarding the infectious period of the disease o The sixth line will provide information regarding the contact rate of the disease o The seventh line will provide information regarding the number of available vaccines · Your system should perform the following operations: o Read in and store the simulation configuration information o Read in and store the initial region population · Each line contains the ID of the area and its population · There can be any number of areas in a region, and they can have any population o Read in and store the region layout · The region layout stores the region as an adjacency matrix with a header on the top row and left column · The region can be considered to be a contiguous, planar graph where areas are nodes and an edge between two nodes indicates those two areas share a border · A 1 in a cell indicates two areas are adjacent · A 0 in a cell indicates two areas are not adjacent · The adjacency matrix will always be square o Output the ID and population of each area o Output an adjacency list representing the region o Setup the following experiments · Distribute vaccines amongst the areas according to closeness centrality, smaller closeness values have priority over larger closeness values. In the case of a tie between closeness centrality values, smaller label values take priority. Closeness is defined as the average shortest distance between an area and every other area. You should attempt to distribute the maximum number (population size) of vaccines to an area before beginning distributing vaccines to the next area · Distribute vaccines amongst the areas according to degree centrality, larger degree values have priority over smaller degree values. In the case of a tie between degree centrality values, smaller label values take priority. Degree for an area is the number of adjacent areas. You should attempt to distribute the maximum number (population size) of vaccines to an area before beginning distributing vaccines to the next area · Distribute vaccines amongst the areas randomly. The areas labels have already been randomized so allocate vaccines starting at the smallest label and working to the largest label. You should attempt to distribute the maximum number (population size) of vaccines to an area before beginning distributing vaccines to the next area · Distribute vaccines amongst the areas equally. Each area should receive an equal share of the vaccine. An area cannot receive more vaccines than it has people, and any remaining vaccines from its allocation should be distributed round-robin style to the areas starting with the lowest numbered area and working to the highest numbered area. o Execute each experiment using an agent-based SIRV model · In SIRV models, we say that agents have one of four health states: Susceptible, Infectious, Recovered, Vaccinated. Susceptible agents do not have the disease but can contract it. Infectious agents have the disease and are spreading it for the length of their infectious period. Recovered agents are no longer infectious and have immunity to the disease. Vaccinated agents cannot contract the disease due to being vaccinated · In agent based models, each individual is represented as a separate entity, not just a population total. This means they will each agent will have their own health states and their own infectious period · For each experiment, one agent in the initially infected area will be infectious on Day 0. This does count as a day for the infectious period of that agent · Before an experiment is executed, the name of that distribution method should be output · For each experiment, your simulator must output for each day (including day 0) 1. The current simulated day number 2. The id, total population, number of susceptible, number of infectious, number of recovered, and number of vaccinated agents for each area · Each day, every infectious agent in an area infects contact rate number of available susceptible agents. These agents do not become infectious until the next day · At the end of the day, any infectious agents that have spent a number of days equal to the infectious period should become recovered for the next day. This means that every infectious agent should infect susceptibles for the full number of infectious period days · Recovered and vaccinated agents do not change states · If an area ever has more than 50% of its population infectious in a single day, then it infects a single person in each of its adjacent areas that have no infectious agents. These agents do not become infectious until the next day · The experiment stops when there are no more infectious agents in the region o Collect and output data regarding the experiment · For each experiment, you should determine what the peak number of infectious agents was, when the first day that peak occurred, what day the outbreak ended on (i.e. the first day with no infectious agents in the region), and how many agents in total were infected · This data should be output as a summary after all experiments have been executed · See the example output files for formatting of each of the outputs · Major functionality components must be constructed in some function, or across some functions, that are declared and defined outside of your main.c/main.cpp . Remember, function declarations must be stored in a header file, while definitions must be stored in a .c/.cpp file. You may have additional functions that support your major functionality component function. · Your code must be well commented. · Each group member should be performing regular commits to the GitLab repository on the Apollo server with meaningful commit messages. “Fixed bug” or “New code” are not meaningful, so try to be more specific about what was fixed or what was added. · Please do not commit the example input and output files to the remote server as that may cause a space issue on the server. · You must provide a .txt format README file which includes: o The names of all group members o Instructions on how to compile your program o Instructions on how to run your program o An indication on whether you implemented the bonus or not. By default, the TA’s will assume you did not attempt the bonus unless you indicate otherwise. · Additionally, you may write a makefile, but please specify if it needs any additional flags to function properly Each student must be accountable for one or more major functionality components, and may not swap after they sign up for a component barring an exceptional circumstance. Failure to be accountable for any major functionality component will result in a 0 for the coding portions of the project (milestone submission and/or final submission). Keep in mind that some components build on others, so be careful about who takes ownership of which pieces and manage your time to avoid a crunch near the due date. Also, the group should strive to balance the work across all members. The major functionality components are: 1. Reading in the configuration file, region file, and population file, storing and organizing the data, and outputting the adjacency list of the graph representing the region along with the population of each area 2. Calculating the closeness centrality and determining vaccine distribution for each area 3. Calculating the degree centrality
Apr 21, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here