Gurobi & Python. Capacitated vehicle routing problem

Поделиться
HTML-код
  • Опубликовано: 8 ноя 2024

Комментарии • 49

  • @jessriy
    @jessriy 4 года назад +6

    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?

  • @Marinsversoo
    @Marinsversoo Месяц назад

    You saved my life!!! This video helped me to get over passini

  • @Blindsided4
    @Blindsided4 4 года назад +4

    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.

    •  4 года назад +1

      You're right! I'll try to add a note about it, thank you for letting me know.

  • @luciferhasfallen6019
    @luciferhasfallen6019 4 года назад +3

    Finally I wait for this Thank

  • @nguyentu3776
    @nguyentu3776 4 года назад +4

    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

  • @bijoyjth
    @bijoyjth 4 года назад +1

    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
      @sanjaybalikar870 2 года назад

      did you get your answer please let me know if you have

    • @kenzo450D
      @kenzo450D 2 года назад

      @@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.

  • @genuiskids3362
    @genuiskids3362 4 года назад +5

    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).

  • @tanvirkaisar7245
    @tanvirkaisar7245 2 года назад +2

    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?

  • @Daehne_
    @Daehne_ 5 месяцев назад

    best wishes from germany

  • @bilaldaqqah5888
    @bilaldaqqah5888 4 года назад

    This was very helpful for my project. Thanks.

  • @yufeihuang9771
    @yufeihuang9771 4 года назад

    Thank you. It helps my project a lot!

  • @alfandysurya1146
    @alfandysurya1146 3 года назад +1

    Thank you for your help! would you mind share to us what mathematical model of CVRP is used in this video?

  • @xhmshorbpr
    @xhmshorbpr 2 года назад

    Hi, great video. May i ask what the best bounds meaning?

  • @francescasbarbati2077
    @francescasbarbati2077 3 года назад

    Thank you. If I wanted to solve p-median problems and p-center problems on Gurobi, what would the code be?

  • @Ty.nattasit
    @Ty.nattasit 2 года назад

    Is there any example of multi-depot vrp (pick up and delivery )?

  • @yiyunzhou4853
    @yiyunzhou4853 3 года назад

    Thanks for sharing! Is there any way to find the route for each truck? I think the groubi may already give us the answer.

  • @genuiskids3362
    @genuiskids3362 4 года назад

    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.

  • @hamousatla4451
    @hamousatla4451 3 года назад +1

    Hello
    Great job! and how about the multi-objective problems?

  • @genuiskids3362
    @genuiskids3362 4 года назад +1

    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?

    • @genuiskids3362
      @genuiskids3362 4 года назад

      I got stuck with how to code a specific parameter , any help will be appreciated

  • @XShollaj
    @XShollaj 3 года назад

    Beast ! Great Job!

  • @otreborsolrac2
    @otreborsolrac2 3 года назад +1

    Tendrás un ejemplo con cvrptw?

  • @javierwilches7
    @javierwilches7 3 года назад

    profe una pregunta no tienes un ejemplo con datos reales? osea no utilizando datos ramdon.

  • @jaintenrustono7765
    @jaintenrustono7765 3 года назад

    Which algoritm do you use Sir?

  • @maroofmaroof3799
    @maroofmaroof3799 3 года назад

    Dear Sir can you kindly solve a resource scheduling problem for time minimization using groubi? Also how to add fuzzy variables in gurobi?

  • @kishan9506
    @kishan9506 3 года назад

    Amazing. Thanks !!

  • @KienNguyen-kx3xv
    @KienNguyen-kx3xv 3 года назад

    Thank you so much!

  • @srinivasanbalan5903
    @srinivasanbalan5903 4 года назад

    Is this video not uploaded earlier?

  • @yasirnaeem7192
    @yasirnaeem7192 6 месяцев назад

    where you have considered number of vehicles

  • @saurabhtalele1537
    @saurabhtalele1537 3 года назад

    Great sir

  • @tezkrattroza5008
    @tezkrattroza5008 2 года назад

    i always receive this ""errorname 'rnd' is not defined" i don't understand why

  • @ThKevzg97
    @ThKevzg97 2 года назад

    Hey, anyone knows how to make different colors for every sub route available?

  • @mf4552
    @mf4552 4 года назад

    this is a two index commodity flow version of cvrp right?

    • @DerEddieLoL
      @DerEddieLoL 3 года назад

      2-Index with Miller-Tucker-Zemlin constraints

  • @yongshengcao1679
    @yongshengcao1679 4 года назад

    is there matlab of gurobi for VRP

  • @wijayah2508
    @wijayah2508 4 года назад

    if qi is not random, how to make it?

  • @gunawansilalahi3290
    @gunawansilalahi3290 4 года назад +1

    Hello. Can you help me?

  • @fahadusman3572
    @fahadusman3572 4 года назад

    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

  • @yasirnaeem7192
    @yasirnaeem7192 6 месяцев назад

    where is the number of vehicles

  • @lynckee5244
    @lynckee5244 4 месяца назад

    Vehicule routing problem

  • @fermat6377
    @fermat6377 Год назад

    garibi grubi

  • @architdongre1372
    @architdongre1372 4 года назад

    This was so helpful for my project , thank you

  • @fahadusman3572
    @fahadusman3572 4 года назад

    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

    • @educatedchicken1533
      @educatedchicken1533 4 года назад

      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.