seed inputted in GUI General tab used for the formulation of ACO scenario

parent 9db0a49e
...@@ -67,8 +67,12 @@ class ACO(plugin.ExecutionPlugin): ...@@ -67,8 +67,12 @@ class ACO(plugin.ExecutionPlugin):
ant = {} ant = {}
# for each of the machines, rules are randomly picked from the # for each of the machines, rules are randomly picked from the
# options list # options list
seedPlus = 0
seed = data['general'].get('seed', 10)
for k in collated.keys(): for k in collated.keys():
random.seed(seed+seedPlus)
ant[k] = random.choice(collated[k]) ant[k] = random.choice(collated[k])
seedPlus +=1
# TODO: function to calculate ant id. Store ant id in ant dict # TODO: function to calculate ant id. Store ant id in ant dict
ant_key = repr(ant) ant_key = repr(ant)
# if the ant was not already tested, only then test it # if the ant was not already tested, only then test it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment