项目作者: ElkmanY

项目描述 :
A MATLAB toolkit of benchmark functions for numerical experiments of optimization.
高级语言: MATLAB
项目地址: git://github.com/ElkmanY/bmkfcn.git
创建时间: 2021-05-10T00:56:06Z
项目社区:https://github.com/ElkmanY/bmkfcn

开源协议:MIT License

下载


bmkfcn

A MATLAB toolkit of benchmark functions for numerical experiments of optimization.

Usage: bmkfcn.m

Get function handles of the benchmark function using index.

  1. [J, lmt, name] = bmkfcn(index,d)

inputs:

  • index - integer
  • d - demension of benchmark functions

outputs:

  • J - function handle, calculating the fitness of x (an d-by-n matrix)
  • lmt - constraints
  • name - char, function name

example

  1. >> i = 2;
  2. >> d = 4;
  3. >> [J,lmt,name] = bmkfcn(i,d)
  4. J =
  5. function_handle with value:
  6. @(x) sum(abs(x))+prod(abs(x))
  7. lmt =
  8. -32 32
  9. -32 32
  10. -32 32
  11. -32 32
  12. name =
  13. 'Schwefel-2.22'
  14. >> n = 10;
  15. >> x = rand(d,n).*(lmt(:,2)-lmt(:,1)) + lmt(:,1);
  16. >> f = J(x)
  17. f =
  18. 1.0e+05 *
  19. 0.7335 1.8390 0.2030 0.8281 2.2142 1.2539 0.0959 0.0046 0.3606 0.0060

Updating soon…