Page 1 of 1
DimaID / Distance matrix calculations
Posted: Thu Aug 11, 2016 11:50 am
by otsjw
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.
Re: DimaID / Distance matrix calculations
Posted: Mon Aug 15, 2016 7:47 am
by Bernd Welter
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/f ... a%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
Re: DimaID / Distance matrix calculations
Posted: Mon Aug 15, 2016 12:06 pm
by otsjw
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?
Re: DimaID / Distance matrix calculations
Posted: Mon Aug 15, 2016 2:04 pm
by Bernd Welter
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.
- Example: the reference between the request profile and the routing profile.
Best regards
Bernd