public abstract class AbstractInsertionStrategy extends Object implements InsertionStrategy
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractInsertionStrategy.Insertion |
| Modifier and Type | Field and Description |
|---|---|
protected static double |
NO_NEW_DEPARTURE_TIME_YET |
protected static Driver |
NO_NEW_DRIVER_YET |
protected static Vehicle |
NO_NEW_VEHICLE_YET |
protected Random |
random |
protected VehicleRoutingProblem |
vrp |
| Constructor and Description |
|---|
AbstractInsertionStrategy(VehicleRoutingProblem vrp) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(InsertionListener insertionListener) |
Collection<InsertionListener> |
getListeners() |
protected void |
insertJob(Job unassignedJob,
InsertionData iData,
VehicleRoute inRoute) |
Collection<Job> |
insertJobs(Collection<VehicleRoute> vehicleRoutes,
Collection<Job> unassignedJobs)
Inserts unassigned jobs into vehicle routes.
|
abstract Collection<Job> |
insertUnassignedJobs(Collection<VehicleRoute> vehicleRoutes,
Collection<Job> unassignedJobs) |
void |
markUnassigned(Job unassigned,
List<String> reasons) |
void |
removeListener(InsertionListener insertionListener) |
void |
setRandom(Random random) |
protected Random random
protected static final double NO_NEW_DEPARTURE_TIME_YET
protected static final Vehicle NO_NEW_VEHICLE_YET
protected static final Driver NO_NEW_DRIVER_YET
protected VehicleRoutingProblem vrp
public AbstractInsertionStrategy(VehicleRoutingProblem vrp)
public void setRandom(Random random)
public Collection<Job> insertJobs(Collection<VehicleRoute> vehicleRoutes, Collection<Job> unassignedJobs)
InsertionStrategyinsertJobs in interface InsertionStrategyvehicleRoutes - existing vehicle routesunassignedJobs - jobs to be insertedpublic abstract Collection<Job> insertUnassignedJobs(Collection<VehicleRoute> vehicleRoutes, Collection<Job> unassignedJobs)
public void removeListener(InsertionListener insertionListener)
removeListener in interface InsertionStrategypublic Collection<InsertionListener> getListeners()
getListeners in interface InsertionStrategypublic void addListener(InsertionListener insertionListener)
addListener in interface InsertionStrategyprotected void insertJob(Job unassignedJob, InsertionData iData, VehicleRoute inRoute)
Copyright © 2013–2024. All rights reserved.