Costs: do not mix them up! Sometimes fiscal,sometimes metric

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.

Costs: do not mix them up! Sometimes fiscal,sometimes metric

Postby Bernd Welter » Wed Apr 04, 2018 7:48 am

Hi there,

today a customer was confused by the output values of his ExtendedRoute's inner cost value. His expectation was "this is a financial value and it is way too high.". Unfortunately the RouteInfo class is used in various contexts and the meaning of it's cost property depends on the context. I hope the attached image helps:

Depending on the context of a RouteInfo object the meaning is either a toll distance or a metric but it is never a price

So while this player expected the "cost" value to be a financial value it is used as toll distance or a metric (applied to compare different paths) but not as a price.

Prices are returned in properties such as
  • TollCostInfo.tollPrice: int = toll price of a toll section
  • TollTotals.cost: int = The total toll costs within a country.
  • TollCost.cost: int = The cost.

Best regards,
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

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

Return to PTV xRouteServer