gov.sns.tools.optimizer
Class EvaluatorSolver

java.lang.Object
  |
  +--gov.sns.tools.optimizer.EvaluatorSolver

public class EvaluatorSolver
extends java.lang.Object


Constructor Summary
EvaluatorSolver()
          Creates a new instance of EvaluatorSolver a random search algorithm.
EvaluatorSolver(int algorithmType)
          Creates a new instance of EvaluatorSolver with an algorithm of certain type.
 
Method Summary
 void addBestSolutionListener(java.awt.event.ActionListener al)
          Adds the best solution events listener.
 SearchAlgorithm getAlgorothm()
          Returns an inner search algorithm.
 double getBestScore()
          Returns the best score.
 TrialPoint getBestTrialPoint()
          Returns the best solution as the TrialPoint class instance.
 java.util.List getParametersProxies()
          Returns an unmodifiable list of ParameterProxy instances.
 Scoreboard getScoreboard()
          Returns Scoreboard.
 boolean isRunning()
          Returns true if it is runnung.
 void removeBestSolutionListener(java.awt.event.ActionListener al)
          Removes the best solution events listener.
 void removeBestSolutionListeners()
          Removes all of the best solution events listeners.
 void setEvaluator(Evaluator evaluator)
          Set the evaluator to use in scoring the trial points.
 void setSearchAlgorithm(int algorithmType)
          Sets the search algorithm of certain type.
 void setStopper(SolveStopper aStopper)
          Set the object that will be used to determine when the solver should stop running.
 void setVariables(java.util.Collection vars)
          Set the variables for the optimization problem.
 void solve()
          Finds the solution of the problem.
 void wantToStop()
          Notifies the solver that user wants to stop the process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluatorSolver

public EvaluatorSolver()
Creates a new instance of EvaluatorSolver a random search algorithm.


EvaluatorSolver

public EvaluatorSolver(int algorithmType)
Creates a new instance of EvaluatorSolver with an algorithm of certain type.

Method Detail

setSearchAlgorithm

public void setSearchAlgorithm(int algorithmType)
Sets the search algorithm of certain type.


setVariables

public void setVariables(java.util.Collection vars)
Set the variables for the optimization problem.


setEvaluator

public void setEvaluator(Evaluator evaluator)
Set the evaluator to use in scoring the trial points. The evaluator defines the problem we are trying to optimize.

Parameters:
evaluator - The object to use in scoring the trial points.

setStopper

public void setStopper(SolveStopper aStopper)
Set the object that will be used to determine when the solver should stop running.

Parameters:
aStopper - The object that will be used to determine when the solver should stop running.

solve

public void solve()
Finds the solution of the problem.


getParametersProxies

public java.util.List getParametersProxies()
Returns an unmodifiable list of ParameterProxy instances.


isRunning

public boolean isRunning()
Returns true if it is runnung.


wantToStop

public void wantToStop()
Notifies the solver that user wants to stop the process.


getAlgorothm

public SearchAlgorithm getAlgorothm()
Returns an inner search algorithm.


getScoreboard

public Scoreboard getScoreboard()
Returns Scoreboard.


getBestTrialPoint

public TrialPoint getBestTrialPoint()
Returns the best solution as the TrialPoint class instance.


getBestScore

public double getBestScore()
Returns the best score.


addBestSolutionListener

public void addBestSolutionListener(java.awt.event.ActionListener al)
Adds the best solution events listener.


removeBestSolutionListener

public void removeBestSolutionListener(java.awt.event.ActionListener al)
Removes the best solution events listener.


removeBestSolutionListeners

public void removeBestSolutionListeners()
Removes all of the best solution events listeners.