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

Pickup and delivery #274

Merged
merged 64 commits into from
Feb 3, 2020
Merged

Pickup and delivery #274

merged 64 commits into from
Feb 3, 2020

Conversation

jcoupey
Copy link
Collaborator

@jcoupey jcoupey commented Oct 7, 2019

Issue

This PR is a work in progress toward #189 to solve problems including pickup-and-delivery scenarios (with precedence constraints, as opposed to #241 that is already implemented). For all pairs of pickup/delivery jobs, a solution is expected to be valid wrt two new constraints.

  • coupling: pickup and delivery must be serviced by the same vehicle
  • precedence: pickup must happen before delivery

Tasks

  • Define new objects to model pickup-and-delivery scenarios
  • Adjust existing heuristics to include paired jobs and produce valid solutions wrt new constraints.
  • Restrict current local search neighbours to the one that are valid wrt new constraints
  • Handle P&D pairs for (intra) CROSS and Mixed Exchange + Or-opt
  • Add new dedicated operator to shift a P&D to another route
  • Add other operator(s) dedicated to P&D?
  • Adjust remove_from_routes and try_job_additions logic to handle P&D pairs in local search
  • Benchmark approach on academic and real-life instances
  • Test on mixed problems containing single jobs and shipments
  • Adjust output step type
  • Consider P&D pairs in Input::set_compatibility
  • Update libvroom example
  • Update docs/API.md
  • Update CHANGELOG.md
  • review

@jcoupey
Copy link
Collaborator Author

jcoupey commented Jan 10, 2020

@K-Leon out of curiosity, where your tests about shipments-only situations or did you also try solving instances mixing shipments and regular jobs? Asking because I've not done much tests so far on the latter. Also some of the last day commits target this use-case through specific local search operators that involve moving around a job and a shipment at once.

@jcoupey jcoupey mentioned this pull request Jan 14, 2020
@jcoupey jcoupey merged commit 2a0137a into master Feb 3, 2020
@jcoupey jcoupey deleted the feature/pickup-and-delivery branch February 6, 2020 16:30
@Reggerriee
Copy link

Issue

This PR is a work in progress toward #189 to solve problems including pickup-and-delivery scenarios (with precedence constraints, as opposed to #241 that is already implemented). For all pairs of pickup/delivery jobs, a solution is expected to be valid wrt two new constraints.

  • coupling: pickup and delivery must be serviced by the same vehicle
  • precedence: pickup must happen before delivery

Tasks

  • Define new objects to model pickup-and-delivery scenarios
  • Adjust existing heuristics to include paired jobs and produce valid solutions wrt new constraints.
  • Restrict current local search neighbours to the one that are valid wrt new constraints
  • Handle P&D pairs for (intra) CROSS and Mixed Exchange + Or-opt
  • Add new dedicated operator to shift a P&D to another route
  • Add other operator(s) dedicated to P&D?
  • Adjust remove_from_routes and try_job_additions logic to handle P&D pairs in local search
  • Benchmark approach on academic and real-life instances
  • Test on mixed problems containing single jobs and shipments
  • Adjust output step type
  • Consider P&D pairs in Input::set_compatibility
  • Update libvroom example
  • Update docs/API.md
  • Update CHANGELOG.md
  • review

Hi,
I would like to ask whether this has been achieved? "* precedence: pickup must happen before delivery"
Realizing this is a problem for me and I want to ask you for information.
Thanks for your help.

@jcoupey
Copy link
Collaborator Author

jcoupey commented Oct 23, 2020

@Reggerriee as you can see, this PR has been merged. It's now part of the core features as of v1.6.0.

Use shipment objects to describe a pickup-and-delivery scenario.

@Reggerriee
Copy link

@Reggerriee as you can see, this PR has been merged. It's now part of the core features as of v1.6.0.

Use shipment objects to describe a pickup-and-delivery scenario.

Unfortunately, I do not know how to use. Can you possibly send an example where two jobs are assigned and which pickup is specified for which delivery?

This is my example:
{"jobs":[{"id":1,"service":600,"delivery":[1],"description":"Érd, 2030 Magyarország","location":[18.9016904,47.3571428]},{"id":2,"service":600,"delivery":[1],"description":"Százhalombatta, 2440 Magyarország","location":[18.9065897,47.3107008]},{"id":3,"service":600,"pickup":[1],"description":"Törökbálint, Magyarország","location":[18.9108101,47.4384914]},{"id":4,"service":600,"delivery":[1],"description":"Diósd, Magyarország","location":[18.9434797,47.4082916]},{"id":5,"service":600,"pickup":[1],"description":"Budaörs, Magyarország","location":[18.9529586,47.4621396]},{"id":6,"service":600,"delivery":[1],"description":"Sóskút, Magyarország","location":[18.8277597,47.4046702]},{"id":7,"service":600,"delivery":[1],"description":"Pusztazámor, Magyarország","location":[18.7830465,47.4044249]},{"id":8,"service":600,"delivery":[1],"description":"Biatorbágy, Magyarország","location":[18.8205591,47.4706818]},{"id":9,"service":600,"delivery":[1],"description":"Etyek, Magyarország","location":[18.751179,47.4467098]},{"id":10,"service":600,"delivery":[1],"description":"Herceghalom, Magyarország","location":[18.743256,47.4979399]}],"options":{"g":true},"vehicles":[{"id":1,"capacity":[5],"start":[18.9016904,47.3571428],"startDescription":"Érd, 2030 Magyarország","end":[18.9016904,47.3571428],"endDescription":"Érd, 2030 Magyarország"},{"id":2,"capacity":[5],"start":[18.9016904,47.3571428],"startDescription":"Érd, 2030 Magyarország","end":[18.9016904,47.3571428],"endDescription":"Érd, 2030 Magyarország"}]}

Where should I indicate which delivery the pickup belongs to?

Thanks for your answer.

@braktar
Copy link
Contributor

braktar commented Oct 23, 2020

Pickup-and-delivery pairs are defined not as jobs, but as shipments.

Here is the sample which displays how to build the json :

"shipments": [

you have to specifically define one pickup 'activity' and one delivery 'activity'.
Activities which are not linked can still be defined as jobs in parallel

@Reggerriee
Copy link

Pickup-and-delivery pairs are defined not as jobs, but as shipments.

Here is the sample which displays how to build the json :

"shipments": [

you have to specifically define one pickup 'activity' and one delivery 'activity'.
Activities which are not linked can still be defined as jobs in parallel

Thank you for your answer 👍

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

Successfully merging this pull request may close these issues.

4 participants