From bb60d49e33370c7afc5f95af73e12198e5871c35 Mon Sep 17 00:00:00 2001 From: remi Date: Fri, 14 May 2021 23:49:40 -0400 Subject: [PATCH] setting it up --- .vscode/extensions.json | 5 + .vscode/launch.json | 19 ++++ .vscode/settings.json | 9 ++ SourceCode/AlgorithmAnalyser.py | 20 ++-- .../SimmulatedAnnealing.cpython-38.pyc | Bin 0 -> 2062 bytes SourceCode/TestFunctions/Bukin6.py | 24 +++++ SourceCode/TestFunctions/Bukin6.py.old | 86 ++++++++++++++++++ .../__pycache__/Brown.cpython-38.pyc | Bin 0 -> 382 bytes .../__pycache__/Bukin2.cpython-38.pyc | Bin 0 -> 619 bytes .../__pycache__/Bukin4.cpython-38.pyc | Bin 0 -> 332 bytes .../__pycache__/Bukin6.cpython-38.pyc | Bin 0 -> 1374 bytes 11 files changed, 155 insertions(+), 8 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 SourceCode/SampleAlgorithms/__pycache__/SimmulatedAnnealing.cpython-38.pyc create mode 100644 SourceCode/TestFunctions/Bukin6.py.old create mode 100644 SourceCode/TestFunctions/__pycache__/Brown.cpython-38.pyc create mode 100644 SourceCode/TestFunctions/__pycache__/Bukin2.cpython-38.pyc create mode 100644 SourceCode/TestFunctions/__pycache__/Bukin4.cpython-38.pyc create mode 100644 SourceCode/TestFunctions/__pycache__/Bukin6.cpython-38.pyc diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..dd4360d --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "magicstack.magicpython" + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..46d4532 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,19 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + + + { + "name": "Python: Current File", + "type": "python", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal", + "cwd": "${fileDirname}" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7dc6613 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "python.pythonPath": "/usr/bin/python3.8", + "python.testing.pytestArgs": [ + "Sample codes" + ], + "python.testing.unittestEnabled": false, + "python.testing.nosetestsEnabled": false, + "python.testing.pytestEnabled": true +} \ No newline at end of file diff --git a/SourceCode/AlgorithmAnalyser.py b/SourceCode/AlgorithmAnalyser.py index a05ff87..3f61813 100644 --- a/SourceCode/AlgorithmAnalyser.py +++ b/SourceCode/AlgorithmAnalyser.py @@ -20,6 +20,8 @@ from scipy import signal, misc, ndimage + + def measure(heuristicpath, heuristic_name, funcpath, funcname, objs, args, scale, connection): ''' This function runs each optimization process of the heuristic with one test function @@ -126,8 +128,8 @@ def representfunc(funcpath): # Valleys and Bassins # Alternative filter used for calculating derivatives - derfilt = array([1.0, -2, 1.0], dtype=float32) - alpha = signal.sepfir2d(ck, derfilt, [1]) + signal.sepfir2d(ck, [1], derfilt) + #derfilt = array([1.0, -2, 1.0], dtype=float32) + #alpha = signal.sepfir2d(ck, derfilt, [1]) + signal.sepfir2d(ck, [1], derfilt) # Currently used filter for Valley detection hor = array([[0,1,1],[-1,0,1], [-1,-1,0]]) @@ -169,16 +171,16 @@ def representfunc(funcpath): # Noisyness: use the previously generated DOE and calculate a noisyness factor; average of derivative # Displaying the plots for development purposes - img1 = plt.figure() - ax2 = img1.add_subplot(111) - ax2.imshow(alpha) + #img1 = plt.figure() + #ax2 = img1.add_subplot(111) + #ax2.imshow(alpha) img2 = plt.figure() ax3 = img2.add_subplot(111) ax3.imshow(beta) plt.show() - + print("should be plotted") # Writing the calculated representation into the test function file # results['Represented'] = True @@ -242,7 +244,9 @@ if __name__ == '__main__': args = {"high": 200, "low": -200, "t": 1000, "p": 0.95} scale = 1 - doe (heuristicpath, heuristic_name, testfunctionpaths, funcnames, objs, args, scale) + #doe (heuristicpath, heuristic_name, testfunctionpaths, funcnames, objs, args, scale) - #representfunc("/home/remi/Documents/MDAF-GitLAB/SourceCode/TestFunctions/Bukin6.py") + representfunc("TestFunctions/Bukin6.py") + +# %% diff --git a/SourceCode/SampleAlgorithms/__pycache__/SimmulatedAnnealing.cpython-38.pyc b/SourceCode/SampleAlgorithms/__pycache__/SimmulatedAnnealing.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8c9b131c5f1b2c91f508fcd6b0ceab5240bd47fe GIT binary patch literal 2062 zcmZt{O>Y}TbY}L$>-E}B(vUh$RT&Oc?x8^i34}sRf$|}tsI6PIU8zd9o{h7~?s_vj zriwd0xv1rURE}`LIaWg4`49aCb3>eR?&E24&?j1=OAxBDgY7x9A?R3 zkwj8OCUio-AP;Yk9YrOZT8CuM7J+2DHm8bl_9Gj+%2Gr*t32OOz1}F3^aNtsHSwU` zFgwQsvw&B024;C4mOhw$xI6}&Wb?|sM?#bl4*qjuLa7OzZX;RAGASIUKe%wAXSL$gyi;`U1@}P*djVFZ*ssz3??Gz%(rM7^mt>|&tvEf#G;w|La z=%RLFR5W}vSE#BYT@5|Wr0Bf9JRlu4v4E5~UFKM{~d1xFG)!ZX5 zskj0fe3VteEGDQ`b{w7ZcnxL5*UE!^utq+DoPb0f^m=nECmw_E{>*nH^BbINz&U?z zf36kupJeamf< z0hT%mv)0OHivTh7v&KGT6KDHO$un z`m(9$20I6oWsvY-=du;RjP}kVHWs-fE`b5<3lKcVG7Te5c)R2MC|x>-9U?4K<5`j_-^+v~(Bim;L#F+Lj$&+V W(_l^(spi7nEEnZO4*lIPBK!jTTTIvh literal 0 HcmV?d00001 diff --git a/SourceCode/TestFunctions/__pycache__/Bukin2.cpython-38.pyc b/SourceCode/TestFunctions/__pycache__/Bukin2.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0321d4bfff2919e06f1325ab78644cb78d4f0caa GIT binary patch literal 619 zcmWIL<>g`kf)5d!dL@TC&`e)45V3rG^;R!2!jMrOdLqVMcKrmGU5zCGuaazfCh1KDFA_0 zL1Iy2u0mo_da;#4PG)h5LVlV;T26jqNijseD7B=tD9;Ka1{UJt;#7`TR!GUr%}vcK z&dkpP>NMiw#3rg|Fnq;drU1kLB`8MHt3}qiKdfr8e+lF;yaYw&OHh2TWYA>1#R3Z2 zA~qlwO#BiLNi8mME6qzT0fn5tQ)zZ)o{?Tb)n#LPU9am6e^fg`kf)5`Cs{n}<#u}hHNrn_=VFnR~6qXVOAfFY;XA@^=W)xu%X8@YPUS-0i00heM$_go& zxw)x%#hLke#a0SNU|}v!ObI;$F3y)JKnq@itb7S_UwXC3I`@ZFE%q;g9EO)54{0*q zVoppd22w1EMd`&W8HzZ7qQAsLQj1I6O7oISK-TCxm1bw=ndlW%-eSp3%*+EBSPU|d kfvpH+h@U1SmWHa^HWN5Qtd#xJ_9iW0A6=MIRF3v literal 0 HcmV?d00001 diff --git a/SourceCode/TestFunctions/__pycache__/Bukin6.cpython-38.pyc b/SourceCode/TestFunctions/__pycache__/Bukin6.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66e72d17ed043e1732a8d62f6ba41a57741d1cae GIT binary patch literal 1374 zcmeHHF-yZh6n>Xnt&J8015pqRbjnhtgNTTVf-d5q)gg<} zWfQ0T1#$4b=ul8+mp*v!?tS0gyW{crPV03G&<>ZMFP=ES8ztjrV6ua*moNwrEC$JZ zCJo94_&Wg5G;k1Jz|+f5GJl1 z*UCKDumA%#U^b#9PxzFBm<9a**P#4oA80zyf;bNQII?Y(g@2Fcd?}yupvV!!gAW2iS z^H|OU)zu?VguOfMP^bG@(n(1yR(7+SC|PUX_H!#=;B|`Shmji7XDc=o@8~Ir9^Od|0&r literal 0 HcmV?d00001