Skip to content
Snippets Groups Projects
Commit a6df61ce authored by Emile Prost's avatar Emile Prost
Browse files

Ajout de 'crazy' dans les stratégies possible pour l'update de tau

parent 6acbc1b4
Branches
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ def ACO(Me, NbP, comm, alpha, rho, Q, nb_ants, tau_0, n_iter, n1_max=256, n2_max ...@@ -72,7 +72,7 @@ def ACO(Me, NbP, comm, alpha, rho, Q, nb_ants, tau_0, n_iter, n1_max=256, n2_max
paths = np.array(paths, dtype="int32") paths = np.array(paths, dtype="int32")
costs = np.array(costs, dtype="float64") costs = np.array(costs, dtype="float64")
if fancy_strategy == 'AS' or fancy_strategy == 'ElitistAS': if fancy_strategy == 'AS' or fancy_strategy == 'ElitistAS' or fancy_strategy == 'crazy':
#we initialize the best path with the ants already in this process #we initialize the best path with the ants already in this process
best_cost = np.amin(costs) best_cost = np.amin(costs)
best_p = paths[np.argmin(costs), :] best_p = paths[np.argmin(costs), :]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment