From b05666e1372cd76edaadadd5e218a701f513eade Mon Sep 17 00:00:00 2001 From: Remi Ehounou Date: Sat, 11 Sep 2021 16:53:22 -0400 Subject: [PATCH] fixed optimization space lower limit error --- MDAF/MDAF.py | 2 +- MDAF/SampleAlgorithms/SimmulatedAnnealing.py | 4 ++-- .../SimmulatedAnnealing.cpython-39.pyc | Bin 1882 -> 1863 bytes tests/SimmulatedAnnealing.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MDAF/MDAF.py b/MDAF/MDAF.py index 02ed8eb..125ef0f 100644 --- a/MDAF/MDAF.py +++ b/MDAF/MDAF.py @@ -279,7 +279,7 @@ def doe(heuristicpath, testfunctionpaths, heuristic_args, measurementSampleSize failedfunctions[run] = process.exitcode connections[run][0].close() connections[run][1].close() - print('Test Function Completed: '+str(i)+'/'+str(len(proc))) + print('Test Function Completed: '+str(i+1)+'/'+str(len(proc))) # display output diff --git a/MDAF/SampleAlgorithms/SimmulatedAnnealing.py b/MDAF/SampleAlgorithms/SimmulatedAnnealing.py index 0329d52..a898992 100644 --- a/MDAF/SampleAlgorithms/SimmulatedAnnealing.py +++ b/MDAF/SampleAlgorithms/SimmulatedAnnealing.py @@ -39,14 +39,14 @@ def main(func, S, args): t = args["t"] p = args["p"] high = args["upper"] if isinstance(args["upper"], int) else max(args["upper"]) - low = args["lower"] if isinstance(args["lower"], int) else max(args["lower"]) + low = args["lower"] if isinstance(args["lower"], int) else min(args["lower"]) Best = list() Best[:] = cp.deepcopy(S) sigma = 0.1 route.append(Best[:]) for iterationstep in range(100000): - print('\n\n\n') + #print('\n\n\n') R = tweak(cp.deepcopy(S),p,sigma,high, low) #print(R) #print(S) diff --git a/MDAF/SampleAlgorithms/__pycache__/SimmulatedAnnealing.cpython-39.pyc b/MDAF/SampleAlgorithms/__pycache__/SimmulatedAnnealing.cpython-39.pyc index f7f1d6d89a2b6c2cd392527c0f44dcf12abd2f2c..25f42a91253717367d677f48470c5eb8d02a6b6e 100644 GIT binary patch delta 274 zcmcb`cbtzmk(ZZ?0SI=8*(Qo_Lf3@TM9@i0P6HFjH+9Fzo=U z=K`5iJg0=WhO>sHhM}1`g*%(2XcZ$+v~Wq`Duj42gC@^pZ&vNe)vWF;%(s}IVY5@hAD+rlA)QgmZOBFnW2`mgna== z4dX(_8qO4k6oytN8-^6NTCN)A1)MMuNrr`tj0`1QDeTRRE({YGV;O3>OSn@wnn9vG zApMh_SwfAKN*ERhEM%zR&jzX~GOOW%m?z0l!w56EhBbvVn*}KAQ^N{mb4@v2Qz5$PIhF~X02l8 z;^LZ|!|JZclw5F&BPBJpAUVIF@)lcSK|yL>N)a0{gl@4G6lLa>Ouoe0s$c^OGDaar gHYN^65L9ARVqydGS%8=i$e&!w*2btc`45{n0AsgRGynhq diff --git a/tests/SimmulatedAnnealing.py b/tests/SimmulatedAnnealing.py index 9756f56..e9c1c00 100644 --- a/tests/SimmulatedAnnealing.py +++ b/tests/SimmulatedAnnealing.py @@ -46,7 +46,7 @@ def main(func, S, args): sigma = 0.1 route.append(Best[:]) while True: - print('\n\n\n') + #print('\n\n\n') R = tweak(cp.deepcopy(S),p,sigma,high, low) print(R) print(S)