xTour2: Successor of findToursForUnscheduledOrder

This forum deals with any kind of trip optimization whether it is automatic planning or manual dispatching, refering to transport orders or service planning.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

xTour2: Successor of findToursForUnscheduledOrder

Post by Bernd Welter »

Hi there,

recently I've been asked about this:
Have you ever think about a mechanism with xS2 to approach findToursForUnscheduledOrder() xS1 function/use case?
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.
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.
Click Image to see the animation: <br />Showcase example: add single, unscheduled order to an existing tour at the best position
Click Image to see the animation:
Showcase example: add single, unscheduled order to an existing tour at the best position
  • 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.
Play with the showcase to get an understanding of this mechanism.

Let us know how you succeeded with this approach!

Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply