Issues with Assignment Rule

2372
5
06-20-2013 11:00 AM
Highlighted
New Contributor
We have a client in the transportation business.  We are using Arc Engine and Network Analyst to create a schedule for them for their drivers.  These trips consist of a pickup location and a drop off location, so we are using Ordered Pairs to ensure that the pickup takes place prior to the drop off.  We are also attempting to set the Assignment Rule to preserve routes for select trips as specified on this page http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//00360000000r000000.

The problem we are having is that setting an order with an Assignment Rule of 2 (which should keep the order with the route) often fails when there are multiple orders on the route set like this.  The irony however is that if one of those orders are assigned to the route with assignment rule 2 and the others use assignment rule 3 (to be distributed however the VRP Solver feels is appropriate) the other orders that we want to have pre-assigned will get placed on that route.  So the question becomes, why is it that the VRP Solver errors when we try to pre-assign these orders ahead of time and what can we do to resolve this issue?

Thank you for your assistance,
PDAD Software
Tags (2)
Reply
0 Kudos
5 Replies
Highlighted
by
Occasional Contributor
Hi,

When using the assignment rule �??Preserve Route,�?� you need to provide the valid sequence number as the initial solution. If the sequence number does not produce a feasible solution, i.e. there is hard time window violation, solver will leave some orders unassigned. While with assignment rule 3 �??override,�?� solver has the flexibility to assign orders in any sequence. Therefore, you see the unassigned orders got assigned.

When you don�??t know the initial feasible sequence numbers, to guarantee a set of orders are assigned to a route, you can use the specialty to match orders with routes.

Thanks.

Anna
Reply
0 Kudos
Highlighted
New Contributor

hello Anna

I would like to consult the following scenario.

I have a route that contains 20 orders, want to set one or more orders that have an established route sequence and will be the first to wish to be treated in this case would be 2, 3, 4, etc., the following shall not be defined sequence because I want the VRP resolve it with the best result.

To which I would wish to be treated by first placing'm AssignmentRule = Preserve route and relative sequence, then the next set of orders AssignmentRule = Preserve route and white sequence.

Is this correct or should be the properties that should be placed so that the VRP of a correct result.

Thanks for your time

Reply
0 Kudos
Highlighted
Esri Contributor

Hi Alex,

I'm not completely sure what you are asking.  Are you trying to solve the problem twice?  The first time solving it with the route and sequence preserved and then second time just preserving the route letting the solver re-sequence so that you can see the difference between the two.  If so then for the first solve the AssignmentRule = Preserve route and relative sequence for all orders and for the second solve the AssignmentRule = Preserve Route for all orders.

Are you trying to preserve the route for some of the orders and let the solver decide where to put the rest of them all within one solve?  If so for the orders you want to keep on the same route and relative sequence you would make AssignmentRule = Preserve route and relative sequence.  For the orders that do not have specific assignment information there are two options.  If the route is known and you want to keep that then AssignmentRule = Preserve Route for those orders.  If the route is not known or if it doesn't matter if it stays on the same route then for those orders AssignmentRule = Override.

One thing to note on the idea of adding in other orders around the ones that have a specific route and sequence.  The sequence is only preserved relative to the others with that same designation.  So for example if you have two orders with sequence 2 and 3 they will never be reversed so the solver goes to 3 first then 2 but the solver is allowed to insert several orders between 2 and 3 or in front of 2. 

Do either of these two options answer your question?  If not can you give a bit more detail to your example and question to clarify it?

Thanks,

Heather

Reply
0 Kudos
Highlighted
New Contributor

Thanks for answering.

What would be the way to assign the rule to orders if you wish some of them have a route and absolute sequence or want it mandatory for them to start and the rest of which I have to address the solve the vrp placing sequence.

Greetings.

Reply
0 Kudos
Highlighted
Esri Contributor

Alex,

The solver doesn't directly support absolute sequence but there are a few options and work-a-rounds.

If you have orders that have to be exactly first on a route you can give them an assignment rule of anchor first.  If those orders have to also be on a specific route I would recommend creating artificial specialties for those orders and their corresponding routes so that the only route that would fit the specialty requirement is the one that is desired. 

If you have say a sequence of three orders that have to be visited first second and third on a specific route then I would follow the steps as above with the third stop being the one that is anchored first and stops one and two are excluded from the solve.  Once the solver then has a solution for the routes starting with the end of your required order you can then go back and add in the orders that came before the first one in the route.  If you need to worry about time windows you can figure out the start time of the route ahead of time using a route layer for the ones that you already have sequenced at the beginning.

If at the end you then need to create a map of those routes with directions you have two options.  You can add back in the orders that were excluded and assign them route and sequence values adjusting the sequence values for the orders that come later in that route.  Give all the orders an assignment rule of preserve route and sequence and resolve.  This will update the routes to show you everything and allow for directions.  The other option if there is just a few routes that had added orders to the beginning then you could take those individually into a route layer and solve them preserving the sequence.

What is your business case that is requiring stops at the beginning of a route to be in a specific sequence?

Reply
0 Kudos