GraphHopper.com | Forum | GitHub | Maps | Blog

Service time in depot


#1

Hello,

it’s my first post on this forum, so thanks for doing the great job and delivering so powerful software.

I have two problems, maybe anyone can help me to solve it. Suppose I have a depot (as far as I know there’s no such object in Jsprit and depot is defined by the start location of the car, but it doesn’t matter) and N vehicles.

  1. Is there any way to define the service time in depot? I mean, something similar to Service.ServiceTime.

  2. At the same time only K (K<N) vehicles can be loaded/unloaded in depot [let say it takes 10 minutes] and (N-K) vehicles have to wait [at least 10 minutes] for their turn. It changes their real start hour of time window from S to S+10mins, and created plan may differ.

Is there any way I can do it in Jsprit? Now in my program all N vehicles can be loaded/unloaded simultaneously, what is not proper in my situation.

Thanks,
Mateusz


#2

I think your first point is doable in certain cases. I suppose in your problem you have some pickups and/or deliveries which are unloaded/loaded at the vehicle end/start location (depot). In the case of single depot, or, in the multi-depot case, if you know which depot each pickup or delivery is associated with, you can convert those pickup or delivery jobs into shipments, with one leg at the depot. In this way you can define service time for the leg at the depot.

Note that the service time is for individual activity. If you want a flat service time for no matter how many loading or unloading activities at the depot, you can try the setup time.

Your second point seems difficult to do with current Jsprit, unfortunately, if not impossible… My initial rough idea would be to work with the getActivityDuration method in VehicleRoutingActivityCosts.

EDIT: hmm maybe your first point can also be achieved by the getActivityDuration method? I’m not sure…

Hopefully this helps.

Best regards,
He