Linear Integer Programming IP - PowerPoint PPT Presentation

1 / 57
About This Presentation
Title:

Linear Integer Programming IP

Description:

Machine Scheduling Problem. Applications. Airline Scheduling and Yield Management ... 4. x. 7. x. 9. x. 10. x. 12 (LAX CHI) x. 1. x. 6. x. 10. x. 11 (LAX DFW) x ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 58
Provided by: wri79
Category:

less

Transcript and Presenter's Notes

Title: Linear Integer Programming IP


1
Linear Integer Programming - IP
Maximize/Minimize z c1x1 c2x2 ? ? ? cnxn



s.t. ai1x1 ai2x2 ? ? ? ainxn
³

bi, i 1,,m


0 xj uj, j 1,,n
xj integer for some or all j 1,,n
2

An IP is a mixed integer program (MIP)
if some but not all decision variables are
integer.

If all decision variables are integer we have a
pure IP.

A binary decision variable must be 0 or 1
(a yes-no decision variable).

If all
decision variables are binary
the IP is a binary IP (BIP)

Decision variables not integer-constrained are
continuous decision variables
3
Why study IP?
(1)

LP divisibility assumption
(fractional solutions are okay)
is not always valid.
(2)
Binary variables allow powerful new techniques
like logical constraints.

4
Recall the Call Center Employee Scheduling problem
xt of full-time
employees that begin work in
shift t
yt of part-time employees
that work shift t
¼
¼
Min z
121.6(x

x
) 51.8(y

y
)


1
6
1
6
5
³
s.t.
x
x


x
15
6
6
1
1
2
5
³
³
x
x


(x
x
y
)
x
x


y
10

3
6
6
1
6
1
1
1
2
2
.
.
.
.
.
.
2
5
³
³
x
x


(x
x
y
)
x
x


y

35

3
6
5
6
5
6
6
5
6
6
xt ³ 0, yt ³ 0, t 1,2, ,6
5
Optimal LP solution
x 7.06, 0, 40, 12.94, 27.06, 7.94 y
0, 3.53, 0, 20.47, 0, 0 z 12795.2
not feasible

A correction method round continuous solution
x 8, 0, 40, 13, 27, 8 y 0, 3,
0, 21, 0, 0 z 12916.8 Feasible Yes,
Optimal? We do not know!

6
How good is this solution?

z
12795.2 is a lower bound on integer
optimum Hence, the rounded solution is no more
than
LP
12916.8 12795.2
(
) ? 100 0.95

12795.2
from the optimum.
Optimal solution is
x 10, 0, 40, 20, 20, 5
zIP 12795.2
y 10, 0, 0, 12, 0, 12

Here the LP and IP optima have the same
value. This is not commonly true.
7
Sometimes there is no obvious feasible solution
that can be obtained by rounding
X2
?
?
? optimal LP solution
?
?
?
?
?
?
?
X1
?
iso-cost line
optimal IP solution
The IP solution can be far from the LP rounded
solution even when the rounded solution is
feasible.
8
Basic Integer Programs
  • Assignment Problem
  • Knapsack Problem
  • Set Covering Problem
  • Facility Locaiton Problem
  • .
  • Traveling Saleman Problem
  • Machine Scheduling Problem

9
Applications
  • Airline Scheduling and Yield Management
  • Manpower Scheduling
  • Network Reliability and Design
  • Supply Chain Management
  • ..

10
Fixed-Charge Problem
n
kj cjxj if xj gt 0 0 if xj 0

Min å fj(xj) where fj(xj )









j1

kj set-up cost, cj per unit cost
IP formulation
n
å ( cjxj kjyj )
Min

j1
s.t.
xj Myj , j 1,,n yj Î 0,1, j 1,,n xj
³ 0, j 1,,n
11
Example Warehouse Location Problem
A company has m potential warehouse sites and n
customers Data dj demand for customer j
si capacity (supply) of warehouse i Decision
variables yi build a warehouse at site i? (1
yes, 0 no) xij shipment from warehouse i
to customer j
12
m
n
m
å
å
å


cijxij

kiyi
Min
j1
i1
i1
m
å xij dj j 1,,n
s.t.

Satisfy each customers demand

i1
n
å xij siyi i 1,,m
each warehouse can ship no more than its
supply if it is built

j1

xij ³ 0, i 1,,m, j 1,,n yi Î 0,1, j
1,,m
13
Example Facility Location Problem
(with forcing constraints)
Problem - open set of facilities assign each
customer to one facility at minimum cost.
No shipping here Cost of assigning customers to
facilities could be based on a response time
(e.g., locating fire stations).
14
Indices/Sets
potential facility location, j Î J with J n
customers to be served, i Î I with I m

Data
kj cost of opening a facility at location
j cij cost of serving customer i from facility
j
Decision Variables
yj open facility at location j (1 yes, 0
no) xij assign customer i to location j (1
yes, 0 no)
15
Strong Formulation
å å cijxij å kjyj
Min

jÎJ
iÎI jÎJ
each customer assigned to exactly one
facility forcing constraint
å xij 1, " iÎI
s.t.
jÎJ
xij yj , " iÎI jÎJ xij , yj Î
0,1 , " iÎI jÎJ
Can assign customer i to facility j only if we
open facility j.
16
Mathematically equivalent Weak formulation
å å cijxij å kjyj
Min

jÎJ
iÎI jÎJ
å xij 1, " iÎI
s.t.

jÎJ
xij must be 0 for all iÎI if yj 0 up to Ixij
can be 1 if yj 1.
å xij Iyj , jÎJ

iÎI
xij, yj Î 0,1 " iÎI jÎJ
? Less computational efficiency
17
The Days-Off Scheduling Problem
Each employee works 5 days per week and is given
2 consecutive days off (5,7)-cycle problem
cj weekly cost of pattern j per employee ri
number of required on day i xj number of
employees assigned to days-off pattern j
Note There are 7 days-off patterns i, j 1,,7
18
Days-Off Mathematical Model
7 j1
Minimize z ? cjxj subject to ( ? xj ) xi
xi-1 ? ri , i 1,7 xj ? 0 and integer, j
1,,7 x0 x7
7 j1
Solve problem to get xj Minimum cost workforce W
? xj
7 j1
19
Compact Mathematical Model
Minimize z cx subject to
x ? 0 and integer
20
Set Covering Problem (Airline Crew Scheduling)
  • 3 crews, each must be assigned a sequence of
    flights that begins and ends in Dallas (DFW)
  • Each flight segment must be covered

Possible tours
DFW ? LAX
1
1
1
1
DFW? DEN
1
1
1
1
1
1
1
1
DFW ? SEA
2
2
3
2
3
LAX ? CHI
LAX ?DFW
2
3
5
5

CHI ? DEN
3
3
4
3
3
3
3
4
CHI ? SEA
DEN ? DFW
2
4
4
5
2
2
DEN ? CHI
2
5
4
4
SEA ? DFW
2
2
4
4
SEA ? LAX
2
2
Cost (10000)
2
3
4
6
7
5
7
8
9
9
8
9
Decision Variables
xj (j 1,,12) assign a crew to tour j (1 yes,
0 no)
21
Formulation (Set covering problem)

Min
2x

3x

4x


8x

9x
1
2
3
11
12
s.t.
³ 1
(DFW ? LAX)
x

x

x

x

1
4
7
10
x

x

x

x
(DFW ? DEN)
³ 1
2
5
8
11
x

x

x

x
³ 1
(DFW ? SEA)
3
6
9
12
x

x

x

x

x
(LAX ? CHI)
³ 1
4
7
9
10
12
x

x

x

x
³ 1
(LAX ? DFW)
1
6
10
11
?
?
?
(SEA ? LAX)
³ 1
x

x
x

x

x

6
9
10
11
12

x

x


x
(assign 3 crews)
3
1
2
12
xj Î 0,1, j 1,,12
side constraint
Allows Dead heading i..e., multiple crews fly
on 1 leg. Only 1 crew works (all get paid).

22
The Knapsack Problem
  • A thief breaks into a store and wants to fill his
    knapsack with as much value as possible before
    making his escape. Given the following list of
    items available, what should he take?
  • Item A, weighing wA units and valued at vA
  • Item B, weighing wB units and valued at vB
  • Item C, weighing wC units and valued at vC
  • ? ? ?

23
The Knapsack Problem
  • The problem
  • The Backpack has a Capacity -- K
  • n items with weights wi and values vi
  • Model
  • Goal maximize the sum of values of items taken
  • Decisions which to choose
  • Constraints
  • The sum of weights of items in S is at most K

24
Mathematic Models
  • Xij --

25
Assignment Problem
  • There are n people avaialbe to carry out n jobs,
    each person is assigned to carryout one job.
  • Some indifiduals are better suited to particular
    jobs than others, so there is an estimate cost of
    Cij if person I is assigned to job j
  • Find the minimum cost assignement

26
Mathematic Models
27
Network flow Problem
  • When you solve the LP relaxation of the AP
    problem, the solution will be all integer.
  • Generall this is not true.
  • There is a set of problems, referred to as
    network flow problem, that has this property.
  • SPT, MST, .

28
Excerise Problem
  • Suppose that you are interested in choosing a set
    of investments 1,7. Model the following
    Constraints
  • 1 You can not invest in all of them
  • 2 You must choose at least one of them
  • 3 Investment can not be chosen if investment 3
    is chosen
  • 4 Investment 4 can be chosen only if investment
    2 is chosen
  • 5 You choose choose either investment 1 and 5 or
    Neither

29
Traveling Salesman Problem
1
4
2
3
Find minimum distance tour that starts at a city,
visits every other city exactly once and returns
to the initial city
30
Decision Variables
xij 1 if tour includes arc (i,j) 0 otherwise

Initial Formulation
. . .
20x

45x

40x
Min
50x

44x

25x

41
42


43
12
13
14

s.t.
x

x

x
1
xij Î 0,1, i ¹ j
12
13
14

x

x

x
1
21
31
41
x

x

x
1
21
23
24
1
x

x

x
1
.
12
32
42
.
.
4
2
x

x

x
1
41
42
43
x

x

x
1
14
24
34
3
This is incomplete because subtours are allowed.
31
Add Subtour Elimination Constraints Let S1
1,3 S2 2,4 and require at least 1 arc
from S1 to S2 x12 x14 x32 x34 ³
1 Disallows the 2 loop solution. Alternative
formulation x13 x31 1 and x24 x42 1 To
generalize, let N 1,,n, and let S ? N SEC
S xij S 1, 2 S n/2
(ij)?S
32
Example of SEC
Let n 10 and S 2, 5, 6, 9 . Then S
4. SEC x25 x26 x29 x52 x56 x59 x62
x65 x69 x92 x95 x96 4 1 3
6
2
5
9
In general, there exponentially many subtour
elimination constraints.
33
Sequencing problems with sequence-dependent
set-up times can be modeled as a TSP
Testing integrated circuits (ICs) A machine is
used to test several batches of ICs of differing
types. After each batch the machine must be
reset. The change-over time depends on what type
of IC we just tested and what well test next.
Change-Over Times IC Type
1
2
3
4
--
1
10
17
15
IC Type
2
20
19
18
--
3
50
44
--
25
20
--
4
45
40
34
If the order of testing is IC1 ? IC2 ? IC4
? IC3 ? IC1 . . .
  • The total change-over time for one cycle is
  • 10 18 20 50 98
  • The goal is to sequence the testing order so that
    the throughput (i.e., minimize cycle time) is
    maximized for fixed batch sizes
  • (Note that in this example the travel times are
    not symmetric)

35
Graph for IC Testing Example
1
0
Dummy node
2
44
0
17
0
3
18
4
Sample path 0 ? 1 ? 3 ? 2 ? 4 ? 0 Cost of path
0 17 44 18 0 79
36
Traveling Salesman Problem
Mathematical Programming
Inputs n number of customers including the
depot cij cost of traveling from customer i to
j Decision variables
37
Traveling Salesman Problem
(1) (2)
Constraints (1) and (2) ensure that each customer
is visited exactly once.
38
Traveling Salesman Problem
minimize 2x123x132x143x153x234x24...5x45 s
.t. x12x13x14x15 1 for node 1
x21x31x41x51 1 for node 1 ... ...
39
Traveling Salesman Problem
Is this solution feasible to our formulation? We
need additional constraints, so-called subtour
elimination constraints.
40
Traveling Salesman Problem
41
Traveling Salesman Problem
Subtour elimination constraints for the example
2
3
4
1
5
42
To See How It Works
  • Cutting Plane Approach
  • http//www.tsp.gatech.edu/cpapp/wi29.html
  • The Algorithm
  • 1) Solve the LP,
  • 2) Find Violated Constraints
  • 3) Add the constraint to LP
  • 4) Go to 1), Resolve the Problem.

43
The Power Generaiton Problem Revisted.
  • Recall the energy generation problem
  • What if the cost is changed

The two plants (generators) have the following
(nonlinear) efficiencies
Plant 1
0, 6 MW
6MW, 10MW
Unit cost (/MW)
10
25
Plant 2
0, 5 MW
5MW, 11MW
Unit cost (/MW)
8
28
The two plants (generators) have the following
(nonlinear) efficiencies
Plant 1
0, 6 MW
6MW, 10MW
Unit cost (/MW)
25
10
Plant 2
0, 5 MW
5MW, 11MW
Unit cost (/MW)
28
8
44
2. Energy Generation Problem (with piecewise
linear objective)

Austin Municipal Power and Light (AMPL) would
like to determine optimal operating levels for
their electric generators and associated
distribution patterns that will satisfy customer
demand. Consider the following prototype system
Demand requirements
4 MW
1
1
Demand sectors
Plants
7 MW
2
2
3
6 MW
The two plants (generators) have the following
(nonlinear) efficiencies
Plant 1
0, 6 MW
6MW, 10MW
Unit cost (/MW)
10
25
Plant 2
0, 5 MW
5MW, 11MW
Unit cost (/MW)
8
28
The table is to be read as follows. For plant 1
if you generate at a rate of 8MW then the cost
(/sec) is 10(6) 25(2) 110.
45
Problem Statement and Notation
Formulate an LP that, when solved, will yield
optimal power generation and distribution levels.
Decision Variables
x
power generated at plant
1 at operating level 1
11
1
x
²
2
²
²
²
²
²
²
12

2
1
x
²
²
²
²
²
²
²
21


2
x
2
²
²
²
²
²
²
²

22

y
1 to demand sector 1
power sent from plant
11
2
y
1 ² ² ²


12
²
²
²
²
y
3
1

²
²
²

13
²
²
²
²

y
1
2
²
²
²

²
²
²
²
21

y
2
2
²
²
²

²
²
²
²
22

y
3
2
²
²
²

23
²
²
²
²

46
Formulation
8x
28x
Min
10x
25x





21
22
11
12
s.t.
y

y
x
x
y





11
12
13
11
12
y

x
x
y
y






21
22
23
21
22
y
y
4




11
21
y
y
7




12
22
y
y
6




13
23
6,



x
0

x

4


0



11
12


x
5,

x
0

6



0



22
21
y
y
y
y
y
y
³

0
,
,
,
,
,

11
12
13
21
22
23
Note that we can model the nonlinear operating
costs with an LP only because the efficiencies
have the right kind of structure. In particular,
the plant is less efficient (more costly) at
higher operating levels. Thus the LP solution
will automatically select level 1 first.
47
The Power Generaiton Problem Revisted
  • Recall the cost in energy generation problem
  • What if the cost is changed

The two plants (generators) have the following
(nonlinear) efficiencies
Plant 1
0, 6 MW
6MW, 10MW
Unit cost (/MW)
10
25
Plant 2
0, 5 MW
5MW, 11MW
Unit cost (/MW)
8
28
The two plants (generators) have the following
(nonlinear) efficiencies
Plant 1
0, 6 MW
6MW, 10MW
Unit cost (/MW)
25
10
Plant 2
0, 5 MW
5MW, 11MW
Unit cost (/MW)
28
8
48
Have to model whether a produciton level is used
or not
Define Variables
Constraints
Precedence between levels
What is missing
Link the produciton value with produciton
level
Will that be enough ? No
49
The Complete Model
In Mosel forall( i in 1..2, j in 1..2) z(i,j)
is_bineary
50
Logic Constraints
Either-Or Constraints
Either f1(x1,,xn) b1 or f2(x1,,xn)
b2 or both.
IP formulation
Let y Î 0,1 f1(x1,,xn) b1 My f2(x1,,xn)
b2 M(1 y)
y 0 ? first constraint must hold y 1 ? second
constraint must hold Optimization process will
choose the y value.
51
K out of N constraints must hold
N constraints
f1(x1,,xn) b1 M(1 y1)
? fN(x1,,xn) bN M(1-yN)
f1(x1,,xn) b1 ? fN(x1,,xn) bN
At least K out of N must be satisfied
N


S yi K
i1

yi Î 0,1, i 1,,N
52
Job Scheduling Problem
There are a set of n jobs to be processed on one
machine. The following are certain data
concerning a job j 1.. n process time pj
release time rj (when the job will be
avaialbe) due date dj (when the job
should be completed) The problem is how to
arrange these jobs so that the total completion
time (makespan) is minimized.
Decision Varialbes start time sj
completion time ej z The latest/largest
of these times
Minimze z subject to z gt ej and

53
We want to make sure that no two jobs are being
processed at the same time. That is
For any two jobs i and j, then (start time of
i ) (process time of i ) lt start time of j
or (start time of j ) (process time of j ) lt
start time of I
That is only one of following two constraints
will hold
si pi lt sj or sj pj lt si
Let yij be the case the first one hold
job i preceeds job j
si pi lt sj M(1-yij) sj pj lt si Myij
Additiaonly, we have si pi ei
54
Job Shop Scheduling
Minimze z
s.t. z gt ej
si pi lt sj M(1-yij) sj pj lt si Myij
si pi ei
yij ? 0, 1
55
Homework IP Problem Set
  • Chapter 7, problems 2, 4  and 5.
  • IP problem set
  • Sample problem in Chapter 7
  • Fixed charge problem
  • Capacitiate facilitiation location problem
  • Traveling Saleman Problem
  • Directed Minimum Spanning Tree
  • Assembly balancing
  • Manufacuting with concave cost
  • Excerise 2, 4, 5, 7,  11, 13, 15, 17, 23
  • Branch and Bound
  • Chapter 8.1, 8.2, and 8.3,   8-10

56
Problem Set 2
  • Network Flow Models -- Chapter 5
  • Assignment Problem,
  • Transportation Problem
  • Maximal Flow Problem
  • Shortest Path Problem
  • Minimum Cut
  • Network Flow Models in LP Chapter 6 
  • You need to know the LP models of these problems,
    but ignore the algorithms

57
The TSP Model Without Subtour Elimination
Constraints
Write a Comment
User Comments (0)
About PowerShow.com