Skip to content

Package for using CEC'2013 Real Single Objective Optimization in Python, deployed in pypi with the same name.

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.txt
Notifications You must be signed in to change notification settings

yyamnk/cec2013single

 
 

Repository files navigation

CEC'2013 Single Global Optimization Special Session Benchmark

This package wraps the official C code for the Special Session & Competition on Real-Parameter Single Objective Optimization at the IEEE Congress on Evolutionary Computation. See http://www.ntu.edu.sg/home/EPNSugan/index_files/CEC2013/CEC2013.htm.

This package is a unofficial package using cython for calling the official implementation in C source code.

original repository is dmolina/cec2013single <https://github.com/dmolina/cec2013single>

Setup

git clone git@github.com:yyamnk/cec2013single.git
cd cec2013single
python setup.py build_ext --inplace
# cec2013single/cec2013.c, cec2013single/cec2013.so are generated

Usage

# path/to/cec2013single/cec2013single
$ ipython

In [1]: import cec2013 as cec

In [2]: fobj = cec.Benchmark()

In [3]: fid = 1 # function id, [1-28]

In [4]: f = fobj.get_function(fid)

In [5]: pos = np.random.rand(30) # position vector to be evaluated

In [6]: f(pos) # get fitness
Out[6]: 70296.9232630032

Configure

When you call f(pos) from anywhere except cec2013single/cec2013single, enviroment variable CEC13DATA is required.

export CEC13DATA=PATH-TO-DIR/cec2013single/cec2013_data

About

Package for using CEC'2013 Real Single Objective Optimization in Python, deployed in pypi with the same name.

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 88.6%
  • Python 10.7%
  • C++ 0.7%