Travel-time and distance matrices are often calculated on the basis of average speeds. Although this is often good enough for tour optimization, it can happen that the traffic situation between two locations affects the travel-time for the corresponding relation in the matrix. Indeed, during rush hours in urban area or in case of a traffic incident along the way, the delay can become significant, with the risk that the trip cannot validate certain constraints (such as the opening hours at subsequent stops).
Since V1.4.0, the PTV Developer Matrix Routing API allows to calculate more precise matrices, taking into account travel-times as a function of time. It is now possible to specify a start time, to select which Traffic Mode to be applied for the calculation (average or realistic), but also to retrieve a travel-time profile for each relation of the matrix, within a customizable time horizon.
Try these new capabilities in our new Traffic Modes and Travel Time Profiles code samples. See also the related concept page for more details, as well as our new tutorial.
Note, when a duration is specified as input, only the travel-times are returned as profiles, not the distances (constant route path). Due to the amount of information, the travel-time profiles are returned in an encoded format. The Results Representation concept page describes how to read it.
Please be also aware that the consideration of time-dependent travel-times requires a higher computation time, and is therefore only available with the asynchronous matrix calculation methods, with a maximum of 250,000 relations per request. Besides, all locations should be located within a rectangle of 500×500 kilometers maximum.
To keep yourself updated about upcoming releases and news you can use the subscribe function on the right hand side. If you got any question do not hesitate to get in contact.