Page 1 of 1

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

Posted: Wed Apr 04, 2018 7:48 am
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