Skip to content
Snippets Groups Projects
Commit 7bd8204b authored by Matthieu Oberon's avatar Matthieu Oberon
Browse files

add functionality to have a record of cost_opti

parent d275c86f
Branches
No related tags found
No related merge requests found
......@@ -84,6 +84,8 @@ def ACO(Me, NbP, comm, alpha, rho, Q, nb_ants, tau_0, n_iter, n1_max=256, n2_max
if best_cost < cost_opti:
cost_opti = best_cost
path_opti = best_p
with open("cost_opti.txt", 'a') as file:
file.write(f"{-1*cost_opti}\n")
comm.Bcast(tau, root=0)
if Me == 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment