Record Class StrategyExecuted
java.lang.Object
java.lang.Record
com.graphhopper.jsprit.core.algorithm.listener.events.StrategyExecuted
- Record Components:
iteration- The iteration numbertimestamp- When the strategy completed executionstrategyId- The full strategy ID including operator names
- All Implemented Interfaces:
AlgorithmEvent
public record StrategyExecuted(int iteration, long timestamp, String strategyId)
extends Record
implements AlgorithmEvent
Emitted after a strategy has been executed (ruin and insertion completed).
This event provides the strategy ID that was used in the current iteration. For independent selection, this will be an expressive name like "independent:radial+regretFast". For legacy strategies, it will be the coupled strategy name like "radial_regret".
-
Constructor Summary
ConstructorsConstructorDescriptionStrategyExecuted(int iteration, long timestamp, String strategyId) Creates an instance of aStrategyExecutedrecord class. -
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.intReturns the value of theiterationrecord component.Returns the value of thestrategyIdrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StrategyExecuted
Creates an instance of aStrategyExecutedrecord class.- Parameters:
iteration- the value for theiterationrecord componenttimestamp- the value for thetimestamprecord componentstrategyId- the value for thestrategyIdrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
iteration
public int iteration()Returns the value of theiterationrecord component.- Specified by:
iterationin interfaceAlgorithmEvent- Returns:
- the value of the
iterationrecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceAlgorithmEvent- Returns:
- the value of the
timestamprecord component
-
strategyId
Returns the value of thestrategyIdrecord component.- Returns:
- the value of the
strategyIdrecord component
-