What is the CalculationMode.CUSTOM (xTour2)?

This forum deals with any kind of trip optimization based on xTour1, xTour2 and the Developer APIs "RouteOptimization" and "SequenceOptimization". No matter whether it is automatic planning or manual dispatching, refering to transport orders or service planning.
Attention: this does not refer to PTV Optiflow SaaS and PTV Developer RouteOptimization Optiflow.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2703
Joined: Mon Apr 14, 2014 10:28 am
Contact:

What is the CalculationMode.CUSTOM (xTour2)?

Post by Bernd Welter »

Hi there,

Many of you already use our tour optimization component xTour. Last week I was introduced into an internal process which offers some nice tuning approaches in the context of xTour 2. It is important to understand the capabilities of the approach described below so you can return to your technical counterpart at PTV if you are stuck in a project, in development or in a pitch.

Keep in mind that we may have some magic potion which helps to get rid of a current obstacle.

Within this article I’d like to forward some important parts of what I learned – maybe we can use the process in the background to optimize planning results on a more project driven base.

Here's what it is all about:
Within our tour optimization components (both xTour 1 and 2) we model the usual objects such as
  • Locations (depots, customer sites…)
  • Ressources (drivers, vehicles, …)
  • Orders (transports, visits,…)
  • Constraints (maximum driving times, break- and rest rules, …)
Now these objects are quite generic and can be used for various usecases:
  • Urban logistics / parcel delivery (sequencing / tour optimization)
  • Long haul optimization (tour optimization)
  • Service technicians (tour optimization)
  • Sales reps (sequencing)
  • Health care (tour optimization)
  • Many more!

As described in Tour Optimization a la PTV and some other forum articles there are some native goals which usually apply out of the box. It is difficult to parametrize the targets of an optimization and those who already worked with xTour 1 know the mysteria of TourOpt.INI – an important configuration file which contains hundreds of switches and which should not be touched without prior consultation of PTV. Furthermore changing such a configuration file is not an option in a shared cloud environment and therefore our experts invented a new mechanism in xTour 2. It will enable xTour 2 users to specify a flexible parameter to tune the targets of an optimization to their needs:

The regular optimization in xtour 2 offers the following com.ptvgroup.xserver.xtour.CalculationMode :
  • STANDARD, QUALITY, PERFORMANCE are trying to satisfy the same goals but just invest different levels of efforts. You can choose between Performance (=“a quick 90% result”) and Quality (=“a tedious but thorough 99% result”) or something in between: Standard (a good compromise between quality and performance)
  • AVOID_INTERSECTIONS produces plans which focuses on tours with a better visual appearance (and at the same time typically reduce the quality of total distance / periods)
  • EVALUATE simply calculates a given input plan and provides times and distances and also reports violations (in case you created the plan manually)

Now maybe you have already noticed the 6th mode which is called CUSTOM. This mode requires another parameter customCalculationModeConfiguration and will then optimize the requests based on the parameters which are encoded in this string. And here’s what you need to know: at this moment you can’t generate the string by yourself. This is the task for the internal process I want to introduce now.

The process will create such a custom binary encoded string based on the following ingredients:
  • Some small sample requests which reflect a typical usecase scenario of an application
  • Your definition of “the optimum” – your story, your requirements

Once the process produced the binary string you can provide the parameter both On Premise and in the cloud / PTV xServer Internet. With this approach we will be able to offer a customized optimization which targets to improve
  • Reflection of your goals
  • Quality of the output
  • Reduction of runtime

The number of internal parameters of this mechanism is huge and here are just the most important ones:
  • Goal function which focuses on KPIs such as number of unplanned orders, tours and trips, on travel time and driving time, on distance but also on overlaps of tours (both intra and inter) and performance
  • Search tree size (compromise between runtime and quality of solution)
  • Improvement phase (mighty but enduring post processing)
  • Visual attractiveness
  • and more

Finally here’s the workflow diagram – If you want to apply this approach in a project I recommend to get in touch with PTV’s technical consulting. We will evaluate the user story and if it matches the processe’s skills we will provide an offer for this from a professional services perspective. In any case we should ensure whether It is promising in the current context or not and then answer the client.
process workflow... provide small samples and requirement to consulting and we will handle it internally with DEV.
process workflow... provide small samples and requirement to consulting and we will handle it internally with DEV.
Feel free to get back to this post with your questions in this post. I can imagine that some of them would be sensitive  return to me one to one then.

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