Page 1 of 1

Minimize number of tours PTV xServer 2 - xTour

Posted: Mon Apr 07, 2025 7:31 am
by jerich
Hi Bernd,

I have a question for the xTour endpoint of xServer 2.

1 Depot: Holzkirchen

3 Customers:

- Amstetten
1x order 4773 kg

- Esslingen
1x order 3008

- Pforzheim
48x orders 822 kg

The total quantity of the truck is defined with 24000 kg, 3 trucks are available.
Customer stops per tour is definied with max. 2.
Single trip per tour, single depot per tour as well as minimize number of tours is enabled.

I am using direct distance in this example to provide a smaller sample set.

What I am expecting is that the algorithm creates 2 trips, like this:

Tour 1:
- Amstetten 4773 kg
- Pforzheim 19227kg

Tour 2:
- Esslingen 3008 kg
- Pforzheim 20229 kg

Unfortunately, there are always 3 trips created. The first trip is a FTL with 23838 kg of Pforzheim and then two other trips.
Please see attached the json files "request1_3 vehicles.txt" and "response1.txt"


What I tried

Setting the maximum number of vehicles to 2 to force my expected behavior.
But now one order remains unplanned.

Please see attached "request2_2 vehicles.txt" and "response2.txt"


Is there something that I am missing in the request?

Re: Minimize number of tours PTV xServer 2 - xTour

Posted: Mon Apr 07, 2025 1:15 pm
by Bernd Welter
Checked this with Daniela: you did run into a weakness of the heuristics:
Without an input plan the heuristics approach fails: it does not recognize that shifting some workload to an alternative vehicle would manage to create free capacities.
Without an input plan the heuristics approach fails: it does not recognize that shifting some workload to an alternative vehicle would manage to create free capacities.
with an input plan that pre-assigns the two bigger orders to the two vehicles the algorithm manages to create 2 tours with one trip each . And each trip delivers one of the bigger orders and several of the partial orders.
with an input plan that pre-assigns the two bigger orders to the two vehicles the algorithm manages to create 2 tours with one trip each . And each trip delivers one of the bigger orders and several of the partial orders.