fr.jussieu.gla.wasa.core
Class Explorer

java.lang.Object
  |
  +--fr.jussieu.gla.wasa.core.ProblemItem
        |
        +--fr.jussieu.gla.wasa.core.Explorer

public abstract class Explorer
extends ProblemItem

Defines how to explore the neighbourhood of Buisness Objects state.

Version:
$Revision: 1.3 $ $Date: 2002/04/17 15:24:05 $
Author:
Laurent Caillette

Constructor Summary
Explorer(Problem problem)
           
 
Method Summary
protected  void doReset()
          Override this method to initialize your private stuff when the exploration starts around a given Configuration.
protected abstract  boolean explore(int explorationIndex)
          Override this method to change Buisness Objects values according to your private explorers.
protected  Var getVar()
          Returns the worst Var, that which has the highest error.
protected abstract  boolean hasNeighbours(int explorationIndex)
          Override this method to indicate if explorer should be applied.
 
Methods inherited from class fr.jussieu.gla.wasa.core.ProblemItem
getName, getProblem, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Explorer

public Explorer(Problem problem)
Method Detail

getVar

protected final Var getVar()
Returns the worst Var, that which has the highest error. Only use it in the #explore( int ) method to catch the worst Var.
Returns:
The Var that was passed in during the last call of #reset().

doReset

protected void doReset()
Override this method to initialize your private stuff when the exploration starts around a given Configuration.

hasNeighbours

protected abstract boolean hasNeighbours(int explorationIndex)
Override this method to indicate if explorer should be applied.
Parameters:
true - if explorer should be applied, false otherwise.
Returns:
true if the results should be taken in account and the exploration should continue, false if the results should not be taken in account and the exploration must stop.

explore

protected abstract boolean explore(int explorationIndex)
Override this method to change Buisness Objects values according to your private explorers.

Apply the Explorer to the Buisness Objects : change some values to optimize a given criterion.

Parameters:
explorationIndex - The number of times this method was called to explore around for a given Configuration.
Returns:
true if the result should be taken in account, false otherwise.