Configuring Algorithm Run

From jecoliwiki
Jump to: navigation, search

The first step to run a specific optimization algorithm in the JECoLi library, is to instantiate an algorithm specific configuration. All the algorithm configurations implement the interface IConfiguration, that has the following set of methods:

   - StatisticsConfiguration getStatisticConfiguration() //This primitive returns the currently defined statistics configurations, that allow to set the statistics that will be 
     printed on the screen and those that will be saved to a specific array of files.
   - void setStatisticsConfiguration(StatisticsConfiguration statisticsConfiguration) // This method allows to define the statistics configuration.
   - ITerminationCriteria getTerminationCriteria() //This primitive returns the current termination criteria object.
   - void setTerminationCriteria(ITerminationCriteria terminationCriteria) //This method allows to set the termination criteria.
   - boolean verifyConfiguration()  //The purpose of this method is to verify the integrity of the configuration. It returns false if the 
     parameters are not congruent. Usually this method is called by the algorithm object when is constructed and throws an exception if this method returns false.
   - void  setEvaluationFunction(IEvaluationFunction<?> evaluationFunction) //This method allows to set a defined evaluation function.
   - IEvaluationFunction getEvaluationFunction() //Returns the currently  assigned evaluation function.
   - int getNumberOfObjectives() //Returns the number of objectives of the currently defined evaluation function.

Following this, the specific instance of the optimization algorithm should be created and the method run() should be called. All the available algorithms implement the interface IAlgorithm or extend the class AbstractAlgorithm. The interface IAlgorithm has the method run that returns the algorithm results tweaked by the configuration options.

Personal tools