java.lang.Object
org.cicirello.search.problems.scheduling.WeightedShortestProcessingTime
org.cicirello.search.problems.scheduling.ATCS
 All Implemented Interfaces:
Splittable<ConstructiveHeuristic<Permutation>>
,ConstructiveHeuristic<Permutation>
This is an implementation of the ATCS (Apparent Tardiness Cost with Setups) heuristic. ATCS is
defined as: h(j) = (w[j]/p[j]) exp( max(0,d[j]  T  p[j]) / (k_{1} p̄) ) exp(
s[i][j] / (k_{2} s̄)), where w[j] is the weight of job j, p[j] is its processing
time, d[j] is the job's due date, T is the current time, and s[i][j] is any setup time of the job
if it follows job i. The k_{1} and k_{2} are parameters that can be tuned based
on problem instance characteristics, p̄ is the average processing time of all jobs, and
s̄ is the average setup time of all jobs. The p̄ and s̄ are computed once at the
start. For a version of the heuristic that dynamically updates these, see the
DynamicATCS
class.
The constant MIN_H
defines the minimum value the heuristic will return, preventing
h(j)=0 in support of stochastic sampling algorithms for which h(j)=0 is problematic. This
implementation returns max( MIN_H
, h(j)), where MIN_H
is a small nonzero
value.

Field Summary

Constructor Summary
ConstructorDescriptionATCS
(SingleMachineSchedulingProblem problem) Constructs an ATCS heuristic.ATCS
(SingleMachineSchedulingProblem problem, double k1, double k2) Constructs an ATCS 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.Creates an IncrementalEvaluation object corresponding to an initially empty Partial for use in incrementally constructing a solution to the problem for which this heuristic is designed.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
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

ATCS
Constructs an ATCS heuristic. Parameters:
problem
 The instance of a scheduling problem that is the target of the heuristic.k1
 A parameter to the heuristic, which must be positive.k2
 A parameter to the heuristic, which must be positive. Throws:
IllegalArgumentException
 if problem.hasDueDates() returns false.IllegalArgumentException
 if k ≤ 0.0.

ATCS
Constructs an ATCS heuristic. Sets the values of k1 and k2 according to the procedure described by the authors of the ATCS heuristic. Parameters:
problem
 The instance of a scheduling problem that is the target of the heuristic. Throws:
IllegalArgumentException
 if problem.hasDueDates() returns false.


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. Specified by:
h
in interfaceConstructiveHeuristic<Permutation>
 Overrides:
h
in classWeightedShortestProcessingTime
 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.

createIncrementalEvaluation
Description copied from interface:ConstructiveHeuristic
Creates an IncrementalEvaluation object corresponding to an initially empty Partial for use in incrementally constructing a solution to the problem for which this heuristic is designed. The object returned incrementally computes any data associated with a Partial as needed by theConstructiveHeuristic.h(org.cicirello.search.ss.Partial<T>, int, org.cicirello.search.ss.IncrementalEvaluation<T>)
method. TheConstructiveHeuristic.h(org.cicirello.search.ss.Partial<T>, int, org.cicirello.search.ss.IncrementalEvaluation<T>)
method will assume that it will be given an object of the specific runtime type returned by this method. It is unsafe to pass IncrementalEvaluation objects created by one heuristic to theConstructiveHeuristic.h(org.cicirello.search.ss.Partial<T>, int, org.cicirello.search.ss.IncrementalEvaluation<T>)
method of another.The default implementation simply returns null, which is appropriate for heuristics that won't benefit from incrementally computing heuristic information.
 Returns:
 An IncrementalEvaluation for an empty Partial to be used for incrementally computing
any data required by the
ConstructiveHeuristic.h(org.cicirello.search.ss.Partial<T>, int, org.cicirello.search.ss.IncrementalEvaluation<T>)
method.

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
