Lecture 03
Lecture 03
Ming Yan
June 8, 2022
maximize x1 + 2x2
x1 ,x2
subject to x1 100
2x2 200
x1 + x2 150
x1 , x2 0
maximize x1 + 2x2
x1 ,x2
÷
subject to x1 100
2x2 200
x1 + x2 150
x1 , x2 0
Let x = [x1 , x2 ]> 2 R2⇥1 , c = [1, 2]>
= =
maximize c> x
x
subject to [1, 0]x 100
=
[0, 2]x 200
[1, 1]x 150
x1 , x2 0 × ≥o
:
xi 0 8i 2 N1
xi 0 8i 2 N2
minimize c> x
x
s.t. Ax = b (1)
x 0,
If one has xi 0 ×;
- •
Y; replace
Define yi = xi 30
Eliminating “free” variables xi (no constraint on xi ) Xi Xi
,
replace
Define xi = xi+ xi , with xi+ 0, xi 0 X;
In ~
maximize x1 + 2x2
x1 ,x2 -
subject to x1 100
:
2x2 200
x1 + x2 150
x1 , x2 0.
Standard form:
minimize x1 2x2
x1 ,x2151 52,53
,
n
X m
X
minimize i + j
i j
s.t. a> xi + b + i 1 8i = 1, . . . , n
→
>
a yj + b j 1 8j = 1, . . . , m
✗
i 0 8i = 1, . . . , n
I j 0 8j = 1, . . . , m
a, b
☆ _
free.
Define a = a+ a , b = b+ -
b , with a+ , a , b + , b
-
0.
= =
-
And add slacks to inequality constraints.
min : 2- 8; t -29
i 's
set .
✗i'cat
-
a) + b-1-5-18; -
s; = I
*Fcat _
a- I 1-6+-5 -
6; + t
= -
l
,
at ≥o a- ≥o ¥570
b- Siro ,
si ≥ o
o; ≥o t ≥0
;
n
X m
X
minimize i + j
a+ ,a ,b + ,b , , ,s,t
i j
s.t. x>
i a
+
x>
i a +b
+
b + i si = 1 8i
yj> a+ yj> a + b + b j + tj = 1 8j
+ +
a ,a ,b ,b 0
,s 0
,t 0.
'Ñ day :
×i too K days at
A hospital wants to make a weekly night shift schedule for its nurses
The demand for the night shift on day j is dj , for j = 1, . . . , 7.
Every nurse works 5 days in a row.
We want to minimize the total number of nurses used while meeting
all demand.
mm É ,
Ignore the integrality constraints for now (i.e., we allow “half” nurse if
necessary)
✗ik = ✗ it , k -11 k= 0, I 2,3 ,
E- ✗in ≥ di
¥.
What is your choice of decision variable? How about letting xi be the
E-
A better way is to define xi to be the number of nurses starting at day i.
Our objective will be
minimize x 1 + x 2 + x3 + x4 + x5 + x6 + x7
x2R7
Th Xx X X} I
, X,
Xy
F ✗5
Xi Xi X} ✗4 "
sa ✗6 Xi
"
× } ✗
¢ Xy
Su
Xy X}
Xp Xs ✗6
Staffing Problem: LP
The LP form is
minimize x1 +x2 +x3 +x4 +x5 +x6 +x7
x
subject to x1 +x4 +x5 +x6 +x7 d1
[
"
x1 +x2 +x5 +x6 +x7 d2
x1 +x2 +x3 +x6 +x7 d3
x1 +x2 +x3 +x4 +x7 d4
x1 +x2 +x3 +x4 +x5 d5
x2 +x3 +x4 +x5 +x6 d6
x3 +x4 +x5 +x6 +x7 d7
x1 , x2 , x3 , x4 , x5 , x 6 , x7 0
minimize c> x
x
subject to Ax d, x 0
2 3 2 3 2 3 2 3
x1 1 1 0 0 1 1 1 1 d1
6 x2 7 6 1 7 6 1 1 0 0 1 1 1 7 6 d2 7
6 7 6 7 6 7 6 7
6 x3 7 6 1 7 6 1 1 1 0 0 1 1 7 6 d3 7
6 7 6 7 6 7 6 7
x=6
6 x4 7c = 6
7 6 1 7
7 A=6
6 1 1 1 1 0 0 1 7d = 6
7 6 d4 7
7
6 x5 7 6 1 7 6 1 1 1 1 1 0 0 7 6 d5 7
6 7 6 7 6 7 6 7
4 x6 5 4 1 5 4 0 1 1 1 1 1 0 5 4 d6 5
x7 1 0 0 1 1 1 1 1 d7
.-_
Flight j must land in time interval [aj , bj ].
The objective is to maximize the minimum separation time, which is
the interval between two landings.
tj+1 tj
tj titi
aj '
bj aj+1 bj+1
-
Decision variables
tj : the landing time of the flight j
Formulation
subject to aj tj bj j = 1, . . . , n
tj tj+1 j = 1, . . . , n 1.
⇐
min {tj+1 tj }.
j=1,...,n 1
It can be formulated as
max{ : tj+1 tj 8j = 1, . . . , n 1}
At optimal, must equal the minimal separation (since we try to
maximize ).
I
m¥
.
sit ,
£ -4-11 -
t's
V-j
It can be formulated as
max{ : tj+1 tj 8j = 1, . . . , n 1}
At optimal, must equal the minimal separation (since we try to
maximize ).
Formulation
maximize
t,
to
subject to tj+1 tj 8j = 1, . . . , n 1
a j tj b j j = 1, . . . , n
tj tj+1 j 2 J = 1, . . . , n 1.
Ming Yan MAT 3007 June 8, 2022 20 / 42
Remarks
min{z : z x, z y}
.
:÷
☆
43.4,
Data (x, y ): (1,2), (3,4), (4,7)
x represents temperature (on some scale)
y represents number of Blizzards sold by Dairy Queen (in hundreds)
We want to use the independent variable (x) to predict the dependent
response (y ) using a linear (or rather affine) model, y = ax + b.
Our goal is to find values of a and b that give the “best” fit of the model
to the data.
Minimizing one-norm (`1 ) error: |y (ax + b)|
/
& ,
Decision variables
a slope 8
min ,
b intercept si
s, ≥ latb -2
Formulation ¢ 8, ≥ -
Clatb -27
minimize |1 · a + b 2| + |3 · a + b 4| + |4 · a + b 7|
a,b
we - ur
s.t. a 0, b unrestricted.
1×1 = max { ×, -
✗ ls
minimize e1 + e2 + e3
a,b,e1 ,e2 ,e3 '
s.t. e1 a+b 2
e1 (a + b 2)
}
e2 3a + b 4
e2 (3a + b 4) }
e3 4a + b 7
e3 (4a + b 7) }
a 0
( ✗+ b) ≤c
Lf
3
X
minimize ei+ + ei
a,b,e+ ,e
i=1
s.t. e1+ e1 =a+b 2
e2+ e2 = 3a + b 4
e3+ e3 = 4a + b 7
a, e1+ , e1 , e2+ , e2 , e3+ , e3 0.
~
Piecewise linear function: each cost segment as aj and the marginal
@
cost on each segment as mj maxhm.IT ,
Mi- •?
,
Max -
? }
!
Ming Yan
¥ MAT 3007 June 8, 2022 27 / 42
Energy Management
m ($100,000/mw) 2 5 -
10
-
a (mw) 6 8 12
2
m ($100,000/mw) 1 2 -
5-
nonlinear objective function max{f12 (x1 ), f22 (x1 ), f32 (x1 )}+
s.t. x1 + x2 = 20
Piecewise linear convex function
0 x1 16
! maximize over a group of
0 x2 12
linear functions (equivalence)
minimize f1 + f2
x,f
s.t. x1 + x2 = 20
f1 2x1
1-
f1 5x1 24
f1 10x1 84
f2 1x2
f2 2x2 6
E- f2 5x2
0 x1 16
30
0 x2 12
µ§
x ⇐ ← =
s.t. x11 + x12 + x13 + x21 + x22 + x23 = 20
µµ,,µ ,
#
0 x11 8 mi -15×12-110×13
2✗
✗11×12×1
0 x12 4 }
f. 0 ≤ Xi , ≤ 8
0 x13 4 5.
0 ≤ ×, , ≤ ×
0 x21 6
◦ ≤ ✗↳ ≤4
0 x22 2
0 x23 4.
c> x + d
minimize
x e> x + f
subject to Ax b.
O O
We assume that e> x + f > 0 for any x satisfying Ax b.
When do we see this problem?
Production Planning: the objective of a company might be based on
maximizing the ratio: (total profit)/(total production costs).
00
Define:
x 1
y= , z= .
e> x +f e> x +f
A- ✗ ≤ b
Ay ≤ 2b
; =
EY 1- 2d
min .
CTL tzd
ÉÉ Ay
.
≤ 2- b
Ey -125 =
I
Define:
x 1
y= , z= .
e> x+f e> x+f
c> x + d c> x d ·1
>
= >
+ > = c> y + dz
e x+f e x+f e x+f
Constraints:
Connection:
e> y + zf = 1
minimize c> y + dz
y,z
subject to Ay zb 0
>
e y + fz = 1
z 0
This is an LP!
See Boyd and Vandenberghe for details on the equivalency
(supplemental reading: P151).
The network optimization models we will study are all special cases of
linear programming models.
It is important to be able to formulate network optimization models, when
appropriate because:
network representations make optimization models easier to visualize,
understand, and explain; and,
very efficient network optimization algorithms are available, enabling
us to solve much larger model instances.
If you are interested, check Bertsimas and Tsitsiklis Chapter 7 for more
information.
-
1000
0
-
÷
±
-
=
(shipping cost per unit, lower bound, upper bound) on each arc; (can
-
=]
-
The decision variables are the flows, xij . Constraints (2)-(8) are flow
balance constraints for each of the eight nodes.
Recap of SVM:
Auxiliary variables
Orientation of the objective function pushing
Correct equivalence
Maximin/minimax
Absolute value
Piecewise linear convex/concave functions