Skip to content

Commit 01c61f1

Browse files
committed
fixing the docs
1 parent 15abaa1 commit 01c61f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,18 @@ def doCycle(sorted_x):
214214

215215

216216
def main():
217-
# runs only once
217+
# Runs only once. Generates the population, x and y, and tour matrix
218218
generateFirstPopulation()
219219
generateXandY()
220220
generateTour()
221221

222-
# runs in a loop 0 - 9999
222+
# Runs in a loop 0 - 9999.
223223
for _ in range(NUM_EXECUTION):
224224
sorted_x = fitnessFunction()
225225
rouletteFunction(sorted_x)
226226
doCycle(sorted_x)
227-
generateTour() # generate the Tour matrix again, as the population is updated
228-
costByExecution.append(sorted_x[0][1])
227+
generateTour() # Generate the Tour matrix again, as the population is updated
228+
costByExecution.append(sorted_x[0][1]) # Appends the cost to the array of costs (plotted at the end)
229229

230230
# Generates the fitness values for the last population
231231
sorted_x = fitnessFunction()

0 commit comments

Comments
 (0)