Delivery Duration: Edge Cases and when to log what

Hello,

I know that it is possible (and allowed) to have a delivery duration of 0 ticks.

Just for clarification: Would this e.g. mean that if a driver is assigned a full order (with delivery duration == 0) in tick 4, he would log the delivery preparation in this tick, he would arrive at the group in tick 5 and try to give them the order (after having logged that he drove the entire delivery distance with 0 ticks remaining) and he would arrive back at the restaurant in tick 6?

And to have another “normal” example: If the delivery duration was 1 tick instead but the order is still assigned in tick 4, then what exactly happens in tick 5?

According to the logging, this is when the delivery “starts”. So would we log having driven 1 tick in tick 5? And if so, would we do this with remaining ticks == 1 or 0?

And what about tick 6? Based on the example with delivery duration == 0, I would assume that the driver now arrives at the group in tick 6.

But if we already logged the driver having driven some distance in tick 5, then the remaining distance would now just be 0. So are we even supposed to log driving some distance in the tick that the driver arrives in?

I’m also asking because the log for driving specifically states that the remaining ticks can also be 0. Or should we only ever use this log with 0 for the remaining ticks if the delivery duration is 0?

Now finally regarding going back to the restaurant in the case where the delivery duration is 1 tick. I saw in another post that returning starts in the tick after having arrived at the group.

Assuming that the driver did indeed arrive at the group in tick 6, he would then “start” returning in tick 7. So would he then arrive back at the restaurant in tick 8?

Is it? The deliveryDistance has to be strictly larger than 0 in order to be recognised as a delivery,

deliveryDistance (deliveryDistance ≥ 0) Distance between customer and restaurant in kilometers, in case it is a casual customer group. deliveryDistance > 0 means it is a delivery.

therefore if we calculate the duration via

The delivery will start in the tick after finishing the meals, and will last ⌈distance/5⌉ ticks.

we will get at least ⌈1/5⌉ = ⌈0.2⌉ = 1 ticks if I’m not wrong

2 Likes

You’re right. I just now realized that I’ve been mixing this up with the cooking duration this entire time.

Thank you!

1 Like