net.sf.myra.framework
Class CompoundLocalSearch

java.lang.Object
  extended by net.sf.myra.framework.CompoundLocalSearch
All Implemented Interfaces:
LocalSearch

public class CompoundLocalSearch
extends java.lang.Object
implements LocalSearch

This class represents a local search method made by the combination of several local search methods. The local search methods are applied in a cascade order of insertion. In other words, the input of the method is the input of the previous one, with the exception of the first.

Version:
$Revision$ $Date:: $
Author:
Fernando Esteban Barril Otero

Constructor Summary
CompoundLocalSearch()
          Default constructor.
 
Method Summary
 void add(LocalSearch localSearch)
          Adds the specified local search method.
 Trail explore(Trail trail)
          Returns an improved trail based on the exploration of neighborhood trails.
 void remove(LocalSearch localSearch)
          Removes the specified local search method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundLocalSearch

public CompoundLocalSearch()
Default constructor.

Method Detail

add

public void add(LocalSearch localSearch)
Adds the specified local search method.

Parameters:
localSearch - the local search method to add.

remove

public void remove(LocalSearch localSearch)
Removes the specified local search method.

Parameters:
localSearch - the local search method to remove.

explore

public Trail explore(Trail trail)
Description copied from interface: LocalSearch
Returns an improved trail based on the exploration of neighborhood trails. If none can be found, retuns the original trail.

Specified by:
explore in interface LocalSearch
Parameters:
trail - the trail (solution) to explore.
Returns:
an improved trail based on the exploration of neighborhood trails.


Copyright © 2013. All Rights Reserved.