Optimize 'service' job as delivery

Hi all,

I understand ‘shipment’ job has two locations, pickup and delivery. So loading and unloading is automatically there when optimize.
Can optimize ‘service’ job as delivery and unloading will be there also?
Please explain me how to optimize single location deliveries as ‘service’ jobs.


It is expected that the capacity decreases with every service. And you need a reverse method where some initial size decreases by the size specified at each service? Then I fear this is currently only possible via shipments. Is there a reason you cannot use shipments?

@karussell Let me refine your answer a bit. One can use services of type pickup and delivery as follows:

   "type": "pickup",
   "size": [10],


   "type": "delivery",
   "size": [10],

Type “pickup” is - as the name suggests - a pickup at the corresponding location. Thus, capacity consumption increases by 10. Type “delivery” causes a delivery at the associated location and decreases capacity consumption by 10.
However, there is one major difference compared to shipments. Once a service “pickup” is picked up, it can never leave the vehicle anymore. Therefore, it stays in the vehicle until the end of the route, and consume capacity until the end. When it comes to services of type “delivery”, it is assumed that the underlying items are picked up at the start location of the vehicle and leave the vehicle at the delivery location.

1 Like

This is what our documentation says:

[service -> “type”]

Specifies whether a service is a general service, a pickup or a delivery. This makes a difference if items are loaded or unloaded, i.e. if one of the size dimensions > 0. If it is specified as service or pickup, items are loaded and will stay in the vehicle for the rest of the route (and thus consumes capacity for the rest of the route). If it is a delivery, items are implicitly loaded at the beginning of the route and will stay in the route until delivery (and thus releases capacity for the rest of the route).

Ah, cool. Didn’t know this - nice!

For the “delivery” type - I cannot define an initial size that needs to be delivered so that I’m forced to revisit the depot at some point, right?

I didn’t know that.
I am still assuming only service and shipment.
Thanks @stefan
It’s nice to apply three different types in Service.