lio.memetic
Class HillClimbing

java.lang.Object
  extended by lio.memetic.HillClimbing
All Implemented Interfaces:
LiOResource

public class HillClimbing
extends java.lang.Object
implements LiOResource

This objects perform local search to solutions. It is implemented as an operator so that it can be used as a part in some other search algorithms. Notice that it is necessary to have a neighbourhood operator implemented for the kind of data used.

See Also:
Neighbourhood

Constructor Summary
HillClimbing()
          Creates a new instance of HillClimbing
 
Method Summary
 Individual doHillClimbing(Individual individual)
          Given an individual, performs a local search and returns the result.
 LiOResourceDefinition getDefinition()
          Return a LiOResDescription object with the information of each object.
 int getMaxNoImprove()
          Getter for property maxNoImprove.
 int getMaxSteps()
          Getter for property maxSteps.
 Neighbourhood getNeighbourhood()
          Getter for property neighbourhood.
 int getNumCandidates()
          Getter for property numCandidates.
static void main(java.lang.String[] args)
          Main class to test the class.
 void setMaxNoImprove(int maxNoImprove)
          Setter for property maxNoImprove.
 void setMaxSteps(int maxSteps)
          Setter for property maxSteps.
 void setNeighbourhood(Neighbourhood neighbourhood)
          Setter for property neighbourhood.
 void setNumCandidates(int numCandidates)
          Setter for property numCandidates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HillClimbing

public HillClimbing()
Creates a new instance of HillClimbing

Method Detail

doHillClimbing

public Individual doHillClimbing(Individual individual)
Given an individual, performs a local search and returns the result.

Parameters:
individual - Starting solution.
Returns:
another solution resulting of carrying out the local search.

getDefinition

public LiOResourceDefinition getDefinition()
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.

main

public static void main(java.lang.String[] args)
Main class to test the class.


getMaxNoImprove

public int getMaxNoImprove()
Getter for property maxNoImprove.

Returns:
Value of property maxNoImprove.

setMaxNoImprove

public void setMaxNoImprove(int maxNoImprove)
Setter for property maxNoImprove.

Parameters:
maxNoImprove - New value of property maxNoImprove.

getNumCandidates

public int getNumCandidates()
Getter for property numCandidates.

Returns:
Value of property numCandidates.

setNumCandidates

public void setNumCandidates(int numCandidates)
Setter for property numCandidates.

Parameters:
numCandidates - New value of property numCandidates.

getMaxSteps

public int getMaxSteps()
Getter for property maxSteps.

Returns:
Value of property maxSteps.

setMaxSteps

public void setMaxSteps(int maxSteps)
Setter for property maxSteps.

Parameters:
maxSteps - New value of property maxSteps.

getNeighbourhood

public Neighbourhood getNeighbourhood()
Getter for property neighbourhood.

Returns:
Value of property neighbourhood.

setNeighbourhood

public void setNeighbourhood(Neighbourhood neighbourhood)
Setter for property neighbourhood.

Parameters:
neighbourhood - New value of property neighbourhood.