Question: Highway traffic flow analyser Final Practical Project - Mark contributes to the final examination mark. Study the scenario that will monitor and analyse traffic patterns
Highway traffic flow analyser
Final Practical Project Mark contributes to the final examination mark.
Study the scenario that will monitor and analyse traffic patterns to determine if the road can handle the volume or if it requires expansion
Follow the instructions to develop, test and submit the project.
Click on ADD SUBMISSION to see the details and activity instructions.
Highway traffic flow analyser
Scenario:
Imagine a singlelane road in a suburb of Cape Town that experiences varying traffic flow throughout the day. Over a period of days, traffic engineers need to monitor and analyse these patterns to determine if the road can handle the volume or if it requires expansion. They contacted you, as a student in Computer Science to assist them.
Data Collection
The traffic department of Cape Town provides you with the data in a text file trafficdatatxt see attached.
Typical data in the trafficdata.txt:
Timestamp; Vehicle Type; Speed kmh
::; Motorbike;
::; Bus;
Your C Console Program
Your task is to using C develop a traffic flow analyser that monitors and analyses the flow of cars on a specific stretch of single lane road.
The program will read the captured data from the file and, using appropriate methods and functions, analyse trends, calculate averages, identify peak traffic times, and generate a report to assist road planners in making informed decisions about future road development. You may use any of the functions or methods we have studied throughout the year in this project, but you must include comments in your code explaining each step and your reasoning for choosing specific methods or functions. Additionally, you may include documentation within the comments to help the examiner understand your logic and decisions.
Choose any three of the following reports to generate
Report Traffic Summary Report
Total vehicles: The total number of vehicles recorded over the specified period.
Vehicle count per day: A breakdown of the number of vehicles passing per day.
Vehicle type distribution: The number and percentage of each vehicle type eg cars, buses, bikes
Example output:
Traffic Summary Report:
Total vehicles:
Day : vehicles
Day : vehicles
Vehicle distribution:
Cars:
Buses:
Motorbikes:
Report Peak Traffic Times Report
Hourly peak traffic: Identify the hours with the highest traffic volume.
Daily peak traffic: Determine which day had the most traffic.
Time intervals with maximum congestion: Specific times where the road was most congested.
Example output:
Peak Traffic Times Report:
Peak traffic time overall: :: with vehicles
Peak traffic by day:
Day : :: vehicles
Day : :: vehicles
Report Speed Analysis Report
Average speed of vehicles: Display the average speed of vehicles passing over the specified period.
Speed ranges: Categorize vehicle speeds eg slow, medium, fast and report on how many falls into each category.
Example output:
Speed Analysis Report:
Average speed: kmh
Speed distribution:
Slow kmh: vehicles
Medium kmh: vehicles
Fast kmh: vehicles
Report Congestion Level Report
Congestion trends: Identify periods where traffic flow is significantly higher than average, indicating congestion.
Congestion by dayhour: Report on the most congested times of each day and the overall period.
Example output:
Congestion Level Report:
Average congestion level: Moderate
Most congested period: Day :: with vehicles
Congestion breakdown by day:
Day : Low vehicles
Day : High vehicles
Report Custom Time Interval Report
Userspecified time intervals: Allow the user to specify custom time intervals eg "report from : to : over days" to generate tailored traffic data.
Example output:
Custom Interval Report : to ::
Total vehicles:
Average speed: kmh
Most congested time: :: vehicles
Report Vehicle Type Specific Report
Traffic trends for specific vehicle types: Provide a report focusing on a particular type of vehicle eg just cars, or buses
Example output:
Vehicle Type Report Buses:
Total buses:
Peak time: :: buses
Average speed: kmh
Develop, test and compile your C code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
