What is a distance matrix?
A distance matrix contains all distances and travel times between each pair of a given set of specific geographical points.
Taking into account that the world isn’t perfect, the distances and travel times are considered to be asymmetric. For this reason there are values for both directions of each relation.
Why do I need a distance matrix?
Within all of our planning algorithms we aim to consider the reality as accurately as possible. Therefore it’s very important to use the distances and travel times based on a road network instead of using something like the Manhattan metric (http://en.wikipedia.org/wiki/Taxicab_geometry for more information).
To increase the algorithms performance it’s advisable not to calculate these values each time they have to be used. This can be more often than you can imagine.
Due to that fact our algorithms rather access the desired values from a distance matrix for all relevant geographical points.
How to provide a distance matrix?
There are many different ways to provide a distance matrix.
First of all we have some highly sophisticated routing algorithms, such as Contraction Hierarchies, which enables us to calculate distance matrices extremely fast, even if the calculation is based on detailed maps.
But it’s also possible to use distances and travel times from any other source in our algorithms. This can be achieved by importing the data into our distance matrix format.