multiple cargo, multiple depot reload? #4847
Unanswered
ymp-vtl
asked this question in
Routing (and legacy CP) questions
Replies: 1 comment 3 replies
-
can't you create 3 demands dimensions and 3dim*5 reload stations ? e.g. with 2 reload station per cargo dimension aka 3dim * 2 reload = 6 reload data['demands_0'] = \
[0, # depot
-_capacity, # unload depot_1
-_capacity, # unload depot_2
0, # unload depot_3
0, # unload depot_4
0, # unload depot_5
0, # unload depot_6
1,
4,
7,
10]
data['demands_1'] = \
[0, # depot
0, # unload depot_1
0, # unload depot_2
-_capacity, # unload depot_3
-_capacity, # unload depot_4
0, # unload depot_5
0, # unload depot_6
2,
5,
8,
11]
data['demands_2'] = \
[0, # depot
0, # unload depot_1
0, # unload depot_2
0, # unload depot_3
0, # unlooad depot_4
-_capacity, # unload depot_5
-_capacity, # unload depot_6
3,
6,
9,
12] then you have SlackVar on |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was referring to https://github.com/google/or-tools/blob/master/ortools/constraint_solver/samples/cvrp_reload.py for the multi depot visit in order to reset capacity to 0.
Problem i have is that i am carrying multiple cargo types in my vehicle, and each vehicle also has different capacity for each cargo type. how should i model the resetting of the capacity to 0 in this case?
for example, my current code without the depot revisit is:
(i have 5 vehicle and 4 locations to visit as a simplified example)
In the github example, it there is only 1 capacity for 1 cargo type so the demands just takes the negative of the capacity.
Beta Was this translation helpful? Give feedback.
All reactions