示例#1
0
文件: scene.py 项目: 0mar/mercurial
 def move_pedestrians(self):
     """
     Performs a vectorized move of all the pedestrians.
     Assumes that all the velocities have been set accordingly.
     :return: None
     """
     self.time += self.dt
     self.counter += 1
     self.last_position_array = np.array(self.position_array)
     self.position_array += self.velocity_array * self.dt
     if self.mde:
         mde = compute_mde(self.position_array, self.size[0], self.size[1],
                                                self.active_entries, self.core_distance)
         mde_found = np.where(np.sum(np.abs(mde[self.active_entries]), axis=1) > 0.001)[0]
         self.mde_proc.append(len(mde_found) / np.sum(self.active_entries))