VRP - Create a dynamic service time

482
2
09-21-2016 11:38 AM
Highlighted
New Contributor III

I am working on a model to optimize a fleet of over 450 school buses and what trips they will service. Everything works beautifully, except one thing, and I will describe the scenario.

When the school bell rings in the afternoon at 2:00 PM the bus should be there and wait 7 minutes to service the order (servicetime). The bus should depart at 2:07 PM ideally. However, if I strictly enforce this time rule, I am left with an unrealistic increase in equipment because I some buses will be late. However, If I allow buses to be late say 5 minutes, then a bus can arrive at 2:05 PM, but since my service time always remains 7 minutes, I am left with is a bus leaving at 2:12 PM, which distorts my next set of orders. What I need is a way to subtract service time from arrival time, but is there a way I can set service time dynamically?

Here's what ESRI says:

A time window only states when a vehicle can arrive at an order; it doesn't state when the service time must be completed. To account for service time and leave before the time window is over, subtract ServiceTime from the TimeWindowEnd1 field.

What they fail to say is where and how to do this. Any suggestions?

Doug

Reply
0 Kudos
2 Replies
Highlighted
New Contributor III

Hello Doug,

I have a doubt here, you said the service time always remain 7 minutes and at the end, you said about incorporating the dynamic service time. I am unsure if it is static or dynamic.

Assuming the service time is 7 minutes always, I have a suggestion for you.

the statement

'A time window only states when a vehicle can arrive at an order; it doesn't state when the service time must be completed. To account for service time and leave before the time window is over, subtract ServiceTime from the TimeWindowEnd1 field.' , means, if the service time is 7 minutes and you allowed 15 minutes delay in the arrival which means timewindowstart1 = 2:00 PM and timewindowend1 = 2:15 PM. and you want the bus to depart by 2:15 PM(with service of 7 minutes), you should set timewindowstart1 = 2:00 PM and timewindowend1 = 2:08 PM. and service time being 7 minutes entered in the solver. This will take care of latest allowed depart time(timewindowend1 +7).

You would also want to explore InboundArriveTime if your date value and time value is static. 

Please let me know if you have a doubt.

Thanks,

Shubhada

Reply
0 Kudos
Highlighted
New Contributor III

I appreciate the suggestion, but it results in the same problem I am struggling to resolve. Time windows only control when a vehicle can arrive to a destination, so, using my times, if I set the window from 2:00 PM to 2:07 PM with a 7 minute service time, the bus could leave anywhere from 2:07 PM to 2:14 PM. This is really what I want as the bus should ideally arrive by 2:00 PM and MUST leave by 2:07 PM. However, the reality of it, buses are late sometimes and as I said if I totally enforce the 7 minute service time, then I project too much equipment because buses are leaving late (say 2:11 PM.) That's why I want the service time to be TimeWindow2 - ArrivalTime. If the bus couldn't make it until 2:03 PM, then my service time would ideally change to 4 minutes, because as I said the bus must leave at 2:07 PM. There are some rules that are strict (depart at 2:07 PM) and some that are flexible (7 minute service time.)

My solution was to change the timewindow1 to 2:06:50 PM, timewindow2 to 2:07 PM, and my servicetime to 0 minutes . Equipment is now tiering logically, which is great, but I don't like that I am not considering service time in the model because in reality it takes time to load children onto a bus.

InboundArriveTime is a good suggestion, but from my understanding equipment won't leave the depot until the order has arrived at the destination. I need my equipment to be in transit, or at the destination, as to anticipate picking up the order. I may be misunderstanding this variable. I may need to experiment with this variable more.

If ESRI would implement a "depart at" variable, then I could schedule my time windows and tell the modeller to leave at an exact time. Couple this with additional variables like minimum service time and maximum service time, then I could create a much more accurate VRP model.

Thanks for the suggestion.

Doug

Reply
0 Kudos