# update the options list to ensure that good performing queue-rule
# update the options list to ensure that good performing queue-rule
# combinations have increased representation and good chance of
# combinations have increased representation and good chance of
...
@@ -159,6 +172,13 @@ class ACO(plugin.ExecutionPlugin):
...
@@ -159,6 +172,13 @@ class ACO(plugin.ExecutionPlugin):
# 'EDD' is added to Q1 so there is a higher chance that it is
# 'EDD' is added to Q1 so there is a higher chance that it is
# selected by the next ants.
# selected by the next ants.
collated[m].append(l[m])
collated[m].append(l[m])
#termination criterion: after four generations check if the solution has been improving
solutionConvergence.append(max([ant['actualDelays']forantinants]))#add the worst solution after the last generation
solutionConvergence.sort()
del(solutionConvergence[int(data['general'].get('numberOfSolutions',0)):])#extract the last 4 worst solutions among the best, if there has been no improvement, terminate the optimisation process