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
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 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.
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?