summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorJonZhao <[email protected]>2019-05-26 11:03:18 +0800
committerJonZhao <[email protected]>2019-05-26 11:03:18 +0800
commit5296f1068e42633790c64b40ff134fc08deb9b80 (patch)
tree5e0c1cf142fe9865fc434aba8046c8f54cb8252f /main.py
parent28cbf59dbb14930a49c1b6c137e2f0d594570d69 (diff)
downloadVRPTW-ACO-python-5296f1068e42633790c64b40ff134fc08deb9b80.tar.gz
VRPTW-ACO-python-5296f1068e42633790c64b40ff134fc08deb9b80.tar.bz2
VRPTW-ACO-python-5296f1068e42633790c64b40ff134fc08deb9b80.zip
minor updation
Diffstat (limited to 'main.py')
-rw-r--r--main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.py b/main.py
index 90bc361..4008dac 100644
--- a/main.py
+++ b/main.py
@@ -145,7 +145,7 @@ class VrptwAco:
current_ind = self.best_path[0]
for next_ind in self.best_path[1:]:
- self.pheromone_mat[current_ind][next_ind] += self.Q/self.best_path_distance
+ self.pheromone_mat[current_ind][next_ind] += self.rho/self.best_path_distance
current_ind = next_ind
def stochastic_accept(self, index_to_visit, transition_prob):
@@ -171,7 +171,7 @@ class VrptwAco:
if __name__ == '__main__':
- file_path = './solomon-100/r101.txt'
+ file_path = './solomon-100/c101.txt'
graph = VrptwGraph(file_path)
vrptw = VrptwAco(graph)