[SOLVED] 代写 data structure scala compiler software security Go COMPSYS202/MECHENG270 Assignment 4 – Traffic Simulator

30 $

File Name: 代写_data_structure_scala_compiler_software_security_Go_COMPSYS202/MECHENG270_Assignment_4_–_Traffic_Simulator.zip
File Size: 1073.88 KB

SKU: 4805914005 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


COMPSYS202/MECHENG270 Assignment 4 – Traffic Simulator
Partha Roop and Jin Woo Ro
Due: October 23 11:59 pm, Weight: 20%
1 Introduction
Traffic simulation plays a key part in designing modern transport infrastructure. Microscopic simulators simulate the physics of individual vehicles, while macroscopic simulators abstract the detailed physics by some abstraction. This helps in creating scalable models, even for simulating a whole city’s traffic. One such macroscopic model is known as Traffic Cellular Automata. Here a segment of a road is divided into a set of lanes and each lane is further divided into a set of cells. This is a space discrete and time discrete model i.e. the space is divided into discrete segments called cells and the simulation time is broken down into discrete steps called ticks. During every tick, a car can move forward one step to follow the car ahead. This is known as car-following. Alternatively, it might want to change lane to an adjacent lane, which is known as lane-changing. Either a car following forward movement or lane changing perpendicular movement is allowed as long as there are no conflicts i.e. the cell to which the car intends to move is free. Figure 1 provides an example of the cellular structure of a set of lanes. Figure 4 illustrates the two types of movements by an individual vehicle.
In this assignment, you will program a simple traffic simulator, which implements the car-following and the lane-changing dynamics. You are required to use linked-lists as an underlying data-structure to store the vehicles being simulated. You are free to choose either a singly or a doubly linked-list. The operation of the traffic simulator is as follows. We start by defining some terminology, which will be used throughout this document.
• Lane: We consider a set of cars to be travelling in lanes, which are indexed from 0≤k . Each Platoon object has a pointer to the first car, and a pointer to the last car in the lane. Then, by using the linked list operations, it is possible to navigate between the car objects in a platoon for their position computation.
4.1 Your Tasks
In this assignment, you are free to modify any file in the provided skeleton code. First, have a look at the SimulationControl.cpp file. In the run function, it should be straightforward to understand how the simulation works. Basically, in each tick, the operation updates the car position, reads the lane change commands, then writes the result to the output file.
In the provided skeleton code, the update function in TrafficModel is left empty for you to complete. This function is responsible for updating the position and state of each car in every tick. Basically, your main task is to implement this function, so that the car positions and state are computed correctly in each tick, according to the movement rules. This will require you to add more methods and attributes in the Platoon and Car classes.
Since the skeleton code is only a rapid prototype of this assignment, you may want to improve the skeleton code in your own coding style. In fact, you can totally ignore the skeleton code and build your own program from scratch. Additionally, you may decide to just use a subset of the skeleton code, or extend the skeleton code. However you decide to modify the skeleton code, you should make sure that the car objects in a platoon are implemented as a doubly or singly linked list, and that the movement rules are programmed based on the linked list operations (which you will need to implement).
4.2 Marking Criteria
The marking will be done via examination of the output file (result.txt) generated by your program. More precisely, there will be a set of input.txt files for different scenarios, and each time that your program correctly generates the output result.txt file, some marks will be given. Also, there will be marks on the linked list implementation. Note that, the Qt visualisation is only an option for testing. Alternatively, you can just inspect the result.txt file directly without the Qt visualizer. Furthermore, you can assume that the input file is always provided with the correct format as shown in Figure 2. You must make sure that the generated output file is always in the correct format as shown in Figure 3.
The total mark for this assignment is 20 with a distribution of 15:5, where 15 marks for automated test case marking, and 5 marks for the code quality inspection. Details are as follows:
1. Test cases (15 marks): the correctness is examined by checking the generated output file. For each case you generate incorrect result, some marks are deduced. A few test cases and their expected answer will be available on Canvas. Note that, 5
8

marks will be deduced if linked-lists are not implemented/used properly, regardless of passing the test cases.
2. Code quality inspection (5 marks):
• MVC design (2 mark): the skeleton code is already in MVC design. If you com- plete assignment without breaking the design pattern, you will get these marks.
• Style (1 mark): consistency on comments and indentation.
• Efficiency (1 mark): deduction if there are any unnecessary loops.
• Destructor (1 mark): memory needs to be released appropriately.
4.3 How to submit your code
This assignment deadline is October 23 11:59 pm. Submit a zip file, which contains:
1. A zip file of all the source files needed to compile your code.
2. Coversheet: this should include your full name, id, upi, and your sign for declaration of originality.
Please double check your submission, because if your code fails to compile (with the ‘make’ command), then you will receive ZERO marks for this assignment. There will be no exceptions if you accidentally submitted the wrong files, regardless if you can prove you did not modify them since the deadline. No exceptions.
4.4 Academic Honesty
• The work done on this assignment must be your own work. Think carefully about any problems you come across, and try to solve them yourself before you ask anyone for help. Under no circumstances should you take or pay for an electronic copy of someone else’s work.
• All submitted code will be checked using software similarity tools. Code detected for suspicious similarity will result in an Investigative Meeting and will be forwarded to the Disciplinary Committee.
• Penalties for copying will be severe – to avoid being caught copying, don’t do it.
• To ensure you are not identified as cheating you should follow these points:
– Always do individual assignments by yourself.
– Never give another person your code.
– Never put your code in a public place (e.g., forum, git, your website).
– Never leave your computer unattended. You are responsible for the security of your account.
– Ensure you always remove your USB flash drive from the computer before you log off.
9

4.5 Late submissions
Late submissions incur the following penalties:
• 15% penalty for zero to 24 hours late
• 30% penalty for 25 to 48 hours late
• 100% penalty for over 48 hours late (dropbox automatically closes)
In case if the assignment is extended, then the late submission penalty applies identically to the extension date.
10

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 data structure scala compiler software security Go COMPSYS202/MECHENG270 Assignment 4 – Traffic Simulator
30 $