Академический Документы
Профессиональный Документы
Культура Документы
Operations Analysis II
IE 322
Integer Programming
Fall 2013
Definition
Integer Linear Programs are linear
programs with some or all the variables
restricted to integer or (discrete) values.
If all the variables restricted to integer or
(discrete) values, then the Problem is an
integer linear program ILP.
If some variables are integer or (discrete)
(but not all) then the problem is a Mixed
Integer Linear Program MILP.
1
10/1/2013
Required Floor
Machine Purchase
Space
Price
(sq. ft.)
Press 15 $8,000
Lathe 30 4,000
4
2
10/1/2013
A 0 - 1 Integer Model (1 of 2)
Recreation facilities selection to maximize daily usage by
residents.
Resource constraints: $120,000 budget; 12 acres of land.
Selection constraint: either swimming pool or tennis center
(not both).
Data:
Land
Recreation Expected Usage
Cost ($) Requirement
Facility (people/day)
(acres)
Swimming pool 300 35,000 4
Tennis Center 90 10,000 2
Athletic field 400 25,000 7
Gymnasium 150 90,000 3
3
10/1/2013
A 0 - 1 Integer Model (2 of 2)
4
10/1/2013
10
5
10/1/2013
Optimal Solution:
Z = $1,055.56
x1 = 2.22 presses
x2 = 5.55 lathes
6
10/1/2013
Problem (1)
Problem (2)
Five items are to be loaded in a vessel. The weight wj , volume
vj and the value rj for item j are given in the following table.
The maximum allowable cargo weight and volume are 111
tons and 109 m3.
itemj Unitweightwj UnitVolumevj UnitValuerj
1 5 1 4
2 8 8 7
3 3 6 6
4 2 5 5
5 7 4 4
7
10/1/2013
Problem 7
You have the following three-letter words : AET, FAR,
TVA, ADV, JOE, FIN, OSF and KEN. Suppose that we
assign a numeric values to the alphabet starting with A =
1 and ending with Z = 26. Each word is sorted by adding
numeric codes of its three letters. For example, AFT has
a score of 1+6+20 =27.You are to select five of the
given eight words that yield the maximum total score.
Simultaneously, the selected five words must satisfy the
following conditions :
Sum of letter 1 scores < Sum of letter 2 scores < Sum
of Letter 3 scores
Problem 8
8
10/1/2013
Problem 10
Problem 11
9
10/1/2013
1 2 3
Street A Street B
Street K
Street I
Street G
4 Street C 5
Street H
Street J
Street E Street D
6 8
7
ABC is an ILT trucking company that delivers loads to five customers . The following
list provides the customers associated with each route :
Route Customersservedontheroute
1 1,2,3,4
2 4,3,5
3 1,2,5
4 2,3,5
5 1,4,2
6 1,3,5
The following matrix lists distances among the truck terminal and the
customers
10
10/1/2013
ABC 1 2 3 4 5
ABC 0 10 12 16 9 8
1 10 0 32 8 17 10
2 12 32 0 14 21 20
3 16 8 14 0 15 18
4 9 17 21 15 0 11
5 8 10 20 18 11 0
The objective is to determine the least distance needed to make the daily deliveries to
all five customers
Challenge of Combinatorial
Problems
Example: Travelling Salesman Problem TSP
Consider a traveling salesman who leaves a
depot and return after delivering his product
to a finite number of sales points.The distance
between these points is known. His problem is to
find the shortest route through all the sales
points.
11
10/1/2013
X1 + x2 - My<= 5
2x1 + 5 x2 M(1-y)<= 7
Y = 0 or 1
12
10/1/2013
0 4 2 3 1 0 Unfeasible solution
Impossible to go
from 4 to 2
2 3 1 2 9
0 4 1 3 2 0 Distance = 17
13
10/1/2013
1 2 3 4
2 3 4 1 3 4 1 2 4 1 2 3
3 4 2 4 2 3 3 4 1 4 1 3 2 4 1 4 1 2 2 3 1 3 1 2
4 3 4 2 3 2 4 3 4 1 3 1 4 2 4 1 2 1 3 2 3 1 2 1
15 22 19 31 17 22 23 31 23 17 19 15
14
10/1/2013
Suppose that the salesman has only one supplementary sales point
If the number of sales points is 10 then the computation time = 10! minutes
= 3749760 minutes
= 62492 hours
= 2604 days 7 years
15
10/1/2013
A strong computer can take just 0.000001 second to check the feasibility of a
sequence or to compute its distance.
We have 10 nodes. So we have 10! sequences. The computation time of the computer is
= 10! 0.000001 = 3749760 0.000001 = 3.7 seconds.
If the number of sales points is 20 then the computation time of the computer
= 20!x0.000001 seconds
= 2432902008176640000 x0.000001 seconds
= 2432902008177 seconds
= 675806113 hours
= 28158588 days
78218 years
16
10/1/2013
9
2
The optimal solution will be equal or
11 less then 16
3
16
4 The value of any feasible solution is
an Upper Bound of the value of the
optimal solution in case of
minimization problems
17
10/1/2013
Upper Bound = 16
UB = 16
0
1 5
16
4
Upper Bound = 16
UB = 16
0
1 5
9 6
2 3
11 8 9
3 4 2 4
16
4 4 2
18
10/1/2013
Upper Bound = 16
UB = 16
0
1 5
8
2 9 36 4
11 8 9 11
3 4 2 4 2 3
16 22
4 4 2 2
Upper Bound = 16
UB = 16
0
1 5
8
2 9 36 4
11 8 9 11
3 4 2 4 2 3
16 22
4 4 2 2
19
10/1/2013
Upper Bound = 16
UB = 16
0
9
1 5 2
8
2 9 36 4 1 13
11 8 11
9 14
3 4 2 4 2 3 3
22 19
16
4 4 2 2 4
Upper Bound = 16
UB = 16
0
If we take the route 0-2-1-4 we will
travel at least 16 km
9
1 5 2
20
10/1/2013
Upper Bound = 16
UB = 16
0
9
1 5 2
11
8
2 9 36 4 1 13 3 4
11 8 11 14 16 12 14
9
3 4 2 4 2 3 3 4 1 4
22 19 17 22
15
4 4 2 2 4 4 1
Upper Bound = 16
UB = 16
0
9 12
1 5 2 3
11
9 6 8 13 14 15
2 3 4 1 13 3 4 1 2 4
11 8 11 14 16 12 14 17 16 18 18
9
3 4 2 4 2 3 3 4 1 4 2 4 1 4 1 2
22 19 17 22
16
4 4 2 2 4 4 1
21
10/1/2013
Upper Bound = 16
UB = 16
0
9 12
1 5 2 3 4 2
11
9 6 8 13 14 15 5 5
2 3 4 1 13 3 4 1 2 4 1 2 3
11 8 11 14 16 12 14 17 16 18 18 6
9 9 6 7
3 4 2 4 2 3 3 4 1 4 2 4 1 4 1 2 2 3 1 2
22 19 17 22 23
16 17 19 16
4 4 2 2 4 4 1 3 2 2 1
22
10/1/2013
Applications
Theory
Computation
23
10/1/2013
Applications
Cutting and Packing Problems.
Network Design and Transportations Problems.
Scheduling and Time Tabling Problems.
Location, Assignment and Supply chain
Problems.
Various applications in real life problems.
Consider the graph G (V, E) where V is the set of nodes and E is the set of arcs.
Each arc e E has a distance ce . Formulate the shortest path problem from
node s to node t as a linear program.
2
1
s (9,3)
t
3
5
4
24
10/1/2013
Objective function
Min c x
e E
e e
Constraints
x1 x 4 1
x1 x 2 x 7 0
x2 x3 0
x 7 x 8 x 9 x10 0
x 4 x5 x8 0
x 5 x10 x 6 0
x3 x6 x9 1
x e 0 ,1 e E
the formulation is
Min ce xe
eE
S .T
x e
1
e ( s )
x x e e
0 i V /s, t
e ( i ) e ( i )
x e
1
e ( t )
xe 0,1 e E
25
10/1/2013
Consider the graph G (V, E) where V is the set of nodes and E is the set of arcs.
Each arc e E has a capacity ce and a unit cost of flow e . We need to send a
quantity of flow d=6 from node s to t with minimum total cost. Formulate the
problem as a linear program
2
1
s (9,3,4)
t
3
5
4
(e, ce, e ) = ( number of the arc, capacity of the arc, unit cost of flow
on the arc )
x e
the total amount of flow that passes on arc e
Objective function
Min x
e E
e e
Constraints
x1 x 4 6
x1 x 2 x 7 0
x2 x3 0
x 7 x 8 x 9 x10 0
x 4 x5 x8 0
x 5 x10 x 6 0
x3 x6 x9 6
xe ce e E
xe 0 e E
26
10/1/2013
the formulatio n is
Min x
eE
e e
S .T
x e
d
e ( s )
x e
x e
0 i V / s , t
e ( i ) e ( i )
x e
d
e ( t )
xe ce e E
xe 0 e E
Consider the graph G (V, E) where V is the set of nodes and E is the set of arcs.
Each arc e E has a capacity ce ,a unit cost of flow e and a fixed cost fe of
installing the arc e. We need to send a quantity of flow d=6 from node s to t
with minimum total cost. Formulate the problem as a linear program
2
1
s (9,3,4,10)
t
3
5
4
(e, ce, e , fe ) = ( number of the arc, capacity of the arc, unit cost of flow on the arc,
fixed cost of installing the arc )
27
10/1/2013
x e
the total amount of flow that passes on arc e
1 if arc e is used
y
e
0 otherwise
Objective function
Min x
e E
e e
f y
e E
e e
Constraints
x1 x 4 6
x1 x 2 x 7 0
x 2 x3 0
x 7 x 8 x 9 x10 0
x 4 x5 x8 0
x 5 x10 x 6 0
x3 x6 x9 6
xe ce ye e E
xe 0 e E
y e 0 ,1 e E
the formulatio n is
Min e x e f y
e e
e E e E
S .T
x e
d
e ( s )
x e
x e
0 i V / s , t
e ( i ) e ( i )
x e
d
e ( t )
xe ce y e e E
xe 0 e E
y e 0,1 e E
28
10/1/2013
Job-Sequencing Model
Example 9.1-4
Jobco uses a single machine to process three jobs. (Both the processing time and the due
date (in days) for each job are given in the following tables. The due dates are measured
from zero, the assumed start time of the first job.
1 5 25 19
2 20 22 12
3 15 35 34
The objective of the problem is to determine the minimum late penalty sequence
for processing the three jobs
Example 9.1.D
Jobco Shop has 7 jobs to be processed on a single machine. (Both the processing
time and the due date (in days) for each job are given in the following tables).
proceesing Duedate
job(j) time(pj) (dj)
1 10 40
2 3 20
3 13 30
4 15 30
5 9 45
6 5 15
7 8 10
29
10/1/2013
Integer Programming
Algorithms
30
10/1/2013
Branch-and-Bound (B&B)
Developed in 1960 by A Land and G Doig
31
10/1/2013
Branching
If LP1 (in general LPi) fails to yield integer solution,
branch on any variable that fails to meet this
requirement.
Note: In mixed integer problems, a continuous variable is
never selected for branching.
Bounding / Fathoming
Select LP1 (in general LPi) and solve. Three
conditions arise.
32
10/1/2013
Best Bound
In maximisation, the solution to a sub-problem
is superior if its integer and raises the current
lower bound.
33
10/1/2013
Remove the
Relax ILP integrality Get LP1
constraint
34
10/1/2013
Branch on x1
LP3 LP2
35
10/1/2013
Branch on x2
LP4 LP5
36
10/1/2013
Home Work
Solve Problems (9.1C.1, 9.1C.2).
Solve Problems (9.1D.4, 9.1D.9).
Solve Problems (9.2A.2).
37
10/1/2013
1 2 3
Street A Street B
Street K
Street I
Street G
4 Street C 5
Street H
Street J
Street E Street D
6 8
7
38