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)
@@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.).
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?
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.
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!
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.
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
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!
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.
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.
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
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
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?
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
Hello! Unfortunately, by now I do not provide help for assignments. I hope the examples on Linear Programming may help you: th-cam.com/play/PL0ZLI5mvN8kCsgjrK-YrTC81KY00rQKCK.html th-cam.com/play/PL0ZLI5mvN8kA8a1e4Z8mKDLMm1ydLhKRs.html
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
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
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).
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)
You're welcome! Glad you find it useful.
Thank you sir. This was very helpful. I was banging my head for the past few hours before finding your explanation.
You're welcome!
(I'm glad to hear that this video had saved somebody's head.)
Very Well explained. Please keep doing this! You are an amazing teacher
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 :)
@@coverCell Can you please do a video on using meta heuristics in integer programming?
@@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.).
Great explanation, thanks a lot!
You're welcome! Glad you find this video useful.
Appreciate your excellent video and valuable for the world 😊
Hello! I'm glad you find this valuable, thank you for watching my videos.
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?
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.
Thank you so much Sir!
You're welcome! Thanks for watching my videos.
Thanks a lot for this! Super clear explanation!
You're welcome! I'm glad that the explanation on my video helps.
Thank you very much for the video.
I am wondering how do you write it down when asked either or both?
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!
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.
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
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!
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.
@@coverCell Thanks a lot for your response, very well understood, God bless you!
Thank you for the video, very helpful, In fact, I have an if-then constraint as follow
if (Occ)t>0 then T1
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.
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
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
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?
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
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.
Hello! Unfortunately, by now I do not provide help for assignments. I hope the examples on Linear Programming may help you:
th-cam.com/play/PL0ZLI5mvN8kCsgjrK-YrTC81KY00rQKCK.html
th-cam.com/play/PL0ZLI5mvN8kA8a1e4Z8mKDLMm1ydLhKRs.html
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
Sir there is another one: x1 2 . The answer suggested is b1 >= (x1 - 2)/M1 and x2 0 , -X1 >=0 resulting in x1
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
For the second problem, I think this is correct:
x1
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
Hello there.
Here's my idea, do you think it would work?
(x_1) - 2
@@coverCell yea that could work. Thanks for the help.
@@rosspaterson1426 You're welcome!
@AmazingTube Hello! Thanks for the correction. I changed the signs to become
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?
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).
@@coverCell Thanks for the quick respond!
Thanks!
You're welcome! Thanks for watching my videos.
Great explanation, thank you!
You're welcome! I'm glad it helps and thanks for watching.