diff --git a/MDAF/MDAF.py b/MDAF/MDAF.py index 8a0b0e9..02ed8eb 100644 --- a/MDAF/MDAF.py +++ b/MDAF/MDAF.py @@ -375,7 +375,7 @@ if __name__== "__main__": #visualize2D('@Easom.py', -10,10) #feats = array([representfunc(testfun, True)['ela_meta'] for testfun in testfuns]) #plotfuncs(['@Bukin2.py','@Bukin6.py'], 'ela_meta') - perf = doe('@SimmulatedAnnealing.py', testfuns[0:1],{"t": 1000, "p": 0.95, "objs": 0, "lower": [-10], "upper": [10]},measurementSampleSize=2) + perf = doe('@SimmulatedAnnealing.py', testfuns[4:5],{"t": 1000, "p": 0.95, "objs": 0, "lower": [-10], "upper": [10]},measurementSampleSize=2) #perfs = array([[perf[func][0]['cpuTime'][0], perf[func][0]['numCalls'][0], perf[func][0]['quality'][0], perf[func][0]['convRate'][0]] for func in perf.keys()]) #features = array(feats) diff --git a/MDAF/SampleAlgorithms/SimmulatedAnnealing.py b/MDAF/SampleAlgorithms/SimmulatedAnnealing.py index cd0cd9f..0329d52 100644 --- a/MDAF/SampleAlgorithms/SimmulatedAnnealing.py +++ b/MDAF/SampleAlgorithms/SimmulatedAnnealing.py @@ -38,8 +38,8 @@ def main(func, S, args): y = args["objs"] t = args["t"] p = args["p"] - high = max([args["upper"]]) - low = max([args["lower"]]) + high = args["upper"] if isinstance(args["upper"], int) else max(args["upper"]) + low = args["lower"] if isinstance(args["lower"], int) else max(args["lower"]) Best = list() Best[:] = cp.deepcopy(S) diff --git a/MDAF/SampleAlgorithms/__pycache__/SimmulatedAnnealing.cpython-39.pyc b/MDAF/SampleAlgorithms/__pycache__/SimmulatedAnnealing.cpython-39.pyc index 7c98c1f..f7f1d6d 100644 Binary files a/MDAF/SampleAlgorithms/__pycache__/SimmulatedAnnealing.cpython-39.pyc and b/MDAF/SampleAlgorithms/__pycache__/SimmulatedAnnealing.cpython-39.pyc differ