Setting precedence on jobs #992
Labels
Help Needed
Modeling/Usage problem
Lang: Python
Python wrapper issue
Solver: Routing
Uses the Routing library and the original CP solver
Milestone
We are trying to model our dispatching problem to use the vehicle routing paradigm. We have two kinds of jobs: pickups and returns. Returns are orders where we return objects to customers. Pickups are orders where we pickup objects from customers.
On a given day, we want to dispatch orders that are mix of these two types. Ideally, we want service the returns first and only get do the pickups. Most of the time, the time window constraints are specified in this manner, i.e Returns can be scheduled between 7am to 9am. Pickups can be scheduled from 9am to 11am. Only rare occasions to meet supply, we do returns at 11am as well.
I want to the following constraint: for every route, return orders should performed before the pickup orders. I tried adding a PickupAndDelivery constraint, to each of the return and pickup order pairs, but that seems wrong, and expectedly the solver isn't able to solve.
Is there a way to specify the above constraint ?
Here is a snippet of our code:
Thanks!
The text was updated successfully, but these errors were encountered: