Page 1 of 1

How to find out Toll Charge has changed, from which date?

Posted: Fri May 25, 2018 4:21 am
by nirengp
Hi,

We use route service to calculate route distance and toll charges. And for efficiency we cache the details. Now, when the Toll charge changes, the cached data becomes obsolete. However, is their any mechanism available in PTV xServer API to find out if the Toll charge has changed. We know their is a way to get route calculation based on date using START_TIME parameter or CountryInfoOptions.tollDate. However, that will not allow us to cache the calculated route data efficiently.

Re: How to find out Toll Charge has changed, from which date

Posted: Fri May 25, 2018 6:54 am
by Joost
If you use CountryInfoOptions.tollDate, the result will also include ExtendedRoute.CountryInfo[].scenarioId . You can use this to check if a newer scenarios is used. Keep in mind that scenarioId's are unique for a specific map release. Meaning that if you deploy a newer map you should flush your cache.

Re: How to find out Toll Charge has changed, from which date

Posted: Fri May 25, 2018 9:24 am
by Bernd Welter
And for your information: the relevant scenario meta data is available in the TollScenarios.INI in your map folder.
You might use this info to check (manually) what validity periods are given:

TOLLSCENARIOID;COUNTRYID;LANGUAGECODE;NAME;DESCRIPTION1;DESCRIPTION2;VALIDFROM;CREATEDAT;RELEVANCE;LASTMODIFICATION;MANDATORYTOLLNAME
Sample of the TollScenarios in my environment.<br />Reduced to ENG descriptions.  Shows 4 scenarios for Germany (49). Some are marked as FORECASTS.
Sample of the TollScenarios in my environment.
Reduced to ENG descriptions. Shows 4 scenarios for Germany (49). Some are marked as FORECASTS.
Best regards,
Bernd