gov.sns.tools.optimization
Class RandomSearchAlgorithm.ComboSearcher

java.lang.Object
  |
  +--gov.sns.tools.optimization.RandomSearchAlgorithm.RandomSearcher
        |
        +--gov.sns.tools.optimization.RandomSearchAlgorithm.ComboSearcher
All Implemented Interfaces:
RandomSearchAlgorithm.Searcher, gov.sns.tools.optimization.ScoreMonitor
Enclosing class:
RandomSearchAlgorithm

public class RandomSearchAlgorithm.ComboSearcher
extends RandomSearchAlgorithm.RandomSearcher

Use a combination of search engines to search for the best solution.


Field Summary
protected  RandomSearchAlgorithm.RandomSearcher randomSearcher
           
protected static double SHRINK_THRESHOLD
           
protected  RandomSearchAlgorithm.ShrinkSearcher shrinkSearcher
           
 
Fields inherited from class gov.sns.tools.optimization.RandomSearchAlgorithm.RandomSearcher
changeProbabilityBase, randomGenerator, values
 
Constructor Summary
RandomSearchAlgorithm.ComboSearcher()
          Constructor
 
Method Summary
 void newScore(java.lang.Object sender, Solution solution)
          Notifies the receiver of a new score event.
 void newTopSolution(TrialPoint oldPoint, TrialPoint newPoint)
          An event indicating that a new solution has been found which is better than the previous best solution according to the score given by the evaluator.
protected  double proposeValue(Variable variable)
          Propose a new value for the variable by picking a search engine to propose a new value.
 void reset()
          reset for searching from scratch; forget history
 
Methods inherited from class gov.sns.tools.optimization.RandomSearchAlgorithm.RandomSearcher
nextPoint, nextPoint, nextTrialPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shrinkSearcher

protected RandomSearchAlgorithm.ShrinkSearcher shrinkSearcher

randomSearcher

protected RandomSearchAlgorithm.RandomSearcher randomSearcher

SHRINK_THRESHOLD

protected static final double SHRINK_THRESHOLD
See Also:
Constant Field Values
Constructor Detail

RandomSearchAlgorithm.ComboSearcher

public RandomSearchAlgorithm.ComboSearcher()
Constructor

Method Detail

reset

public void reset()
reset for searching from scratch; forget history

Specified by:
reset in interface RandomSearchAlgorithm.Searcher
Overrides:
reset in class RandomSearchAlgorithm.RandomSearcher

newTopSolution

public void newTopSolution(TrialPoint oldPoint,
                           TrialPoint newPoint)
An event indicating that a new solution has been found which is better than the previous best solution according to the score given by the evaluator.

Specified by:
newTopSolution in interface RandomSearchAlgorithm.Searcher
Overrides:
newTopSolution in class RandomSearchAlgorithm.RandomSearcher
Parameters:
oldPoint - The old best point.
newPoint - The new best point.

proposeValue

protected double proposeValue(Variable variable)
Propose a new value for the variable by picking a search engine to propose a new value.

Overrides:
proposeValue in class RandomSearchAlgorithm.RandomSearcher
Parameters:
variable - the variable for which to propose a new value
Returns:
the new value to propose for the variable

newScore

public void newScore(java.lang.Object sender,
                     Solution solution)
Notifies the receiver of a new score event.

Specified by:
newScore in interface gov.sns.tools.optimization.ScoreMonitor
Overrides:
newScore in class RandomSearchAlgorithm.RandomSearcher
Parameters:
sender - The object posting the event.
solution - The solution posted.