Commit b753996f authored by Georgios Dagkakis's avatar Georgios Dagkakis

bug in ACO fixed. It would create the same ant all over the same generation

parent 550e63ad
...@@ -73,12 +73,12 @@ class ACO(plugin.ExecutionPlugin): ...@@ -73,12 +73,12 @@ class ACO(plugin.ExecutionPlugin):
for i in range(int(data["general"]["numberOfGenerations"])): for i in range(int(data["general"]["numberOfGenerations"])):
scenario_list = [] # for the distributor scenario_list = [] # for the distributor
# number of ants created per generation # number of ants created per generation
seedPlus = 0
for j in range(int(data["general"]["numberOfAntsPerGenerations"])): for j in range(int(data["general"]["numberOfAntsPerGenerations"])):
# an ant dictionary to contain rule to queue assignment information # an ant dictionary to contain rule to queue assignment information
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) seed = data['general'].get('seed', 10)
if seed == '' or seed == ' ' or seed == None: if seed == '' or seed == ' ' or seed == None:
seed = 10 seed = 10
...@@ -91,7 +91,6 @@ class ACO(plugin.ExecutionPlugin): ...@@ -91,7 +91,6 @@ class ACO(plugin.ExecutionPlugin):
# if the ant was not already tested, only then test it # if the ant was not already tested, only then test it
if ant_key not in tested_ants: if ant_key not in tested_ants:
tested_ants.add(ant_key) tested_ants.add(ant_key)
ant_data=self.createAntData(data, ant) ant_data=self.createAntData(data, ant)
ant['key'] = ant_key ant['key'] = ant_key
ant['input'] = ant_data ant['input'] = ant_data
......
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