File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -214,18 +214,18 @@ def doCycle(sorted_x):
214
214
215
215
216
216
def main ():
217
- # runs only once
217
+ # Runs only once. Generates the population, x and y, and tour matrix
218
218
generateFirstPopulation ()
219
219
generateXandY ()
220
220
generateTour ()
221
221
222
- # runs in a loop 0 - 9999
222
+ # Runs in a loop 0 - 9999.
223
223
for _ in range (NUM_EXECUTION ):
224
224
sorted_x = fitnessFunction ()
225
225
rouletteFunction (sorted_x )
226
226
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)
229
229
230
230
# Generates the fitness values for the last population
231
231
sorted_x = fitnessFunction ()
You can’t perform that action at this time.
0 commit comments