Class CheapestInsertionConcurrent
java.lang.Object
com.graphhopper.jsprit.core.algorithm.recreate.AbstractInsertionStrategy
com.graphhopper.jsprit.core.algorithm.recreate.CheapestInsertionConcurrent
- All Implemented Interfaces:
InsertionStrategy
Concurrent version of
CheapestInsertion.
This implementation parallelizes the evaluation of jobs across multiple threads, significantly improving performance on multi-core machines.
Each iteration evaluates all remaining jobs in parallel, then selects the globally cheapest (job, position) pair and inserts it.
- Author:
- schroeder
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.graphhopper.jsprit.core.algorithm.recreate.AbstractInsertionStrategy
AbstractInsertionStrategy.Insertion -
Field Summary
Fields inherited from class com.graphhopper.jsprit.core.algorithm.recreate.AbstractInsertionStrategy
NO_NEW_DEPARTURE_TIME_YET, NO_NEW_DRIVER_YET, NO_NEW_VEHICLE_YET, random, vrp -
Constructor Summary
ConstructorsConstructorDescriptionCheapestInsertionConcurrent(JobInsertionCostsCalculator insertionCostsCalculator, ExecutorService executorService, VehicleRoutingProblem vrp) -
Method Summary
Modifier and TypeMethodDescriptioninsertUnassignedJobs(Collection<VehicleRoute> vehicleRoutes, Collection<Job> unassignedJobs) toString()Methods inherited from class com.graphhopper.jsprit.core.algorithm.recreate.AbstractInsertionStrategy
addListener, getListeners, insertJob, insertJobs, markUnassigned, removeListener, setRandom
-
Constructor Details
-
CheapestInsertionConcurrent
public CheapestInsertionConcurrent(JobInsertionCostsCalculator insertionCostsCalculator, ExecutorService executorService, VehicleRoutingProblem vrp)
-
-
Method Details
-
toString
-
insertUnassignedJobs
public Collection<Job> insertUnassignedJobs(Collection<VehicleRoute> vehicleRoutes, Collection<Job> unassignedJobs) - Specified by:
insertUnassignedJobsin classAbstractInsertionStrategy
-