Class JobInsertionContext
java.lang.Object
com.graphhopper.jsprit.core.problem.misc.JobInsertionContext
Provides context information about a particular job insertion.
-
Constructor Summary
ConstructorsConstructorDescriptionJobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime) Constructs the context. -
Method Summary
Modifier and TypeMethodDescriptiongetJob()Returns the job that needs to be inserted.doubleReturns the new departure time at the new vehicle's start location.Returns the driver that should operate the new route, i.e.Returns the vehicle that should operate the new route, i.e.Returns pickup context.getRoute()Returns the existing route where the .getJob() needs to be inserted in.voidsetActivityContext(ActivityContext activityContext) voidsetRelatedActivityContext(ActivityContext relatedActivityContext) Sets pickup context.
-
Constructor Details
-
JobInsertionContext
public JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime) Constructs the context.- Parameters:
route- the existing route where the job needs to be inserted injob- the job to be insertednewVehicle- the new vehicle that should operate the new routenewDriver- the new driver that should operate the new routenewDepTime- the new departure time at the new vehicle's start location
-
-
Method Details
-
getRoute
Returns the existing route where the .getJob() needs to be inserted in.- Returns:
- the route
-
getJob
Returns the job that needs to be inserted.- Returns:
- the job
-
getNewVehicle
Returns the vehicle that should operate the new route, i.e. routethis.getRoute()+ new jobthis.getJob().- Returns:
- the newVehicle
-
getNewDriver
Returns the driver that should operate the new route, i.e. routethis.getRoute()+ new jobthis.getJob().Currently the driver is just a mock, it has no functions
- Returns:
- the newDriver
-
getNewDepTime
public double getNewDepTime()Returns the new departure time at the new vehicle's start location.- Returns:
- the newDepTime
-
getAssociatedActivities
-
setRelatedActivityContext
Sets pickup context.- Parameters:
relatedActivityContext- pickup context
-
getRelatedActivityContext
Returns pickup context. If no context available, returns null.- Returns:
- pickup context
-
setActivityContext
-
getActivityContext
-