1. Intro

This software package just a Matlab wrapper of the Java version code for "Problem Definitions and Evaluation Criteria for CEC 2015 Special Session on Bound Constrained Single-Objective Numerical Optimization Competition Part B: Computationally Expensive Single Objective Optimization".

For detail of the problems, please check out the related technical report.

2. Usage

To use the package, just add CEC2015.jar to your java class path. The script installCEC2015Jar.m will do this for you automatically. You do have to run Matlab with permissions to edit the classpath.txt of the Matlab. You can mannually run
>> edit classpath.txt
to add a line like mydirectory/CEC2015.jar in the file and save it.

You have to restart to make the classpath work for Matlab.

And in Matlab script or functions, you can import cec2015.CEC15Problems to use the test functions.

import cec2015.CEC15Problems;
cec15functions = CEC15Problems(resultfilePrefix);

or we can ommite the import, just use

cec15functions = cec2015.CEC15problems(resultfilePrefix);


3. Interface

You can find the test program testCEC15_XXX.m in the package for usage example. 

The main interfaces that matter are as follows:

The constructors of the CEC15Problems are

 CEC15Problems()

and

 CEC15Problems(java.lang.String resultFilePrefix)

The first one is used when you don't want to use the recording functions. The second one with an arguments that give the resultFilePrefix. There could be directory and sub-directories when specifiy the file prefix. Like "/home/username/myalgorithm/result", the result files will be in the directory "/home/username/myalgorithm/", all the result files will be started with "result".

There are different ways to call object's functions in Matlab, for better performance, we can call memeber functions of an object like this:

function_name(obj, argments....)


/*
 * evaluate specific function
 */
double[]	eval(double[] x, int nx, int mx, int func_num) 

Matlabe call:
fx = eval(cec15functions, x, nx, mx, func_num);

x will contain the values need to be evaluated, the vector returned will hold the return value, nx is the dimension of the problem, can be 10 and 30 here; mx is the number of the values to be evaluated, thus the length of the x will be mx * nx, and f must be longer than mx * sizeof(double), func_num defines the function you want to evaluate, can be 1,2,3,..., 15.

/*
 *  Number of run
 */
void	setNumberOfRun(int run) 

Matlab called as:
setNumberOfRun(cec15functions, n);

/* 
 * output to file
 */
void	writeResultToFiles() 

Matlab called as:
writeResultToFiles(cec15functions);

These two functions can be turned of by using the Constructor withou arguments. 

When using these functions, just set the number of run as 

setNumberOfRun(n); // n could be 1-20

All the evaluations after this call and before the next call of it will be recorded as the nth run of your algorithm. The data that are specified to be recorded for statistical analysis in the Technical Report will be recorded automatically in memory.

After all 20 run of the algorithm finished, or part of the running are done, you can use writeResultToFiles() to dump all the recorded result into directory specified as the argument of the constructor, and all the result fills will have the same prefix as the argument specified. 


4. Contact

If you find anything does not work, have any difficulty to use the package, or have better ideas about the package, please don't hesitate to contact Qin Chen (email:chenqin1980@gmail.com) for further information.
