|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.job.OptimizationAlgorithm
com.sun.slamd.job.SingleStatisticWithConstraintOptimizationAlgorithm
This class defines a SLAMD optimization algorithm that tries to find the optimal (highest or lowest) value for a given statistic, but also provides for an additional constraint so that a second statistic does not go outside a given range. Both the statistic to optimize and the statistic to constrain must be searchable.
| Field Summary | |
static java.lang.String |
CONSTRAINT_STRING_NO_GREATER_THAN
The string that will be displayed if the user wants to ensure that the constraint statistic does not go above the given value. |
static java.lang.String |
CONSTRAINT_STRING_NO_LESS_THAN
The string that will be displayed if the user wants to ensure that the constraint statistic does not go below the given value. |
static int |
CONSTRAINT_TYPE_NO_GREATER_THAN
The constraint type that indicates that the statistic to constrain should not be allowed to be greater than the specified value. |
static int |
CONSTRAINT_TYPE_NO_LESS_THAN
The constraint type that indicates that the statistic to constrain should not be allowed to be less than the specified value. |
static int |
OPTIMIZE_TYPE_MAXIMIZE
The optimization type value that indicates that we should try to find the highest value for the statistic to optimize. |
static int |
OPTIMIZE_TYPE_MINIMIZE
The optimization type value that indicates that we should try to find the lowest value for the statistic to optimize. |
static java.lang.String |
PARAM_CONSTRAIN_STAT
The name of the parameter that is used to specify the statistic to constrain. |
static java.lang.String |
PARAM_CONSTRAINT_TYPE
The name of the parameter that specifies the type of constraint to enforce. |
static java.lang.String |
PARAM_CONSTRAINT_VALUE
The name of the parameter that specifies the value to use for the constraint. |
static java.lang.String |
PARAM_OPTIMIZE_STAT
The name of the parameter that is used to specify the statistic to optimize. |
static java.lang.String |
PARAM_OPTIMIZE_TYPE
The name of the parameter that is used to specify the type of optimization to perform. |
| Constructor Summary | |
SingleStatisticWithConstraintOptimizationAlgorithm()
Creates a new instance of this optimization algorithm. |
|
| Method Summary | |
boolean |
availableWithJobClass(JobClass jobClass)
Indicates whether this optimization algorithm may be used when running the specified type of job. |
double |
getIterationOptimizationValue(Job iteration)
Retrieves the value associated with the provided iteration of the given optimizing job. |
java.lang.String |
getOptimizationAlgorithmName()
Retrieves the human-readable name that will be used for this optimization algorithm. |
ParameterList |
getOptimizationAlgorithmParameters()
Retrieves the set of parameters that have been defined for this optimization algorithm. |
ParameterList |
getOptimizationAlgorithmParameterStubs(JobClass jobClass)
Retrieves a set of parameter stubs that should be used to prompt the end user for the settings to use when executing the optimizing job. |
void |
initializeOptimizationAlgorithm(OptimizingJob optimizingJob,
ParameterList parameters)
Initializes this optimization algorithm with the provided set of parameters for the given optimizing job. |
boolean |
isBestIterationSoFar(Job iteration)
Indicates whether the provided iteration is the best one seen so far for the given optimizing job based on the constraints specified in the parameters used to initialize this optimization algorithm. |
OptimizationAlgorithm |
newInstance()
Creates a new, uninitialized instance of this optimization algorithm. |
void |
reInitializeOptimizationAlgorithm()
Clears any state information currently set for this optimization algorithm and restores it to the state it would have if a new instance had been created and only the initializeOptimizationAlgorithm() method
had been called on that instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String PARAM_OPTIMIZE_STAT
public static final java.lang.String PARAM_OPTIMIZE_TYPE
public static final java.lang.String PARAM_CONSTRAIN_STAT
public static final java.lang.String PARAM_CONSTRAINT_TYPE
public static final java.lang.String PARAM_CONSTRAINT_VALUE
public static final int OPTIMIZE_TYPE_MAXIMIZE
public static final int OPTIMIZE_TYPE_MINIMIZE
public static final int CONSTRAINT_TYPE_NO_GREATER_THAN
public static final int CONSTRAINT_TYPE_NO_LESS_THAN
public static final java.lang.String CONSTRAINT_STRING_NO_GREATER_THAN
public static final java.lang.String CONSTRAINT_STRING_NO_LESS_THAN
| Constructor Detail |
public SingleStatisticWithConstraintOptimizationAlgorithm()
| Method Detail |
public java.lang.String getOptimizationAlgorithmName()
getOptimizationAlgorithmName in class OptimizationAlgorithmpublic OptimizationAlgorithm newInstance()
newInstance in class OptimizationAlgorithmpublic boolean availableWithJobClass(JobClass jobClass)
availableWithJobClass in class OptimizationAlgorithmjobClass - The job class for which to make the determination.
true if this optimization algorithm may be used with
the provided job class, or false if not.public void reInitializeOptimizationAlgorithm()
initializeOptimizationAlgorithm() method
had been called on that instance. In this case, all that is necessary is
to forget about the best value seen so far.
reInitializeOptimizationAlgorithm in class OptimizationAlgorithmpublic ParameterList getOptimizationAlgorithmParameterStubs(JobClass jobClass)
getOptimizationAlgorithmParameterStubs in class OptimizationAlgorithmjobClass - The job class that will be used for the optimizing job.
public ParameterList getOptimizationAlgorithmParameters()
getOptimizationAlgorithmParameters in class OptimizationAlgorithm
public void initializeOptimizationAlgorithm(OptimizingJob optimizingJob,
ParameterList parameters)
throws InvalidValueException
initializeOptimizationAlgorithm in class OptimizationAlgorithmoptimizingJob - The optimizing job with which this optimization
algorithm will be used.parameters - The parameter list containing the parameter values
provided by the end user when scheduling the
optimizing job.
InvalidValueException - If the contents of the provided parameter
list are not valid for use with this
optimization algorithm.
public boolean isBestIterationSoFar(Job iteration)
throws SLAMDException
isBestIterationSoFar in class OptimizationAlgorithmiteration - The job iteration for which to make the
determination.
true if the provided iteration is the best one seen
so far for the optimizing job, or false if not.
SLAMDException - If a problem occurs that prevents a valid
determination from being made. If this exception
is thrown, then the optimizing job will stop
immediately with no further iterations.
public double getIterationOptimizationValue(Job iteration)
throws SLAMDException
getIterationOptimizationValue in class OptimizationAlgorithmiteration - The job iteration for which to retrieve the value.
SLAMDException - If a problem occurs while trying to determine the
value for the given optimizing job iteration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||