gov.sns.tools.optimization
Class SolveStopperFactory

java.lang.Object
  |
  +--gov.sns.tools.optimization.SolveStopperFactory

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

public class SolveStopperFactory
extends java.lang.Object

SolveStopperFactory is a factory for conveniently producing SolveStopper implementations that are commonly used. There are several behaviors from which to choose. If none of these solvers meet your needs, you can still create and use a custom SolveStopper.


Constructor Summary
protected SolveStopperFactory()
          Deprecated. Creates a new instance of StopperFactory.
 
Method Summary
static SolveStopper immediateStopper()
          Deprecated. Stop the solver immediately.
static SolveStopper maxElapsedTimeStopper(double maxSeconds)
          Deprecated. Stop the solver when the scoreboard elapsed time exceeds maxSeconds.
static SolveStopper maxIterationStopper(int maxIterations)
          Deprecated. Stop the solver when the scoreboard iterations exceeds maxIterations.
static SolveStopper maxScoreStopper(double maxScore)
          Deprecated. Stop the solver when the best score meets or exceeds maxScore.
static SolveStopper maxTimeStopper(java.util.Calendar stopTime)
          Deprecated. Stop the solver when the stopTime is in the past.
static SolveStopper runForeverStopper()
          Deprecated. Never stop the solver.
static SolveStopper targetStopperWithMaxTime(double targetScore, double maxTime)
          Deprecated. Run until the best score exceeds the targetScore or the elapsed time exceeds maxTime.
static SolveStopper targetStopperWithTimeLimits(double targetScore, double leastTime, double maxTime)
          Deprecated. Run for at least leastTime and stop when the best score exceeds the targetScore or the elapsed time exceeds maxTime.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolveStopperFactory

protected SolveStopperFactory()
Deprecated. 
Creates a new instance of StopperFactory. This constructor never gets called since the factory has only static methods.

Method Detail

maxIterationStopper

public static SolveStopper maxIterationStopper(int maxIterations)
Deprecated. 
Stop the solver when the scoreboard iterations exceeds maxIterations.

Parameters:
maxIterations - The maximum iterations to run the solver.
Returns:
The SolveStopper implementation.

maxElapsedTimeStopper

public static SolveStopper maxElapsedTimeStopper(double maxSeconds)
Deprecated. 
Stop the solver when the scoreboard elapsed time exceeds maxSeconds.

Parameters:
maxSeconds - The maximum elapsed time in seconds to run the solver.
Returns:
The SolveStopper implementation.

maxTimeStopper

public static SolveStopper maxTimeStopper(java.util.Calendar stopTime)
Deprecated. 
Stop the solver when the stopTime is in the past.

Parameters:
stopTime - The absolute time after which to stop the solver.
Returns:
The SolveStopper implementation.

maxScoreStopper

public static SolveStopper maxScoreStopper(double maxScore)
Deprecated. 
Stop the solver when the best score meets or exceeds maxScore.

Parameters:
maxScore - The score to beat.
Returns:
The SolveStopper implementation.

targetStopperWithMaxTime

public static SolveStopper targetStopperWithMaxTime(double targetScore,
                                                    double maxTime)
Deprecated. 
Run until the best score exceeds the targetScore or the elapsed time exceeds maxTime.

Parameters:
targetScore - The score to beat.
maxTime - The maximum elapsed time in seconds to run the solver.
Returns:
The SolveStopper implementation.

targetStopperWithTimeLimits

public static SolveStopper targetStopperWithTimeLimits(double targetScore,
                                                       double leastTime,
                                                       double maxTime)
Deprecated. 
Run for at least leastTime and stop when the best score exceeds the targetScore or the elapsed time exceeds maxTime.

Parameters:
targetScore - The score to beat.
leastTime - The least amount of elapsed time to run the solver in seconds.
maxTime - The maximum elapsed time in seconds to run the solver.
Returns:
The SolveStopper implementation.

runForeverStopper

public static SolveStopper runForeverStopper()
Deprecated. 
Never stop the solver.

Returns:
The SolveStopper implementation.

immediateStopper

public static SolveStopper immediateStopper()
Deprecated. 
Stop the solver immediately.

Returns:
The SolveStopper implementation.