Package org.ddolib.examples.smic
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 scheduledcurrentTime- the current time in the scheduleminCurrentInventory- the minimum possible inventory level at this statemaxCurrentInventory- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecurrentTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxCurrentInventoryrecord component.intReturns the value of theminCurrentInventoryrecord component.Returns the value of theremainingJobsrecord component.toString()Returns a string representation of this state, displaying the set of remaining jobs, the current time, and the current inventory bounds.
-
Constructor Details
-
SMICState
public SMICState(BitSet remainingJobs, int currentTime, int minCurrentInventory, int maxCurrentInventory) Creates an instance of aSMICStaterecord class.- Parameters:
remainingJobs- the value for theremainingJobsrecord componentcurrentTime- the value for thecurrentTimerecord componentminCurrentInventory- the value for theminCurrentInventoryrecord componentmaxCurrentInventory- the value for themaxCurrentInventoryrecord component
-
-
Method Details
-
toString
Returns a string representation of this state, displaying the set of remaining jobs, the current time, and the current inventory bounds. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
remainingJobs
Returns the value of theremainingJobsrecord component.- Returns:
- the value of the
remainingJobsrecord component
-
currentTime
public int currentTime()Returns the value of thecurrentTimerecord component.- Returns:
- the value of the
currentTimerecord component
-
minCurrentInventory
public int minCurrentInventory()Returns the value of theminCurrentInventoryrecord component.- Returns:
- the value of the
minCurrentInventoryrecord component
-
maxCurrentInventory
public int maxCurrentInventory()Returns the value of themaxCurrentInventoryrecord component.- Returns:
- the value of the
maxCurrentInventoryrecord component
-