Record Class RecreateCompleted
java.lang.Object
java.lang.Record
com.graphhopper.jsprit.core.algorithm.listener.events.RecreateCompleted
- Record Components:
iteration- The iteration numbertimestamp- When the event occurredinsertedJobCount- Number of jobs that were successfully insertedunassignedJobs- List of jobs that could not be insertednewSolutionCost- The total cost of the new solution
- All Implemented Interfaces:
AlgorithmEvent
public record RecreateCompleted(int iteration, long timestamp, int insertedJobCount, List<Job> unassignedJobs, double newSolutionCost)
extends Record
implements AlgorithmEvent
Event emitted when the recreate (insertion) phase completes.
-
Constructor Summary
ConstructorsConstructorDescriptionRecreateCompleted(int iteration, long timestamp, int insertedJobCount, List<Job> unassignedJobs, double newSolutionCost) Creates an instance of aRecreateCompletedrecord 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 theinsertedJobCountrecord component.intReturns the value of theiterationrecord component.doubleReturns the value of thenewSolutionCostrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunassignedJobsrecord component.
-
Constructor Details
-
RecreateCompleted
public RecreateCompleted(int iteration, long timestamp, int insertedJobCount, List<Job> unassignedJobs, double newSolutionCost) Creates an instance of aRecreateCompletedrecord class.- Parameters:
iteration- the value for theiterationrecord componenttimestamp- the value for thetimestamprecord componentinsertedJobCount- the value for theinsertedJobCountrecord componentunassignedJobs- the value for theunassignedJobsrecord componentnewSolutionCost- the value for thenewSolutionCostrecord 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
-
insertedJobCount
public int insertedJobCount()Returns the value of theinsertedJobCountrecord component.- Returns:
- the value of the
insertedJobCountrecord component
-
unassignedJobs
Returns the value of theunassignedJobsrecord component.- Returns:
- the value of the
unassignedJobsrecord component
-
newSolutionCost
public double newSolutionCost()Returns the value of thenewSolutionCostrecord component.- Returns:
- the value of the
newSolutionCostrecord component
-