资源简介
烟花算法matlab源代码,本代码是烟花算法的基本代码,有助于学习算法及其优化算法的同学快速入门
代码片段和文件信息
function f=benchmark_func(xfunc_num)
global initial_flag
persistent fhd f_bias
% benchmark_func.m is the main function for 25 test functions all minimize
% problems
% e.g. f=benchmark_func(xfunc_num)
% x is the variable f is the function value
% func_num is the function num
% 25 TEST FUCNTIONS
% Unimodal Functions (5):
% 1. Shifted Sphere Function Bounds[-100100] f_bias=-450
% 2. Shifted Schwefel‘s Problem 1.2 Bounds[-100100] f_bias=-450
% 3. Shifted Rotated High Conditioned Elliptic Function Bounds[-100100] f_bias=-450
% 4. Shifted Schwefel‘s Problem 1.2 with Noise in Fitness Bounds[-100100] f_bias=-450
% 5. Schwefel‘s Problem 2.6 with Global Optimum on Bounds Bounds[-100100] f_bias=-310
%
% Multimodal Functions (20):
% Basic Functions (7):
% 6. Shifted Rosenbrock‘s Function Bounds[-100100] f_bias=390
% 7. Shifted Rotated Griewank‘s Function without Bounds Initilization Range [0 600] f_bias=-180
% 8. Shifted Rotated Ackley‘s Function with Global Optimum on Bounds Bounds[-3232] f_bias=-140
% 9. Shifted Rastrigin‘s Function Bounds[-55] f_bias=-330
% 10. Shifted Rotated Rastrigin‘s Function Bounds[-55] f_bias=-330
% 11. Shifted Rotated Weierstrass Function Bounds[-0.50.5] f_bias=90
% 12. Schwefel‘s Problem 2.13 Bounds[-100100] f_bias=-460
% Expanded Functions (2):
% 13. Expanded Extended Griewank‘s plus Rosenbrock‘s Function (F8F2) Bounds[-31] f_bias=-130
% 14. Expanded Rotated Extended Scaffe‘s F6 Bounds[-100100] f_bias=-300
% Hybrid Composition Functions (11):
% 15. Hybrid Composition Function 1 Bounds[-55] f_bias= 120
% 16. Rotated Hybrid Composition Function 1 Bounds[-55] f_bias= 120
% 17. Rotated Hybrid Composition Function 1 with Noise in Fitness Bounds[-55] f_bias= 120
% 18. Rotated Hybrid Composition Function 2 Bounds[-55] f_bias=10
% 19. Rotated Hybrid Composition Function 2 with a Narrow Basin for the Global Optimum Bounds[-55]] f_bias=10
% 20. Rotated Hybrid Composition Function 2 with the Global Optimum on the Bounds Bounds[-55] f_bias=10
% 21. Rotated Hybrid Composition Function 3 Bounds[-55] f_bias=360
% 22. Rotated Hybrid Composition Function 3 with High Condition Number Matrix Bounds[-55] f_bias=360
% 23. Non-Continuous Rotated Hybrid Composition Function 3 Bounds[-55] f_bias=360
% 24. Rotated Hybrid Composition Function 4 Bounds[-55] f_bias=260
% 25. Rotated Hybrid Composition Function 4 without Bounds Intilization Range[-25] f_bias=260
%
%J. J. Liang & P. N. Suganthan 2005.Feb 18
if initial_flag==0
if func_num==1 fhd=str2func(‘sphere_func‘); %[-100100]
elseif func_num==2 fhd=str2func(‘schwefel_102‘); %[-100100]
elseif func_num==3 fhd=str2func(‘high_c
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 28314 2011-06-01 21:58 FireWorks\benchmark_func.m
文件 2946 2011-12-01 14:34 FireWorks\FAMAIN.m
文件 2023 2011-05-31 22:14 FireWorks\func_plot.m
文件 376 2011-05-25 09:19 FireWorks\fun_ackley.m
文件 166 2011-05-25 09:19 FireWorks\fun_griewank.m
文件 302 2011-05-25 09:19 FireWorks\fun_michalewics.m
文件 362 2011-05-25 09:19 FireWorks\fun_perm.m
文件 150 2011-05-25 09:19 FireWorks\fun_rastrigin.m
文件 297 2011-05-25 09:19 FireWorks\fun_rosenbrock.m
文件 320 2011-05-25 09:19 FireWorks\fun_schafferf6.m
文件 191 2011-05-25 09:19 FireWorks\fun_schwefel.m
文件 146 2011-05-25 09:19 FireWorks\fun_sphere.m
文件 561 2011-05-28 18:02 FireWorks\mathConfidenceComputing.m
文件 456 2011-05-27 21:19 FireWorks\mathNorm.m
文件 4410 2011-09-10 15:54 FireWorks\optFWE.m
文件 453 2011-05-30 14:39 FireWorks\scope_cal.m
文件 450 2011-05-30 15:00 FireWorks\scope_calm.m
文件 818 2011-06-01 21:26 FireWorks\scope_calScaleModify.m
文件 1434 2011-05-27 20:59 FireWorks\seedGaussMutation.m
文件 2215 2011-05-28 09:44 FireWorks\selectNextIterationOnEntropy.m
文件 1973 2011-05-29 13:34 FireWorks\selectNextIterationOnGuoTao.m
文件 1970 2011-05-29 00:14 FireWorks\selectNextIterationOnPan.m
文件 2731 2011-05-29 14:29 FireWorks\selectNextIterationOnPan_Modify.m
文件 1062 2011-05-29 14:06 FireWorks\selectNextIterationOnRand.m
文件 1660 2011-05-29 16:06 FireWorks\selectNextIterationOnRandSelect.m
文件 736 2011-05-30 10:17 FireWorks\sonsnum_cal.m
文件 921 2011-06-01 21:09 FireWorks\sonsnum_calBestAround.m
文件 1716 2011-05-27 20:53 FireWorks\sons_generate.m
文件 11817 2011-09-11 21:39 FireWorks\util_getFunctionParams.m
目录 0 2011-12-01 14:22 FireWorks
............此处省略3个文件信息
- 上一篇:利用Matlab生成正弦波表
- 下一篇:matlab下编写的劳斯判据
评论
共有 条评论