Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you please code this question? Mrs Mlimaji Mashamba is a UWC graduate who runs a successful tricycle delivery business in the city of Cape

image text in transcribed

image text in transcribed

can you please code this question?

Mrs Mlimaji Mashamba is a UWC graduate who runs a successful tricycle delivery business in the city of Cape Town. She has realized that a big portion of her business costs comes from her tricyle drivers using road segments with potholes and segments where traffic cops usually stop tricycles for documents' verification. Building around socket programming, your knowledge of Python programming, and the shortest path algorithms learnt in your second-year courses, you are tasked to propose a client/server solution to Mrs Mashamba to help her drivers "find the least cost path" when starting a trip from a collection point to delivery point in the city. The goal is to develop a system that provide Mrs Mashamba's drivers services which are similar to Google Map but with the possibility of integrating the cost of potholes and the costs incurred by the presence of traffic cops on each segment along the path from a collection point to a delivery point as provided by Google Waze. Note that the presence of potholes has been included in the least cost path computation because, on a long term, they will destroy the shock absorbers of the tricycle, while the presence of traffic cops results in reduced income in terms of number of daily trips made by a tricyle as a result of the time wasted during traffic cops' verifications. The requirements are as follow - The server process maintains a graph of different locations/stations in the city, some of them being shopping centers while others are only transit/dropping stations between two shopping centers. The server is also equipped with algorithms (Dijkstra and Bellman Ford algorithms covered in your second year) to compute/find the least cost path between a collection station and a delivery station. - The client process maintains a file of routes that records the paths travelled by the tricycle during the day. For each trip, the client process (used by the driver) will provide to the server process through its socket a source location (a collection station) and a destination location (a delivery station). - The client process will then wait for a response from the server which consists of an explicit path proposed by the server with all the points/stations traversed by the tricycle from the source to the destination. Such least cost path will be saved in the file of routes travelled for accountability and further insights (e.g. statistics on routes' usage, classification and prediction using machine learning). Note: - Each student will be provided with a graph of city map that includes 42 stations. The weights on the different segments of the graph will be calculated by the student by using the Google Waze platform. - Google Waze has been selected for this tutorial because it is a platform that uses community-driven information from its users about real-time road segments conditions. Using Waze, drivers can share real-time data about accidents, traffic incidents, speed limits, speed traps, and other trip information that helps other drivers navigate the fastest possible route. - Students are encouraged to adapt their first Tutorial code to find a solution to this second tutorial. - Hand-out date: 24-02-2023 - Hand-in date: 05-03-2023 - List of the links (edges)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago