-
Notifications
You must be signed in to change notification settings - Fork 0
raakeshvicrak/MapSearch
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a simple dataset of North American (though mostly U.S.) major roads. city-gps.txt contains one line per city, with three fields per line, delimited by spaces. The first field is the city, followed by the latitude, followed by the longitude. road-segments.txt has one line per road segment connecting two cities. The space delimited fields are: - first city - second city - length (in miles) - speed limit (in miles per hour) - name of highway Note that there are mistakes and bugs in these files and your code should still operate correctly; e.g. not all cities that appear in road-segments.txt have a corresponding line in city-gps.txt. You should assume that all roads in road-segments.txt are bidirectional, i.e. none are one-way roads, so that it's possible to travel from the first city to the second city at the same distance at speed as from the second city to the first city. It's September, which means you have only 6 months to make your Spring Break vacation plans to a dream destination! We've prepared a dataset of major highway segments of the United States (and parts of southern Canada and northern Mexico), including highway names, distances, and speed limits; you can visualize this as a graph with nodes as towns and highway segments as edges. We've also prepared a dataset of cities and towns with corresponding latitude-longitude positions. Your job is to implement algorithms that find good driving directions between pairs of cities given by the user. Your program should be run on the commandline like this: python route.py [start-city] [end-city] [routing-option] [routing-algorithm] where: � start-city and end-city are the cities we need a route between. � routing-option is one of: { segments finds a route with the fewest number of \turns" (i.e. edges of the graph) { distance finds a route with the shortest total distance { time finds the fastest route, for a car that always travels at the speed limit { scenic finds the route having the least possible distance spent on highways (which we dene as roads with speed limits 55 mph or greater) � routing-algorithm is one of: { bfs uses breadth-first search { dfs uses depth-first search { ids uses iterative deepening search { astar uses A* search, with a suitable heuristic function
About
Shortest/longest/Fastest route finder algorithms between places in the USA. Algorithms used are Breadth-First-Search, Depth-First-Search, A-star and Iterative-Deepening-Search
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published