CVRP - > To put a capacity constraint for total demand of visited points located in last visited city #4334
Unanswered
burbot48
asked this question in
Routing (and legacy CP) questions
Replies: 1 comment
-
Is there anybody had an idea to manage that constraint. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I want to set a constraint for the vehicle capacity. The vehicle can visit multiple points existed in different cities. For each vehicle, the total demand of the points visited by the vehicle which are existing in that last city is expected to be more than half of the total demand within that vehicle. Can we put such a hard constraint.
I added data['cities'] variable as below to define which nodes are in same city.
data['cities'] = [0, 1, 1, 2] # Index 0 is depot, index 1and index 2 are in same city, index 3 is in a different city
I added a constraint like as below.
But the solver status is coming Infeasible. Can anybody check why that constraint is not working properly.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions