Академический Документы
Профессиональный Документы
Культура Документы
Formulation If all variables are discrete, the model is a pure integer program
Otherwise, the model is a mixed-integer program
2 Approximations of Nonlinear Models as MILPs Example: In a blending model, use none or all of a given ingredient
Separable Programming min 18x1 + 3x2 + 9x3
x1 ,x2 ,x3
Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 7 / 26 Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 8 / 26
“Lumpy” Linear Programs (cont’d) Formulating Models for Semi-Continuous Variables
cj xj Class Exercise: Consider the following blending problem, where the
ingredient x3 is a semi-continuous variable:
Yet another source of “lumpy” LP min 18x1 + 3x2 + 9x3
cj x1 ,x2 ,x3
models is when a decision variable is
semi-continuous s.t. 2x1 + x2 + 7x3 ≤ 150
0 ≤ x1 ≤ 60
xj 0 ≤ x2 ≤ 30
lj uj
x3 = 0 ∨ 10 ≤ x3 ≤ 20
Expressing Semi-Continuous Requirements
Semi-continuous variables of the form: xj = 0 ∨ lj ≤ xj ≤ uj , with lj > 0 Formulate a corresponding MILP model.
can be modeled by introducing 2 new continuous variables xjl , xju ≥ 0, 1
new binary variable yj ∈ {0, 1}, and 2 additional constraints:
xj = lj xjl + uj xju
1 = yj + xjl + xju
Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 9 / 26 Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 10 / 26
Class Exercise: Readily available Canadian coins are 1¢, 5¢, 10¢ and 25¢. 3 Constraints can also enforce selection of exactly p or at least p of a
Formulate an ILP model to minimize the number of coins needed to set of choices J
provide change amount for q¢.
Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 11 / 26 Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 12 / 26
Formulating ILP Models Assignment Models
Class Exercise: The Department of Chemical Engineering at McMaster is Set I Set J
acquiring optimization software for use in ChE 4G03. The issue here is optimal matching
The 4 codes available and the types of algorithms they provide are or pairing of objects of two distinct
indicated by ×’s in the following table: types
It is standard to model all
Algorithm Code, j assignment forms with the decision
Type 1 2 3 4 variables:
LP × × × ×
IP — × — ×
NLP — — × × ∆ 1, if i of the 1st set is matched with j of the 2nd
yi ,j =
Cost 3 4 6 14 0, otherwise
Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 15 / 26 Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 16 / 26
Matching Models (cont’d) Process Scheduling Models
Class Exercise: The instructor of ChE 4G03 wants to assign his students Scheduling is the allocation of resources over time
to 2-person teams for a graded tutorial. each student s has scored his/her Single-process scheduling problems seek an optimal sequence in
preference ps,s ′ for working with each other student s ′ . which to complete a given collection of tasks on a single process that
1 Formulate a MILP model to form teams in a way that maximizes can accommodate only one job at a time
total preference.
Feed 1 Product 1 111111
000000
p1
000000
111111
000000
111111 Time
r1 d1
Feed 2 Product 2 11111
00000
p2
00000
11111 Time
r2 d2
Feed 3 Product 3 11111
00000
p3
00000
11111
00000
11111 Time
r3 d3
Typical Data:
∆
pj = estimated process time for task j
∆
rj = release time at which task j becomes available for processing
∆
dj = due date by which task j should be completed
Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 17 / 26 Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 18 / 26
Due dates are usually handled as goals to be reflected in the objective Max. lateness max{xj + pj − dj : j = 1, . . . , n}
n
1X
function rather than explicit constraints Mean lateness (xj + pj − dj )
n j=1
This avoids the situation where there is no feasible schedule that
Max. tardiness max{0, max{xj + pj − dj : j = 1, . . . , n}}
meets all due dates n
1X
Dates that must be met are termed deadlines to distinguish and can Mean tardiness max{0, xj + pj − dj }
n j=1
be easily enforced as: xj + pj ≤ dj , ∀j
Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 19 / 26 Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 20 / 26
Process Scheduling Models (cont’d) Process Scheduling Models (cont’d)
Class Exercise: The following table shows the process time, release times, x1 x2 x3
due dates, and scheduled starts for three jobs. Compute the corresponding Feed 1 Product 1 000000
111111
p1
111111
000000
000000
111111 Time
value of each of the six objective functions listed previously. r1 d1
Feed 2 Product 2 11111
00000
p2
Job 1 Job 2 Job 3 r2 00000
11111 Time
d2
Process time, pi 15 6 9 Feed 3 Product 3 11111
00000
p3
00000
11111
00000
11111 Time
Release time, ri 5 10 0 r3 d3
Due Date, di 20 25 36
Scheduled start, xi 9 24 0
Conflict Constraints:
1 Completion times (xi + pi ) are: xj + pj ≤ xj ′ ∨ xj ′ + pj ′ ≤ xj , ∀j, j ′ = 1, . . . , n, j 6= j ′
9 + 15 = 24, 24 + 6 = 30, 0+9= 9
Maximum completion time is max{24, 30, 9} = 30 Reformulation Using Disjunctive Variables:
Mean completion time is 13 (24 + 30 + 9) = 21
∆ 1, if j binding comes before j ′
2 Lateness of the three jobs (xj + pj − dj ) is: yj,j ′ =
0, if j ′ binding comes before j
9 + 15 − 20 = 4, 24 + 6 − 25 = 5, 0 + 9 − 36 = − 27
Maximum lateness is max{4, 5, −27} = 5 Illustrative Example: y1,2 = y1,3 = 1, y2,3 = 0
Mean completion time is 31 (4 + 5 − 27) = −6
Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 21 / 26 Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 22 / 26
Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 23 / 26 Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 24 / 26
Approximating General Separable Programs as MILPs Approximating General Separable Programs as MILPs
Piecewise affine approximation: Piecewise affine approximation:
Define: Disjunctive Variables:
(Nj intervals) (Nj intervals)
(k) (k−1)
(2) (1) (k) fj − fj (2) (1) ∆ 0, if ωj,k = 0
fj (xj )
c2 =
fj −fj
cj = fj (xj )
c2 =
fj −fj yj,k =
(2) (1) (k) (k−1) (2) (1) 1, if ωj,k > 0
xj −xj
xj − xj xj −xj
Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 25 / 26 Benoı̂t Chachuat (McMaster University) MILP: Model Formulation 4G03 25 / 26