Question: Please provide a python solution Part A [3 marks: Build a graph for the (offline) road mapetwork 1. Get the list of the cities/districts in
Please provide a python solution

Part A [3 marks: Build a graph for the (offline) road mapetwork 1. Get the list of the cities/districts in the region of the choice (e.g., metro Vancouver, Fraser Valley Region) a. You could use google search to get the list i. Example: for Fraser Valley, this includes Abbotsford, Chilliwack, Mission, Kent, and Hope. ii. Hint: use the first two-letters from the name of the city when defining a variable for that city in your program (use capital letters) 2- Calculate the cost function (using Google map application) a. Consider the minimum distance between the city halls (assume the mayor's office is in the city hall) as the cost of traveling between two cities. For simplicity, you could round down this number. For example, the cost of traveling from city hall Abbotsford to Chilliwack operation center=32.7Km i. Note: if the city/district doesn't have a city hall, search for a municipality building or downtown or .... 3- Build a heuristic function a. X= minimum distance between the city halls b. Y= a random number between 5 to 10 C. H(c1,c2)=round_down (X-Y) #heuristic value between city 1 and 2 Part A [3 marks: Build a graph for the (offline) road mapetwork 1. Get the list of the cities/districts in the region of the choice (e.g., metro Vancouver, Fraser Valley Region) a. You could use google search to get the list i. Example: for Fraser Valley, this includes Abbotsford, Chilliwack, Mission, Kent, and Hope. ii. Hint: use the first two-letters from the name of the city when defining a variable for that city in your program (use capital letters) 2- Calculate the cost function (using Google map application) a. Consider the minimum distance between the city halls (assume the mayor's office is in the city hall) as the cost of traveling between two cities. For simplicity, you could round down this number. For example, the cost of traveling from city hall Abbotsford to Chilliwack operation center=32.7Km i. Note: if the city/district doesn't have a city hall, search for a municipality building or downtown or .... 3- Build a heuristic function a. X= minimum distance between the city halls b. Y= a random number between 5 to 10 C. H(c1,c2)=round_down (X-Y) #heuristic value between city 1 and 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
