Linear Programming (Optimization)

Chapter 1. Formulations
1
 Mixed Integer Optimization Problem (or (Linear) Mixed Integer Program,
MIP)
min c’x + d’y
Ax + By = b (or Ax + By  b)
xZ+n , yR+k,
where AZmn , BZmk , bZm, cZn, dZk
 Integer Optimization Problem (IP)
min c’x
Ax = b
xZ+n
 Binary (or zero-one) Integer Optimization Problem (BIP)
min c’x
Ax = b
x  {0, 1}n
Integer Programming 2011
( or xBn )
2
 Combinatorial Optimization Problem
Given a finite set N = { 1, … , n }, weights cj for each j N, and a set F of
feasible subsets of N.
Want to find a minimum (or maximum) weight feasible subset in F.
(COP)
min SN {  jS cj : S  F }
 Almost all COPs can be formulated as IP or BIP
Knapsack problem, Traveling Salesman Problem, Min/Max cut of graph, Stable
set, Steiner Tree, …
Integer Programming 2011
3
Applications
 Numerous applications
Transportation (train scheduling)
Airline crew scheduling, plane scheduling
Production planning, distribution, SCM, logistics
Energy, Eletricity generation planning
Telecommunicaton network design, operation
Buses for the handicapped
Ground holding of aircraft
Cutting problems
….
Too many to list.
 Provides very strong modeling capabilities (much better than LP alone), but
usually difficult to solve (The solution set is not convex)
linear  nonlinear, convex  non-convex
 Recent advances in theory and software makes IP a practical option.
Integer Programming 2011
4
1.1 Modeling Techniques
 Steps
Define necessary variables
Define (construct) constraints so that feasible points correspond to the feasible
solutions of the problem
Define objective function
 May exist many correct, but different formulations. Needs creativity.
Which formulation is better?
 Frequently, use incidence vectors to denote sets
S  N, incidence vector of S is n-dimensional vector xS such that xSj = 1 if j  S
and xSj = 0 otherwise.
Integer Programming 2011
5
Binary choice
 The 0-1 knapsack problem
n items
wj is the weight of item j, and cj is its value
Bound b on the weight that can be carried in a knapsack
Select items to be put in the knapsack so that the total value is maximum.
xj = 1 if item j is selected, and xj = 0 otherwise
The capacity bound cannot be exceeded:  j =1, ..,n aj xj  b
Variables are 0-1:
Total value is maximized:
Integer Programming 2011
xj  {0, 1} for j = 1, .., n
max  j cjxj
6
 Variations
Integer knapsack problem
Precedence constrained knapsack problem
Partial orders on projects
project i must be done to perform project j ( i -> j )
( can be represented as directed graph, use xi  xj in constraints (x: binary))
ex) repair kit selection, selecting tools for FMS tool magazine, open pit mining,
…
Quadratic knapsack problem: Objective is quadratic function
Integer Programming 2011
7
 Boolean Quadratic Function
max f(x) = i = 1n dixi + i, j, i  j cijxixj , xi  {0, 1} for all i
( use additional variables yij , such that yij = xixj for binary x. Extended
formulation.)
 max i = 1n dixi + i, j, i  j cijyij
xi + xj – yij  1
-xi + yij  0
-xj + yij  0 for all i, j, i  j
xi, yij  {0, 1} for all i, j
 constraints ensure that xi = xj = 1
 yij = 1
 The technique will be used in lift and project
Integer Programming 2011
8
 Ex: quadratic knapsack problem, max cut of a graph
Def: Given a graph G = (V, E), and subset S  V of vertices, the set of edges
with exactly one endpoint in S is called a cut (relative to S).
 Given G = (V, E), and edge weights cij, e = (i, j)  E, find a maximum weight
cut of G.
max (i, j)  E cij ( xi(1-xj) + (1-xi)xj )
xi  {0, 1} for all i
(may add constraint x1 = 1 )
 Note: max cut problem is difficult to solve (NP-hard), but min cut problem is
easy (max-flow min-cut theorem).
Integer Programming 2011
9
Forcing constraints
 Decision A (x=1) can be made only if decision B (y=1) also has been made.
xy
 Uncapacitated Facility Location (UFL)
Given potential depots N = { 1, …, n}, and a set M = { 1, …, m} of clients.
Fixed cost cj to open depot j, and transportation cost dij if all of client i’s
order is delivered from depot j.
Determine which depots to open, and which depot serves each client so as to
minimize the total cost.
Define yj = 1 if depot j is open, and yj = 0 otherwise
xij is fraction of the demand of client i satisfied from depot j.
Satisfaction of demand of client i :  j =1n xij = 1 for i = 1, .., m
Integer Programming 2011
10
if depot j not opened, then xij = 0.
=> xij  yj for i  M, yj  {0, 1}
min  j  N cjyj +  i  M  j  N dijxij
 j =1n xij = 1 for i  M
xij  yj for i  M, j  N
0  xij  1 for i  M, j  N, yj  {0, 1} for j  N
 Note that there exists an optimal solution with xij = 0 or 1.
Capacitated version?
Integer Programming 2011
11
Relation between variables
 j =1n xij  (=) 1 : Generalized upper bound (GUB) constraint
Integer Programming 2011
12
Disjunctive constraints
 Assume x  0
a’x  b, c’x  d, a, c  0
at least one of the two constraints needs to be satisfied
 a’x  yb, c’x  (1-y)d,
y{0, 1}
 General form:
ai’x  bi ,
i = 1, …, m
( ai  0 for all i)
(at least k of m needs to be satisfied)
 i = 1m yi  k, ai’x  biyi, yi{0, 1}, i = 1, …, m.
 Ex) machine scheduling: two jobs must be processed on the same machine
and cannot be processed simultaneously.
pi : processing time of job i,
ti : start time of job i,
 either t2  t1 + p1 or t1  t2 + p2 should hold.
(need a different formulation from above, using big M)
Note that the feasible solution set is not convex.
Integer Programming 2011
13
Restricted range of values
 Want to restrict a variable x to take values in a set {a1, … , am}.
 x = j=1m ajyj, j=1myj = 1, yj  {0, 1}
Integer Programming 2011
14
Arbitrary piecewise linear cost functions
 Piecewise linear, not necessarily convex, cost function
(separable piecewise linear convex cost function can be modeled as LP (min
problem, but non-convex (or non-concave) function cannot be modeled as LP)
f(x)
x = i=1k iai, f(x) = i=1k i f(ai),
i=1k i = 1, 1, …, k  0
a1 y a2
1
2
1
Integer Programming 2011
y2
a3
3
y3
a4
4
x
15

min
s. t.
i=1k i f(ai)
1  y1 , k  yk-1
i  yi-1 + yi , i = 2, …, k-1,
i=1k i = 1, i=1k-1 yi = 1
i  0,
yi  {0, 1}
Integer Programming 2011
16
 Alternative formulation
Ljwj  xj  Ljwj-1 j = 1, 2, … , k
w0 = 1
wj  {0, 1}
j = 1, 2, … , k
xj  0
j = 1, 2, … , k
f(x)
f = K+c1x1 + c2x2 + … +ckxk
K
w0
w1
L1
Integer Programming 2011
w3
w2
L2
x
L3
17
Set covering, set packing, set partitioning
 M = { 1, … , m}, N = { 1, … , n}
M1 , M2 , …, Mn are collection of subsets of M.
cost cj for each subset Mj
 F N is a cover of M if j  F Mj = M
F is a packing of M if Mj  Mj =  for all j, k  F, j  k
F is a partition of M if it is both a cover and a packing of M.
weight of a subset F of N is defined as
j F cj
 Let A: m  n with aij = 1, if i  Mj ,
= 0, otherwise
 Ax  e, Ax  e, Ax = e
Integer Programming 2011
18
Sequencing problem with setup times
 One machine, m operations
operation j requires unique tool j
capacity of tool magazine is B < m
loading or unloading tool j into the magazine requires sj units of setup time
n jobs need to be performed by the machine and each job i requires multiple
operations Ji , |Ji|  B
(setup time required prior to each job is sequence dependent)
 Determine the optimal job sequence that minimizes total setup time. Assume
the magazine is empty initially.
Integer Programming 2011
19
 Let

xir = 1,
= 0,
if job i is the rth job processed
otherwise
yjr = 1,
= 0,
if tool j is on the magazine while the rth job is processed
otherwise
yj0 = 0,
r = 1n xir = 1,
i = 1n xir = 1,
xir  yjr ,
j = 1m yjr  B,
Integer Programming 2011
for all j. (or may use initial magazine setting)
for all i.
for all r.
for all j  Ji , for all r, i.
for all r.
20
minimize
j = 1m r = 1n sj | yjr - yj,r-1 |
 minimize

minimize
j = 1m r = 1n sj zjr
zjr  yjr - yj,r-1 ,
zjr  yjr-1 - yj,r ,
j = 1m r = 1n sj zjr
zjr  yjr - yj,r-1 ,
zjr  yjr-1 - yj,r ,
r = 1n xir = 1,
i = 1n xir = 1,
xir  yjr ,
j = 1m yjr  B,
Integer Programming 2011
for all j, r,
for all j, r.
for all j, r,
for all j, r,
for all i.
for all r.
for all j  Ji , for all r, i.
for all r.
21
Uncapacitated lot sizing (ULS) (NW)
 Production plan for an T-period horizon for a single product.
ct is the fixed cost (set-up) of producing in period t.
pt is the unit production cost in period t.
ht is the unit storage cost in period t.
dt is the demand in period t.
Variables:
yt is the amount produced in period t.
st is the stock at the end of period t.
xt = 1 if production occurs in t, and xt = 0 otherwise.
Integer Programming 2011
22
 Formulation:
min t = 1T (ptyt + htst + ctxt)
y1 = d1 + s1
st-1 + yt = dt + st
yt  xt
sT = 0
s, y  R+T,
x  BT,
for t = 2, … , T
for t = 1, … , T
where  = t=1T dt is an upper bound on yt for all t.
Integer Programming 2011
23
 Alternative formulation:
Define qit as the quantity produced in period i to satisfy demand in period t  i.
min t = 1T i=1t (pi + hi + hi+1 … + ht-1)qit + t=1T ctxt
i=1t qit = dt
for t = 1, … , T
qit  dtxt
for i = 1, … , T and t =i, … , T
q  R+T(T+1)/2,
x  BT,
 If we replace x  BT, by 0  xt  1 for all t, then the LP has an optimal
solution with x  BT. Hence this is a stronger formulation.
 The formulation is a special case of the uncapacitated facility location
problem. Substitute yit = qit/dt for all i and t  i.
 Extensions: capacitated lot sizing, multiple item lot sizing, …
Integer Programming 2011
24