Linking to waypoint (zero-based index list) failed

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
Rok
Posts: 13
Joined: Fri Nov 17, 2017 9:25 am

Linking to waypoint (zero-based index list) failed

Post by Rok »

Hello,

I am trying to calculate route cost, based on a previous route that a truck had driven. I have the coordinates that the truck went through on its route and i pass them as waypoints to the calculateExtendedRoute operation. I keep getting the "linking to waypoint (zero-based index list) failed" exception and i don't know how to get around it. If i insert the route with exactly the same coordinates into the PTV Map&Guide internet trial, it calculates the route without a problem. However, it returns the aforementioned exception when i send a request from my server.

I have tried several different options to avoid the exception, changing the linkType/viaType of the waypoints, allowing segment violations, i tried implementing the trick mentioned here: Routing: Enter authorized passages with delivery vehicles (DevBlog, 10.1.2014, thanks Michael!), tried increasing the maximumDistanceToSegment property, all with no success.

Here is a stripped down version of my request, with only the waypoints that cause the linking error, hopefully you can point me in the right direction of what i need to change in my request, so that the exception will be gone. The exception I get reads: "linking to waypoint (zero-based index list: 4) failed".

Code: Select all

<?xml version="1.0" encoding="utf-16"?>
<calculateExtendedRouteRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<ArrayOfWaypointDesc_1>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.144502639770508" y="52.038711547851563" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.561130523681641" y="52.110450744628906" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.57036018371582" y="52.120311737060547" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.575920104980469" y="52.122821807861328" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.659549713134766" y="52.143318176269531" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.886789321899414" y="52.122520446777344" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="26.599710464477539" y="53.450908660888672" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="24.358179092407227" y="52.214111328125" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
	</ArrayOfWaypointDesc_1>
	<ArrayOfRoutingOption_2>
		<RoutingOption parameter="COUNTRY_ENCODING" value="ISO2" xmlns="http://xroute.xserver.ptvag.com" />
		<RoutingOption parameter="GENERATE_EXTWAYPOINTS" value="true" xmlns="http://xroute.xserver.ptvag.com" />
		<RoutingOption parameter="ALLOW_SEGMENT_VIOLATIONS" value="true" xmlns="http://xroute.xserver.ptvag.com" />
		<RoutingOption parameter="COST_OF_SEGMENT_VIOLATIONS" value="50000" xmlns="http://xroute.xserver.ptvag.com" />
	</ArrayOfRoutingOption_2>
	<ArrayOfExceptionPath_3 xsi:nil="true" />
	<ResultListOptions_4 totalRectangle="false" tollManoeuvres="false" texts="false" segments="true" segmentAttributes="false" polygon="true" nodes="false" manoeuvreGroups="false" urbanManoeuvres="false" manoeuvreAttributes="false" dynamicInfo="false" detailLevel="BORDERS" brunnelManoeuvres="false" boundingRectanglesOffset="0" boundingRectanglesC="0" binaryPathDesc="true" manoeuvres="false">
		<cenEmissionConfiguration xsi:nil="true" xmlns="http://xroute.xserver.ptvag.com" />
		<destDetail xsi:nil="true" xmlns="http://xroute.xserver.ptvag.com" />
		<emissions xsi:nil="true" xmlns="http://xroute.xserver.ptvag.com" />
		<hbefaType xsi:nil="true" xmlns="http://xroute.xserver.ptvag.com" />
		<startDetail xsi:nil="true" xmlns="http://xroute.xserver.ptvag.com" />
	</ResultListOptions_4>
	<CountryInfoOptions_5 xmlns:q1="http://xroute.xserver.ptvag.com" xsi:type="q1:CountryInfoVehicleOptions" allEuro="true" calculatePartTollCosts="true" detailedTollCosts="true">
		<q1:wrappedReductionIDs xsi:nil="true" />
		<q1:wrappedTollScenarios xsi:nil="true" />
		<q1:wrappedOptions>
			<q1:VehicleOption parameter="TYPE" value="TRL" />
			<q1:VehicleOption parameter="TOTAL_WEIGHT" value="40000" />
			<q1:VehicleOption parameter="NUMBER_OF_AXLES" value="5" />
			<q1:VehicleOption parameter="EMISSION_CLASS" value="EURO_5" />
		</q1:wrappedOptions>
	</CountryInfoOptions_5>
	<CallerContext_6>
		<wrappedProperties xmlns="http://baseservices.service.jabba.ptvag.com">
			<CallerContextProperty key="CoordFormat" value="OG_GEODECIMAL" />
		</wrappedProperties>
	</CallerContext_6>
</calculateExtendedRouteRequest>
Thank you in advance for your help.

Best regards,
Rok
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: Linking to waypoint (zero-based index list) failed

Post by Joost »

Map and guide uses Here map data. I'm making an educated guess that you are using TomTom map data. The coverage of Belarus in TomTom is much lower then Here. This is why Map and Guide can link to a road en your installation can't. I would suggest to discus the map choice with your technical contact directly.
Joost Claessen
Senior Technical Consultant
PTV Benelux
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Linking to waypoint (zero-based index list) failed

Post by Bernd Welter »

Just a side note:
If you have the coordinates because of the GPS trace you could also use xMapMatch service to ensure a proper track of the routing afterwards. Let us know whether this is the case. Maybe we can provide a sample calculation if you provide the GPS trace.
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:
Rok
Posts: 13
Joined: Fri Nov 17, 2017 9:25 am

Re: Linking to waypoint (zero-based index list) failed

Post by Rok »

Thank you guys both for the replies.
I will get back to you if/when I have more questions.
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Linking to waypoint (zero-based index list) failed

Post by Bernd Welter »

Hi there,

looks like this topic is back on my desk - I've been asked by several players in the recent weeks about the same effect and the answer was the loink to the DevBlog article by Michael Nutto.

Please be aware that granting access each time is not what you probably want. I therefore recommend to apply an iterative approach:
  • Try to compute the route with restricted settings
  • If this fails apply weaker restrictions as mentioned in the Blog
With the given data you would probably reach the second level only in a rare number of cases.

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