public class RegretInsertionConcurrentFast extends AbstractInsertionStrategy
Basically calculates the insertion cost of the firstBest and the secondBest alternative. The score is then calculated as difference between secondBest and firstBest, plus additional scoring variables that can defined in this.ScoringFunction. The idea is that if the cost of the secondBest alternative is way higher than the first best, it seems to be important to insert this customer immediatedly. If difference is not that high, it might not impact solution if this customer is inserted later.
AbstractInsertionStrategy.InsertionNO_NEW_DEPARTURE_TIME_YET, NO_NEW_DRIVER_YET, NO_NEW_VEHICLE_YET, random, vrp| Constructor and Description |
|---|
RegretInsertionConcurrentFast(JobInsertionCostsCalculator jobInsertionCalculator,
VehicleRoutingProblem vehicleRoutingProblem,
ExecutorService executorService,
VehicleFleetManager fleetManager) |
| Modifier and Type | Method and Description |
|---|---|
Collection<Job> |
insertUnassignedJobs(Collection<VehicleRoute> routes,
Collection<Job> unassignedJobs)
Runs insertion.
|
void |
setDependencyTypes(DependencyType[] dependencyTypes) |
void |
setScoringFunction(ScoringFunction scoringFunction)
Sets the scoring function.
|
void |
setSwitchAllowed(boolean switchAllowed) |
String |
toString() |
addListener, getListeners, insertJob, insertJobs, removeListener, setRandompublic RegretInsertionConcurrentFast(JobInsertionCostsCalculator jobInsertionCalculator, VehicleRoutingProblem vehicleRoutingProblem, ExecutorService executorService, VehicleFleetManager fleetManager)
public void setScoringFunction(ScoringFunction scoringFunction)
By default, the this.TimeWindowScorer is used.
scoringFunction - to scorepublic void setSwitchAllowed(boolean switchAllowed)
public void setDependencyTypes(DependencyType[] dependencyTypes)
public Collection<Job> insertUnassignedJobs(Collection<VehicleRoute> routes, Collection<Job> unassignedJobs)
Before inserting a job, all unassigned jobs are scored according to its best- and secondBest-insertion plus additional scoring variables.
insertUnassignedJobs in class AbstractInsertionStrategyRuntimeException - if smth went wrong with thread executionCopyright © 2013–2016. All rights reserved.