From 9b39b73fcac29af55c99135e4341e617d76c8298 Mon Sep 17 00:00:00 2001 From: Remi Ehounou Date: Mon, 3 May 2021 18:35:36 -0400 Subject: [PATCH] relative paths --- SourceCode/AlgorithmAnalyser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SourceCode/AlgorithmAnalyser.py b/SourceCode/AlgorithmAnalyser.py index e90bca9..a05ff87 100644 --- a/SourceCode/AlgorithmAnalyser.py +++ b/SourceCode/AlgorithmAnalyser.py @@ -48,7 +48,7 @@ def measure(heuristicpath, heuristic_name, funcpath, funcname, objs, args, scale # ^^ The timer ends right above this; the CPU time is then calculated below by simple difference ^^ # Building the response - response = "The optimum point obtained is: " + str(best) + "\nThe CPU time of the process was: " + str((toc - tic)*(10**-9)) + "Seconds" + response = "The optimum point obtained is: " + str(best) + "\nThe CPU time of the process was: " + str((toc - tic)*(10**-9)) + " Seconds" connection.send(response) @@ -231,16 +231,16 @@ def doe(heuristicpath, heuristic_name, testfunctionpaths, funcnames, objs, args, for process in proc: print(process.name + "____\n" + str(responses[process.name]) + "\n_________________") if __name__ == '__main__': - heuristicpath = "/home/remi/Documents/MDAF-GitLAB/SourceCode/SampleAlgorithms/SimmulatedAnnealing.py" + heuristicpath = "SampleAlgorithms/SimmulatedAnnealing.py" heuristic_name = "SimmulatedAnnealing" - testfunctionpaths = ["/home/remi/Documents/MDAF-GitLAB/SourceCode/TestFunctions/Bukin2.py", "/home/remi/Documents/MDAF-GitLAB/SourceCode/TestFunctions/Bukin4.py", "/home/remi/Documents/MDAF-GitLAB/SourceCode/TestFunctions/Brown.py"] + testfunctionpaths = ["TestFunctions/Bukin2.py", "TestFunctions/Bukin4.py", "TestFunctions/Brown.py"] funcnames = ["Bukin2", "Bukin4", "Brown"] # testfunctionpaths = ["/home/remi/Documents/MDAF-GitLAB/SourceCode/TestFunctions/Bukin4.py"] # funcnames = ["Bukin4"] objs = 0 args = {"high": 200, "low": -200, "t": 1000, "p": 0.95} - scale = 2.5 + scale = 1 doe (heuristicpath, heuristic_name, testfunctionpaths, funcnames, objs, args, scale)