mirror of
https://github.com/ejeanboris/MDAF.git
synced 2025-06-18 11:08:30 +00:00
added more fumctions for testing
This commit is contained in:
@ -11,11 +11,11 @@ r.seed(int(time.time()))
|
|||||||
|
|
||||||
heuristicpath = "/home/remi/Documents/MDAF-GitLAB/SourceCode/SampleAlgorithms/SimmulatedAnnealing.py"
|
heuristicpath = "/home/remi/Documents/MDAF-GitLAB/SourceCode/SampleAlgorithms/SimmulatedAnnealing.py"
|
||||||
heuristic_name = "SimmulatedAnnealing"
|
heuristic_name = "SimmulatedAnnealing"
|
||||||
testfunctionpaths = ["/home/remi/Documents/MDAF-GitLAB/SourceCode/TestFunctions/Bukin2.py"]
|
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/Bukin6.py"]
|
||||||
funcnames = ["Bukin2"]
|
funcnames = ["Bukin2", "Bukin4", "Bukin6"]
|
||||||
objs = 0
|
objs = 0
|
||||||
args = {"high": 200, "low": -200, "t": 100, "p": 0.8}
|
args = {"high": 200, "low": -200, "t": 100, "p": 0.95}
|
||||||
scale = 3
|
scale = 2.5
|
||||||
|
|
||||||
|
|
||||||
def doe(heuristicpath, heuristic_name, testfunctionpaths, funcnames, objs, args, scale):
|
def doe(heuristicpath, heuristic_name, testfunctionpaths, funcnames, objs, args, scale):
|
||||||
|
@ -72,7 +72,7 @@ def main(func, obj, S, args, connection):
|
|||||||
route.append(Best[:])
|
route.append(Best[:])
|
||||||
print(route)
|
print(route)
|
||||||
|
|
||||||
if t < 0 or Quality(Best,y,func) > 1000:
|
if t < 0 or Quality(Best,y,func) > 50:
|
||||||
break
|
break
|
||||||
#print('the Best Quality obtained was:{}'.format(Quality(Best,y)))
|
#print('the Best Quality obtained was:{}'.format(Quality(Best,y)))
|
||||||
print("Final Quality is: {}".format(Quality(Best,y,func)))
|
print("Final Quality is: {}".format(Quality(Best,y,func)))
|
||||||
|
2
SourceCode/TestFunctions/Bukin4.py
Normal file
2
SourceCode/TestFunctions/Bukin4.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
def main(args):
|
||||||
|
return 100*args[1]**2+0.01*abs(args[0]+10)
|
5
SourceCode/TestFunctions/Bukin6.py
Normal file
5
SourceCode/TestFunctions/Bukin6.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from math import sqrt, fabs
|
||||||
|
|
||||||
|
|
||||||
|
def main(args):
|
||||||
|
return 100*sqrt(fabs(args[1]-0.01*args[0]**2))+0.01*fabs(args[0]+10)
|
Reference in New Issue
Block a user