1. Intro

This software package contain 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. And import cec2015.CEC15Problems to use the test functions.

import cec2015.CEC15Problems;

Throught commandline, it looks like the following:

>> javac -classpath CEC2015.jar Test.java
>> java -classpath ".;CEC2015.jar" Test

There are minor differences in different platform, please check the manual of your JDK.


3. Interface

You can find the test program Test.java for usage example. And the javadoc are also give detail interface description, as well as the source code src.zip.

The main interfaces that matter are as follows:

The constructors of the CEC15Problems are

public CEC15Problems()

and

public 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".

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

x will contain the values need to be evaluated, the value 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) 
/* 
 * output to file
 */
void	writeResultToFiles() 

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.
