gov.sns.tools.optimization
Class RandomSearchAlgorithm

java.lang.Object
  |
  +--gov.sns.tools.optimization.SearchAlgorithm
        |
        +--gov.sns.tools.optimization.RandomSearchAlgorithm
All Implemented Interfaces:
gov.sns.tools.optimization.ScoreMonitor, SolutionMonitor

Deprecated. The optimization package has been replaced by the optimizer package.

public class RandomSearchAlgorithm
extends SearchAlgorithm

RandomSearchAlgorithm looks for points bounded by the specified variable limits. Every iteration a subset of variables are randomly chosen to be changed. The value chosen for each variable is randomly selected from a uniform distribution within a window for that variable. The window begins as the full limit range allowed by the variable. Whenever a better solution is found, the window changes so that it is three times wider than the distance between the last best point and the new best point. The window gets centered around the new best points. Then the window gets clipped as necessary to satisfy the variable limits. Note that the window may grow or shrink depending on the distance between successive top points. As the optimal solution is approached, the window should tend to shrink around the optimal point. Note that each variable has its own window and the window automatically adjusts to the variable according to the progress.


Nested Class Summary
 class RandomSearchAlgorithm.ComboSearcher
          Deprecated. Use a combination of search engines to search for the best solution.
protected  class RandomSearchAlgorithm.RandomSearcher
          Deprecated. A searcher that performs a simple random search in the entire search space.
protected static interface RandomSearchAlgorithm.Searcher
          Deprecated. Interface for classes that search for solutions.
protected  class RandomSearchAlgorithm.ShrinkSearcher
          Deprecated. ShrinkSearcher searches for the next trial point by adjusting the search domain per variable depending on how much a variable has changed between the best solutions found so far.
protected  class RandomSearchAlgorithm.VariableWindow
          Deprecated. Search window for a variable.
 
Field Summary
protected  TrialPoint bestPoint
          Deprecated.  
protected  RandomSearchAlgorithm.Searcher searcher
          Deprecated.  
 
Fields inherited from class gov.sns.tools.optimization.SearchAlgorithm
messageBoard, numVariables, trialProxy, variables
 
Constructor Summary
RandomSearchAlgorithm(MessageCenter aMessageBoard)
          Deprecated. Creates a new instance of SearchAlgorithm
 
Method Summary
 void newScore(java.lang.Object sender, Solution solution)
          Deprecated. Notifies the receiver of a new score event.
 void newTopSolution(java.lang.Object sender, Solution solution)
          Deprecated. 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  TrialPoint nextTrialPoint()
          Deprecated. Calculate and get the next trial point to evaluate.
 void reset()
          Deprecated. reset for searching from scratch; forget history
protected  void resetBestPoint()
          Deprecated. Reset the trial point's variables to their starting values.
 void solve()
          Deprecated. begin searching for an optimal solution
 
Methods inherited from class gov.sns.tools.optimization.SearchAlgorithm
registerEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bestPoint

protected TrialPoint bestPoint
Deprecated. 

searcher

protected RandomSearchAlgorithm.Searcher searcher
Deprecated. 
Constructor Detail

RandomSearchAlgorithm

public RandomSearchAlgorithm(MessageCenter aMessageBoard)
Deprecated. 
Creates a new instance of SearchAlgorithm

Method Detail

reset

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

Specified by:
reset in class SearchAlgorithm

resetBestPoint

protected void resetBestPoint()
Deprecated. 
Reset the trial point's variables to their starting values.


solve

public void solve()
Deprecated. 
begin searching for an optimal solution

Specified by:
solve in class SearchAlgorithm

nextTrialPoint

protected TrialPoint nextTrialPoint()
Deprecated. 
Calculate and get the next trial point to evaluate.

Returns:
The next trial point to evaluate.

newTopSolution

public void newTopSolution(java.lang.Object sender,
                           Solution solution)
Deprecated. 
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 SolutionMonitor
Specified by:
newTopSolution in class SearchAlgorithm
Parameters:
sender - The object that has posted this solution.
solution - The best solution found so far.

newScore

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

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