Instructions

For this project you will be designing and implementing a system, in C++, to analyze the features of a contact network and simulate how a disease would spread through the network given certain disease parameters using an SEIR disease model.

Additionally, sample input files will not be uploaded to Canvas, but can instead be found on the CSE machines at /home/jeh0289/public/csce2110/su19/proj3/ You can cd into that directory and copy input the files from there.

Requirements

This assignment has two parts: a design portion and an implementation portion.

Design Document

For the design portion, you must generate documentation, in PDF format, describing your system. The purpose of this is for you to explain not just what your system is doing, and how it is doing it, but why. You will need to justify your design decisions in a concise, informative manner. Justifications such as "I did this because it was easy" are not sufficient, as you should actually explain why a particular data structure or algorithm was more efficient, effective, or optimal. Additionally, commented code, while sometimes helpful in small examples, is not a sufficient explanation in and of itself. Your explanations and justifications are expected to be presented in prose and in paragraph format, i.e. not bulleted lists. Further, part of the evaluation of your design document is the apparent amount of thought and effort that went into its creation.

This document should be divided into three main parts, and should follow the provided template.

In the first part, in one or two paragraphs you should describe the project in your own words and give a brief overview of the problem. Do not copy and paste this from the instruction document.

For the second part, you should describe the data structures you used in your system. What, if any, objects or structs did you create to store data? How did you organize and manage them? What types of formal data structures did you make use of (trees, graphs, arrays, hashes, etc)? In a few paragraphs, describe in detail how you stored the various data elements in your system, and be sure to provide sufficient justification of your methodology.

For the third part, you should describe functionality of your system. How is data moved and transformed? How is it read in? How is it output? What are the various major functions you constructed and how do they work? In a few paragraphs, describe in detail how your system works, and be sure to provide sufficient justification of your methodology. You might also consider including diagrams to more easily visualize how all of the pieces fit together.

Implementation

Your program must provide the following functionality and adhere to the following constraints:

  • Allow the user to choose the file describing the configuration of the simulation
    • Do NOT hardcode the filename into your program
    • The first line will contain the name of the file describing the population of the contact network
    • The second line will contain the latent period of the disease
    • The third line will contain the infectious period of the disease
    • The fourth line will contain the identity of patient zero, the initially infected person
  • For the population file:
    • Each line will list a person and all of the people they are connected to
    • The format will be the name of the person, a colon, and then a comma delimited list of all of the people they are connected to
    • If person 1 is linked to person 2, then person 2 is also linked to person 1
  • The population should be stored as an unweighted, undirected graph, and the graph should be constructed as either an adjacency matrix or an adjacency list. All people start as susceptible except for patient zero who is infectious.
    • You may not use any of the graph libraries provided by any C/C++ libraries, the STL, or the Boost libraries. You must build your own adjacency matrix or adjacency list.
  • Your system should first analyze the contact network and output:
    • The number of connected components in the graph
    • The number of individuals in each component
    • The average degree of nodes (people) for each component with two digits of precision
  • Next, your system should simulate the disease according to the following constraints:
    • Patient zero is infectious on day 0, and this counts against one day of their infectious period
    • All susceptible people adjacent to an infectious person become latent on the next day
    • Latent people become infectious after the latent period is over
    • Infectious people become recovered after the infectious period is over
    • Recovered people stay recovered for the duration of the simulation
    • The simulation should end when there are no latent and no infectious people remaining
  • You system should output the count of susceptible, latent, infectious, and recovered for each day of the outbreak, including day 0 and the first day with no latent and no infected people
  • All .cpp files, except your main.cpp, must have associated header files. You may not #include a .cpp file, only header files
  • You may not use any of the searching algorithms provided by any C/C++ libraries, the STL, or the Boost libraries. You must write your own search algorithm, using the ones discussed in class.
  • You must provide a .txt format README file which includes:
    • Your name
    • Instructions on how to compile your program
    • Instructions on how to run your program
    • 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
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.