Record Class InsertionOperatorFactory.Context

java.lang.Object
java.lang.Record
com.graphhopper.jsprit.core.algorithm.recreate.InsertionOperatorFactory.Context
Enclosing interface:
InsertionOperatorFactory

public static record InsertionOperatorFactory.Context(VehicleRoutingProblem vrp, VehicleFleetManager fleetManager, StateManager stateManager, ConstraintManager constraintManager, ActivityInsertionCostsCalculator activityInsertionCalculator, ScoringFunction scoringFunction, Random random, ExecutorService executorService, int numThreads) extends Record
Context object containing all dependencies needed to create an insertion strategy.
  • Constructor Details

    • Context

      public Context(VehicleRoutingProblem vrp, VehicleFleetManager fleetManager, StateManager stateManager, ConstraintManager constraintManager, ActivityInsertionCostsCalculator activityInsertionCalculator, ScoringFunction scoringFunction, Random random, ExecutorService executorService, int numThreads)
      Creates an instance of a Context record class.
      Parameters:
      vrp - the value for the vrp record component
      fleetManager - the value for the fleetManager record component
      stateManager - the value for the stateManager record component
      constraintManager - the value for the constraintManager record component
      activityInsertionCalculator - the value for the activityInsertionCalculator record component
      scoringFunction - the value for the scoringFunction record component
      random - the value for the random record component
      executorService - the value for the executorService record component
      numThreads - the value for the numThreads record component
  • Method Details

    • isConcurrent

      public boolean isConcurrent()
    • 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.
    • vrp

      public VehicleRoutingProblem vrp()
      Returns the value of the vrp record component.
      Returns:
      the value of the vrp record component
    • fleetManager

      public VehicleFleetManager fleetManager()
      Returns the value of the fleetManager record component.
      Returns:
      the value of the fleetManager record component
    • stateManager

      public StateManager stateManager()
      Returns the value of the stateManager record component.
      Returns:
      the value of the stateManager record component
    • constraintManager

      public ConstraintManager constraintManager()
      Returns the value of the constraintManager record component.
      Returns:
      the value of the constraintManager record component
    • activityInsertionCalculator

      public ActivityInsertionCostsCalculator activityInsertionCalculator()
      Returns the value of the activityInsertionCalculator record component.
      Returns:
      the value of the activityInsertionCalculator record component
    • scoringFunction

      public ScoringFunction scoringFunction()
      Returns the value of the scoringFunction record component.
      Returns:
      the value of the scoringFunction record component
    • random

      public Random random()
      Returns the value of the random record component.
      Returns:
      the value of the random record component
    • executorService

      public ExecutorService executorService()
      Returns the value of the executorService record component.
      Returns:
      the value of the executorService record component
    • numThreads

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