Professional Documents
Culture Documents
February 3, 2021
Contents
2 Inference Condition 2
3 Max Constraint 2
4 Min Constraint 4
5 And Condition 4
6 Or Condition 5
7 Z=X × Y Constraint 5
8 Conflicted Condition 5
1
Ho Chi Minh City International University Deterministic Models in Operation Research
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc
Let:
Cj : be the capacity regarding to facility j
BigM : be the very large number
Oj : be the binary decision variable, Oj = 1 if the facility j is opened; otherwise Oj = 0
It is often that, there are at least one of 2 following constraints
X
() ≤ Cj × Oj
i
X
() ≤ BigM × Oj
i
2 Inference Condition
• If (X = T RU E) then A ≤ B
• If (X = F ALSE) then A ≥ B
• If (X = T RU E) then A = B
If (X = T RU E) then A ≤ B
A ≤ B + BigM (1 − X)
If (X = F ALSE) then A ≥ B
A ≥ B − BigM × X
If (X = T RU E) then A = B
A ≤ B + BigM (1 − X)
A ≥ B − BigM (1 − X)
3 Max Constraint
X = max(A, 0)
X = max(A, B)
where X, A, B are variables. This constraint can be transformed to linear form as follow:
Let Y be the index variable:
1 , if (A − B) ≥ 0
Y =
0 , if (A − B) ≤ 0
Given a threshold R for a resource , if the usage of this resource is higher than R it will incur an extra cost
for each extra usage resource.
In short the following constraints need to be transform into linear constraint:
!
X
X = max Ci Yi − R, 0
i
P
Now the constraints X = max ( i Ci Yi − R, 0) can be transformed to linear form as :
0 ≤ X ≤ 0 + BigM × Z
(P C Y − R) ≤ X ≤ (P C Y − R) + BigM × (1 − Z)
i i i i i i
4 Min Constraint
X = min(A, 0)
X = min(A, B)
where X, A, B are variables. This constraint can be transformed to linear form as follow:
Let Y be the binary variable:
1 , if A − B ≥ 0
Y =
0 , if A − B ≤ 0
5 And Condition
Y = X1 ∩ X2 ∩ X3 ... ∩ Xn
6 Or Condition
Y = X1 ∪ X2 ∪ X3 ... ∪ Xn
7 Z=X × Y Constraint
8 Conflicted Condition
Example
Assume that there are 2 jobs i and j. These jobs must be finished in their time window [si ; ei ] and [sj ; ej ].
If their time windows are overlapped, so these jobs cannot be assigned to the same worker. These jobs are
called conflicted jobs. If [si ; ei ] and [sj ; ej ] are not decision variables so their conflict due to overlap can be
expressed through a parameters Cij .
Parameters
Eim be the enable matrix Eim = 1 if job i is possible to be assigned to worker m; otherwise Eim = 0
Cij be the conflict matrix Cij = 1 if job i and job j cannot be assigned to the same worker m due to overlap
constraint; otherwise Cij = 0
Decision variables
Xim be the binary variable; Xim = 1 if job i is assigned to worker m; otherwise Xim = 0
Basic constraints
Index
i: index of job
j: index of job
w: index of worker
Parameters
BigM : Very large number
Sijm :setup time for job j on machine mif job i is immediate precedence job of job j on machine m
Eniw : be the enable matrix Eniw = 1 if job i is able to be assigned to worker w;otherwise Enij = 0
Bw and Fw are two values identify the time window of worker w
Decision Variables
Xiw be the binary variable, Xiw = 1 if job i is assigned to worker w; otherwise Xiw = 0
si starting time of job i
ei finishing time of job i
Basically there are two cases when 2 jobs are overlapped:
• The first is the starting time of job i, si in the range of job j, [sj , ej ]
• The second is the ending time of job i, ei in the range of job j, [sj , ej ]
ei ≤ sj , ∀P reij = 1
For each uij , vij , pij , qij pair of constrains are used
Elimination condition
Furthermore if Xiw = 1 then si and ei must be in the range [Bw ; Fw ], this will create the following constraints
s1 e1
s2 e2
s1 e1
s2 e2
Index
i: index of job
j: index of job
m: index of machine
Parameters
BigM : Very large number
X ≥A−B
X ≥B−A
X ≤A+B
X ≤2−A−B
Given several ranges [ai ; bi ] , i = 1...n and decision variable X, Y . If ai ≤ X ≤ bi then Y = fi (X)
Let ri be the index variable if X ∈ [ai ; bi ] then ri = 1 otherwise ri = 0.
ai ≤ Xi + BigM × (1 − ri )
Xi ≤ bi + BigM × (1 − ri ) ∀i = 1...I
Xi ≤ BigM × ri ∀i = 1...I
I
X
ri = 1, ∀i = 1...I
i=1
X
Y = ri × fi (Xi ) ∀i = 1...I
i
Zi ≤ BigM × ri ∀i = 1...I
Zi ≤ fi (Xi ) + BigM × (1 − ri ) ∀i = 1...I
Zi ≥ fi (Xi ) − BigM × (1 − ri ) ∀i = 1...I
ai ≤ Xi + BigM × (1 − ri )
Xi ≤ bi + BigM × (1 − ri )
Xi ≤ BigM × ri
D departure time
S starting time
p processing time
Ut binary variable, Ut = 1 if t ≥ S, otherwise; Ut = 0
Dt binary variable, Dt = 1 if t ≥ D − 1, otherwise; Vt = 0
D ≥S+p
t ≥ S − BigM × (1 − Ut )
t ≤ S − 1 + BigM × Ut
t ≤ D − 1 + BigM × (1 − Vt )
t ≥ D − BigM × Vt