Class WeightedCriticalRatio

  • All Implemented Interfaces:
    ConstructiveHeuristic<Permutation>

    public final class WeightedCriticalRatio
    extends WeightedShortestProcessingTime

    This is an implementation of a variation of the weighted critical ratio heuristic. The usual definition of this heuristic is: h(j) = (w[j]/p[j])(1/(1+S(j)/p[j])), where w[j] is the weight of job j, p[j] is its processing time, and S(j) is a calculation of the slack of job j where slack S(j) is d[j] - T - p[j] - s[j]. The 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).

    Historically, this heuristic has been criticized for allowing negative evaluations (i.e., slack S(j) is negative for jobs completing late). Additionally, this library's use of constructive heuristics is for stochastic sampling, for which we require positive heuristic values. Therefore, we have altered the definition as follows: h(j) = (w[j]/p[j])(1/(1+max(0,S(j))/p[j])).

    Furthermore, 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 non-zero value.