Ejemplo n.º 1
0
 def __init__(self):
     config_1 = SimulationManager.get_default_config()
     config_2 = SimulationManager.get_default_config()
     config_1['general']['obstacle_file']=demo_file_name
     config_2['general']['obstacle_file']=empty_file_name
     self.filled_scene = Scene(config=config_1,initial_pedestrian_number=10)
     self.empty_scene = Scene(config=config_2,initial_pedestrian_number=10)
     self.gt1 = GraphTransporter(self.filled_scene, config_1)
     self.gt2 = GraphTransporter(self.empty_scene, config_2)
Ejemplo n.º 2
0
 def __init__(self):
     config_1 = SimulationManager.get_default_config()
     config_2 = SimulationManager.get_default_config()
     config_1['general']['obstacle_file'] = demo_file_name
     config_2['general']['obstacle_file'] = empty_file_name
     self.filled_scene = Scene(config=config_1,
                               initial_pedestrian_number=10)
     self.empty_scene = Scene(config=config_2, initial_pedestrian_number=10)
     self.gt1 = GraphTransporter(self.filled_scene, config_1)
     self.gt2 = GraphTransporter(self.empty_scene, config_2)
 def test_no_obstacle_means_no_fraction(self):
     config = SimulationManager.get_default_config()
     config['general']['obstacle_file'] = test_fractions_file
     scene = Scene(1, config)
     dyn_plan = DynamicPlanner(scene, config)
     # Cell (7,10) is a free cell.
     assert (7, 10) not in dyn_plan.obstacle_cell_set and (
         7, 10) not in dyn_plan.part_obstacle_cell_dict
 def __init__(self):
     self.config = SimulationManager.get_default_config()
     self.config['general']['obstacle_file'] = empty_scene_file
     self.scene = Scene(config=self.config, initial_pedestrian_number=1)
     self.dyn_plan = DynamicPlanner(self.scene, self.config)
     self.pedestrian = self.scene.pedestrian_list[0]
     self.ped_x = np.random.randint(3, self.scene.size.width - 2)
     self.ped_y = np.random.randint(3, self.scene.size.height - 2)
     self.pedestrian.position = Point([self.ped_x, self.ped_y])
     self.pedestrian.velocity = Velocity([1, -1])
Ejemplo n.º 5
0
 def __init__(self):
     config = SimulationManager.get_default_config()
     self.scene_obj = Scene(config=config,initial_pedestrian_number=50)
Ejemplo n.º 6
0
 def __init__(self):
     self.config = SimulationManager.get_default_config()
     self.config['general']['obstacle_file'] = demo_file_name
     self.scene = Scene(1000, self.config)
     self.grid_computer = GridComputer(self.scene, False, False, False,
                                       self.config)
Ejemplo n.º 7
0
 def __init__(self):
     config = SimulationManager.get_default_config()
     self.scene_obj = Scene(config=config, initial_pedestrian_number=50)
Ejemplo n.º 8
0
 def __init__(self):
     self.config = SimulationManager.get_default_config()
     self.config['general']['obstacle_file'] = demo_file_name
     self.scene = Scene(1000, self.config)
     self.grid_computer = GridComputer(self.scene, False, False, False, self.config)