Skip to content
Snippets Groups Projects
Commit d5ce408d authored by Carlos Santos Garcia's avatar Carlos Santos Garcia
Browse files

Corrected bugs

parent b6aefc2f
No related branches found
No related tags found
No related merge requests found
...@@ -152,7 +152,7 @@ if __name__ == "__main__": ...@@ -152,7 +152,7 @@ if __name__ == "__main__":
nb_ants = 2 nb_ants = 2
tau_0 = Q*300 tau_0 = Q*300
n_iter = 1 n_iter = 1
fancy_strategy = "AS" fancy_strategy = "crazy"
# Parameters for compilation and execution of iso3dfd # Parameters for compilation and execution of iso3dfd
nb_threads = 8 nb_threads = 8
......
...@@ -84,12 +84,12 @@ def compute_path(tau, alpha, n1_size, n2_size, n3_size, fancy_strategy = 'AS'): ...@@ -84,12 +84,12 @@ def compute_path(tau, alpha, n1_size, n2_size, n3_size, fancy_strategy = 'AS'):
path = [] path = []
sequence, weights = proba(0, alpha, tau, n1_size, n2_size, n3_size, n_cbx, n_cby, n_cbz) sequence, weights = proba(0, alpha, tau, n1_size, n2_size, n3_size, n_cbx, n_cby, n_cbz)
crazy = False
if fancy_strategy == 'crazy': if fancy_strategy == 'crazy':
r = random.random() r = rd.random()
if r < 0.1: if r < 0.1:
crazy = True crazy = True
else: else:
crazy = False
new_node = rd.choices(sequence,weights)[0] new_node = rd.choices(sequence,weights)[0]
path.append(new_node) path.append(new_node)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment