Integer Programming (9.2, either-or & if-then)

Поділитися
Вставка
  • Опубліковано 9 вер 2024

КОМЕНТАРІ • 49

  • @foxhare
    @foxhare 4 роки тому +8

    Sir, thank you. This was the only video I could find that clearly explained either-or binary constraints in a way that I could understand and apply to a specific problem in my MBA course. (Ateneo de Manila Graduate School of Business - Manila, Philippines)

    • @coverCell
      @coverCell  4 роки тому

      You're welcome! Glad you find it useful.

  • @dust2dust61
    @dust2dust61 3 роки тому +2

    Thank you sir. This was very helpful. I was banging my head for the past few hours before finding your explanation.

    • @coverCell
      @coverCell  3 роки тому +2

      You're welcome!
      (I'm glad to hear that this video had saved somebody's head.)

  • @Dennaton
    @Dennaton 3 роки тому +2

    Great explanation, thanks a lot!

    • @coverCell
      @coverCell  3 роки тому

      You're welcome! Glad you find this video useful.

  • @johndias631
    @johndias631 3 роки тому +1

    Very Well explained. Please keep doing this! You are an amazing teacher

    • @coverCell
      @coverCell  3 роки тому

      Thank you!! I'm so glad to know that you found the explanation useful.
      I'll keep doing this, and hopefully will get even better as well :)

    • @johndias631
      @johndias631 3 роки тому

      @@coverCell Can you please do a video on using meta heuristics in integer programming?

    • @coverCell
      @coverCell  3 роки тому

      @@johndias631 Hello! I haven't got any plan on that yet. Furthermore, I think the metaheuristics application (especially the encoding/decoding) would be very highly dependent on the problem on hand. Let's say the metaheuristic is GA, then the chromosome, crossover procedure, mutation procedure, really depends on the problem (Knapsack problem, scheduling problem, etc.).

  • @choosewithmeguys
    @choosewithmeguys 3 роки тому +1

    Thank you so much Sir!

    • @coverCell
      @coverCell  3 роки тому +1

      You're welcome! Thanks for watching my videos.

  • @Mara51029
    @Mara51029 Рік тому

    Appreciate your excellent video and valuable for the world 😊

    • @coverCell
      @coverCell  Рік тому

      Hello! I'm glad you find this valuable, thank you for watching my videos.

  • @defnebaseren5808
    @defnebaseren5808 3 роки тому

    Thanks a lot for this! Super clear explanation!

    • @coverCell
      @coverCell  3 роки тому

      You're welcome! I'm glad that the explanation on my video helps.

  • @bluetaurean
    @bluetaurean Рік тому

    I am a supply chain professional. I love the simplicity with which you explain and yet make the concepts super clear. Would love to see more videos from you on subject.
    Also can you recommend good books with real world examples of LP, IP, MILP that can be used to learn in more detail?

    • @coverCell
      @coverCell  Рік тому

      Thank you!
      I think this book Operations Research: Applications and Algorithms (by Wayne L. Winston) is good. It has a lot of examples for practicing LP/IP formulations.

  • @erayerol1629
    @erayerol1629 9 місяців тому

    Thanks!

    • @coverCell
      @coverCell  9 місяців тому +1

      You're welcome! Thanks for watching my videos.

  • @hansotjes3459
    @hansotjes3459 Рік тому

    Hi @dididedi, would you know how to to treat an if statement like this:
    if X_1 + 2(X_2 + X_3) = 4 , then X_4 = 1. The reverse does not have to hold per se.

    • @coverCell
      @coverCell  Рік тому

      Hello! That's an interesting question.
      Would it work if you transform those equations to these?
      X1 + 2X2 + 2X3 - 3 > 0 (this is the f(x))
      X4 - 1 >= 0 (this is the g(x))
      Then you apply the if-then formula 19:40

  • @divshu2061
    @divshu2061 3 роки тому

    Sir , the video was helpful. I have the following questions. Can there be different formulations for the same constraint. I have come across the constraints for the following : if b=1 then x=y the answer suggested is : y-M(1-b) =0 (Put them in the form as suggested). Then the IP constraints are -x+ y

    • @divshu2061
      @divshu2061 3 роки тому

      Sir there is another one: x1 2 . The answer suggested is b1 >= (x1 - 2)/M1 and x2 0 , -X1 >=0 resulting in x1

    • @coverCell
      @coverCell  3 роки тому

      Hello!
      First, I think there is a difference between x=y (that is required in the original constraint) and x-y >= 0 (this implies x may be greater than y). Second, the variable y in the video is an indicator 0-1 variable, while in your case y is an actual variable.
      Therefore, -x+ y

    • @coverCell
      @coverCell  3 роки тому

      For the second problem, I think this is correct:
      x1

  • @farahsouayfane7446
    @farahsouayfane7446 3 роки тому

    Thank you for the video, very helpful, In fact, I have an if-then constraint as follow
    if (Occ)t>0 then T1

    • @coverCell
      @coverCell  3 роки тому +1

      Hello, you're welcome! It seems like you have a step function in your case, I found a suggestion about step function here: math.stackexchange.com/questions/1987271/optimization-technique-for-step-function-in-constraints-and-objective-function
      However, since (Occ)t > 0, it might be quite difficult to model that due to the sign being strictly larger than.

  • @hughrhone
    @hughrhone 2 роки тому

    Thanks for your explanation. I have a problem exactly like your if-then example. In my case it's if s5 = 1, s6 = s7 = s8 = 0. How would I implement this in excel? is it s6 + s7 + s8

    • @coverCell
      @coverCell  2 роки тому

      Hello! I think if you apply it on Excel, M may be replaced by a very big positive integer. The y is a decision variable, just like your s5, s6, and so on. As for the if-then constraints, as shown in 19:16, you will have s6 + s7 + s8

  • @rubenstevenaar640
    @rubenstevenaar640 3 роки тому

    Great explanation! I've got one question, does it matter which equation you choose to be f(x) or g(x) regarding the either-or constraint?

    • @coverCell
      @coverCell  3 роки тому +2

      Hello, thanks for watching the video & glad you find it useful! I think, for the either-or case, it does not matter which equation you choose as f(x) or g(x).

    • @rubenstevenaar640
      @rubenstevenaar640 3 роки тому

      @@coverCell Thanks for the quick respond!

  • @flownamas31
    @flownamas31 3 роки тому

    Thank you very much for the video.
    I am wondering how do you write it down when asked either or both?

    • @coverCell
      @coverCell  3 роки тому

      Hello. That's an interesting question. If I understand correctly, you are asking how to formulate this condition: we have two constraints, we must satisfy any or both of them but we can't violate both. I'm thinking if it's possible to use two sets of if-then constraints: (1) if Constraint 1 is violated, then Constraint 2 must be satisfied; (2) if Constraint 2 is violated, then Constraint 1 must be satisfied. What do you think? Thanks!

  • @alaratizer8495
    @alaratizer8495 2 роки тому

    hi, would it be the same process if we had constraints such as if you invest in 3 or more projects from this portfolio, you need to invest in at least 2 project in another portfolio. Would we still try to leave the inequality to the zero?

    • @coverCell
      @coverCell  2 роки тому

      Hello! I'm thinking to solve such problem with a set of constraints like below. Let me know if it makes sense.
      Let's say we have portfolio A and portfolio B. The variable "a" is the sum of investments that we choose from portfolio A, out of 5 possible investments.
      a = xA1 + xA2 + xA3 + xA4 + xA5
      b = xB1 + xB2 + xB3 + xB4 + xB5
      The variables y1 and y2 are 0 or 1. If "a" is 3 or greater, y1 must be 1.
      a >= 3y1
      b >= 2y2
      Finally, we say that if y1 equals 1 (which means we invest in 3 or more investments from portfolio A), then y2 must equal 1 too.
      y2 >= y1

  • @xondiego
    @xondiego 2 роки тому

    Hi and thanks for the video. How do you get the value of the Big M for the second example, and when the condition is in the capacities how can I get a good value for the big M? Thanks a lot!

    • @coverCell
      @coverCell  2 роки тому

      Hello! In 26:00, for example, since each x may have the maximum value equal 1, then I think it is enough to set the M = 3 (to handle the situation when x21 = 1, x31 = 1, and x41 = 1); larger than 3 is also OK.

    • @xondiego
      @xondiego 2 роки тому

      @@coverCell Thanks a lot for your response, very well understood, God bless you!

  • @alinateh6688
    @alinateh6688 Рік тому

    hello didideidi, do u provide assignment help for linear programming on this? hope to hear from you soon as to how to contact you as it is urgent.

    • @coverCell
      @coverCell  Рік тому

      Hello! Unfortunately, by now I do not provide help for assignments. I hope the examples on Linear Programming may help you:
      ua-cam.com/play/PL0ZLI5mvN8kCsgjrK-YrTC81KY00rQKCK.html
      ua-cam.com/play/PL0ZLI5mvN8kA8a1e4Z8mKDLMm1ydLhKRs.html

  • @rosspaterson1426
    @rosspaterson1426 3 роки тому

    I have to come up with constraints so that x_1>2 and x_2>3 can not be true at the same time. Do you have any idea on how to go about this

    • @coverCell
      @coverCell  3 роки тому +1

      Hello there.
      Here's my idea, do you think it would work?
      (x_1) - 2

    • @rosspaterson1426
      @rosspaterson1426 3 роки тому

      @@coverCell yea that could work. Thanks for the help.

    • @coverCell
      @coverCell  3 роки тому

      @@rosspaterson1426 You're welcome!

    • @coverCell
      @coverCell  3 роки тому

      @AmazingTube Hello! Thanks for the correction. I changed the signs to become

  • @kaganesengin552
    @kaganesengin552 3 роки тому

    Great explanation, thank you!

    • @coverCell
      @coverCell  3 роки тому

      You're welcome! I'm glad it helps and thanks for watching.