__MACOSX/._2110_Project1 2110_Project1/config1.txt Region Layout:zone1.csv Time Limit:20 Refresh Rate:1 __MACOSX/2110_Project1/._config1.txt 2110_Project1/config2.txt Region Layout:zone2.csv Time...

1 answer below »
All in C++, please


__MACOSX/._2110_Project1 2110_Project1/config1.txt Region Layout:zone1.csv Time Limit:20 Refresh Rate:1 __MACOSX/2110_Project1/._config1.txt 2110_Project1/config2.txt Region Layout:zone2.csv Time Limit:10 Refresh Rate:2 __MACOSX/2110_Project1/._config2.txt 2110_Project1/Project 1.pdf Project 1: Airport Simulation Instructions For this project, you and your group will be designing and implementing a system in C or C++, that will simulate the growth of an airport over time. Specifically, you will be simulating the growth of domestic, international, and cargo zones, and seeing how pollution(noise) impacts the overall development of airport. Additionally, sample input files can be found on zip file project. 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 it from 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 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. Wiki For the wiki portion, the group must generate documentation describing their system using the wiki functionality provided by GitLab. The wiki must contain at least one page that provides a high-level description of the entire system, and must contain at least one page for each of the major functionality components (i.e. if there are five major functionality components, there should be at least five pages). For the high-level description page, the team must provide a brief description of each of the major functionality components, how they work together, and some of the major data structures across the entire project. This information should not be copied and pasted from the project instructions. The page must also contain a diagram of the entire system, 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 scanned image. For each major functionality component page, the student accountable for that component must provide a detailed description of their component. This description should have three labeled sections: a brief description of the purpose of the component, a description of how data was stored and maintained for this component, and a description of the functionality for the component. They might also consider including diagrams to more easily visualize how all of the pieces fit together. For the data storage and maintenance section, there should be an explanation of how data was stored and maintained in their component. What, if any, objects or structs were created to store data? How were they organized and managed? 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 data moved and transformed? How is it read in? How is it output? What are the various major functions constructed and how do they work? Descriptions and explanations should be primarily in prose and paragraph format, not bulleted lists. Code snippets are also 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. Implementation ● Your program must provide the following functionality and adhere to the following constraints: o Your int main() should be in its own .c/.cpp file o 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 o Allow the user to input the file containing the simulation configuration ● Do NOT hardcode the filename into your program o The first line will provide the name of the file containing the zone layout (Do NOT prompt the user for this filename) ● The second line will provide the maximum amount of time steps the simulation can take o The third line will provide the refresh rate of how often the current state of the zone should be output to the user during simulation • Your system should perform the following operations: ● Read in and store the simulation configuration information o Read in and store the initial zone layout ● The file will be in CSV format ● The zone may be any sized rectangle ● The zone contains 0 pollution(noise) and activity at the beginning of the simulation ● (D) represents a domestic zone ● (C) represents a cargo zone ● (I) represents an International zone ● (T) represents a terminal ● (-) represents a powerline ● # represents a powerline over a terminal ● (P) represents a power plant o Output the initial zone state ● If a cell is zoned domestic, cargo, or international and has a terminal of 0, the letter representing the zone type should be displayed instead of its terminal ● The initial zone state can be interpreted as time step 0 o Simulate the development of the airport over time ● The simulation should halt when there is no change between two, consecutive time steps or when the time limit has been reached, whichever comes first ● The current time step, number of available workers, and number of available goods should be output for each timestep except time step 0 ● The state of the zone should be output at the frequency denoted by the refresh rate in the configuration file ● The zone is considered to be flat, and thus the edges do not wrap around to connect to each other ● Two cells are considered adjacent if they share an edge or corner (i.e. a cell may be adjacent to a maximum of eight other cells, and a minimum of three other cells) ● Each of the zoned cells will change their state according to the provided rules ● In the event of a decision needing to be made over two zoned cells that could grow and use available resources, the following rules must be used in order: o International zoned cells are prioritized over cargo zoned cells ones o The growth of larger terminal(#gates) zoned cells is prioritized over smaller terminal(#gates) zoned cells (i.e. a 1 terminal cell will always grow before a 0 terminal cell) o The growth of zoned cells with greater total adjacent terminal is prioritized over zoned cells with smaller total adjacent terminals o The growth of zoned cells with smaller Y coordinates is prioritized over zoned cells with greater Y coordinates, assuming the top left cell is 0,0 o The growth of zoned cells with smaller X coordinates is prioritized over zoned cells with greater X coordinates, assuming the top left cell is 0,0 ● Domestic 1. If a cell has a terminal of 0 and is adjacent to a powerline in the current time step, that cell’s terminal will increase by 1 in the next time step 2. If a cell has a terminal of 0 and is adjacent to at least one cell with a terminal of at least 1, that cell’s terminal will increase by 1 in the next time step 3. If a cell has a terminal of 1 and is adjacent to at least two cells with a terminal of at least 1, that cell’s terminal will increase by 1 in the next time step 4. If a cell has a terminal of 2 and is adjacent to at least four cells with a terminal of at least 2, that cell’s terminal will increase by 1 in the next time step 5. If a cell has a terminal of 3 and is adjacent to at least six cells with a terminal of at least 3, that cell’s terminal will increase by 1 in the next time step 6. If a cell has a terminal of 4 and is adjacent to at least eight cells with a terminal of at least 4, that cell’s terminal will increase by 1 in the next time step 7. The domestic terminal provides workers to the cargo and international zones, but each worker can only have one job ● Cargo 1. If a cell has a terminal of 0, is adjacent to a powerline in the current time step, and there are at least 2 available workers, that cell’s terminal will increase by 1 in the next time step and the available workers are assigned to that job 2. If a cell has a terminal of 0, is adjacent to at least one cell with a terminal of at least 1, and there are at least 2 available workers, that cell’s terminal will increase by 1 in the next time step and the available workers are assigned to that job 3. If a cell has a terminal of 1, is adjacent to at least two cells with a terminal of at least 1, and there are at least 2 available workers, that cell’s terminal will increase by 1 in the next time step and the available workers are assigned to that job 4. If a cell has a terminal of 2, is adjacent to at least four cells with a terminal of at least 2, and there are at least 2 available workers, that cell’s terminal will increase by 1 in the next time step and the available workers are assigned to that job 5. A cell produces pollution(noise) equal to its terminal, and pollution(noise) spreads to all adjacent cells at a rate of one less unit of pollution(noise) per cell away from the source 6. The cargo terminal provides goods to the international zones, at a rate of one good per terminal, but each good can only be sold at one international cell ● International 1. If a cell has a terminal of 0, is adjacent to a powerline in the current time step, there is at least 1 available worker, and there is at least one available good, that cell’s terminal will increase by 1 in the next time step and the available worker and available good are assigned to that job 2. If a cell has a terminal of 0, is adjacent to at least one cell with a terminal of at least 1, there is at least 1 available worker, and there is at least one available good, that cell’s terminal will increase by 1 in the next time step and the available worker and available good are assigned to that job 3. If a cell has a terminal of 1, is adjacent to at least two cells with a terminal of at least 1, there is at least 1 available worker, and there
Answered 21 days AfterSep 20, 2021

Answer To: __MACOSX/._2110_Project1 2110_Project1/config1.txt Region Layout:zone1.csv Time Limit:20 Refresh...

Kamal answered on Oct 04 2021
145 Votes
simulator.h
#include "airport.h"
class Simulator
{
public:
Simulator();
vo
id function();
void calculate_total_population();
};
tile.cpp
#include "tile.h"
Tile::Tile(int x, int y)
{
this->x = x;
this->y = y;
this->label_zone = 0;
}
Tile::~Tile() {}
tile.h
#include
#include
using namespace std;
class Tile
{
private:
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here