xTour2: Successor of findToursForUnscheduledOrder
Posted: Fri Feb 05, 2021 8:20 am
Hi there,
recently I've been asked about this:
Limitation
- no sequence optimization of the matching tour
Benefit
- fast approach
Well, there's no dedicated successor method which replaces the xTour1 approach 1:1 but here's how you can handle this (and even more) in xTour2:
Use the changeToursRequest with a MoveOrdersAction or MoveStopsAction. To ensure the proper position within a target tour use InsertionAtBestPosition.
Let us know how you succeeded with this approach!
Best regards,
Bernd
recently I've been asked about this:
The scope of this well known xTour1 method was to check a single orders best insertion position among several potential tours of an existing plan.Have you ever think about a mechanism with xS2 to approach findToursForUnscheduledOrder() xS1 function/use case?
Limitation
- no sequence optimization of the matching tour
Benefit
- fast approach
Well, there's no dedicated successor method which replaces the xTour1 approach 1:1 but here's how you can handle this (and even more) in xTour2:
Use the changeToursRequest with a MoveOrdersAction or MoveStopsAction. To ensure the proper position within a target tour use InsertionAtBestPosition.
- You have to process this transaction for each potential target tour so it is a bit more complicated but due to the limitation to InsertionAtBestPosition it is still very fast.
- On the other hand you may try to use parallel requests to speed up the process.
- If you want to evaluate even more than one potential position in a target tour you can use the xtour.InsertionAfterSpecifiedPosition or xtour.InsertionBeforeSpecifiedPosition and iterate over each existing position in the target tour
- Refer to a storedRequestId, so you won't have to transfer the whole scenario again and again.
Let us know how you succeeded with this approach!
Best regards,
Bernd