lio
Class LiOTask

java.lang.Object
  extended by lio.LiOTask
All Implemented Interfaces:
LiOResource
Direct Known Subclasses:
Ackley, Ackley, CheckerBoard, Colville, Colville, DecomposableProblem, EqualProducts, FC2, FC3, FC4, FC5, Griewangk, Griewangk, LiOGreedyTask, MMDP, OneMax, OneMax, PermutationExample, Plateau, Powell, Powell, Rastrigin, Rastrigin, Rosenbrock, Rosenbrock, Schwefel, Schwefel, SixPeaks, SumCan

public abstract class LiOTask
extends java.lang.Object
implements LiOResource

This abstract class must be extended for those classes which define tasks to be solved.


Constructor Summary
LiOTask()
           
 
Method Summary
abstract  LiOBounds defineIndividuals()
          In most cases, it is necessary to define some common features of a certain kind of individual such as upper and lower limits, size, etc.
abstract  double evaluate(Individual individual)
          Evaluates an individual and returns its fitness.
 LiOResourceDefinition getDefinition()
          This class must be overloaded if the task has to give information about itself to the LiO core.
 double optimum()
          Returns the optimum of the function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiOTask

public LiOTask()
Method Detail

defineIndividuals

public abstract LiOBounds defineIndividuals()
In most cases, it is necessary to define some common features of a certain kind of individual such as upper and lower limits, size, etc.

Returns:
a Bounds object which defines individuals.

evaluate

public abstract double evaluate(Individual individual)
Evaluates an individual and returns its fitness.

Parameters:
individual - The individual that is going to be evaluated.
Returns:
fitness of a individual.

optimum

public double optimum()
Returns the optimum of the function. If this value is known, the function must be overloaded by the child classes.

Returns:
Optimum of the task.

getDefinition

public LiOResourceDefinition getDefinition()
This class must be overloaded if the task has to give information about itself to the LiO core. Return a LiOResDescription object with the information of each object. That object holds the name and all parameters that describe the object

Specified by:
getDefinition in interface LiOResource
Returns:
A definition of the object.