def test_bidirectional_ucs(self): """Test and generate GeoJSON for bidirectional UCS search""" path = bidirectional_ucs(self.atlanta, '69581003', '69581000') print path all_explored = self.atlanta.explored_nodes plot_search(self.atlanta, 'atlanta_search_bidir_ucs.json', path, all_explored)
def test_bidirectional_a_star(self): """Test and generate GeoJSON for bidirectional A* search""" path = bidirectional_a_star(self.atlanta, '69581003', '69581000', heuristic=haversine_dist_heuristic) all_explored = self.atlanta.explored_nodes plot_search(self.atlanta, 'atlanta_search_bidir_a_star.json', path, all_explored)
def test_bidirectional_ucs(self): """Test and generate GeoJSON for bidirectional UCS search""" keys = list(self.atlanta.node.keys()) random.shuffle(keys) start = keys[0] goal = keys[4] node_positions = { n: self.atlanta.node[n]['pos'] for n in self.atlanta.node.keys() } self.atlanta.reset_search() path = bidirectional_ucs(self.atlanta, start, goal) all_explored = self.atlanta.explored_nodes plot_search(self.atlanta, 'atlanta_search_bidir_ucs.json', path, all_explored)