I have questions : 1)how to specify the different routes? 2)this model assumes one vehicle with only one type. if I have multiple types of vehicle, how to modify the model to minimize the number of vehicles put in use, and what is the best combination of vehicle types? 3)how to add time window constraints for each customer?
Thank you for sharing this. Can you please clarify the role of each constraint you have added? I have added my understanding of the constraints next to them: quicksum(x[i,j] for j in V if i!=j) == 1 for i in N # this is to ensure only one outgoing edge is selected for each node quicksum(x[i,j] for i in V if i!=j) == 1 for j in N # this is to ensure only one incoming edge is selected for each node q[i] (u[i] - q[i] == u[j]) for i,j in A if i!=0 and j!=0 I re-wrote the last constraint since u[i] (coming into node i) - q[i] (demand at node i) = u[j] (flow out of i and into node j) seems to satisfy the balance constraints of flow for the arc (i, j). Thoughts? A single vehicle carrying the same product to all the customers is similar to a single commodity network flow problem, right?
@@sanjaybalikar870 the first constraint is the outgoing arc constraint so that each vertex does not have more than one arc exiting from vertex. the second constraint is the incoming arc constraint, so that more than one arc is not incoming to a vertex. The third constraint ensures that the amount delivered to the customer is consistent with the next vertex. the fourth constraint makes sure that vehicle carrying constraint of Q is maintained.
Great Job! This is an awesome video that I need very much. I am trying to solve a dial a ride problem with gurobi, if you can add more videos on how to solve DARP and how to generate data randomly, it will be great of help ( I know you have generated data at this video but I think of a more dedicated video for how to generate data).
hi, thanks for the awesome tutorial. what would have to be changed if there are more than one vehicles? in particular, can we set a number of vehicles as a parameter like the number of clients?
You formulated the arcs as (i,j). If I have a similar problem and have some infeasible arcs that should be not considered by the program. How can I tell the program to remove such arcs. I am waiting for your reply please.
Hello Hernán Cáceres, I have created a dial-a-ride problem formulation based on your great tutorial, but some issues are there would you mind discuss with me my model please?
hi sir I have error when I try to solve the CVRP for your code in the step "from gurobipy import Model, GRB, quicksum" its appear there is no gurobipy so the message Error is --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) in ----> 1 from gurobipy import Model, GRB, quicksum ModuleNotFoundError: No module named 'gurobipy' the error in minite 9:36
hi sir I have error when I try to solve the CVRP for your code in the step "from gurobipy import Model, GRB, quicksum" its appear there is no gurobipy so the message Error is --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) in ----> 1 from gurobipy import Model, GRB, quicksum ModuleNotFoundError: No module named 'gurobipy' the error in minite 9:36
Have you correctly installed gurobi pip to your phyton ide? if the eror is for gurobipy, you may have an issue on installing the solver to your ide. If that is the problem you can visit gurobi website and copy pip installation link directly.
I have questions : 1)how to specify the different routes? 2)this model assumes one vehicle with only one type. if I have multiple types of vehicle, how to modify the model to minimize the number of vehicles put in use, and what is the best combination of vehicle types? 3)how to add time window constraints for each customer?
You saved my life!!! This video helped me to get over passini
Hello thanks for the upload!
At 16:16 I believe you made a mistake and wrote q[i] instead of q[j] which made the graph with seed 0 look a bit odd.
You're right! I'll try to add a note about it, thank you for letting me know.
Finally I wait for this Thank
Thank you for your contribution. What if for multiple depots? for example, 03, how could I set up the parameters and constrains? Thanks a lot
Thank you for sharing this. Can you please clarify the role of each constraint you have added? I have added my understanding of the constraints next to them:
quicksum(x[i,j] for j in V if i!=j) == 1 for i in N # this is to ensure only one outgoing edge is selected for each node
quicksum(x[i,j] for i in V if i!=j) == 1 for j in N # this is to ensure only one incoming edge is selected for each node
q[i] (u[i] - q[i] == u[j]) for i,j in A if i!=0 and j!=0
I re-wrote the last constraint since u[i] (coming into node i) - q[i] (demand at node i) = u[j] (flow out of i and into node j) seems to satisfy the balance constraints of flow for the arc (i, j).
Thoughts? A single vehicle carrying the same product to all the customers is similar to a single commodity network flow problem, right?
did you get your answer please let me know if you have
@@sanjaybalikar870 the first constraint is the outgoing arc constraint so that each vertex does not have more than one arc exiting from vertex. the second constraint is the incoming arc constraint, so that more than one arc is not incoming to a vertex. The third constraint ensures that the amount delivered to the customer is consistent with the next vertex. the fourth constraint makes sure that vehicle carrying constraint of Q is maintained.
Great Job! This is an awesome video that I need very much. I am trying to solve a dial a ride problem with gurobi, if you can add more videos on how to solve DARP and how to generate data randomly, it will be great of help ( I know you have generated data at this video but I think of a more dedicated video for how to generate data).
hi, thanks for the awesome tutorial. what would have to be changed if there are more than one vehicles? in particular, can we set a number of vehicles as a parameter like the number of clients?
best wishes from germany
This was very helpful for my project. Thanks.
Thank you. It helps my project a lot!
Thank you for your help! would you mind share to us what mathematical model of CVRP is used in this video?
Hi, great video. May i ask what the best bounds meaning?
Thank you. If I wanted to solve p-median problems and p-center problems on Gurobi, what would the code be?
Is there any example of multi-depot vrp (pick up and delivery )?
Thanks for sharing! Is there any way to find the route for each truck? I think the groubi may already give us the answer.
You formulated the arcs as (i,j). If I have a similar problem and have some infeasible arcs that should be not considered by the program. How can I tell the program to remove such arcs. I am waiting for your reply please.
Hello
Great job! and how about the multi-objective problems?
Hello
Hernán Cáceres, I have created a dial-a-ride problem formulation based on your great tutorial, but some issues are there would you mind discuss with me my model please?
I got stuck with how to code a specific parameter , any help will be appreciated
Beast ! Great Job!
Tendrás un ejemplo con cvrptw?
profe una pregunta no tienes un ejemplo con datos reales? osea no utilizando datos ramdon.
Which algoritm do you use Sir?
Dear Sir can you kindly solve a resource scheduling problem for time minimization using groubi? Also how to add fuzzy variables in gurobi?
Amazing. Thanks !!
Thank you so much!
Is this video not uploaded earlier?
where you have considered number of vehicles
Great sir
i always receive this ""errorname 'rnd' is not defined" i don't understand why
Hey, anyone knows how to make different colors for every sub route available?
this is a two index commodity flow version of cvrp right?
2-Index with Miller-Tucker-Zemlin constraints
is there matlab of gurobi for VRP
if qi is not random, how to make it?
Hello. Can you help me?
hi sir I have error when I try to solve the CVRP for your code in the step "from gurobipy import Model, GRB, quicksum" its appear there is no gurobipy so the message Error is ---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 from gurobipy import Model, GRB, quicksum
ModuleNotFoundError: No module named 'gurobipy' the error in minite 9:36
You need to install gurobi first. You can get the academic license.
where is the number of vehicles
Vehicule routing problem
garibi grubi
This was so helpful for my project , thank you
hi sir I have error when I try to solve the CVRP for your code in the step "from gurobipy import Model, GRB, quicksum" its appear there is no gurobipy so the message Error is ---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 from gurobipy import Model, GRB, quicksum
ModuleNotFoundError: No module named 'gurobipy' the error in minite 9:36
Have you correctly installed gurobi pip to your phyton ide? if the eror is for gurobipy, you may have an issue on installing the solver to your ide. If that is the problem you can visit gurobi website and copy pip installation link directly.