Trying to understand routing decisions (VRP)

566
2
05-17-2012 07:17 AM
AndrewWeisensel
New Contributor
Our client is in the people transportation business and we have been working with them to assist in scheduling.  This example will no doubt seem odd when considering the overall intention of ArcGIS and Network Analyst, but please bear with me.  Often times our client will start their scheduling by assigning some (usually one to five) trips [Order] to a driver [Route].  These trips [Orders] consist of both a pickup location and a drop off location [Ordered Pair].  It is not uncommon for some of these pre-assigned trips to be impossible to accomplish with hard window time frames.  Here is an example:

Trip A has a 4:45 pickup time, Trip B has a 4:46 pickup time and is 5 miles away.  Both trips are going to the same destination address.

Our Client will assign these two trips to the same driver as they are in the same general proximity.  Their passengers typically know that they are not going to be picked up exactly at the times listed, so the actual times they have listed are more to help our client visually see them together.  The problem however is trying to get Network Analyst to accept these pre-assigned trips with the route.  So far, the only way I've been able to avoid a violated constraints message is by setting the service time to zero for both pickup locations, opening the TimeWindowStart1/TimeWindowEnd1 by 20 minutes and setting the MaxViolationTime1 to 20 minutes as well.  Each [Order] has its [Route] pre-assigned and uses AssignmentRule 2 and is given a Sequence that increments by one.

Now on to the confusing part.  With the above conditions in place, the VRP will finally accept the pre-assigned orders and provide result data.  What is confusing however is that it lists Trip B (4:46 pickup) as first in the result sequence, followed by Trip A (4:45 one).  Initially I thought that this was because Trip B was closer to the client's main office [Distribution Center], however if we switch the times, the results are similar with the solution assigning Trip A (now at 4:46 and further away) first and Trip B (now 4:45) second.  This has become very confusing and frustrating.  Anyone have any insight into why the VRP wants to stop at a later appointment first?

Thank you for your assistance.
Tags (2)
0 Kudos
2 Replies
AndrewWeisensel
New Contributor
On top of the original question, I now also have questions about Capacity as it relates to pre-assigned trips [Orders].  There is enough room in the vehicle for 5 passengers, so up to this point, capacity was set to 5 for a [Route].  However if a [Route] was given five pre-assigned [Orders] where it would pickup each passenger before arriving at the final destination (which is the same for each rider), an error would be given regarding pre-assignments and exceeding capacity.  So, my question is, when pre-assigned [Orders] are loaded in, does the VRP ignore [PickupQuantities] and [DeliveryQuantities] until it actual starts to route the [Orders]?

When [Route] capacity was increased to 20, I no longer received capacity errors.  It seems to me like [Orders] that are pre-assigned all just get totaled on load regardless of whether space will become available (via delivery) before additional [Orders] are added to the route.  Is this an accurate statement?

Thanks for the clarifications.
0 Kudos
NaAn
by
Occasional Contributor
Hi Andrew,

There is a simple way to lock the relative sequence between two orders. In your case, please set assignment rule to 1 which is preserve route and relative sequence and give Order A a sequence number smaller than Order B. VRP solver will guarantee to schedule A in front of B.

When loading preassigned orders, VRP solver does check the pickup/delivery quantities to make sure no capacity voilation exits. It looks like you didn't set up the problem properly. For a pair-order which represents one passenger pickup, you will need to set the PickupQuantities to 1 for the first order in the pair and DeliveryQuantities to 1 for the second order in the pair. Set the route capacity to 1 if you only have this single order pair.

Please let me know if you have more questions.

Thanks.

Anna
0 Kudos