Lab 2: Search
Python - graphs, data modeling
Important: Labs are to be completed individually. Do not collaborate with anyone in the completion of this work. Do not post solutions, code, or these questions online, or make them accessible within or outside of this course.
I. Coronavirus in Texas
Analysis of Coronavirus in Texas.
You are in charge of helping to determine two things. One is to contribute in finding the time that will take for the virus to spread all over Texas, and the second one is help understand where it is better to set up the distribution port of the vaccine when received.
Create a new Google Colab notebook for this lab; name it abc123-lab2.
In this notebook, you will create and display a map given coordinates, and create two search agents to traverse this map. The map is a 2D graph consisting of nodes & edges. The search agents will be independent - that is, only one agent will run at a time. Both agents will use the graph of nodes, which is a map of a group of cities of Texas.
Provided with this lab description is nodes.csv, which contains node coordinates in the following format:
where the node for San Antonio is located at (x,y) coordinate (29.4685,-98.5254). Additionally, a mappings.csv contains node mappings in the following format:
San Antonio,New Braunfels, 30.80876734
where an edge exists between nodes San Antonio and New Braunfels, and the weight on that edge is 30.80876734. [Note: the above two examples are format examples only.]
Create a new section in the notebook, name it Question 1: Coronavirus Spread. Create a text cell and code cell for each of the following three tasks:
Part 1: Selected Texas Cities Map
Handle the logic for the graph, including loading the graph data from the file and displaying a map (graph) of the given data, with labeled nodes and edges.
Part 2: Search 1: Coronavirus spread
The goal of the Coronavirus spread agent is to show how the virus gets spread around the cities of Texas if the first confirmed case appeared in Three Rivers. The speed that the virus will move is a constant of 25 miles per hour. Running this cell should print the sequence of cities that get “infected” of the Coronavirus to their optimal solution.
Part 3: Search 2: Vaccine distribution search
Assuming that the vaccine was found abroad (EU), discover what’s the fastest way to distribute the vaccine from either from Galveston or from Corpus Christi to the focus area as it is Amarillo. For this search, you need to find the fastest route from each of them and select which would be the best port to receive the vaccine. Assume that the average speed of the distribution trucks is 70 miles per hour. Running this cell should print the sequence of cities to the optimal solution for both ports and display the best as a conclusion.
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of