GraphHopper.com | Forum | GitHub | Maps | Blog

Optimization is not respecting priority setting


#1

We have several vehicles and lots of services (just delivery).

On a daily basis we submit a new job containing all vehicles and all services and request optimization. Services which have been assigned in a previous run get a priority of ‘1’ new service get a priority of ‘10’.

During optimization service can be reassigned to other vehicles, that’s fine.

However, what see is that after a new round of optimization a service can be unassigned. That would not be a problem if it is a service assigned priority ‘10’ but we sometimes see a service with priority ‘1’ being unassigned while a service with priority ‘10’ is assigned.

We would like services with prio ‘1’ always stay assigned, as these services have been assigned previously.

How can we achieve this?

Relevant Job id : da9b523c-db2c-4fa6-a319-717a92395002

Service ID 28569 is dropped, but has priority 1. I would rather see service with priority 10 is dropped.


#2

I see and I understand. The priority approach is still a soft approach, i.e. there is a swap ratio between prio 1 and 10 jobs. Do you also have the solution where this unassigned job had been assigned?


#3

In your specific example, it does not seem that simple to assign this unassigned job without worsening the solution significantly. Can you make sure that when omitting all prio 10 jobs, every prio 1 job can be assigned?


#4

I tried myself, it is possible.


#5

Hmm. Ok, we need to elaborate how to enforce that prio 1 jobs must be assigned, i.e. to turn the soft approach into a hard one.


#6

Hi Stefan,

Thank you for taking your time to dive into this!

Do I understand correctly that ‘priority’ on a service is more a ‘suggestion’ than a ‘requirement’?

I do not understand your remark: ’ we need to elaborate how to enforce that prio 1 jobs must be assigned’. Are you suggesting there is way to enforce a ‘hard assign’ or that you need to alter the algorithm to force a ‘hard assign’?

Let me just explain how we would like to implement route optimization. Shipment requests are gathered from customers and at data-entry a delivery date is assigned (soft) usually 14 days in advance. At the end of the day all future delivery dates are presented to Route Optimization. Shipments which had not yet been assigned but do fit in a route are given a ‘hard deliverydate’. The customer gets a message confirming the deliverydate.

As long as the deliverydate is still more than two businessdays in the future we really do not care which vehicle on which route is assigned the shipment. As long as it stays on the previously ‘hardened’ deliverydate seeing that optimization has previously suggested the shipment ‘fits’.

In the next days more shipments can be added to the same delivery date. And Route optimization should check if the shipments stil ‘fit’ even with the new shipments added.

If a (new) shipment does not fit we message the planner a different deliverydate has to be assigned to the shipment. In that case the customer does not get a message confirming the deliverydate.

We have seen that adding a single shipment to an existing delivery date can ‘mix up’ the previous routes; shipments are reassigned to other vehicles and vehicles get new routes. Thats fine We just need to know if the shipments will fit.

In essence, what we are looking for is a ‘hard’ assign. Even if this means the routes are not optimal, given the shipments.

Thinking about this I think we are looking for new objective. ‘Do the new shipments (with a low priority) still fit on the given day, given already assigned shipments (with a high priority)’.


#7

We need to alter the algorithm to force a ‘hard assign’ since the current prio approach is a soft one.


#8

Thank you for the clarification!

You could expect my next question: Can you give me an estimated date for this change?


#9

Any update on this issue?


#10

Not yet, unfortunately. We will start analysing and improving this in a few weeks. Thanks for your patience.