0

我目前正在为我的蚁群优化算法制作ACO课程。我试图从我的Ant类中调用我的visit_attraction函数到我在for循环中的ACO类中。我不断收到 TypeError 并说它不可调用。这是我的ACO类中的代码:

    def move_ants(self, ant_population):
        for ant in ant_population:
            ant.visit_attraction(self.pheromone_trails)```
4

0 回答 0