ifmax(scores)-min(scores)<=0.001*min(scores):#Termination Criteria to check for convergence - in this case, if the current solutions are within 10% range
termCriterion+=1
scores=[ant['targetUtil']forantinfittest]
ifmax(scores)-min(scores)<=0.001*min(scores):#Termination Criteria to check for convergence - in this case, if the current solutions are within 10% range
termCriterion+=1
# scores = [ant['excess'] for ant in fittest]
# if max(scores) - min(scores) <= 0.001*min(scores): #Termination Criteria to check for convergence - in this case, if the current solutions are within 10% range
# termCriterion += 1
#
# scores = [ant['targetUtil'] for ant in fittest]
# if max(scores) - min(scores) <= 0.001*min(scores): #Termination Criteria to check for convergence - in this case, if the current solutions are within 10% range
head=tuple(['Demand Request Days Early Weighted']+G.WeekList)
earlinessResults.headers=(head)
weightedLateSP={}
weightedEarlySP = {}
for week in G.WeekList:
weightedLateSP[week] = {}
for sp in G.SPlist.keys():
...
...
@@ -212,26 +370,5 @@ def outputResults():
weightedLateSP[week][sp]['result'] = sum([weightedLateSP[week][sp]['qty'][i]*weightedLateSP[week][sp]['earliness'][i] for i in range(len(weightedLateSP[week][sp]['qty']))])/qtySP