Skip to content

Enforce delivery_a before next pickup (pickup_b) in a PDP #3787

Discussion options

You must be logged in to vote

In your case i would go for an extra dimension of capacity 1,
pickup +1, delivery -1. So vehicle must deliver first to be able to pickup the next.

Note: I don't think playing with P&D policy will work in your case since you want to avoid P1, P2, D2, D1 (LIFO, stack) or P1, P2, D1, D2 (FIFO, queue).
ref: https://github.com/google/or-tools/blob/main/ortools/constraint_solver/docs/PDP.md

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by 0x6d6861
Comment options

You must be logged in to vote
2 replies
@Mizux
Comment options

@0x6d6861
Comment options

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