Commit 55c7bc19 authored by Georgios Dagkakis's avatar Georgios Dagkakis

correction in ACO. It had the same ant_data for the whole generation

parent b2334873
from dream.plugins import plugin from dream.plugins import plugin
from pprint import pformat from pprint import pformat
from copy import copy from copy import copy, deepcopy
import json import json
import time import time
import random import random
...@@ -91,10 +91,11 @@ class ACO(plugin.ExecutionPlugin): ...@@ -91,10 +91,11 @@ 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=deepcopy(self.createAntData(data, ant))
ant['key'] = ant_key ant['key'] = ant_key
ant['input'] = ant_data ant['input'] = ant_data
scenario_list.append(ant) scenario_list.append(ant)
if distributor is None: if distributor is None:
# synchronous # synchronous
for ant in scenario_list: for ant in scenario_list:
......
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