Don't cross country border lines

This forum deals with any kind of trip optimization based on xTour1, xTour2 and the Developer APIs "RouteOptimization" and "SequenceOptimization". No matter whether it is automatic planning or manual dispatching, refering to transport orders or service planning.
Attention: this does not refer to PTV Optiflow SaaS and PTV Developer RouteOptimization Optiflow.
Post Reply
DKula
Posts: 9
Joined: Tue Mar 17, 2015 2:26 pm

Don't cross country border lines

Post by DKula »

Hi forum,

I don't know if I only did not find it in the documentation but I have the problem that a tour driving should not cross country borders.

Is there a way to say that the driving way do not cross any country border lines?

Thanks in advance
User avatar
Bernd Welter
Site Admin
Posts: 2714
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Don't cross country border lines

Post by Bernd Welter »

Hello Dennis,

sounds like you could benefit from our Geographic Restrictions:
http://xserver.ptvgroup.com/fileadmin/f ... strictions
Shows tha positive / negative lists.
Shows tha positive / negative lists.
As xTour requires setting such properties in the profiles on server side you can easily create lists of allowed or forbidden country (only one of them by the time).

Check it!

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

Re: Don't cross country border lines

Post by Bernd Welter »

Here is a sample snippet:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Profile>
	<Routing majorVersion="2" minorVersion="0">
			<Algorithm>
				<GeographicRestrictions>
					<AllowedCountry countryCode="49"></AllowedCountry>
				</GeographicRestrictions>
			</Algorithm>
		</Routing>
	</Profile>
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:
User avatar
Bernd Welter
Site Admin
Posts: 2714
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Don't cross country border lines

Post by Bernd Welter »

Attention: here is some important restriction of the country code!
CountryCode

In other words: you have to use the PTV specific code to identify the allowed / forbidden countries!

Have a nice weekend,
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:
User avatar
Bernd Welter
Site Admin
Posts: 2714
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Don't cross country border lines

Post by Bernd Welter »

Here is another important hint dealing with this challenge:
Since xTour 1.22.0.0 we invented the DirectDistanceFallback parameter:
Improvement: From now on only tours with proper routings are planned and with the new switch useDirectDistanceFallback the old behaviour could still be used (e.g. to plan inaccessible orders with a direct distance approximation).
Therefore you have to consider this switch when applying a profile that should prevent you from visiting unwanted countries:
If both
  • Routing geometries
  • Scheduled locations
should consider the whitelist countries the directDistanceFallback has to be disabled!
Left map: though the dima is based on &quot;Germany only&quot; the tours consider locations in France (west of Rhine). This is because the distances and routing times are estimated based on the FallBack mechanism.<br />Right map: The dima is based on &quot;Germany only&quot; and the fallback is disabled. Therefore French locations remain unscheduled.
Left map: though the dima is based on "Germany only" the tours consider locations in France (west of Rhine). This is because the distances and routing times are estimated based on the FallBack mechanism.
Right map: The dima is based on "Germany only" and the fallback is disabled. Therefore French locations remain unscheduled.
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