Project 2: ContagionInstructionsFor this project, you and your group will be designing and implementing a system in C or C++, that will act as asimulation engine to compare the impact of different...

Project 2: ContagionInstructionsFor this project, you and your group will be designing and implementing a system in C or C++, that will act as asimulation 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 anddegree centrality compare against each other and random and equal distribution strategies. The results of theseexperiments should be provided to the user at the end in an easy to read format.Additionally, sample input files can be found on the CSE machines at/home/dmk0080/2110/proj2/You can copy input the files from there.Further, you will need to utilize the GitLab code repository located at https://apollo.cse.unt.edu/ . You may access itfrom the website, the terminal, or an IDE of your choice.Also, as a reminder, all of the work for this project must be the sole product of the group. You may not share code withother groups, or download solutions off the internet, as doing so will be considered cheating. If you are struggling with aconcept or implementation, you are encouraged to contact the instructor or your TA’s for aid.RequirementsThis assignment has two parts: a wiki portion and an implementation portion.WikiFor the wiki portion, the group must generate documentation describing their system using the wiki functionalityprovided by GitLab. The wiki must contain at least one page that provides a high-level description of the entire systemand must contain at least one page for each of the major functionality components (i.e. if there are six majorfunctionality components, there should be at least six pages).For the high-level description page, the team must provide a brief description of each of the major functionalitycomponents, how they work together, and some of the major data structures across the entire project. This informationshould not be copied and pasted from the project instructions. The page must also contain a diagram of the entiresystem, based on the one created during recitations. The diagram must be created digitally (i.e. using PowerPoint,Photoshop, Paint.net, UMLet, etc.), must be easy to read and understand, and cannot a photographed or scannedimage.For each major functionality component page, the student accountable for that component must provide a detaileddescription of their component. This description should have three labeled sections: a brief description of the purpose ofthe component, a description of how data was stored and maintained for this component, and a description of thefunctionality for the component. They might also consider including diagrams to more easily visualize how all of thepieces fit together.For the data storage and maintenance section, there should be an explanation of how data was stored and maintainedin their component. What, if any, objects or structs were created to store data? How were they organized andmanaged? What types of formal data structures did were made use of (trees, graphs, arrays, hashes, etc)?For the functionality component, there should be an explanation of the major functions in the component. How is datamoved and transformed? How is it read in? How is it output? What are the various major functions constructed and howdo they work?Descriptions and explanations should be primarily in prose and paragraph format, not bulleted lists. Code snippets arealso acceptable, but must be used as an enhancement to the explanation of functionality not as a substitution for it.Your grade for the wiki will partly be based on apparent effort, so please be thorough in your descriptions. Additionally,because this is a wiki, the high-level description page must have links to all of the major functionality component pages.ImplementationYour program must provide the following functionality and adhere to the following constraints:••••Your int main() should be in its own .c/.cpp fileAll .c/.cpp files, except your main.c/main.cpp, must have associated header files. You may not #include a .c/.cppfile, only header filesAllow the user to input the file containing the simulation configurationo Do NOT hardcode the filename into your programo The first line will provide the name of the file containing the region population (Do NOT prompt the userfor this filename)o The second line will provide the name of the file containing the region layout (Do NOT prompt the userfor this filename)o The third line will be emptyo The fourth line will provide information regarding which area in the region starts with the infectiono The fifth line will provide information regarding the infectious period of the diseaseo The sixth line will provide information regarding the contact rate of the diseaseo The seventh line will provide information regarding the number of available vaccinesYour system should perform the following operations:o Read in and store the simulation configuration informationo 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 populationo 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 leftcolumn§ The region can be considered to be a contiguous, planar graph where areas are nodes and anedge 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 squareo Output the ID and population of each areao Output an adjacency list representing the regiono Setup the following experiments§ Distribute vaccines amongst the areas according to closeness centrality, smaller closeness valueshave priority over larger closeness values. In the case of a tie between closeness centralityovalues, smaller label values take priority. Closeness is defined as the average shortest distancebetween 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 havepriority over smaller degree values. In the case of a tie between degree centrality values, smallerlabel values take priority. Degree for an area is the number of adjacent areas. You shouldattempt to distribute the maximum number (population size) of vaccines to an area beforebeginning distributing vaccines to the next area§ Distribute vaccines amongst the areas randomly. The areas labels have already beenrandomized 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 areabefore beginning distributing vaccines to the next area§ Distribute vaccines amongst the areas equally. Each area should receive an equal share of thevaccine. An area cannot receive more vaccines than it has people, and any remaining vaccinesfrom its allocation should be distributed round-robin style to the areas starting with the lowestnumbered area and working to the highest numbered area.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 agentscannot contract the disease due to being vaccinated§ In agent based models, each individual is represented as a separate entity, not just a populationtotal. This means they will each agent will have their own health states and their own infectiousperiod§ For each experiment, one agent in the initially infected area will be infectious on Day 0. Thisdoes 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 number2. The id, total population, number of susceptible, number of infectious, number ofrecovered, and number of vaccinated agents for each area§ Each day, every infectious agent in an area infects contact rate number of available susceptibleagents. 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 theinfectious period should become recovered for the next day. This means that every infectiousagent 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 asingle person in each of its adjacent areas that have no infectious agents. These agents do notbecome infectious until the next day§ The experiment stops when there are no more infectious agents in the regionCollect 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 noinfectious 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 executedSee the example output files for formatting of each of the outputsMajor functionality components must be constructed in some function, or across some functions, that aredeclared and defined outside of your main.c/main.cpp . Remember, function declarations must be stored in aheader file, while definitions must be stored in a .c/.cpp file. You may have additional functions that supportyour major functionality component function.o•••• Your code must be well commented.Each group member should be performing regular commits to the GitLab repository on the Apollo server withmeaningful commit messages. “Fixed bug” or “New code” are not meaningful, so try to be more specific aboutwhat 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 issueon the server.You must provide a .txt format README file which includes:o The names of all group memberso Instructions on how to compile your programo Instructions on how to run your programo An indication on whether you implemented the bonus or not. By default, the TA’s will assume you didnot 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 theysign up for a component barring an exceptional circumstance. Failure to be accountable for any major functionalitycomponent 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 andmanage your time to avoid a crunch near the due date. Also, the group should strive to balance the work across allmembers. The major functionality components are:1. Reading in the configuration file, region file, and population file, storing and organizing the data, andoutputting the adjacency list of the graph representing the region along with the population of eacharea2. Calculating the closeness centrality and determining vaccine distribution for each area3. Calculating the degree centrality and determining vaccine distribution for each area4. Determining the vaccine allocation for each area for random distribution5. Determining the vaccine allocation for each area for equal distribution6. Setting up the simulation for each distribution strategy7. Executing an agent-based SIRV simulation for each distribution strategy8. Collecting, analyzing, and outputting desired resultsMilestone Project SubmissionYour program must provide all requested functionality for major functionality component 1 (reading in the configurationfile, region file and population file and storing and organizing the data), as well as outputting the adjacency list of thegraph representing the region along with the population of each area. At least one group member must submit a .zip filecontaining the following:1. All files necessary to compile and run your program (Please do not include any files not necessary to run theprogram on the CSE machines)2. A .txt format README file explaining how to compile and run your programFinal Project SubmissionYour program must provide all requested functionality. At least one group member must submit a .zip file containing thefollowing:1. All files necessary to compile and run your program (Please do not include any files not necessary to run theprogram on the CSE machines)2. A .txt format README file explaining how to compile and run your programRubricThe entire assignment is worth 300 points, and each student will receive a single grade with respect to both the entireproject and to the portions they were individually responsible for. The breakdown of those points is as follows.• 20 points: Project Expectations Document• 30 points: Project Design• 15 points: Project Check-ins• 100 points: Project Milestone Submission• 100 points: Project Final Submissiono 80 points: Implemented functionalityo 10 points: Proper Commentingo 10 points: Group Evaluation• 10 points: GitLab Commits• 25 points: Project WikiIf your code fails to compile on the CSE machines you will not receive credit for the code portion of the assignment(milestone submission and/or final submission). I recommend not making changes to your code without checking forcompilation before you submit.
Aug 01, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here