remove unused variables and rename a parameter
This commit is contained in:
		| @@ -112,8 +112,8 @@ class Ant: | ||||
|             self.Sequence.append(index) | ||||
|  | ||||
|             # update the local pheromone | ||||
|             update = (1.0 - self.Configuration.propagationRatio) * self.PheromoneMatrix[self.Sequence[-2], self.Sequence[-1]] | ||||
|             update += self.Configuration.propagationRatio * self.Configuration.ThetaZero | ||||
|             update = (1.0 - self.Configuration.PropagationRatio) * self.PheromoneMatrix[self.Sequence[-2], self.Sequence[-1]] | ||||
|             update += self.Configuration.PropagationRatio * self.Configuration.ThetaZero | ||||
|             self.PheromoneMatrix[self.Sequence[-2], self.Sequence[-1]] = max(self.Configuration.ThetaZero, update) | ||||
|  | ||||
|         # validate that nothing went wrong | ||||
|   | ||||
| @@ -16,8 +16,7 @@ class Configuration: | ||||
|         self.ExplorationRuns = kwargs.get('generations', 20) | ||||
|         self.PheromoneEvaporationRate = 0.9 | ||||
|         self.PseudoRandomSelectionRate = 0.9 | ||||
|         self.propagationRatio = 0.9 | ||||
|         self.PropagationRatio = 0.9 | ||||
|         self.Epsilon = 0.1 | ||||
|         self.RunwayOccupasionRatio = 0.7 | ||||
|         self.Beta = 2.0 | ||||
|         self.ThetaZero = None | ||||
		Reference in New Issue
	
	Block a user