Ejemplo n.º 1
0
 def test13(self):
     expand.expand_count = 0
     path = sc.a_star_search(dis_map_tie_breaking_test,
                             time_map_tie_breaking_test, 'Campus', 'Cinema')
     self.assertEqual(path,
                      ['Campus', 'Beach', 'Whole_Food', 'CVS', 'Cinema'])
     self.assertEqual(expand.expand_count, 6)
Ejemplo n.º 2
0
 def test12(self):
     expand.expand_count = 0
     path = sc.a_star_search(dis_map, time_map8, 'Campus', 'Cinema')
     self.assertEqual(
         path, ['Campus', 'Lighthouse', 'Ryan_Field', 'YWCA', 'Cinema'])
     self.assertEqual(expand.expand_count, 4)
Ejemplo n.º 3
0
 def test10(self):
     expand.expand_count = 0
     path = sc.a_star_search(dis_map, time_map6, 'Campus', 'Ryan_Field')
     self.assertEqual(
         path, ['Campus', 'Whole_Food', 'Cinema', 'YWCA', 'Ryan_Field'])
     self.assertEqual(expand.expand_count, 6)
Ejemplo n.º 4
0
 def test11(self):
     expand.expand_count = 0
     path = sc.a_star_search(dis_map, time_map7, 'Campus', 'Cinema')
     self.assertEqual(path, ['Campus', 'Whole_Food', 'Cinema'])
     self.assertEqual(expand.expand_count, 5)
Ejemplo n.º 5
0
 def test9(self):
     expand.expand_count = 0
     path = sc.a_star_search(dis_map, time_map5, 'Campus', 'YWCA')
     self.assertEqual(path, [])
     self.assertEqual(expand.expand_count, 4)
Ejemplo n.º 6
0
 def test8(self):
     expand.expand_count = 0
     path = sc.a_star_search(dis_map, time_map1, 'Frankfurt', 'Cinema')
     self.assertEqual(path, [])
     self.assertEqual(expand.expand_count, 0)
Ejemplo n.º 7
0
 def test7(self):
     expand.expand_count = 0
     path = sc.a_star_search(dis_map, time_map1, 'Campus', 'Waldalgesheim')
     self.assertEqual(path, [])
     self.assertEqual(expand.expand_count, 0)
Ejemplo n.º 8
0
 def test6(self):
     expand.expand_count = 0
     path = sc.a_star_search(dis_map, time_map1, 'Campus', 'Campus')
     self.assertEqual(path, ['Campus'])
     self.assertEqual(expand.expand_count, 0)
Ejemplo n.º 9
0
 def test5(self):
     expand.expand_count = 0
     path = sc.a_star_search(dis_map, time_map1, 'Ryan_Field', 'Beach')
     self.assertEqual(path, ['Ryan_Field', 'Lighthouse', 'Campus', 'Beach'])
     self.assertEqual(expand.expand_count, 4)