Class WeightedShortestProcessingPlusSetupTimePrecompute
 All Implemented Interfaces:
Splittable<ConstructiveHeuristic<Permutation>>
,ConstructiveHeuristic<Permutation>
WeightedShortestProcessingTime
class, and is defined as:
h(j) = w[j] / p[j], where w[j] is the weight of job j, and p[j] is its processing time.
We modify this to incorporate setup times by instead defining the heuristic as: h(j) = w[j] / (p[j] + s[i][j]), where s[i][j] is the setup time required by job j if it immediately follows job i on the machine, where job i is the preceding job.
Furthermore, this implementation returns: max( MIN_H
, h(j)), where MIN_H
is
a small nonzero value. This is to deal with the possibility of a job with weight w[j] = 0, or
especially high processing and setup times relative to weight. For deterministic construction of
a schedule, this adjustment is unnecessary. However, for stochastic sampling algorithms it is
important for the heuristic to return nonzero values.
In this version, the heuristic is precomputed for all pairs of jobs (e.g., for evaluating job
j for each possible preceding job). This may speed up stochastic sampling search when many
iterations are executed (won't need to recompute the same heuristic values repeatedly). However,
for large problems, the O(n^{2}) space, where n is the number of jobs may be prohibitive.
For a version that doesn't precompute the heuristic, see the WeightedShortestProcessingPlusSetupTime
class, which requires only O(1) space.

Field Summary

Constructor Summary
ConstructorDescriptionConstructs an WeightedShortestProcessingPlusSetupTimePrecompute heuristic. 
Method Summary
Modifier and TypeMethodDescriptionfinal int
Gets the required length of complete solutions to the problem instance for which this constructive heuristic is configured.final Partial<Permutation>
createPartial
(int n) Creates an empty Partial solution, which will be incrementally transformed into a complete solution of a specified length.final Problem<Permutation>
Gets a reference to the instance of the optimization problem that is the subject of this heuristic.double
h
(Partial<Permutation> p, int element, IncrementalEvaluation<Permutation> incEval) Heuristically evaluates the possible addition of an element to the end of a Partial.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cicirello.search.ss.ConstructiveHeuristic
createIncrementalEvaluation, split

Field Details

MIN_H
public static final double MIN_HThe minimum heuristic value. If the heuristic value as calculated is lower than MIN_H, then MIN_H is used as the heuristic value. The reason is related to the primary purpose of the constructive heuristics in the library: heuristic guidance for stochastic sampling algorithms, which assume positive heuristic values (e.g., an h of 0 would be problematic). See Also:


Constructor Details

WeightedShortestProcessingPlusSetupTimePrecompute
Constructs an WeightedShortestProcessingPlusSetupTimePrecompute heuristic. Parameters:
problem
 The instance of a scheduling problem that is the target of the heuristic.


Method Details

h
Description copied from interface:ConstructiveHeuristic
Heuristically evaluates the possible addition of an element to the end of a Partial. Higher evaluations imply that the element is a better choice for the next element to add. For example, if you evaluate two elements, x and y, with h, and h returns a higher value for y than for x, then this means that y is believed to be the better choice according to the heuristic. Implementations of this interface must ensure that h always returns a positive result. This is because stochastic sampling algorithms such as HBSS and VBSS assume that the constructive heuristic returns only positive values. Parameters:
p
 The current state of the Partialelement
 The element under consideration for adding to the PartialincEval
 An IncrementalEvaluation of p. This method assumes that incEval is of the same runtime type as the object returned byConstructiveHeuristic.createIncrementalEvaluation()
. Returns:
 The heuristic evaluation of the hypothetical addition of element to the end of p. The higher the evaluation, the more important the heuristic believes that element should be added next. The intention is to compare the value returned with the heuristic evaluations of other elements. Individual results in isolation are not necessarily meaningful.

getProblem
Description copied from interface:ConstructiveHeuristic
Gets a reference to the instance of the optimization problem that is the subject of this heuristic. Specified by:
getProblem
in interfaceConstructiveHeuristic<Permutation>
 Returns:
 the instance of the optimization problem that is the subject of this heuristic.

createPartial
Description copied from interface:ConstructiveHeuristic
Creates an empty Partial solution, which will be incrementally transformed into a complete solution of a specified length. Specified by:
createPartial
in interfaceConstructiveHeuristic<Permutation>
 Parameters:
n
 the desired length of the final complete solution. Returns:
 an empty Partial solution

completeLength
public final int completeLength()Description copied from interface:ConstructiveHeuristic
Gets the required length of complete solutions to the problem instance for which this constructive heuristic is configured. Specified by:
completeLength
in interfaceConstructiveHeuristic<Permutation>
 Returns:
 length of solutions to the problem instance for which this heuristic is configured
