Why does the tourid change?

This forum deals with any kind of trip optimization whether it is automatic planning or manual dispatching, refering to transport orders or service planning.
Locked
CB*
Posts: 1
Joined: Fri Apr 07, 2017 1:57 pm

Why does the tourid change?

Post by CB* »

Hi!

I am calculating a input tour with the following parameters:

<Tour ... id="9900005157" tourPointFixation="NO_TOUR_POINT_OUT" ...

In the result i am getting

<ns4:Tour ... id="1310070565" ...

When the tour is fixed, I would expect to get the same id back in a successful request .

You can find my request attached.
I am using xTour 1.24.0.1.

Thanks
CB*
Attachments
request.zip
Request
(18.43 KiB) Downloaded 272 times
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: Why does the tourid change?

Post by Joost »

I took a quick look, looks like your tourId is bigger then a regular integer can be and there is an internal overflow.

9900005157 mod 2147483647 = 1310070565

Are you working with SAP by any chance? I had a similar issue some time ago where the integers from our interface where mapped against int8 instead of i type in SAP.
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: Why does the tourid change?

Post by Bernd Welter »

Looks like this topic hits both TourIDs and OrderIDs.
Long story short: as Joost explained it is caused by buffer overflow of the integers and produces an exception (Order ID) or a "replacement" (TourID).

For those (SAP based) users who ran into the issue: you need a mapping between your IDs (however they aber based) and some valid INTs.

The xTour2 API deals with string based IDs instead of INTs, so the problem won't occur anymore.

Besr regards,
Bernd

PS: your depot has more than 1000 intervals covering a period of 3.4 years. A bit weird if you ask me ;-)
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:
Locked