Question
A customer calculates the same route with routingMode=FAST and routingMode=MONETARY (same waypoints, same vehicle profile, trafficMode=REALISTIC) and finds that MONETARY returns a shorter travel time than FAST. This seems counter-intuitive.
Answer
FAST and MONETARY use different cost models, so they can calculate different routes:
- FAST calculates the route with the minimal abstract cost. Travel time is the major contribution, but other attributes, such as the road category, are also considered.
- MONETARY calculates the route that minimizes the monetary cost. Its course is influenced by monetaryCostOptions[costPerKilometer] and monetaryCostOptions[workingCostPerHour], the energy cost, and the speeds per road category. With the default parameters (costPerKilometer=2, workingCostPerHour=20), the MONETARY route tends to be the one with the shortest distance.
With trafficMode=REALISTIC, time-dependent travel times and traffic incidents (e.g. construction sites) are taken into account at the calculation time. In some traffic situations, the MONETARY route shows the lowest travel time.
Example: the same route calculated on a Monday afternoon with monetaryCostOptions[costPerKilometer]=0.75 and monetaryCostOptions[workingCostPerHour]=24:
| Mode | REALISTIC travel time | REALISTIC distance | AVERAGE travel time | AVERAGE distance |
| FAST | 13,030 s | 190,952 m | 13,716 s | 190,952 m |
| MONETARY | 12,575 s | 181,811 m | 14,307 s | 181,811 m |
With trafficMode=AVERAGE (the typical traffic situation), the situation is reversed and FAST is faster than MONETARY.
Additions hints
- To check this explanation on another route, calculate it with trafficMode=REALISTIC and with trafficMode=AVERAGE, and compare the travel times.
- FAST does not strictly calculate the fastest route, because its abstract cost also includes other attributes (see the Short and Fast Routes concept).
- The same difference between the two cost models also explains why MONETARY can choose a different course than FAST, for example through a city center (see PTV Developer (Routing API): Why does MONETARY route through a city center (e.g. Paris) instead of the ring road?)
Related articles
- Monetary Costs concept: https://developer.myptv.com/en/documentation/routing-api/concepts/monetary-costs
- Short and Fast Routes concept: https://developer.myptv.com/en/documentation/routing-api/concepts/short-and-fast-routes
- Traffic Modes concept: https://developer.myptv.com/en/documentation/routing-api/concepts/traffic-modes
- PTV Developer (Routing API): Why does MONETARY route through a city center (e.g. Paris) instead of the ring road?
Comments
0 comments
Article is closed for comments.