Commit 80a58f15 authored by Jérome Perrin's avatar Jérome Perrin

Rename calculateAntTotalDelay -> calculateAntScore

This function does not have to use delay only
parent f9c493be
...@@ -8,7 +8,7 @@ from Globals import G ...@@ -8,7 +8,7 @@ from Globals import G
from dream.simulation.Default import Simulation as DefaultSimulation from dream.simulation.Default import Simulation as DefaultSimulation
def calculateAntTotalDelay(ant): def calculateAntScore(ant):
"""Calculate the score of this ant. """Calculate the score of this ant.
XXX Maybe this can be based on other criterions, such as completion time ? XXX Maybe this can be based on other criterions, such as completion time ?
...@@ -116,7 +116,7 @@ class Simulation(DefaultSimulation): ...@@ -116,7 +116,7 @@ class Simulation(DefaultSimulation):
ant_data["nodes"][k]['schedulingRule'] = v ant_data["nodes"][k]['schedulingRule'] = v
ant['resultJSON'] = DefaultSimulation.run(self, ant_data) ant['resultJSON'] = DefaultSimulation.run(self, ant_data)
ant['score'] = calculateAntTotalDelay(ant) ant['score'] = calculateAntScore(ant)
# The ants in this generation are ranked based on their scores and the # The ants in this generation are ranked based on their scores and the
# best 4 are selected # best 4 are selected
......
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