public final class MinimumSlackTime extends Object
This is an implementation of the minimum slack time (MST) heuristic. The slack S(j) of job j is defined as S(j) = d[j] - T - p[j] - s[j], where d[j] is the job's due date, T is the current time, and s[j] is any setup time of the job (for problems with setup times). The MST heuristic chooses to schedule the job with the least slack. We need to define the heuristic h(j) such that h(j) > 0 in order to support stochastic sampling search algorithms. Below we derive the rule that we use.
First, note that since the heuristic is used to compare jobs relative to each other, and since during a specific decision making scenario, the value of T is the same when computing slack for all jobs (it is just the current time), the job that has minimum S(j), also has minimum W(j) = d[j] - p[j] - s[j]. This is equivalent to the job that has maximum value of X(j) = -W(j) = p[j] + s[j] - d[j]. X(j) can be negative or zero. So we will add a constant d[max], to derive our chosen definition of the MST heuristic: h(j) = p[j] + s[j] - d[j] + d[max]. This will always be positive, since if j is the job with max due date, h(j) simplifies to p[j] + s[j], which must be positive since processing times are always positive. And the job that has maximum h(j) has minimum S(j), using this definition is equivalent to the MST heuristic. We do not dynamically update d[max] as jobs are scheduled.
Fields Modifier and Type Field Description
MIN_HThe minimum heuristic value.
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
completeLength()Gets the required length of complete solutions to the problem instance for which this constructive heuristic is configured.
createPartial(int n)Creates an empty Partial solution, which will be incrementally transformed into a complete solution of a specified length.
getProblem()Gets a reference to the instance of the optimization problem that is the subject of this heuristic.
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
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:
- Constant Field Values
public double h(Partial<Permutation> p, int element, IncrementalEvaluation<Permutation> incEval)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.
p- The current state of the Partial
element- The element under consideration for adding to the Partial
incEval- An IncrementalEvaluation of p. This method assumes that incEval is of the same runtime type as the object returned by
- 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.
public final Problem<Permutation> getProblem()Gets a reference to the instance of the optimization problem that is the subject of this heuristic.
public final Partial<Permutation> createPartial(int n)Creates an empty Partial solution, which will be incrementally transformed into a complete solution of a specified length.
public final int completeLength()Gets the required length of complete solutions to the problem instance for which this constructive heuristic is configured.