Record Class TSState
java.lang.Object
java.lang.Record
org.ddolib.examples.talentscheduling.TSState
- Record Components:
remainingScenes- scenes that must still be scheduledmaybeScenes- scenes that may still be scheduled due to state mergingonLocationActors- actors currently available on location
public record TSState(BitSet remainingScenes, BitSet maybeScenes, BitSet onLocationActors)
extends Record
Represents a state in the Talent Scheduling Problem (TalentSched).
A state keeps track of:
remainingScenes— aBitSetcontaining all scenes that still need to be scheduled.maybeScenes— aBitSetused in merged or relaxed states, containing scenes that may need to be scheduled in some merged branches but have already been scheduled in others.onLocationActors— aBitSetrepresenting which actors are currently on location.
The combination of remainingScenes and maybeScenes allows the solver
to represent both definite and potential scheduling decisions in relaxed or merged states.
The onLocationActors field helps track actor availability for scene scheduling.
This record is typically used in decision diagram-based solvers, branch-and-bound, or relaxation algorithms for the TSP.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaybeScenesrecord component.Returns the value of theonLocationActorsrecord component.Returns the value of theremainingScenesrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
TSState
Creates an instance of aTSStaterecord class.- Parameters:
remainingScenes- the value for theremainingScenesrecord componentmaybeScenes- the value for themaybeScenesrecord componentonLocationActors- the value for theonLocationActorsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
remainingScenes
Returns the value of theremainingScenesrecord component.- Returns:
- the value of the
remainingScenesrecord component
-
maybeScenes
Returns the value of themaybeScenesrecord component.- Returns:
- the value of the
maybeScenesrecord component
-
onLocationActors
Returns the value of theonLocationActorsrecord component.- Returns:
- the value of the
onLocationActorsrecord component
-