DimaID / Distance matrix calculations

This forum deals with any kind of trip optimization whether it is automatic planning or manual dispatching, refering to transport orders or service planning.

DimaID / Distance matrix calculations

Postby otsjw » Thu Aug 11, 2016 11:50 am

While integrating the xTour server into our application I've come across the DimaID which I've understood to be related to the size of the vehicle / speed limits, please correct me if I'm wrong.

I get the impression from the specification that either this, or the direct velocity / distance must be used, but I'm not sure? Can both be left empty and would that be wise?

If we should be using this, I feel I'd need a lot more information about its purpose, and how it's supposed to be used.

Looking forward to hearing from someone, thanks in advance.
otsjw
 
Posts: 9
Joined: Thu Aug 11, 2016 6:05 am
Location: Essex, United Kingdom

Re: DimaID / Distance matrix calculations

Postby Bernd Welter » Mon Aug 15, 2016 7:47 am

Hello Joe,

computing an optimization task requires a lot of driving times and distances from each involved location (transport point or depots, ...) to each location. This information can be derived

  • by airline distance (usually for simulations and quick demos, distance multiplied with a generic speed produces driving
    times)
  • by real routing on the street network. In the later case the server requires to compute (create, enlarge, ...) so-called distance matrices.
    Each distance matrix is a container that is created, manipulated and deleted by the so-called DimaControl. There are various documents available in the online documentation.
  • by a reference logic based on an existing distance matrix (usually more precise than option #1 and faster than option #2)
http://xserver.ptvgroup.com/fileadmin/files/PTV-COMPONENTS/DeveloperZone/Documents/xServer_public/manual_1.22/Default.htm#Use%20cases/xDima/OVER_Use_Cases_PTV_xDima.htm%3FTocPath%3DUse%2520Cases%7CPTV%2520xDima%7C_____0

Furthermore it is important to know that

  • Each relation within a dima is based on the DIMAs generic routing profile (specified in the request that creates the DIMA, e.g. if the DIMA doesn't exist or the deleteBefore is set to true)
  • We provide traditional routing and HIGH PERFORMANCE ROUTING - the 2nd option is much faster and therefore recommended for larger distance matrices
  • The DimaControl uses a smart mechanism that computes only those relations that are required (while other parts of the dima could remain empty)
Please check the documentation first and if still necessary get back with concrete questions.

Best regards Bernd
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1440
Joined: Mon Apr 14, 2014 10:28 am

Re: DimaID / Distance matrix calculations

Postby otsjw » Mon Aug 15, 2016 12:06 pm

Thanks for the reply Bernd, I understand everything you’ve said, but I'm still struggling to see the overall picture. I've tried to summarise:

1. What is the structure of the distance matrix? Is it simply the diagram attached?
2. What’s the difference between DistanceMatrixByReference and ByRoad? “The distance calculated will be executed using the reference point method that means all distance approximated via reference points”? Where do these reference points come from?
3. What is a pre-calculated distance matrix and how does it get calculated?
4. Why is DistanceMatrixByReference empty?
5. Delete* parameters, where exactly is it deleting? Where are they stored? Is this relevant only when re-planning an already planned tour?
6. Where are the ProfileNames defined?
Attachments
DistanceMatrix.png
otsjw
 
Posts: 9
Joined: Thu Aug 11, 2016 6:05 am
Location: Essex, United Kingdom

Re: DimaID / Distance matrix calculations

Postby Bernd Welter » Mon Aug 15, 2016 2:04 pm

Hello again,
  • What is the structure of the distance matrix? Is it simply the diagram attached? - ANSWER: "yes. The BaseVehicle class contains a reference to a DimaID (optional). The concrete DistanceMatrices are defined in the planning parameters (as an array). Let's say your fleet is based on 3 vehicles: two trucks, one car. Then you need to provide two elements in the distance matrix array, e.g. {DimaID=1,profile=dimaTruck} and {DimaID=2, profile=dimaCar}. and the fleet is based on Vehicle#1{dimaID=1}, Vehicle#2{dimaID=1}, Vehicle#3{dimaID=2}.
  • What’s the difference between DistanceMatrixByReference and ByRoad? “The distance calculated will be executed using the reference point method that means all distance approximated via reference points”? Where do these reference points come from? - ANSWER: the reference points come from previously generated operations, e.g. produced by a dummy planning considering all national postcode reference points (and without deleting the DIMA afterwards)
  • What is a pre-calculated distance matrix and how does it get calculated? - ANSWER: see above, can be generated by a previous call or via xDima server
  • Why is DistanceMatrixByReference empty? - ANSWER: the class DistanceMatrixByReference isn't emtpy, it's only property is the ID of the reference Dima that should be used...
  • Delete* parameters, where exactly is it deleting? Where are they stored? Is this relevant only when re-planning an already planned tour? - ANSWER: distance matrices are stored on the server below the /data/dima folder. Depending on your usecase it it meaningful to delete the DIMAs right after usage (e.g. because your customers change day-by-day) or to keep them (as a growing memory including static customer locations)
  • Where are the ProfileNames defined? - ANSWER: check /conf and /conf/profiles.
    dima.PNG
    Example: the reference between the request profile and the routing profile.

Best regards
Bernd
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1440
Joined: Mon Apr 14, 2014 10:28 am


Return to PTV xTourServer

cron