From 6db381186475124da517ac65efc0bbeb2a6f27bb Mon Sep 17 00:00:00 2001 From: Remi Ehounou Date: Sat, 11 Sep 2021 16:30:47 -0400 Subject: [PATCH] fixed list issue for optimization space --- MDAF/MDAF.py | 2 +- MDAF/SampleAlgorithms/SimmulatedAnnealing.py | 4 ++-- .../SimmulatedAnnealing.cpython-39.pyc | Bin 1828 -> 1882 bytes 3 files changed, 3 insertions(+), 3 deletions(-) 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 7c98c1f6ef4d431f56d3a42182f0805241f98449..f7f1d6d89a2b6c2cd392527c0f44dcf12abd2f2c 100644 GIT binary patch delta 481 zcmZXRy-EW?6ov2IotgdLB#SI={3)VMEbJnJ5gXA)Y*JWREUu8a7;rO{%o1c#n-qb4 zfds@NgzK^bQ0TZ39@eY{LJ}GRc}{_gOPEyPGWa7Sx^dX}(2Iv69Dh-7-79PPfOy?$vevL_d#eSW_5!NaS@mrq!oF;f delta 396 zcmYLFO-n*S6usA(d0)QwGzmj3p=jfxor@sDO@AR;wJ=7?#K7mQ>JEXg7C{SP{(wUJ zaMi|N@_tFHXr5x-#r-&(b2!{A{)ppV6a`@Gt$5!1^p>$^I5Y3;?D-Z`)UFa#kfH|b z%TqiB?JH;Q5-yN@2@+ll9gvO=h|Rq%QiBB|C||lMUcd~le{@j=(o1u+_@{R$AeX#U z=um|e5+_KRj_i&UZI1Y{s-pYYJn`f5 Jt!