Record Class JobInserted

java.lang.Object
java.lang.Record
com.graphhopper.jsprit.core.algorithm.listener.events.JobInserted
Record Components:
iteration - The iteration number
timestamp - When the event occurred
job - The job that was inserted
routeId - The ID of the vehicle/route the job was inserted into
position - The position in the route where the job was inserted
insertionCost - The total insertion cost
costBreakdown - The breakdown of insertion costs by component (may be null)
insertionOrder - The order in which this job was inserted (1-based)
All Implemented Interfaces:
AlgorithmEvent

public record JobInserted(int iteration, long timestamp, Job job, String routeId, int position, double insertionCost, InsertionCostBreakdown costBreakdown, int insertionOrder) extends Record implements AlgorithmEvent
Event emitted when a job is successfully inserted into a route.
  • Constructor Details

    • JobInserted

      public JobInserted(int iteration, long timestamp, Job job, String routeId, int position, double insertionCost, InsertionCostBreakdown costBreakdown, int insertionOrder)
      Creates an instance of a JobInserted record class.
      Parameters:
      iteration - the value for the iteration record component
      timestamp - the value for the timestamp record component
      job - the value for the job record component
      routeId - the value for the routeId record component
      position - the value for the position record component
      insertionCost - the value for the insertionCost record component
      costBreakdown - the value for the costBreakdown record component
      insertionOrder - the value for the insertionOrder record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
    • iteration

      public int iteration()
      Returns the value of the iteration record component.
      Specified by:
      iteration in interface AlgorithmEvent
      Returns:
      the value of the iteration record component
    • timestamp

      public long timestamp()
      Returns the value of the timestamp record component.
      Specified by:
      timestamp in interface AlgorithmEvent
      Returns:
      the value of the timestamp record component
    • job

      public Job job()
      Returns the value of the job record component.
      Returns:
      the value of the job record component
    • routeId

      public String routeId()
      Returns the value of the routeId record component.
      Returns:
      the value of the routeId record component
    • position

      public int position()
      Returns the value of the position record component.
      Returns:
      the value of the position record component
    • insertionCost

      public double insertionCost()
      Returns the value of the insertionCost record component.
      Returns:
      the value of the insertionCost record component
    • costBreakdown

      public InsertionCostBreakdown costBreakdown()
      Returns the value of the costBreakdown record component.
      Returns:
      the value of the costBreakdown record component
    • insertionOrder

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