CVRPTW with multiple cargo types and capacities #4263
Unanswered
rust-am
asked this question in
Routing (and legacy CP) questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have two cargo types, so I added two capacity dimensions: "type1_capacity" and "type2_capacity," and duplicated the locations, as mentioned here.
Here, one vehicle has two operation times, which is why
type1_capacities => [1, 1]
has a size of 2.This works well.
The next thing I wanted to do was to add the opportunity to use the first dimension capacities to fill with type2_cargo. So I increased the second dimension capacities as follows:
For this case, it works well.
But for the case with overbooking:
There is a solution, but it is not correct.
Now I am trying to add a constraint:
But I can't find how to sum IntVars for two dimensions and can't find how to convert the vehicle capacity to an IntVar.
Could you recommend methods for summing and conversion?
Or maybe there is another solution for this case.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions