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 Summary
ConstructorsConstructorDescriptionContext(VehicleRoutingProblem vrp, VehicleFleetManager fleetManager, StateManager stateManager, ConstraintManager constraintManager, ActivityInsertionCostsCalculator activityInsertionCalculator, ScoringFunction scoringFunction, Random random, ExecutorService executorService, int numThreads) Creates an instance of aContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactivityInsertionCalculatorrecord component.Returns the value of theconstraintManagerrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexecutorServicerecord component.Returns the value of thefleetManagerrecord component.final inthashCode()Returns a hash code value for this object.booleanintReturns the value of thenumThreadsrecord component.random()Returns the value of therandomrecord component.Returns the value of thescoringFunctionrecord component.Returns the value of thestateManagerrecord component.final StringtoString()Returns a string representation of this record class.vrp()Returns the value of thevrprecord component.
-
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 aContextrecord class.- Parameters:
vrp- the value for thevrprecord componentfleetManager- the value for thefleetManagerrecord componentstateManager- the value for thestateManagerrecord componentconstraintManager- the value for theconstraintManagerrecord componentactivityInsertionCalculator- the value for theactivityInsertionCalculatorrecord componentscoringFunction- the value for thescoringFunctionrecord componentrandom- the value for therandomrecord componentexecutorService- the value for theexecutorServicerecord componentnumThreads- the value for thenumThreadsrecord component
-
-
Method Details
-
isConcurrent
public boolean isConcurrent() -
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 '=='. -
vrp
Returns the value of thevrprecord component.- Returns:
- the value of the
vrprecord component
-
fleetManager
Returns the value of thefleetManagerrecord component.- Returns:
- the value of the
fleetManagerrecord component
-
stateManager
Returns the value of thestateManagerrecord component.- Returns:
- the value of the
stateManagerrecord component
-
constraintManager
Returns the value of theconstraintManagerrecord component.- Returns:
- the value of the
constraintManagerrecord component
-
activityInsertionCalculator
Returns the value of theactivityInsertionCalculatorrecord component.- Returns:
- the value of the
activityInsertionCalculatorrecord component
-
scoringFunction
Returns the value of thescoringFunctionrecord component.- Returns:
- the value of the
scoringFunctionrecord component
-
random
Returns the value of therandomrecord component.- Returns:
- the value of the
randomrecord component
-
executorService
Returns the value of theexecutorServicerecord component.- Returns:
- the value of the
executorServicerecord component
-
numThreads
public int numThreads()Returns the value of thenumThreadsrecord component.- Returns:
- the value of the
numThreadsrecord component
-