0

I am analyzing JSPRIT functionalities with time window for a specific problem of a few days single trip.

The truck is being loaded with packages, which are to be delivered within a few days period (not one day). This is because there are large distances between delivery points. Every stop is opened from 8:00 till 16:00 so there are hard time windows. So during the first day the truck delivers some packages up to 16:00 and no more deliveries the same day allowed.

Then driver should go into another delivery point which is going to be open again the following day from 8:00 till 16:00 and procedure continues till all packages are being delivered and track can go back to its depot.

Is it possible to implement such scenario within JSPRIT ?

Samuel Liew
  • 76,741
  • 107
  • 159
  • 260

1 Answers1

0

Late reply sorry. I don't see why this should be too much of a problem. Just define your time unit across the whole week and don't give any of the jobs a time window (or a time window that basically spans the whole week).

Then you define your vehicles. Say you had a fleet of 2 vehicles, you'd have to define:

mondayA
mondayB
tuesdayA
tuesdayB
wednesdayA
....

Each of these vehicles only operate between 7.30am and 4pm (no return to warehouse) for one day in your one-week timeline. The other jobs cannot be serviced when there are no vehicles available so this meets your objective (with a small 30 minute approximation on the start time).

I think it would be much more complicated to define the problem where each job was duplicated on each day, so you may have to accept this, or similar, approximation unless you want to go down the path of either a massively-scaled problem with lots of constraints, or writing custom constraints.

roganjosh
  • 12,594
  • 4
  • 29
  • 46