Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional pickups and job demand sum #122

Open
qwelias opened this issue Jul 27, 2023 · 1 comment
Open

Optional pickups and job demand sum #122

qwelias opened this issue Jul 27, 2023 · 1 comment

Comments

@qwelias
Copy link

qwelias commented Jul 27, 2023

Consider a case where there's three pickup places A, B and C, and a delivery place D, such as:

  • A has [2] items available for pickup
  • B has [1] items available for pickup
  • C has [1] items available for pickup
  • D has demand of [3]
  • We don't know if it's cheaper to pickup A+B or A+C, so it should be up to VRP

Such problem model does not seem to be possible because of at least two hard requirements:

  1. sum of pickup demand should be equal to sum of delivery demand

  2. all pickup/delivery tasks should be done or none of them

The first one is violated because pickups would need to have more demand than delivery in order to model that case.

The second one is violated because it is possible to specify demand only on the task and all tasks have to be completed, but this case requires modelling an extra pickup task because we don't know which is more optimal.

@reinterpretcat
Copy link
Owner

Yes, these are the hard requirements of multi-jobs.

Possible work-arounds for your use case:

Option 1: tour order

  • use tour order feature to have pickups ordered strictly before delivery
  • post-processing if delivery cannot be done or pickups are not optimal

Can be an solution if all pickups from all jobs should be done before any of deliveries (or you can have this split in less strict form somehow )

Option 2: alternative places

  • merge definitions of optional pickups with the same demand into a single pickup but with alternative places

See job.tasks.places definition:
https://reinterpretcat.github.io/vrp/concepts/pragmatic/problem/jobs.html#tasks
https://github.com/reinterpretcat/vrp/blob/master/vrp-pragmatic/src/format/problem/model.rs#L76

This can work if demand for B and C is equal all the time. If this rule holds, then this is the best solution I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants