Welcome! In this video, I’ll be formulating logical
constraints using binary or 0-1 integer variables. Suppose a company has 5 projects available
to choose from. We can define the decision variables as follows:
xi=1 if project i is selected, and 0 if not selected. where i=1, 2, 3, 4, and 5. Now consider these requirements:
If project 3 is selected, project 5 cannot be selected. In essence, 3 and 5 cannot coexist. So we write X3 + X5 ≤ 1
That is, we can have only x3, or only x5, and we can decide to have neither. As long as we can’t select both at the same
time, the condition is satisfied. This is referred to as a mutually exclusive
constraint. You can think of it as trying to attend 2
classes that are running at the same time.  Next. Exactly one of projects 2 and 3 must be selected. This is actually a mutually exclusive case
in which we are forced to choose one of project 2 and 3. So we write X2 + X3=1
That is, we can have only project 2, or only project 3. We can’t have neither and we can’t have
both. This is often referred to as a multiple choice
constraint. You can think of it as a true or false question
that you must answer before you proceed with the rest of an exam.  Next. If project 4 is selected, then project 2 must
also be selected. That is, project 4 is contingent on project
2. And since 4 depends on 2, we write
X4 ≤ X2 or X2 ≥ X4 This is called a conditional (or contingent)
constraint. Think of it as needing to take a prerequisite
course 2 before being allowed to take course 4. You can take 4 if you have 2. You can take 2 without 4. You can take neither 2 nor 4. But you cannot take 4 without 2. This is also written as X4 – X2 ≤ 0  Next. If project 1 is selected, project 5 must also
be, and vice versa. In this case we write
X1=X5 OR X1 – X5=0. That is, if we’re selecting any of the 2,
we must also select the other. This is called a co-requisite constraint. In essence, 1 and 5 are equivalent. That is, we either select both, or select
neither of them. We can’t select one without the other. Let’s examine more:
No more than three projects in total may be selected So X1+ X2 up to X5 has to be less than or
equal 3 At least 2 of the first 3 projects must be
selected And for that X1+X2+X3 ≥ 2 Project 4 must be selected. This simply means that X4=1. Select project 3 or 5, or both. In other words, select at least one of projects
3 and 5. Let’s look at even more. If project 4 is NOT selected, then project
2 must also NOT be selected. This is another conditional case where 2 depends
on 4. So we write X2 ≤ X4. Projects 3 and 4 must be selected together
This again is the co-requisite case where 3 and 4 must be in or out together. So X3=X4 Project 3 or 4 must be selected but not both
In other words, we must select exactly one of 3 and 4. Hence this is the multiple choice case and
so X3 + X4=1. In part 2 of this video, I’ll be formulating
more challenging constraints, involving 3 decision variables. Thanks for watching!

Categories: Articles

Leave a Reply

Your email address will not be published. Required fields are marked *