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.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

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

Post by Bernd Welter »

Hi there,

This applies to xRoute1!

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
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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply