Class JobInsertionContext

java.lang.Object
com.graphhopper.jsprit.core.problem.misc.JobInsertionContext

public class JobInsertionContext extends Object
Provides context information about a particular job insertion.
  • 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 in
      job - the job to be inserted
      newVehicle - the new vehicle that should operate the new route
      newDriver - the new driver that should operate the new route
      newDepTime - the new departure time at the new vehicle's start location
  • Method Details

    • getRoute

      public VehicleRoute getRoute()
      Returns the existing route where the .getJob() needs to be inserted in.
      Returns:
      the route
    • getJob

      public Job getJob()
      Returns the job that needs to be inserted.
      Returns:
      the job
    • getNewVehicle

      public Vehicle getNewVehicle()
      Returns the vehicle that should operate the new route, i.e. route this.getRoute() + new job this.getJob().
      Returns:
      the newVehicle
    • getNewDriver

      public Driver getNewDriver()
      Returns the driver that should operate the new route, i.e. route this.getRoute() + new job this.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

      public List<TourActivity> getAssociatedActivities()
    • setRelatedActivityContext

      public void setRelatedActivityContext(ActivityContext relatedActivityContext)
      Sets pickup context.
      Parameters:
      relatedActivityContext - pickup context
    • getRelatedActivityContext

      public ActivityContext getRelatedActivityContext()
      Returns pickup context. If no context available, returns null.
      Returns:
      pickup context
    • setActivityContext

      public void setActivityContext(ActivityContext activityContext)
    • getActivityContext

      public ActivityContext getActivityContext()