def animate_func(self, t):
    for a in range(len(self.paths)):
        pos = self.get_state((t / 10), self.paths[a])
        self.agents[a].center = (pos[0], pos[1])
        self.agent_names[a].set_position((pos[0], (pos[1] + 0.5)))
        for i in self.agent_goal_connections[a]:
            timestep = floor((t / 10))
            if (timestep not in self.predictions[a]):
                continue
            prediction = self.predictions[a][timestep][i]
            self.agent_goal_connections[a][i].set_data([pos[0], self.goals[i][0]], [pos[1], self.goals[i][1]])
            self.agent_goal_connections[a][i].set_alpha(prediction)
            self.goal_predictions[a][i].set_text('{:.2f}'.format((prediction * 100)))
            self.goal_predictions[a][i].set_position([((pos[0] + self.goals[i][0]) / 2), ((pos[1] + self.goals[i][1]) / 2)])
            self.goal_predictions[a][i].set_alpha(prediction)
    for (_, agent) in self.agents.items():
        agent.set_facecolor(agent.original_face_color)
    agents_array = [agent for (_, agent) in self.agents.items()]
    for i in range(0, len(agents_array)):
        for j in range((i + 1), len(agents_array)):
            d1 = agents_array[i]
            d2 = agents_array[j]
            pos1 = np.array(d1.center)
            pos2 = np.array(d2.center)
            if (np.linalg.norm((pos1 - pos2)) < 0.7):
                d1.set_facecolor('red')
                d2.set_facecolor('red')
                print('COLLISION! (agent-agent) ({}, {}) at time {}'.format(i, j, (t / 10)))
    return (self.patches + self.artists)
def animate_func(self, t):
    for a in range(len(self.paths)):
        pos = self.get_state((t / 10), self.paths[a])
        self.agents[a].center = (pos[0], pos[1])
        self.agent_names[a].set_position((pos[0], (pos[1] + 0.5)))
        for i in self.agent_goal_connections[a]:
            timestep = floor((t / 10))
            if (timestep not in self.predictions[a]):
                continue
            prediction = self.predictions[a][timestep][i]
            self.agent_goal_connections[a][i].set_data([pos[0], self.goals[i][0]], [pos[1], self.goals[i][1]])
            self.agent_goal_connections[a][i].set_alpha(prediction)
            self.goal_predictions[a][i].set_text('{:.2f}'.format((prediction * 100)))
            self.goal_predictions[a][i].set_position([((pos[0] + self.goals[i][0]) / 2), ((pos[1] + self.goals[i][1]) / 2)])
            self.goal_predictions[a][i].set_alpha(prediction)
    for (_, agent) in self.agents.items():
        agent.set_facecolor(agent.original_face_color)
    agents_array = [agent for (_, agent) in self.agents.items()]
    for i in range(0, len(agents_array)):
        for j in range((i + 1), len(agents_array)):
            d1 = agents_array[i]
            d2 = agents_array[j]
            pos1 = np.array(d1.center)
            pos2 = np.array(d2.center)
            if (np.linalg.norm((pos1 - pos2)) < 0.7):
                d1.set_facecolor('red')
                d2.set_facecolor('red')
                print('COLLISION! (agent-agent) ({}, {}) at time {}'.format(i, j, (t / 10)))
    return (self.patches + self.artists)