引用----PSO算法
https://blog.csdn.net/wang454592297/article/details/80367158
根据引用链接中的算法算了几个函数
粒子群算法(Particle Swarm Optimization ,PSO)属于进化算法,是通过模拟鸟群捕食行为设计的。从随机解出发,通过迭代寻找最优解,通过适应度来评价解的品质。
所有的粒子具有以下两个属性:速度、位置。
PSO初始化为一群随机粒子(随机解),然后通过迭代找到最优解。在每次迭代中,粒子通过跟踪极值来更新。
V i + 1 = w ∗ v i + c 1 ∗ r a n d 1 ∗ ( p b e s t i − x i ) + c 2 8 r a n d 2 ∗ ( g b e s t i − x i ) V_{i+1} = w * v_i + c_1 * rand_1 * (pbest_i -x_i) + c_2 8 rand_2 * (gbest_i - x_i) Vi+1=w∗vi+c1∗rand1∗(pbesti−xi)+c28rand2∗(gbesti−xi)
x i + 1 = x i + v i + 1 x_{i+1} = x_i + v_{i+1} xi+1=xi+vi+1
所用到的函数
验证根据PSO算法得出的解是否和图中Min列是否相同
程序循环运行100次的结果:
最优解集合:[0.008798111252883434, 0.00412528796114886, 0.0015759693917201112, 0.0026137533595336215, 0.006531153883643004, 0.003441343940988606, 0.006741767840502622, 0.00456731157836332, 0.0025110381700241824, 0.0009791559846701325, 0.008162902701994046, 0.01829783011504249, 0.004661248796420825, 0.007216901376619678, 0.0014501272550124789, 0.011795247085065075, 0.012796751176616272, 0.0036383589416044693, 0.001740868588975264, 0.004826643514608708, 0.017877522500505894, 0.006458158837166383, 0.0015155482775282003, 0.00963717778213935, 0.0019024031837884259, 0.006730532394322086, 0.004811180271659499, 0.01786805300947636, 0.014243021693669977, 0.010351039149285146, 0.008874660620140862, 0.025762633511487554, 0.007023852271107689, 0.008302876113071012, 0.008316904747250664, 0.004962642897286873, 0.0015181944494320199, 0.0013010305524336907, 0.003310548465979668, 0.01256607951679145, 0.01353386249751809, 0.004146758131572614, 0.0071959835654671345, 0.008392583001452625, 0.015098510771573093, 0.013792976320275319, 0.003190558487653039, 0.007021902820043113, 0.01595595699381791, 0.006332988199347245, 0.009304213194241573, 0.013301185850342012, 0.00866612743434958, 0.012231267979530447, 0.002294416342572436, 0.007603733558145809, 0.002945969372000423, 0.011425637063031235, 0.00018509660771259817, 0.0050254213387082025, 0.006214845842091865, 0.003198911721636666, 0.002806474610015375, 0.010714392669566752, 0.014552545384554083, 0.01641797465566386, 0.005585214691735008, 0.007580658023450315, 0.014009888779025648, 0.005242787408456184, 0.003979815426948807, 0.0054940939246752585, 0.007304460701363258, 0.003208752947060578, 0.007796537698713468, 0.016242397906449657, 0.007193527067734795, 0.0039092611249000875, 0.009779467196981972, 0.005015148089900112, 0.013061175752096421, 0.009182955818279215, 0.003457176636790127, 0.007633535720377171, 0.006374295730904311, 0.0035024866773381014, 0.010446475531108224, 0.008103506208929634, 0.0052477964641153285, 0.010448962206670576, 0.0018359296776577771, 0.004433436967446358, 0.009286925895143572, 0.0030805125585904314, 0.004232010247836815, 0.0046086197116790295, 0.004423558939820271, 0.007628702801600884, 0.005711103245300553, 0.0056482107292770145]
部分实验图像:
程序循环运行100次的结果:
最优解集合:[0.007777698639341413, 0.011750304915569831, 0.001637655438934349, 0.0021345930089151643, 0.004953211605098762, 0.004609366469989329, 0.008855176233816042, 0.006171885474433925, 0.005666283545032957, 0.008779260541907252, 0.0024726402965105088, 0.003308187940345153, 0.005692022526365026, 0.00348317083330274, 0.0018820009309021835, 0.005897906491103999, 0.0043741323540769095, 0.00763438980005704, 0.004308923577422963, 0.008123091173857677, 0.004805585447791305, 0.00519889736401824, 0.005633471196912598, 0.01042444431974987, 0.005909884495644224, 0.0032499732923629843, 0.004154160065145351, 0.0062660511486432036, 0.00922695914112781, 0.0026845793256353723, 0.0028438883844228435, 0.005129443660230937, 0.00415363438387617, 0.005973571033355274, 0.005429500803224574, 0.003031886948388962, 0.0006536105969208172, 0.0014868000903587308, 0.004247792778241166, 0.005831166628155859, 0.0042701336114174815, 0.005011725941635792, 0.009305179197288016, 0.005599391691508249, 0.002732073123198564, 0.006937030243129971, 0.013951514236986373, 0.008872471149321104, 0.0019500464548021235, 0.0056445625119576626, 0.0066535535951293134, 0.00785543004390421, 0.004552863370986149, 0.01010764380870599, 0.007666373494299439, 0.0087730019079868, 0.007417867236938935, 0.005574057033598923, 0.0060426580468058155, 0.005499542575162497, 0.004129655863473136, 0.0036044735968983055, 0.0024687863214123418, 0.0069049609206044416, 0.002105976760589545, 0.006034425495226703, 0.004493055445138783, 0.003959874686679132, 0.003293330771424241, 0.0040926498184536975, 0.009137434042323367, 0.005823916223228753, 0.0033503690159126798, 0.001661783681481399, 0.010295400134300525, 0.004961423736049131, 0.008876837742736843, 0.0050078572563809765, 0.0024045031631740876, 0.005432775616800445, 0.007211534479236281, 0.004198094235750904, 0.005026957671461663, 0.006869285451479801, 0.008548473351126962, 0.004290542956337351, 0.004830191536715933, 0.0006704984706193962, 0.0027148178440197235, 0.006543366711377008, 0.006756568925681439, 0.00934031576953176, 0.002732307643232179, 0.0008839955364732255, 0.0017488753633085885, 0.0046547114007009505, 0.005195974091894318, 0.0030090639639372974, 0.004069457291955292, 0.01084323352713712]
部分实验图像:
正常解 f ( 0 , 0 ) = 0 f(0,0)=0 f(0,0)=0,实验结果也接近0,但偏差也是蛮大的
程序循环运行100次的结果:
最优解集合:[8.2925774558903e-06, 2.6644264789405e-05, 1.403253610938504e-05, 1.052597873788183e-06, 4.1635244128056885e-06, 2.4391729647820876e-06, 7.523322685596437e-06, 1.0772564320710898e-05, 6.386890773946959e-06, 1.2682177763272066e-05, 7.539433679504782e-06, 2.1046330698000245e-06, 3.658812968694753e-06, 1.8328937644910284e-05, 4.451688142874026e-06, 1.27201243467123e-06, 2.1389059140035347e-06, 6.261258416674967e-06, 1.6982763086670388e-06, 1.4201632780776479e-06, 4.5714040645456906e-05, 6.227107923869075e-06, 8.076456912646267e-06, 3.561543520593499e-06, 5.1476292820424856e-05, 5.825901543950666e-06, 1.3230867547506592e-05, 2.4450984193152813e-06, 1.4619986247398137e-07, 5.165415563462723e-05, 1.8355220668226635e-05, 3.581963649001338e-06, 5.33190060536938e-06, 2.5923546350211295e-06, 1.315273644197712e-06, 1.6960687278065705e-06, 3.5371405880771364e-07, 1.5864059184564686e-06, 9.327079995389808e-06, 1.1092309797474783e-05, 1.5051723071523514e-06, 1.174847644711617e-05, 2.823304404165453e-07, 1.3442724715624088e-05, 3.347202289649783e-05, 1.3994864775391124e-06, 1.666020980005086e-06, 6.011638985525239e-06, 1.9760305558918866e-05, 1.0768689787019117e-05, 4.320750723710117e-06, 3.9849707607271535e-07, 1.042722520606095e-05, 1.7364946853440996e-06, 3.951596544088428e-06, 9.071501351730205e-06, 3.1558336333603467e-06, 4.168550954931606e-06, 3.612266693424342e-06, 6.2289210084807875e-06, 1.693591881724597e-05, 5.1599675703273186e-06, 2.3797550177856885e-06, 3.1677714210727076e-06, 1.7549074321792377e-05, 3.5470736931855385e-08, 3.6048310021892474e-05, 6.653024747428683e-07, 1.3718482299206218e-05, 6.518008458027763e-06, 1.1029241847696147e-05, 2.7716815570134566e-05, 2.5893715864922964e-05, 2.0221964580926726e-06, 1.8210244304412265e-05, 7.684523821620521e-06, 4.236418109177502e-06, 4.761868779821344e-07, 1.0771044273498534e-05, 1.0871733055007478e-05, 5.380207477749114e-06, 8.913579807403076e-06, 7.274498196054789e-06, 1.3442559749961223e-06, 5.5650637622358215e-06, 5.046143699940463e-06, 2.6557449477318963e-07, 3.3288789612123434e-06, 2.7974213042418966e-05, 1.1878913368336378e-05, 5.52468759271892e-06, 4.036731979916974e-06, 6.387584072503121e-06, 5.183065390455982e-06, 3.2745182086944514e-05, 3.6878329378214763e-06, 3.2835556807843686e-06, 5.133055695079563e-06, 5.091825622026362e-05, 2.8602231615827474e-06]
部分实验图像:
程序循环运行100次的结果:
最优解集合:[1.4043526407413336e-06, 8.255458499436939e-06, 2.9671060131835567e-05, 2.2833541769152367e-06, 1.0740419003311265e-06, 8.944080295732602e-06, 2.606049966679934e-07, 2.985161570637821e-06, 3.997486005736964e-06, 1.090571043557832e-06, 5.258858243939428e-06, 2.6662383589875515e-06, 2.1546829206265877e-06, 1.126472937868695e-06, 3.7138463139840012e-06, 5.4262009981635e-07, 2.4168715105408075e-06, 2.1362092731459587e-06, 1.5845719462041692e-05, 2.04819522460144e-06, 1.0778905983183676e-05, 6.129954922282131e-06, 1.699421805788903e-06, 1.5179175129969244e-05, 1.6627202925447888e-06, 1.3345971003862538e-06, 3.4356856482476407e-06, 5.256730258771829e-07, 8.95536291508037e-06, 2.513601721267114e-06, 2.285613778753905e-06, 9.76508141606306e-07, 3.1170938815893543e-05, 1.9547213140161835e-06, 1.147032828838478e-06, 3.706700142458343e-06, 3.7728138628016097e-06, 8.497456296526735e-06, 6.326460583840566e-06, 3.2166254054224267e-06, 8.192649256392646e-06, 6.527882585101481e-07, 1.1598068243648735e-05, 8.818438692393206e-06, 2.6725044434922663e-06, 1.1362230165937197e-05, 2.464796670944247e-07, 1.5748417528255132e-06, 6.486471334876782e-06, 3.865993460409729e-06, 2.277144078750453e-07, 6.00994961086068e-06, 2.1470446015749154e-06, 5.389574201742569e-06, 2.8917460592565024e-06, 9.180215478084115e-07, 1.1617651859258028e-05, 2.927809430812373e-06, 1.8324130731076625e-07, 2.7317901820683115e-07, 4.618178987783822e-06, 3.096461214327026e-07, 5.036169926922929e-07, 1.830187989248175e-06, 4.921886684892233e-06, 8.696916427701128e-07, 1.1019872984333512e-06, 3.577779627252081e-07, 8.492940210250046e-06, 1.9270230575428874e-05, 2.776887010753024e-06, 7.060415861469671e-06, 1.6208179650016774e-05, 1.0718267868266525e-06, 2.3204807833472864e-06, 1.1230113909214132e-05, 4.919179847865182e-06, 8.489427772090447e-07, 3.165054326704671e-06, 1.1105356713876477e-06, 2.4120074390475697e-06, 5.003421633110398e-06, 1.507912559554558e-05, 8.093968803037836e-06, 1.3490667021629974e-06, 1.5277735162682622e-05, 1.0970129205331796e-06, 1.4481216116968488e-06, 6.737608122280093e-06, 4.830507304661804e-06, 6.306392040007796e-06, 2.741053372722082e-06, 1.157151657397236e-05, 7.33922055474095e-06, 5.702294947719127e-06, 8.698649063184452e-06, 9.119618114799699e-07, 2.6918101004709757e-06, 4.259206931579608e-06, 6.42798664857414e-08]
部分实验图像:
正常解 f ( 0 , 0 ) = 0 f(0,0)=0 f(0,0)=0,实验结果也近乎似0
程序循环运行100次的结果:
最优解集合:[0.00023212046704656082, 7.908584793481616e-05, 3.922013878554572e-05, 0.0016777786745990932, 0.0005241402925670532, 0.0017261520176992365, 0.0008465167816800328, 0.005109708612667881, 0.00012525499998572835, 0.0005167904783601512, 0.00010001504618670652, 0.00016579385671561828, 0.0029985700255690645, 0.00012773763201309553, 0.001639665816754357, 1.4217468914989302e-06, 0.0023649734088707327, 0.00020984618127326864, 4.0261360760055296e-07, 0.0010956604902850446, 0.001697259717107192, 0.0012175314609209635, 0.0027215488837105807, 0.0023200460422032974, 1.2126729925272752e-05, 0.002379657922553699, 0.00041823654438149415, 0.0012731772655908725, 0.0009544945637321405, 0.000580405512949563, 3.604815983771051e-05, 0.0017718435953204884, 0.004007990269831742, 0.0002764640328967531, 0.00037064423671294606, 2.565809299432186e-05, 0.0013305653584099425, 0.001789080008551349, 0.0007490190934472646, 0.0037918632738721597, 0.0011394105301714228, 0.00012831824508495693, 0.0002135229066810174, 0.0010020135041021038, 0.00031369947356073475, 0.0016416024811867537, 0.0017805146446956003, 2.783443049261034e-06, 0.0021723458702876597, 0.002051520622255194, 0.00014300982059223466, 0.00047649095784713216, 0.0008831918682031198, 0.005346393349490051, 0.00034893231620594054, 0.00010278535828676011, 0.00023557050306350654, 0.004664796104085912, 0.0023366825987634777, 0.0002634366949263774, 0.0012136358700594316, 0.00015938385865626472, 0.0009227263513673641, 0.0013092858462393413, 0.0019082378306232491, 5.02043906250997e-05, 0.00188587005136377, 0.0023083171387123166, 0.00041880077799431, 0.0018055436961506783, 0.001397147132845844, 0.0009740022514748573, 0.001116939977095135, 0.0027229424471003193, 1.262264719884124e-05, 7.32867040968505e-05, 0.0005419418284951526, 0.0034918294259466192, 0.00010485739317459401, 0.00011399748082818807, 0.00926596957120128, 0.0010323626238475938, 0.003083237071712876, 0.0007471643098980736, 0.0014608438196696675, 0.004003201200830355, 3.612093680945486e-05, 5.744309607419617e-05, 0.0031767460263896477, 0.0002195336236536354, 0.0008912119506404506, 0.0005969529812591723, 0.0007571565699879628, 8.642178224511351e-05, 0.0006128031785724944, 2.2189815249957756e-05, 9.523653521548515e-05, 0.00010026811315861068, 0.0009593699208710176, 0.00034832235977122743]
部分实验图像:
程序循环运行100次的结果:
最优解集合:[0.0004738494722786273, 0.0003862927811268219, 0.0007639737457090109, 0.0008741765763545843, 0.00022991964167190756, 3.4608931515486194e-06, 0.0026669641095872373, 6.0331398871587956e-05, 0.00010118865422477228, 0.000555433162175806, 8.537028630103117e-05, 0.00018535207692753662, 0.001442565593463861, 0.0001592667206935548, 0.0003140184023948398, 0.00042053217599415083, 0.00015252068137215887, 0.0003460453338103079, 5.217007674595978e-05, 2.3818114711352777e-05, 0.0003363139848564339, 0.00045500838068852526, 0.0003830558842369261, 0.00041827410507839233, 2.4954024851317322e-05, 5.637285509842888e-05, 0.0019743055958021233, 0.00025980236211493884, 0.0014710940194077504, 0.00024602892535276216, 0.0006505513023889807, 0.00011656443299155639, 0.0005279748817334872, 0.001706447698999263, 0.00013594110138601858, 0.00024290978138286025, 0.00021080976847014405, 8.561767031556114e-06, 0.0001033258406829597, 0.001010870492783533, 0.00013891045823999996, 0.0014222387289262559, 0.0009066376655583419, 0.0001225631806620372, 0.001026644772984721, 0.0003648349363964535, 0.00020938222262520823, 0.00039635439787142127, 0.00015369234282283339, 2.8085045732958566e-06, 0.0004083706206529866, 0.00046566059837057527, 0.0011616055245940852, 0.0012678791887769296, 4.7996755345936175e-05, 0.00022370545037781573, 0.0003708411887888486, 0.0001760246393719436, 0.0010881600893248862, 0.0010618522522203141, 0.0008871708945522998, 9.357545400513715e-05, 0.0006922151819194687, 2.4850846936109963e-05, 0.0007631489817600444, 0.00031329248528776295, 0.0003491368185851396, 0.00013749782175292812, 3.8544442146931314e-05, 0.0010419377449852362, 0.0014698716543755657, 0.00012793076744657212, 0.001083662167725985, 8.324156701727817e-05, 5.431120658483283e-05, 1.778182066495877e-05, 0.00027311680978634264, 0.0008754231097245481, 0.00039373180612396297, 0.0006759981028129436, 0.00020767232376774165, 0.002363755663972754, 0.0009296488229110611, 1.104534059616407e-05, 0.0002126359583600594, 0.0005486376767882559, 5.180421072229442e-05, 0.000754359253546877, 0.00011498190698775587, 8.78162291270112e-05, 3.964435468554012e-06, 0.0005306448519848258, 0.0001377733691142977, 0.00043485156722392325, 0.00027270020291107495, 0.002044562041719163, 0.00043617392499425934, 0.0020097278581440972, 0.000216975001703309, 0.0006643384918153849]
部分实验图像:
在这里插入图片描述
正常解 f ( 1 , 1 ) = 0 f(1,1)=0 f(1,1)=0,实验结果也接近0。
程序循环运行100次的结果:
最优解集合:[1.0975860471000753e-05, 7.387960000853938e-06, 3.653984481366931e-05, 4.3582092636131205e-05, 2.1096873695060306e-05, 2.3091968741881746e-07, 1.3129932190818775e-05, 2.450151907303335e-05, 3.2568784862110664e-05, 3.5950511475174315e-07, 8.269408055013642e-06, 1.9854573422100967e-05, 0.6581162029390142, 2.5861308184202118e-05, 0.6090969150918853, 8.741454436776016e-06, 3.737366454673039e-06, 1.017360971187096e-05, 2.983944131893425e-05, 5.220605343457331e-05, 8.640192876994004e-05, 0.6166060638369398, 2.2342550028247486e-07, 8.095984883337965e-06, 5.684475419108614e-05, 2.4145075917077194e-05, 2.6388346786077107e-05, 3.355624825872016e-06, 7.698753971338321e-05, 2.9110648756429035e-05, 8.10163095882954e-05, 6.183192738900012e-06, 4.159532117640533e-06, 7.70696921200756e-07, 8.899408049523186e-06, 3.0331916008651775e-05, 2.366627866683631e-05, 6.378612969580304e-07, 2.582756029662319e-05, 5.4609064771542474e-06, 2.8191536199520123e-05, 6.904240108415398e-06, 3.874440149074106e-05, 2.3292778797097795e-05, 3.8332640105788326e-05, 4.901458037274118e-06, 4.4887652878118625e-05, 5.039725233538014e-05, 3.0172558847491556e-05, 1.0416002027336254e-05, 1.8535073717570572e-05, 9.967839056272573e-06, 5.564655310370532e-06, 2.6564681815790264e-05, 7.188941672399624e-05, 1.1424180373975987e-05, 2.9785045046831473e-05, 8.73102648125569e-06, 6.638563429681474e-06, 1.6110332182477034e-05, 3.486995272071871e-05, 0.6198580505080163, 4.765169810595047e-05, 1.622163401831026e-05, 3.205168663640398e-05, 5.073139065450367e-05, 6.6786644934997104e-06, 2.141098722963897e-05, 3.9070369003183604e-05, 4.885626600211731e-07, 7.443107053711629e-06, 1.4082595329631256e-05, 5.6950813547802315e-06, 4.304877387077979e-05, 7.031706543817867e-06, 4.707133606322581e-05, 0.6227320831337304, 4.885814743593715e-07, 9.342043977973301e-06, 3.1241925846622958e-06, 1.947565602867148e-05, 1.7413750935810842e-05, 4.2686488558220946e-06, 1.6085402752852623e-05, 1.008152150718801e-05, 1.5904683245801918e-05, 1.0289812486218898e-05, 3.434330089753717e-05, 5.768363491005065e-05, 0.6457899830558631, 3.577904722066536e-05, 3.252713281991938e-05, 1.5609807900018524e-05, 3.144330475713875e-06, 1.1261489501650291e-05, 1.0989307869240168e-05, 6.20540282471728e-06, 6.617691605056639e-05, 0.00010476498707209645, 2.5339460875314213e-05]
部分实验图像:
程序循环运行100次的结果:
最优解集合:[7.285356276116057e-06, 0.5733090530570171, 1.2203934195271276e-06, 2.438572878976885e-05, 1.0616709760742685e-05, 3.7141088312686662e-06, 1.067627284358795e-05, 1.5801814934190362e-07, 1.883560205036066e-06, 6.460179219700539e-06, 2.5808787260177473e-06, 2.4719045086989106e-05, 7.514781393606867e-06, 3.6324299589276116e-05, 8.507034349425799e-07, 1.1612018685990098e-06, 1.96069941357622e-05, 6.888482740612244e-06, 5.573272548211581e-07, 7.315229820207444e-07, 7.077131919536176e-06, 3.9137675278075275e-06, 7.448771319941202e-06, 2.073141852793155e-06, 5.07766491355053e-07, 2.5972653782283703e-05, 2.0372096243551727e-06, 3.0620741490401775e-05, 1.3284035184552781e-05, 0.586700030316749, 8.923199530961109e-06, 5.299968336023008e-06, 1.0254497332053922e-05, 1.2818903132085817e-06, 5.636153670854562e-07, 3.150199207160238e-05, 2.4003533447412545e-05, 0.5827425940005779, 4.430505549995297e-06, 3.6990781757717207e-06, 1.161947465325384e-05, 3.124198183658078e-06, 1.9248636184850073e-05, 2.1171779605416723e-05, 1.660545832327546e-06, 4.1223090530677174e-05, 5.160768946700267e-06, 1.7249233085266935e-05, 1.5308476781428204e-05, 2.0924625512882018e-06, 1.6674070323456466e-05, 1.7275117928999397e-05, 5.041317945282443e-07, 5.4844537337865094e-06, 0.5929970135913135, 9.7671505184026e-06, 2.090839684019443e-05, 0.5915221074041714, 7.440822055166916e-06, 1.0913115499983308e-05, 5.458090450237227e-07, 1.791085570585587e-05, 2.8218048907740894e-05, 5.791650832248885e-06, 4.949915995408414e-06, 6.716742081075784e-06, 2.056107529867027e-05, 1.0582409772660975e-05, 1.6959090688842325e-05, 9.410638326234884e-06, 2.0242744343813904e-05, 2.794474026794977e-07, 3.31845615828033e-05, 2.9352727002391065e-06, 5.2437217791117395e-06, 6.624777668578139e-07, 9.488909450319884e-06, 1.6643308195607225e-05, 1.4989144133147825e-05, 4.270988757752817e-06, 2.347255619528798e-05, 4.581553692476368e-06, 1.5814477877183727e-06, 1.2386167137857146e-05, 3.7278285813305393e-06, 2.3194863703443332e-05, 4.842862944717168e-06, 1.4115212153715243e-05, 1.3569676490388857e-06, 1.7218748685153712e-05, 6.870560201399819e-06, 1.9354837041443337e-06, 8.729704848721963e-07, 0.5737604786492598, 6.8516554483529545e-06, 1.420892507319392e-06, 8.926872397542995e-06, 3.0240702342556233e-06, 2.1590502162344152e-05, 5.548738005577509e-06]
部分实验图像:
正常解 f ( 3 , 0.5 ) = 0 f(3,0.5)=0 f(3,0.5)=0,实验结果最优解和最优位置也接近0和(3,0.5)
但也会出现极少数偏离的值:0.6581162029390142、0.5737604786492598等
程序循环运行100次的结果:
最优解集合:[3.0027061487086617, 3.005174365711244, 3.0046996903438745, 3.0016789615290875, 3.0130218278507606, 3.002144956100579, 3.00535695579559, 84.00010898462149, 3.002584846917305, 3.0010339394467165, 3.0011941412838556, 3.0054289821973565, 3.0040943326146428, 3.0115508399845616, 3.0019671031204878, 3.0081769721478113, 3.010180084292071, 3.0007082733438333, 3.004100131386896, 3.000000477892534, 3.0003656361296223, 3.001420088904084, 3.0007423000511855, 84.00271852046903, 3.0146626234241847, 3.000166048171132, 3.002320719626206, 3.001557694881318, 3.0048677411152296, 3.0012415697140464, 3.005657453086949, 3.0026153590711195, 3.000428366712015, 3.001250881091141, 3.00078219214001, 3.00246156572731, 3.0045229692831876, 3.0012040702061245, 3.000621906744211, 3.0008075805410703, 3.0009225309352523, 3.00377868482596, 3.0028623257067273, 3.0030415150647634, 3.00310029621088, 3.0066473226890422, 3.002448418096668, 3.0009438276284226, 3.000961467166474, 3.0002160762938272, 3.0005446347690574, 3.000856484407298, 3.003766715699539, 3.0004531907301257, 3.0040038981914634, 3.0017629913265624, 3.014021794659537, 3.002606627341283, 3.0030990249192064, 3.0020132676817344, 3.0000975653972954, 3.0012195303256473, 3.0035755321521376, 3.0100907095993237, 3.0000641199960456, 3.003149532329951, 3.0067311145688342, 3.0032952564988684, 3.006275397013299, 3.0056567067995252, 3.0039468596242376, 3.0018538939022346, 3.0031328362366256, 3.0102433663782295, 3.000892831245677, 3.0066382533723135, 3.0025280234791354, 3.0042264879991425, 3.0026610443541975, 3.00232855237995, 3.000097410872381, 84.00282230157137, 3.0058692036621353, 3.0007169896389905, 3.0092248229989194, 3.0032546422525175, 3.0016039225874507, 3.000334135322752, 3.0063309199689, 3.0020434376368534, 3.0018209057628584, 3.0002251636511463, 3.001454009524457, 3.0009795179513477, 3.000740594181979, 3.004098316640839, 3.000680038365779, 3.00139441775399, 3.000439795815934, 3.0021169274940243]
部分实验图像:
程序循环运行100次的结果:
最优解集合:[3.0028383359002992, 3.005276699548814, 3.00106086770872, 3.0016131695259674, 3.0019524478824215, 3.0002646105504187, 84.00531924427669, 3.000528592110529, 3.0006530203138113, 3.000208554837832, 84.01110167183276, 3.0001633302525077, 3.0006490218106836, 3.0043781740039597, 3.0006613797255155, 3.0009124084763714, 3.0075052159810056, 3.0012816930316824, 3.001108164951375, 3.00155935279628, 3.0029900273328116, 3.000194402307134, 3.005124401205367, 3.005386068367189, 3.0016836624576575, 3.0009466572428476, 3.005525082320561, 3.000677907881343, 3.0001411208913984, 3.0014534707062914, 3.0012196477749695, 3.002174774286986, 3.000274031609131, 3.00030601777304, 84.01439408201894, 3.0001254732988203, 3.000848962275462, 3.003810463528297, 3.000846931953176, 3.000666439665735, 3.0011160738212475, 3.0003308669087407, 3.0011053724212187, 3.0000557689887657, 3.005184822839083, 3.002305052543673, 3.001557151558097, 3.000760012178613, 3.0001914263734832, 3.0023080383603378, 3.000577525866686, 3.0000448231753167, 3.000843671022888, 3.0027794175900357, 3.001503316122785, 3.0004502496764607, 3.0002255711033943, 3.0012430674602215, 3.0008989249716054, 3.005508890463924, 3.001047750938716, 3.0007825732292464, 3.000359173010481, 3.0042922721936343, 3.000029017563281, 3.0014748266591793, 3.00218814589512, 3.000940364944334, 3.0000517416162453, 3.0036500456553843, 3.0001299518980047, 3.0009048493947104, 3.000059191243076, 3.001097587916277, 3.0015773408807274, 84.01106110275684, 3.0005370230963813, 3.000311904929091, 3.0029329767919886, 3.001094227887004, 3.000929400055332, 3.005828329202493, 3.000274137732943, 3.0000399350316327, 3.001325886925323, 3.002510436638437, 3.000078405865807, 3.0008665963553356, 3.0006397944143837, 3.0003357573883944, 3.001191367810098, 3.000538434091682, 3.0028741560839496, 3.0002264712909104, 3.0023837636347466, 3.0039176189557253, 3.0006041971421507, 3.004629678543273, 3.002305271936778, 3.001834445259877]
正常解 f ( 0 , − 1 ) = 3 f(0,-1)=3 f(0,−1)=3,实验结果表明最优解和最优位置也接近3和(0,-1)
程序循环运行100次的结果:
最优解集合:[3.188898771918111e-05, 1.9089483279724575e-06, 7.11721507830587e-05, 1.2295649432539894e-05, 2.9047157429858078e-05, 1.7985212894162475e-05, 6.6775853176376915e-06, 1.645786545905858e-06, 1.6000737939674762e-05, 3.431977620347251e-05, 7.171473556531434e-08, 1.1173246820080596e-06, 5.561646378646516e-05, 5.275693783060298e-06, 4.959609773397918e-05, 1.9304602083436896e-06, 2.2726542514713677e-05, 5.0393934745047924e-08, 1.8619333332410467e-05, 2.154897329385117e-05, 1.5002223557492132e-05, 6.850869209858587e-05, 3.399297430013923e-05, 1.5933591804976313e-05, 7.5218837604352685e-06, 2.823957763227304e-05, 2.347409518749385e-05, 8.916576840581224e-05, 6.877180823090857e-06, 7.18546817829052e-05, 2.0111160320240052e-05, 6.3978393582074145e-06, 1.816020653324953e-05, 3.0009381979163032e-05, 2.9023593644146942e-05, 5.6790959725383756e-05, 3.919343876921693e-06, 9.361190531840116e-06, 2.2699397513252096e-05, 1.1284059865830248e-06, 8.947528055534274e-05, 6.015146502179612e-05, 2.764105200663955e-06, 1.7537119591434807e-06, 1.9376303608969182e-05, 0.00012076106650142784, 2.8025878207451076e-05, 5.668253050468734e-05, 5.480692221492805e-05, 0.00012000308152316296, 1.3732066221659968e-05, 6.04283401125636e-05, 6.23240160646106e-05, 2.266064718819474e-05, 3.624880909788495e-05, 1.2536228893370945e-05, 4.478791039197743e-07, 5.544370586841982e-05, 5.282932600366241e-05, 4.6624094521924155e-05, 7.663288104920777e-06, 6.728739282613257e-05, 1.0349149558558157e-05, 8.912101767386949e-06, 2.385104158379257e-07, 1.5115556501988294e-05, 3.645217188478124e-06, 4.5537909143840656e-05, 4.014848172267112e-05, 5.4289866054765874e-05, 6.812108603480625e-05, 3.68584090779174e-05, 6.614601097006785e-06, 1.7519732277120705e-05, 1.554311263776365e-05, 9.847526146989806e-05, 4.932874779055854e-05, 4.110987442653873e-05, 1.618986507440311e-05, 3.247167855649911e-05, 6.1253076619900275e-06, 6.76684042608222e-05, 2.8917751184715445e-05, 7.400983976018258e-05, 4.1112574587419984e-05, 2.4248332046466788e-05, 0.00013197994979268756, 2.4036721869913676e-05, 3.0283043520598886e-06, 4.32485289253767e-05, 8.849980978536562e-05, 2.2159065639191647e-07, 3.7292383060353716e-05, 1.7875636148971412e-05, 2.491034913587211e-05, 0.00014876130241708562, 1.626836514490978e-05, 3.7911100753626133e-06, 5.7889901377914116e-05, 4.7937895956503784e-05]
程序循环运行100次的结果:
最优解集合:[1.7769468173895768e-05, 2.9976165286783333e-05, 4.6222445462169585e-05, 1.743202196663719e-05, 3.840111281004855e-05, 5.873038776344691e-06, 2.1949743181612333e-05, 8.25394150036653e-07, 9.98007442476754e-06, 2.1887973978729275e-05, 1.2364300456431176e-05, 2.587961334924705e-06, 9.625890734238128e-06, 6.718397967678596e-06, 6.3336861393157e-06, 8.284525017993678e-07, 1.870068147583367e-05, 7.857902036128396e-05, 1.9790545777926117e-05, 1.6071535720269346e-05, 2.479393194123994e-06, 3.952790041245041e-06, 6.39048324291096e-06, 1.356905384954851e-05, 1.0167568843991845e-05, 7.928766491829096e-08, 2.1245937784820254e-07, 3.3539038285878976e-05, 3.2396428790004994e-05, 2.0112691925079183e-05, 4.39460323952597e-06, 2.170307161825292e-05, 3.648223175622675e-06, 1.7044565873063503e-05, 1.194792679637261e-05, 4.749663488239971e-06, 1.4607060226632739e-06, 1.0899782370381859e-05, 3.4855602178283467e-06, 5.245983743850389e-06, 7.094516432073004e-06, 3.283976506129177e-05, 3.421447189786646e-06, 2.6519056157279437e-05, 1.710212212893876e-06, 3.3498703828299604e-06, 3.1887047751556547e-06, 3.7707915191340987e-06, 3.6060473388523653e-06, 8.717288169060211e-07, 5.497317245145391e-05, 1.3370112582828772e-05, 1.5874427553875006e-05, 3.006181414116811e-05, 1.4447620676508645e-05, 1.7249006801415524e-05, 7.193937727028125e-06, 1.775279648483417e-06, 5.703408957227744e-06, 1.913596086685452e-06, 3.5018350708790604e-05, 9.330354409526178e-06, 5.068437114881583e-07, 5.685966274805006e-05, 3.216878493342793e-05, 3.9763276966675726e-07, 4.8453675913951116e-05, 5.742814527086718e-06, 5.226845632828179e-06, 1.936068716617949e-06, 1.0903232138219272e-05, 8.807355637262934e-06, 3.366878625524112e-05, 4.243780614074445e-05, 8.357239889312947e-05, 2.418458212509328e-06, 7.824260882285762e-05, 8.555256559902513e-07, 2.70181319088957e-05, 6.801346691330256e-06, 1.8607310838902537e-05, 2.954291941471309e-06, 6.234771044041259e-06, 6.802091416383194e-06, 7.294831135258052e-06, 3.338195747569861e-05, 1.3552463273947067e-05, 1.6300981396060953e-06, 3.2861935244132467e-05, 1.877408564845399e-05, 3.923800605254286e-06, 2.170363033262326e-05, 4.4478783079820616e-05, 4.134112533272677e-06, 2.146267937390144e-05, 8.475317412794048e-06, 7.399640844123754e-06, 1.7515414180230287e-06, 2.822714654342491e-06, 3.7103779902458285e-06]
部分实验图像:
正常解 f ( 1 , 3 ) = 0 f(1,3)=0 f(1,3)=0,实验结果显示
程序循环运行100次的结果:
最优解集合:[5.088458692241969e-07, 3.400432147589216e-06, 3.2831827314461275e-06, 1.2045323527114587e-07, 8.33420859691e-06, 2.4009196469733684e-06, 9.405577651220659e-07, 3.5085188167891394e-07, 2.097814509985133e-08, 7.223556160995247e-07, 5.2201917400631655e-06, 2.004599183768814e-06, 5.995256947938611e-07, 2.0284107778088245e-07, 3.994916861604711e-07, 1.6212317085454791e-06, 1.6394469059350246e-06, 1.3115849815840846e-06, 2.4466809344988197e-06, 3.374878474443378e-08, 1.3586578189361411e-06, 2.2470036849343503e-06, 4.2585494342801895e-06, 9.479234162937022e-07, 1.5151392201822714e-07, 2.2187120719195e-06, 9.544948171918213e-08, 3.8003243744467154e-07, 8.017040857848325e-07, 2.714947647629081e-07, 1.890630051291816e-07, 8.111000840009009e-07, 5.946272531683756e-07, 6.100862802738509e-08, 6.344735271304751e-07, 2.958705926741793e-06, 1.0569167519000588e-07, 7.559882413361413e-07, 4.3616536354976693e-07, 2.1761803359898994e-06, 3.8239855423379844e-07, 8.154734226905237e-07, 3.4497591730612265e-06, 3.8606470393792013e-07, 3.389402646023791e-07, 8.347823377812386e-07, 8.451710515443973e-08, 5.19405188402955e-07, 8.518753795308055e-07, 1.241583446505166e-07, 1.5603739776535006e-06, 2.5535030768481704e-06, 2.783111658220273e-06, 2.231901969278643e-07, 3.9883069046567843e-07, 1.9057991322817988e-07, 2.1573703979785856e-07, 1.5746193460354617e-06, 3.7092964929040503e-07, 2.0263807271895014e-07, 1.3674012275839574e-06, 1.739131075003827e-06, 2.2859948703793274e-08, 1.129835959703733e-06, 4.1372749273787215e-07, 7.062792479017986e-07, 2.0117518777399525e-06, 9.63856252076672e-07, 1.1413852522868848e-06, 5.186841384990303e-07, 2.1704669372276852e-07, 5.495029897328262e-07, 1.7344884171379163e-07, 9.536172130398316e-08, 4.859168745919702e-07, 1.0014659028285819e-06, 1.8701507259578928e-06, 9.921680680050528e-07, 3.842505058759282e-06, 1.13231816717309e-06, 1.000462517176909e-06, 1.0112263761901378e-06, 2.4946433343872343e-06, 1.4586335160137388e-06, 4.521255932770241e-07, 9.705635741752912e-08, 5.193014522893541e-07, 8.478492216075925e-07, 2.2450986213414473e-07, 7.075277268976542e-08, 1.1453542584275375e-06, 1.3329554059473662e-06, 2.6968297558145975e-07, 4.536477763460899e-08, 1.447193905616417e-06, 2.5291687561504466e-07, 9.573319834701995e-08, 2.95882615086619e-07, 1.3121506387736195e-06, 2.339815210215645e-08]
部分实验图像:
程序循环运行100次的结果:
最优解集合:[1.7653476542937308e-06, 9.894917367643116e-07, 5.932926059048843e-08, 5.558976186348288e-07, 5.775501256392888e-08, 7.158037257519735e-08, 3.326023024291195e-07, 3.5551912041733116e-07, 3.8142579609881846e-07, 6.950803888488818e-07, 2.8620927888119516e-07, 2.2917813976730964e-07, 1.0130308823840877e-07, 2.3175423603512165e-07, 9.108592500326523e-07, 3.393186022142579e-07, 1.785445387975053e-07, 2.2456674835701688e-07, 1.0807156807414118e-07, 3.57919416567463e-07, 1.4590722418338706e-06, 7.259743502185722e-08, 1.4621532043474752e-06, 1.9734888663028514e-06, 1.7606621317270958e-07, 3.447842761389851e-08, 1.470853674532899e-07, 5.571650917156661e-07, 2.0728632881443513e-06, 8.958307771728219e-07, 1.4629573507178379e-07, 5.45368780286418e-07, 2.2038323463728048e-07, 5.664606799555189e-08, 9.371634801584225e-07, 5.49639169458581e-07, 2.087639314557164e-06, 3.178171370196219e-06, 1.3767198429095474e-07, 5.332909404438404e-07, 1.81607790182317e-06, 1.8951422546430342e-08, 2.0331971472196553e-07, 6.269148202703952e-07, 3.2708630375557603e-07, 5.112677894053118e-08, 1.9784732378603373e-07, 9.874483811158099e-07, 1.2309014487703355e-06, 1.8265310278230575e-07, 2.1179135782697724e-07, 7.236675899837214e-07, 1.9784386448359098e-07, 1.2693899012680433e-06, 4.884938236702087e-07, 8.500105347777244e-07, 5.028900593708644e-07, 3.3653043181438876e-07, 3.494783552117245e-07, 1.1799914071340293e-08, 3.292731360093955e-08, 3.5222519694977816e-07, 8.591533526356952e-07, 5.971578177915427e-07, 2.6059079398542548e-06, 5.29966052528716e-07, 2.0125197735579307e-07, 1.1178128201987299e-08, 1.2032777551154627e-07, 4.0045262127582696e-07, 4.3312789550143525e-07, 4.48176088036006e-08, 1.9140855671887307e-07, 2.463636937864757e-06, 7.66627294870869e-07, 6.801521948463678e-07, 2.1946378057789229e-07, 3.06563038465662e-07, 4.784866469272086e-07, 7.650781826377882e-07, 3.5920066020600873e-07, 1.2475972618822098e-06, 3.677970261415513e-08, 1.1911195198669472e-06, 7.56377880103628e-07, 4.874118077299787e-07, 3.461430190633664e-07, 8.42086868139358e-08, 4.548537098376006e-07, 4.1476786128530274e-07, 5.713249997747323e-08, 4.783488405302344e-07, 6.618020255833277e-08, 3.8670227577564155e-07, 5.1765812205544345e-08, 3.2174286738252944e-07, 3.38848607530439e-07, 7.736583231454598e-08, 5.284696134084993e-07, 1.1253666003396584e-08]
正常解为 f ( 0 , 0 ) = 0 f(0,0)=0 f(0,0)=0,实验结果显示最优解和最优位置也约为0
程序循环运行100次的结果:
最优解集合:[2.932287853476996e-05, 3.7136589900230515e-05, 0.0003149223318812421, 0.00010547765019271718, 1.6097455648792824e-05, 0.00024365636197950114, 6.402842607394492e-05, 9.597730297538699e-05, 2.9780263896300228e-05, 0.00011943615647531057, 9.527861381660669e-05, 3.095786753673754e-05, 5.327392580929164e-05, 7.402505323867769e-05, 0.00025394201205774006, 5.002296297987266e-05, 0.00016545071983362075, 0.00013400310894438089, 3.226912077146075e-05, 0.0001381911260334574, 0.00026319511566582845, 0.00010062452434349118, 3.7731386608443354e-05, 0.0003453868407241506, 3.9490207161747625e-05, 4.8445587236518284e-05, 0.0002654750819526906, 3.235404819135936e-05, 8.965372880609266e-06, 7.847065762930239e-05, 6.478857333915484e-05, 2.0058991669268607e-05, 4.3434081963010006e-05, 5.6902277293594314e-05, 6.819153723728977e-05, 0.00015080961917025734, 2.0011365702268136e-05, 0.0001388546450497552, 0.000113815832190197, 3.515056173427999e-05, 0.0001859648186126658, 0.00010118989984435656, 2.5439887808224962e-05, 2.601346978072886e-05, 0.00011924154952230898, 3.5726519165113355e-05, 0.00041120268764804717, 0.00011174875420042934, 6.107606855677337e-06, 3.7254671717497666e-07, 7.779669266265798e-05, 2.233393051811168e-05, 1.9435808509501956e-05, 0.00012131603165184301, 1.214414035425827e-05, 7.933227649336254e-05, 1.445470290699553e-05, 1.5056957243048234e-05, 0.00013559541520856877, 4.682966670645117e-05, 7.220906181653213e-05, 0.00010254152365727316, 3.404361543743473e-05, 0.00015566251468881591, 0.00025242970054458396, 0.00028650022739920057, 7.934318707627427e-05, 7.511820608057805e-06, 1.3154283033940973e-06, 5.6555255963450904e-05, 8.221839970644632e-06, 3.249083877696631e-05, 1.0157858993180133e-06, 3.0985471368660475e-06, 0.00010363012434375367, 0.00025082683993254344, 2.6636162203409003e-05, 6.840077546835934e-06, 0.00046719414562036514, 2.9831978747125574e-06, 7.4435685200741225e-06, 1.0644396600879638e-05, 1.352366216716384e-05, 7.788917944883296e-05, 0.00012516439167181205, 0.000124232157952992, 3.186157159653822e-05, 0.00015346051301600306, 2.6599595146588635e-05, 2.3238996557107462e-05, 6.565410305290461e-05, 0.00022813882282809273, 0.0001398097894417107, 0.0006575433853277053, 4.709531602925287e-05, 0.00010466718215493443, 0.00015547358358665352, 0.0001008603936673639, 0.000390689054103208, 8.057575847509654e-05]
部分实验图像:
程序循环运行100次的结果:
最优解集合:[9.777267022614178e-05, 5.28780808017963e-05, 1.2251209912783826e-05, 2.7203678678719306e-05, 2.8560065539908746e-06, 2.2727918925318177e-05, 4.0403906915568413e-05, 2.1027819681200748e-06, 2.6966817155486783e-05, 1.7486604705772905e-06, 1.4846096129588842e-06, 9.664263619200755e-05, 3.243979856292457e-05, 7.692489386184806e-05, 5.896260199885417e-06, 4.925149675326006e-05, 3.7818238002663153e-05, 4.391296765132956e-05, 2.4389920917145056e-05, 2.1105724122022556e-05, 6.188257237900509e-05, 1.3043682053213679e-05, 1.3088598874721435e-06, 1.6390601458429827e-06, 4.4240863561358554e-05, 1.1064888509181824e-05, 6.329302942064395e-06, 1.996719962104701e-05, 1.360644821398584e-05, 9.232278820142522e-06, 1.0521802638632743e-06, 0.00027414409586174105, 9.143502660732067e-06, 5.214123073019943e-05, 6.457679437776085e-06, 6.54871992992561e-05, 9.43945096323893e-05, 6.8877565777795e-05, 0.00010191096001435616, 1.0650063488248858e-05, 4.609074374397286e-05, 7.040482071131069e-06, 0.00012197346801969607, 4.954699950982574e-05, 1.0188067592325557e-05, 9.867576863825156e-05, 1.127761229741461e-05, 2.9387243168690592e-05, 7.154747748252563e-06, 9.649589228747377e-05, 3.530850386526018e-05, 6.127328752707178e-05, 0.00013062020710038913, 4.901822830157125e-05, 0.0001253203114061882, 2.0184750389125954e-05, 3.241419280962988e-05, 0.0001278835416745051, 5.135651939794345e-07, 3.7767005764367193e-05, 1.5973979869977422e-05, 5.9803157604080174e-05, 9.968904344411812e-06, 0.00014707925975598256, 7.740486975420113e-05, 1.065687460230824e-05, 1.5590761514741915e-05, 3.3928055452805174e-05, 7.941400754313889e-05, 2.0429450905498158e-05, 1.2135395026539652e-05, 2.1613690448187635e-05, 5.020298370542492e-06, 0.0001035383669994737, 2.2095286049867706e-05, 5.310688921477251e-05, 4.999644024504601e-05, 0.0001216387808447254, 2.2268184432851513e-05, 6.145478502011801e-05, 8.598933834737985e-06, 2.8555039615090068e-05, 2.328437940876023e-05, 4.748885827064812e-05, 1.658039485931771e-05, 2.9893451836505357e-06, 4.3257328515014314e-05, 0.000248850087979813, 4.311448352948285e-06, 5.478276993651638e-05, 2.793662451269039e-05, 3.57879579990073e-05, 5.2962443132443316e-05, 2.1856777551270456e-05, 8.719909544590825e-05, 4.0947437031780834e-05, 4.285243043270432e-06, 1.9192731436556957e-05, 3.8139937145334935e-05, 0.00011940608306939098]
部分实验图像:
正常解为 f ( 1 , 1 ) = 0 f(1,1)=0 f(1,1)=0,实验结果也接近于0
500代比1000代效果要差点。
500代会出现些偏差稍大的,0.000390689054103208、0.00011924154952230898、0.0003149223318812421、0.00010547765019271718…
程序循环运行100次的结果:
最优解集合:[3.880627298449207e-06, 1.794016375018336e-05, 1.4039641569016266e-06, 2.7240260559774552e-05, 1.2562082443529208e-05, 1.59089795875993e-06, 2.8393192587670403e-06, 1.4030482452617256e-05, 7.97745956655524e-06, 1.3495588799173037e-05, 1.2128252797189975e-05, 4.314201862512457e-06, 1.596859120615157e-06, 3.401241369219472e-07, 2.825560081193969e-06, 7.349242415667825e-06, 4.632420796396615e-07, 2.822624227393206e-05, 4.409316256807315e-05, 3.0012587915789264e-05, 6.799858213176296e-06, 4.411357240226619e-06, 3.8111071360156624e-06, 6.359765578279906e-06, 4.668374669176099e-05, 1.0064572428397157e-05, 1.5496810650666584e-05, 1.2404425423384199e-05, 3.510944191264467e-05, 9.52557674347457e-06, 3.5199427522613415e-07, 9.67105719824073e-06, 6.339857709767897e-06, 1.729240029791585e-06, 4.675076263701444e-06, 6.507015725539332e-06, 2.2297116520826996e-06, 1.8525063354029555e-05, 1.077748136802896e-05, 5.3660175340596946e-05, 1.1414525984514335e-05, 3.7585575776146868e-06, 2.5061495327802476e-05, 5.981333953338193e-05, 1.2147676702463356e-05, 3.2110407056546396e-06, 1.1928513818364431e-05, 0.2987185430412056, 9.833382354812482e-07, 4.263999275954448e-06, 4.162498489759624e-05, 4.818376932678077e-06, 1.884457577028254e-06, 6.025652672376364e-05, 2.667673746429962e-05, 2.6332506654565004e-05, 6.075047276862265e-06, 7.8485447335668e-06, 4.342494368084651e-05, 1.7138312236505078e-05, 1.5026508033396216e-06, 1.517250436685015e-05, 1.08305859925171e-06, 2.7354717824182327e-05, 6.488913876855543e-06, 5.695498541742554e-05, 8.81612051097046e-06, 9.99491448258636e-06, 8.089952958189646e-06, 7.64838334000173e-06, 8.069664719908128e-06, 2.2612904929794984e-05, 8.89964490027266e-06, 5.973666337670713e-06, 1.5768088395504315e-06, 1.3633424447832895e-05, 4.3000763133016525e-05, 2.9195411784629762e-05, 3.6885553862486316e-06, 2.726018430387776e-06, 6.0862359285449e-05, 8.302797508019975e-06, 1.6694725385741162e-05, 1.644698427755722e-05, 1.5922022253271973e-05, 1.066298031926411e-05, 3.100357949145182e-05, 4.268304867897264e-06, 1.3089413486046266e-05, 7.323346740615305e-06, 3.53749955494658e-05, 1.740167659366897e-05, 1.1990366090196368e-05, 4.6873289906375995e-07, 2.598414279914027e-06, 1.2070374650340483e-05, 1.0047830200953148e-06, 0.00013457351585202491, 2.921479522580282e-05, 1.8322712533190418e-06]
部分实验图像:
程序循环运行100次的结果:
最优解集合:[2.4134076053411578e-06, 8.281687514047212e-08, 2.7368581348334994e-07, 1.0631864129276552e-05, 8.282869134111893e-07, 5.185449906108059e-06, 2.43931343926475e-06, 3.1766599262495716e-06, 8.10782957959306e-06, 6.403548466459015e-06, 1.692243629253882e-06, 5.249245961265049e-06, 3.0722529582614e-07, 9.72574947439957e-07, 2.730404867897038e-06, 7.3281927413832394e-06, 6.74641389517095e-06, 6.588355852244749e-06, 8.378699493660328e-06, 5.064302082321713e-06, 8.419483221498833e-06, 1.2021324140724327e-06, 5.01946989618145e-06, 5.510483694275872e-06, 8.499706137030515e-07, 5.53293309813877e-07, 1.970249128167431e-06, 1.210331956348972e-06, 2.081630142080487e-05, 4.427306940991648e-06, 1.9416860702474887e-06, 0.2986385237915954, 1.1219036452403574e-05, 1.2939648655378271e-06, 5.664478117078584e-06, 1.227943925797988e-05, 1.140060821679851e-06, 9.513043722419662e-06, 4.753314219638483e-06, 1.919023247057054e-06, 7.682453032364556e-06, 6.166494535978734e-07, 1.5604374509231886e-05, 3.585512617095958e-05, 3.916293187397055e-06, 2.7097481258429495e-06, 2.631779313474894e-06, 1.2866298051650284e-05, 2.3057986133177707e-06, 5.162018081638978e-07, 1.9480644876440483e-06, 1.0031025149579192e-05, 1.3067134047336737e-06, 3.6929192020164674e-06, 1.149106793543145e-06, 1.586150981613645e-06, 4.460548808972359e-06, 8.985906691220583e-07, 5.543059366698859e-06, 1.0248601520165526e-05, 2.129146310946914e-07, 4.857218356117162e-07, 3.1029872615803497e-06, 4.2320141558431706e-06, 7.562398453935448e-06, 3.377843981587249e-06, 1.8382168836706315e-05, 5.682613017679136e-05, 2.531727854353915e-07, 3.9970494161547696e-06, 1.857583467091328e-06, 3.753138229123777e-07, 1.5472822172494245e-06, 7.673483854814791e-07, 7.267133014545478e-07, 1.0106352169786479e-06, 9.583925882448564e-06, 2.304604936281371e-06, 1.2035557033724091e-05, 1.4342369223071643e-06, 6.714455853069185e-07, 3.691461804555244e-06, 1.7326457887500015e-06, 3.2724230129891467e-06, 7.015770355289911e-07, 3.591123869168607e-07, 6.552139485916194e-06, 1.259061819303265e-05, 1.6424689576795822e-05, 8.518991747304147e-06, 1.1253854564780781e-05, 2.903387037624155e-06, 2.1856668528300734e-06, 3.282210494845397e-06, 5.502087123519716e-06, 3.9963318072568847e-07, 8.759489465534698e-06, 3.940552977816251e-06, 2.4624859061266967e-05, 1.518961397346798e-06]
部分实验图像:
正常解为 f ( 0 , 0 ) = 0 f(0,0)=0 f(0,0)=0,实验结果解也无限接近0
但也有很少部分的偏差,0.2987185430412056, 0.00013457351585202491,0.2986385237915954。
程序循环运行100次的结果:
最优解集合:[-0.999993853859007, -0.9999853179731727, -0.999970526707484, -0.9999833907502506, -0.9999899640426287, -0.9999749374930914, -0.9999968028686498, -0.9999920188807893, -0.9999998768547127, -0.9999973050804503, -0.9999890860628377, -0.9999675290665957, -0.9999881891949592, -0.9999973573364508, -0.9999617407619932, -0.9999841996495714, -0.9999869148914492, -0.9999965533203267, -0.9999979517169364, -0.9999807761251867, -0.9999840004058683, -0.9999989253871704, -0.9999835457134147, -0.9999915787910517, -0.9999960232338769, -0.9999743524800685, -0.9999992129898493, -0.9999889471759963, -0.999990854434558, -0.9999852404006568, -0.9999770958045321, -0.9999935856560263, -0.9999975120059394, -0.9999963849711491, -0.9999901375540867, -0.9999844681709474, -0.9999897433642218, -0.9999991362953526, -0.9999954500029143, -0.9999717517688315, -0.999982305834936, -0.9999995761901384, -0.9999960644353603, -0.9999895736882707, -0.9999469581478756, -0.9999984206235104, -0.9999927843221822, -0.9999724799482607, -0.9999899584890547, -0.9999999412785647, -0.9999848620898982, -0.9999370506505072, -0.9999918801360993, -0.9999626739985762, -0.9999878639481637, -0.9999746784112762, -0.9999895747866362, -0.999979353121283, -0.9999993959956482, -0.9999413796149903, -0.9999693817531181, -0.9999999094175862, -0.9999877206347905, -0.999992046500884, -0.9999703958831931, -0.9999831747925023, -0.999998375387514, -0.9999800051820478, -0.9999670057031279, -0.999991793086032, -0.9999893386693712, -0.9999932574048767, -0.9999827267850815, -0.9999968359336726, -0.9999971584744126, -0.9999967213134553, -0.9999924336857372, -0.9999736321229095, -0.9999951191986465, -0.9999883907205094, -0.9998630681689655, -0.9999930978955571, -0.9999870366249668, -0.999983343916409, -0.999999058649327, -0.9999931126359919, -0.9999914779857364, -0.9999847094305525, -0.999993401751805, -0.9999916192008004, -0.9999840670820204, -0.9999992108374921, -0.9999961781544544, -0.9999981742956063, -0.9999919097108272, -0.9999778176034976, -0.9999831616061806, -0.9999990996208701, -0.999986326463422, -0.9999931308243394]
部分实验图像:
程序循环运行100次的结果:
最优解集合:[-0.9999986165246563, -0.9999994966254112, -0.999996240851313, -0.9999974295896553, -0.9999994339946009, -0.9999997833301226, -0.9999844260665387, -0.9999926149194184, -0.9999962543346994, -0.9999984440308373, -0.9999999044460438, -0.9999897546068942, -0.999999780696381, -0.9999829342345298, -0.9999985715629959, -0.9999710916806339, -0.9999954269344377, -0.9999948532099372, -0.9999775199304418, -0.9999912889515519, -0.9999882477652455, -0.9999919970421296, -0.9999989052533004, -0.9999920965006194, -0.9999903004103394, -0.9999973059937373, -0.9999930867441731, -0.999997566063472, -0.9999862705579103, -0.9999947592922449, -0.9999935589590234, -0.9999985455214285, -0.9999942546594959, -0.9999942387000865, -0.9999969082136612, -0.9999992203846653, -0.9999856257899055, -0.9999956842415677, -0.9999937022940902, -0.9999993904110568, -0.9999992731756875, -0.9999879032837812, -0.9999893008742664, -0.9999997591906399, -0.9999978218615188, -0.9999999147069056, -0.9999985828479958, -0.9999987590313675, -0.999999988647978, -0.9999717688686846, -0.9999955735969694, -0.999985484029259, -0.9999750490145125, -0.9999963579521385, -0.9999967716889454, -0.9999848634062164, -0.9999981380492565, -0.9999913068200802, -0.9999940343237238, -0.9999969660064673, -0.9999907053769925, -0.9999972791812272, -0.9999987105412697, -0.999992350370751, -0.9999809369565268, -0.9999836629674486, -0.9999969273397912, -0.9999758185923056, -0.999999879429748, -0.9999813485597295, -0.999997178800081, -0.9999871190762024, -0.9999986969077651, -0.9999951691515824, -0.9999808993998867, -0.999992801880592, -0.9999967375537967, -0.9999910240411917, -0.9999938234559878, -0.9999895623236558, -0.9999983013084613, -0.9999921405967734, -0.9999910710701932, -0.9999795329075754, -0.9999958299499344, -0.9999900091414853, -0.9999951364844194, -0.9999968693209437, -0.9999902688869335, -0.9999973570507941, -0.9999997901888683, -0.999997252434779, -0.9999957779035507, -0.9999958256518648, -0.9999950586685179, -0.9999848394536658, -0.9999977684994746, -0.9999997436565268, -0.9999919171352891, -0.9999848454862249]
部分实验图像:
正常解为 f ( π , π ) = − 1 f(\pi,\pi)=-1 f(π,π)=−1,实验跑出来的结果也约等于为-1。
程序循环运行100次的结果:
最优解集合:[-2.06261164795988, -2.062610179912921, -2.06261141496543, -2.0626112326667596, -2.06261031597436, -2.0626117770205634, -2.0626088991871203, -2.062610007308285, -2.0626116808330788, -2.0626105487227213, -2.062611739952965, -2.0626088851732742, -2.0626103254249464, -2.062611769810606, -2.062610783206666, -2.0626105379157007, -2.0626105241717654, -2.062611542647841, -2.062608583539884, -2.0626106506559987, -2.0626092313189885, -2.062611597366824, -2.0626097786048754, -2.0626093238894043, -2.062609607688819, -2.0626103113986085, -2.062611478381903, -2.062611501850142, -2.0626114249919962, -2.0626117279851655, -2.0626074450474334, -2.0626095305628422, -2.0626088721605518, -2.0626104623373513, -2.0626116428346157, -2.0626114946144907, -2.0626114999851133, -2.062611720023353, -2.0626102067386882, -2.0626117037548326, -2.0626115885169867, -2.0626117953309127, -2.062610167678121, -2.0626114950161405, -2.062611683723913, -2.062611082338463, -2.0626098610305807, -2.0626111598599466, -2.062611661154612, -2.0626090974247866, -2.062607115138389, -2.0626102693017128, -2.0626110030561895, -2.062610013258724, -2.0626118703493317, -2.062611588696091, -2.0626115801535696, -2.0626105165687196, -2.0626110102867314, -2.0626116527668805, -2.062610938455697, -2.0626114171669405, -2.0626104374462715, -2.0626112349495505, -2.0626115456912504, -2.062609376047466, -2.06261133010365, -2.0626109262674523, -2.0626114103802085, -2.0626102817362137, -2.0626111355721104, -2.062610054733608, -2.06261066993803, -2.062609984254409, -2.062610724348237, -2.0626114109081453, -2.0626094381913176, -2.062610714295451, -2.062611800286351, -2.0626103668944493, -2.0626118311960413, -2.062610615042027, -2.062611549274841, -2.0626118036859595, -2.0626113011407874, -2.0626091559892985, -2.06261090184528, -2.0626110476318003, -2.0626104959371316, -2.06261168378244, -2.062611633053284, -2.0626105169537134, -2.0626116109963206, -2.062611810434865, -2.062609300794597, -2.0626109646367596, -2.062611840005997, -2.0626088330425993, -2.062609756091334, -2.0626074088854334]
程序循环运行100次的结果:
最优解集合:[-2.062611245527471, -2.0626118041258206, -2.0626117292940696, -2.062611474023801, -2.06261021297757, -2.0626110475333745, -2.062610656400767, -2.0626117956445182, -2.062611484121771, -2.062611861340505, -2.062610125118852, -2.0626113663070855, -2.0626117926498795, -2.0626110151923083, -2.0626116666812493, -2.0626114208447075, -2.0626116398003043, -2.062611345733569, -2.0626108574044424, -2.062611513864687, -2.0626118092468824, -2.0626094106740775, -2.0626117111799127, -2.0626114001701157, -2.0626105131490835, -2.0626110110184994, -2.0626117360573644, -2.0626113563315975, -2.062611596157765, -2.062610850224628, -2.0626109015841565, -2.062611590064858, -2.0626107280477157, -2.062611763657176, -2.06261129326757, -2.0626115034834815, -2.062611155027501, -2.0626117679535345, -2.0626094628812353, -2.062609975118117, -2.062611784682349, -2.062609350734797, -2.062611119488792, -2.0626117454534327, -2.0626118104773905, -2.0626115272666286, -2.0626117872170133, -2.0626116890588926, -2.0626110042128296, -2.0626116562684222, -2.062610870783129, -2.0626116080731265, -2.062611657183364, -2.0626113457141946, -2.062611625599322, -2.062611557342745, -2.0626115634790256, -2.0626115241039553, -2.062611857449339, -2.062611804477291, -2.062611274212598, -2.062611331483238, -2.0626108799420657, -2.0626104510416927, -2.062611597574916, -2.0626111194896173, -2.062609931664756, -2.0626115564984238, -2.0626111779104486, -2.0626105305186404, -2.062611823746656, -2.062611121821709, -2.0626115658429245, -2.0626114597300647, -2.062610069467362, -2.06261178402163, -2.0626111171427928, -2.062610152731143, -2.0626118600775865, -2.062611590845228, -2.062610864672688, -2.062610753743496, -2.0626111574077473, -2.0626116774435372, -2.0626117308025456, -2.062610954596701, -2.0626112573429682, -2.0626105881219656, -2.0626117287606047, -2.062611558087453, -2.062610688438608, -2.0626118615143993, -2.062611789655707, -2.0626114508279914, -2.0626113924233986, -2.0626098063094505, -2.062611403665106, -2.0626115332683845, -2.062611802961659, -2.062610924138801]
部分实验图像:
正常解为-2.06261,实验结果表明最优解和最优位置基本一致
程序循环运行100次的结果:
最优解集合:[-19.20844676245716, -9.504617297586908, -9.504643490850652, -11.069515629911596, -9.504646923206414, -8.095115507784303, -19.20800022598044, -9.504615222067992, -11.069492919705189, -19.208497534191164, -9.504644988350131, -19.20836451933687, -9.504675598473662, -19.20816648470391, -19.207883209068676, -9.504609788250926, -19.208501682485313, -19.20821401909786, -9.504620117472513, -9.504635751198519, -11.069418574658796, -19.20795388598183, -19.20841816269424, -19.20837394034454, -11.06954082691926, -19.208402713922275, -19.208452517407313, -11.069510672671058, -19.208249201918115, -9.504635939886082, -9.50463642812324, -9.504096913711011, -9.504662493204782, -19.20848675443884, -9.50457015279695, -9.504662447635505, -9.504630418582975, -19.20844827202697, -11.0695506582525, -9.504636084335134, -19.2081424726873, -19.208499752234054, -19.208220458073498, -9.504557365926889, -11.06952511218209, -9.50446318342142, -9.504648825898666, -19.208257647745885, -19.208343381714936, -9.504606566957849, -9.504672516440953, -9.504669857653449, -19.20847093463252, -9.50465182131716, -9.504588413809056, -9.50440303640723, -9.504595024986077, -19.208328508145826, -19.208484304248735, -9.504523003523706, -9.504561593909312, -9.504625533034456, -19.208481286902412, -19.208477587670302, -5.712237681129465, -9.50462696250841, -9.504548812949622, -19.20849229689562, -19.208364095600142, -19.208213199285233, -9.504591244216991, -9.504551057458308, -9.504613476836528, -19.208497227351167, -5.712216215738436, -11.069452071734776, -19.208253707894606, -9.504665730218209, -19.208394799756057, -19.207941702225465, -9.504604381089097, -5.712219923054506, -11.069355633563264, -19.208202322608212, -19.208459526638638, -19.208437178485838, -19.208480698584395, -19.208414903353326, -9.504496239999954, -9.504634865393506, -19.208298780430255, -9.504573598540674, -9.504646235107966, -9.50463573181503, -9.504675687021178, -11.069533102044433, -9.504642680917973, -9.504555355689574, -19.208458173410616, -9.504621103138131]
部分图像:
程序循环运行100次的结果:
最优解集合:[-11.069549678828697, -9.504672930714808, -19.20849288376624, -9.50466907444916, -9.504655057891648, -9.504659629129305, -19.208407038016674, -9.504668231390262, -19.208478904373155, -19.208348934659025, -9.504532300740397, -9.50462534803076, -11.069538206246179, -11.069534094862147, -9.504640091572538, -19.208489758629824, -9.504660211120926, -9.504647499333124, -19.208484956218484, -19.208471987267814, -8.095099585281373, -9.50460245141924, -9.504635106787399, -11.069474874872174, -19.208491447807962, -19.208478009939505, -19.20846604472724, -9.504663229965654, -19.20834126125964, -19.20839027844237, -9.50462073220346, -9.50461854610198, -19.208297233585636, -5.712230727242616, -9.50467186734912, -9.504636937152476, -19.20845456237719, -19.208496066692874, -11.069526667944208, -19.208467153339395, -9.504676862438357, -19.208419472772125, -9.50466424273897, -9.504619810308965, -9.504526984459943, -11.069483184356725, -9.5046599258157, -9.504647453046429, -4.712458012678044, -19.2084773166292, -9.504661153699761, -9.504617553109318, -19.208435539694317, -19.208365135607117, -19.208486311955554, -19.208330906633144, -11.069530528940062, -9.50466435249903, -9.504663455758788, -19.208502088408252, -19.208418926314046, -11.069524847887184, -9.504651057074387, -19.20843140850622, -19.20848696736017, -19.208401946099848, -9.504600672842573, -9.504564759838242, -19.208480179659222, -19.208474441829498, -19.208485804222644, -9.504671136331952, -19.208309255661522, -11.06953204363536, -19.208465559830476, -8.095100993129412, -9.504507505745085, -9.504587392655303, -9.504659238067259, -19.208469577183664, -19.20848909597185, -9.504676483853416, -19.208453274468294, -11.069548236116367, -19.20844574009531, -9.504657272609176, -19.207919903024077, -9.504641847708038, -4.712458100157444, -9.50466831873525, -9.50463166173726, -9.504597447293962, -9.504675624325708, -9.504572741642548, -9.504657336930165, -9.504370464294732, -9.504644170465564, -11.069528235639478, -19.20847123429956, -9.504666647435355]
部分图像:
最优解正常应为19.208…,但明显-9.5…要更多,所以说明出现陷入了局部最优的情况。
转载望告知,毕竟辛辛苦苦搞出来的,希望对大家有帮助