Class SMICRanking

java.lang.Object
org.ddolib.examples.smic.SMICRanking
All Implemented Interfaces:
Comparator<SMICState>, StateRanking<SMICState>

public class SMICRanking extends Object implements StateRanking<SMICState>
The SMICRanking class defines a heuristic ranking criterion for comparing two SMICState instances during search or optimization.

It implements the StateRanking interface, which is used by decision diagram optimization (DDO) solvers or search algorithms to determine the relative quality or priority of explored states.

In this implementation, the ranking is based solely on the currentTime attribute of the state — that is, the state with the smaller current time is considered better (ranked higher), since it represents a schedule that reaches an earlier point in time.

This ranking can be used, for example, to expand partial schedules that have progressed less in time before others, potentially leading to better exploration efficiency in time-sensitive scheduling problems.

See Also:
  • Constructor Details

    • SMICRanking

      public SMICRanking()
  • Method Details

    • compare

      public int compare(SMICState o1, SMICState o2)
      Compares two SMICState instances based on their current time.

      The comparison is ascending: a state with a smaller currentTime is considered "better" or of higher priority.

      Specified by:
      compare in interface Comparator<SMICState>
      Parameters:
      o1 - the first state to compare
      o2 - the second state to compare
      Returns:
      a negative integer if o1 has a smaller current time than o2, zero if they are equal, or a positive integer otherwise