Microsoft Word - Python Assignment Description.docx Assignment 1Preamble In this assignment, you will be making use of knowledge about a number of simulations and how to automate multiple simulation...

Please check the file for more details. Thanks


Microsoft Word - Python Assignment Description.docx Assignment 1Preamble In this assignment, you will be making use of knowledge about a number of simulations and how to automate multiple simulation runs to extend a simulation to provide more data, functionality and allow automation. You will then report on the results generated by the simulation in a parameter sweep. Note: Remember to cite your sources. 2TheProblem You have been provided with some basic code to simulate the spread of disease in a population. Your task is to extend the code and then conduct an experiment, varying the input parameters, to see how they impact the overall simulation. The required extensions are: 1. Give an option for using Moore or Von Neumann neighbourhoods 2. Extend to have additional behaviour, e.g. death, recovery, immunity 3. Add statistics and other output to help understand the results 4. Add barriers to the "world" to constrain the spread of disease 5. Rework the code to allow command line arguments for the parameters of interest 6. Implement a parameter sweep driver script to run the simulation with varying parameters 7. Include “Airports” for people to move long distances. Extension 5 & 6 will be combined Note: Extensions 5 and 6 are required to generate data for the experiment and report. If you’re really stuck, you can generate data manually, but automation is always better! Your code should include comments to explain what each section does and how. It is useful to keep track of your changes in the comments at the top of the program. Beyond the working program, you will submit two documents: a User Guide to your code and a Report on your experiment. There will be bonus marks for additional functionality and the use of more advanced programming techniques (e.g. efficiencies, modules and OO) – but only if they're sensible and done well. Make sure to discuss the additional work in your User Guide. The file must contain the following (make sure that your zip file contains what is required): • Your code. This means all files needed to run your program. That includes input files used as part of the assignment if that is required to run your program. • README file including short descriptions of all files and dependencies, and information on how to run the program. • User Guide and Report for your code, as described in Section 3. 3UserGuideandReport You need to submit your User Guide and Report in ipynb, docx or pdf format. Jupyter is recommended. Your User Guide will be minimum 2-4 pages and should include the following: • An overview of your program's purpose and features. • A guide on how to use your simulation, directly and using the parameter sweep. • A discussion of your code, explaining how it works, any additional features and how you implemented them. The Report will follow the structure of a standard academic report. It should be at least 4-6 pages long. Required sections are: • Abstract: Explain the purpose of the report and state the parameters you have investigated, and the outcomes/recommendations. • Background: Discuss the purpose of the simulation and your choice of parameters. • Methodology: Describe how you have chosen to set up and compare the simulations, and why. Include commands, input files, outputs – anything needed to reproduce your results. • Results: Present the results of your simulations. • Conclusion and Future Work: Give conclusions and what further investigations could follow. 3.1Marking Marks will be awarded as follows: • [60 marks] Code Features. 10 marks per extension, implemented and documented • [10 marks] User Guide. As described in section 3. • [30 marks] Report. As described in section 3, with the majority of marks for the methodology and results sections. Marks will be deducted for not following specifications outlined in this document, which includes incorrect format and content. You may notice that the values shown in displayGrid and plotGrids do not match using the given code. There are a few ways to resolve this, but perhaps the simplest is to use the following code to replace the existing plotGrids: defplotGrids(): plt.figure(figsize=(20,20)) Irows,Icols,Icount=makeScatter(infected,NUM_ROWS,NUM_COLS) plt.scatter(Icols,Irows,s=Icount,c="r",alpha=0.5) Urows,Ucols,Ucount=makeScatter(uninfected,NUM_ROWS,NUM_COLS) plt.scatter(Ucols,Urows,s=Ucount,c="b",alpha=0.5) plt.show() The issue is that when we talk in rows and columns, they map differently to the x and y values used when plotting - columns are the x-values and rows are the y-values. I had already changed the rest of the code to only use rows and columns, but missed this inconsistency. The changes are in bold type. This will make it consistent with displayGrid which flips the grid vertically, so the origin (0,0) is at the bottom left. Additional behaviour (death, recovery, immunity): the best source of inspiration is the diseaseSim.py code itself, you may also want to use object-orientation to have a more sophisticated model of disease in each individual FAQ: o Do I need to submit documentation in docx or pdf or Jupyter Notebook format? Any of these is fine. If you use Jupyter notebooks you can embed code and plots and allow interaction with results. o What should the command line parameters be? Anything that defines a particular run of the experiment - probability of infection, death, recovery, healthy and infected population numbers, size of grid, input file for barriers, type of neighbourhood, etc. o I got ideas/code from [...], can I use it? Verbatim reuse of code is plagiarism. You should self-cite and of your own code you reuse. You should also cite any resources you draw ideas and solutions from. We use special software to check all assignments against each other, and that will report code that looks too similar. In short, do your own work. o Do I have to implement both Von Neumann and Moore neighbourhoods? No, one of them is already in the code. You need to implement the alternative, and provide an option for the user to switch between them. Hint: it's in the movement code, not the infection code. o How many parameters do I need to do? I would suggest focusing on two parameters in your parameter sweep. You could do multiple sweeps to work with different scenarios (varying barriers, airports etc).
May 28, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here