net.sourceforge.cilib.problem
Class DeratingFunctionMaximisationProblem

java.lang.Object
  extended by net.sourceforge.cilib.problem.OptimisationProblemAdapter
      extended by net.sourceforge.cilib.problem.FunctionOptimisationProblem
          extended by net.sourceforge.cilib.problem.FunctionMaximisationProblem
              extended by net.sourceforge.cilib.problem.DeratingFunctionMaximisationProblem
All Implemented Interfaces:
Serializable, OptimisationProblem, Problem, Cloneable

public class DeratingFunctionMaximisationProblem
extends FunctionMaximisationProblem

Title: DeratingFunctionMaximisationProblem

Description: This class provides a way to modify the search space such that a solution could be removed from the search space and a new solution can be searched for.

The interested reader is referred to: Beasley, D., Bull, D. R. & Martin R. R. (1993). A Sequential Niche Technique for Multimodal Function Optimization. Evolutionary Computation 1(2), MIT Press, pp.101-125.

Author:
Clive Naicker
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.problem.FunctionOptimisationProblem
function
 
Fields inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter
dataSetBuilder, fitnessEvaluations
 
Constructor Summary
DeratingFunctionMaximisationProblem()
          The default constuctor.
 
Method Summary
 void addSolution(double[] solution)
          This method will add a solution to the vectorSolutions.
protected  Fitness calculateFitness(Type solution)
          Calculates the fitness of a solution with respect to the modifications to the search space.
 void clear()
          Removes all solutions from the vectorSolutions.
 Function getDeratingFunction()
          This method gets the function that is used to modify the search space, i.e.
 double getRawFitness(Type solution)
          This method finds the fitness of the solution without applying the derating function.
 double normalise(double distance)
          This method is used to calculate the normalised distance of a value in the domain of the problem.
 void setDeratingFunction(Function deratingFunction)
          This is an accessor method that can be used to set the deratingFunction that is used to modify the search space.
 void setFunction(Function function)
          This method sets the function to evaluate (that is the search space).
 
Methods inherited from class net.sourceforge.cilib.problem.FunctionMaximisationProblem
getClone, getError
 
Methods inherited from class net.sourceforge.cilib.problem.FunctionOptimisationProblem
accept, getBehaviouralDomain, getDomain, getFunction
 
Methods inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter
changeEnvironment, getChangeStrategy, getDataSetBuilder, getFitness, getFitnessEvaluations, setChangeStrategy, setDataSetBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeratingFunctionMaximisationProblem

public DeratingFunctionMaximisationProblem()
The default constuctor. Intialises the distanceMeasure to the EuclideanDistanceMeasure.

Method Detail

calculateFitness

protected Fitness calculateFitness(Type solution)
Calculates the fitness of a solution with respect to the modifications to the search space.

Overrides:
calculateFitness in class FunctionMaximisationProblem
Parameters:
solution - The solution to calculate the fitness.
Returns:
The fitness of the solution.
See Also:
OptimisationProblemAdapter.getFitness(Type, boolean)

getRawFitness

public double getRawFitness(Type solution)
This method finds the fitness of the solution without applying the derating function.

Parameters:
solution - The solution to find the fitness off.
Returns:
The fitness of the solution[]

addSolution

public void addSolution(double[] solution)
This method will add a solution to the vectorSolutions. The solution added will be used to create depression in the search using the deratingFunction.

Parameters:
solution - The position in the search to modify.

getDeratingFunction

public Function getDeratingFunction()
This method gets the function that is used to modify the search space, i.e. the derating function

Returns:
The deratingFunction

setDeratingFunction

public void setDeratingFunction(Function deratingFunction)
This is an accessor method that can be used to set the deratingFunction that is used to modify the search space.

Parameters:
deratingFunction - The derating function to use when modifying the search space.

normalise

public double normalise(double distance)
This method is used to calculate the normalised distance of a value in the domain of the problem.

Parameters:
distance - The distance to normalise
Returns:
A value in the domain [0..1]

clear

public void clear()
Removes all solutions from the vectorSolutions.


setFunction

public void setFunction(Function function)
This method sets the function to evaluate (that is the search space).

Overrides:
setFunction in class FunctionOptimisationProblem
Parameters:
function - The function to evaluate.


Copyright © 2009 CIRG. All Rights Reserved.