Record Class SMICState

java.lang.Object
java.lang.Record
org.ddolib.examples.smic.SMICState
Record Components:
remainingJobs - the set of job indices that remain to be scheduled
currentTime - the current time in the schedule
minCurrentInventory - the minimum possible inventory level at this state
maxCurrentInventory - the maximum possible inventory level at this state

public record SMICState(BitSet remainingJobs, int currentTime, int minCurrentInventory, int maxCurrentInventory) extends Record
The SMICState record represents a state in the search space of the Single Machine with Inventory Constraint (SMIC) scheduling problem.

Each state encodes the current progress of the scheduling process, including:

  • The set of jobs that remain to be scheduled,
  • The current simulation time,
  • The minimum and maximum possible inventory levels, used to handle relaxations and dominance checks in state-space search algorithms.

This record is immutable and is typically used in algorithms such as Decision Diagram Optimization (DDO), Anytime Column Search (ACS), or other branch-and-bound based solvers to represent nodes of the search tree or diagram layers.

Example Usage


 Set<Integer> remaining = Set.of(1, 2, 3);
 SMICState state = new SMICState(remaining, 10, 5, 15);
 System.out.println(state);
 

Output:

 RemainingJobs [1, 2, 3] ----> currentTime 10 ---> minCurrentInventory5 ---> maxCurrentInventory15
 
See Also:
  • Constructor Details

    • SMICState

      public SMICState(BitSet remainingJobs, int currentTime, int minCurrentInventory, int maxCurrentInventory)
      Creates an instance of a SMICState record class.
      Parameters:
      remainingJobs - the value for the remainingJobs record component
      currentTime - the value for the currentTime record component
      minCurrentInventory - the value for the minCurrentInventory record component
      maxCurrentInventory - the value for the maxCurrentInventory record component
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this state, displaying the set of remaining jobs, the current time, and the current inventory bounds.
      Specified by:
      toString in class Record
      Returns:
      a formatted string describing the state
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • remainingJobs

      public BitSet remainingJobs()
      Returns the value of the remainingJobs record component.
      Returns:
      the value of the remainingJobs record component
    • currentTime

      public int currentTime()
      Returns the value of the currentTime record component.
      Returns:
      the value of the currentTime record component
    • minCurrentInventory

      public int minCurrentInventory()
      Returns the value of the minCurrentInventory record component.
      Returns:
      the value of the minCurrentInventory record component
    • maxCurrentInventory

      public int maxCurrentInventory()
      Returns the value of the maxCurrentInventory record component.
      Returns:
      the value of the maxCurrentInventory record component