from models import AdaptiveGA from optproblems import cec2005 from os import makedirs import statistics import csv if __name__ == '__main__': dims = 10 bounds = [ [-100 for i in range(dims)], [100 for i in range(dims)] ] functions = [ cec2005.F1(dims), cec2005.F2(dims), cec2005.F3(dims), cec2005.F4(dims), cec2005.F5(dims)] optimums = [-450, -450, -450, -450, -310] FESThresholds = [0, 0.001, 0.01, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1] numRuns = 25 # Creating result path pathName = "Results/AGA" makedirs(pathName, exist_ok=True) # Initializing result files tableFileName = pathName + "/AGA_" + str(dims) + "D.csv" with open(tableFileName, "w") as resultsFile: writer = csv.writer(resultsFile, delimiter = ',') writer.writerow( ["Fi_10D", "Best", "Worst", "Median", "Mean", "Std_Dev", "Success_Rate"] )
from models import ArtificialBeeColony from optproblems import cec2005 from os import makedirs import statistics import csv if __name__ == '__main__': dims = 10 bounds = [[-100 for i in range(dims)], [100 for i in range(dims)]] functions = [ cec2005.F1(dims), cec2005.F2(dims), cec2005.F3(dims), cec2005.F4(dims), cec2005.F5(dims) ] optimums = [-450, -450, -450, -450, -310] FESThresholds = [ 0, 0.001, 0.01, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1 ] numRuns = 25 # Creating result path pathName = "Results/ABC" makedirs(pathName, exist_ok=True) # Initializing result files tableFileName = pathName + "/ABC_" + str(dims) + "D.csv"