Multiple Runs

From jecoliwiki
Jump to: navigation, search

To execute a given algorithm N times, the multipleAlgorithmRuns method in the IAlgorithm interface can be used.

This execute the algorithm and saves the results in a predefined location.

In this case, the statistics to be calculated are defined by default:

  • a sub-folder is created for each run;
  • the best solution per run is saved;
  • the best, mean and standard deviation of the best solutions per run are calculated;
  • the statistics per iteration in each run are kept in a file in the run's folder;

The following example runs an algorithm created with a given configuration for 3 runs, saving the results in the folder tests, sub-folder "test1".

IAlgorithm algorithm = new EvolutionaryAlgorithm(configuration);
algorithm.multipleAlgorithmRuns("tests", "test1", 3);
Personal tools