0% found this document useful (0 votes)
61 views

Optimization-L4-6 (Integer Programming)

Optimization lecture based on integer programming as a part of operations research and optimization course.

Uploaded by

f20201454
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Optimization-L4-6 (Integer Programming)

Optimization lecture based on integer programming as a part of operations research and optimization course.

Uploaded by

f20201454
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

ENGINEERING OPTIMIZATION

Integer Linear Programming

BITS Pilani
Pilani Campus
Outline
• Introduction
• Integer Linear Programming
– Branch-and-Bound (B&B)
– Cutting-plane

2
Introduction

3
Integer Programming
• Decision variables only have integer values.
– When assigning people, machines, and vehicles to activities
• Requiring integers is the only way in which an IP
deviates from an LPP.
– Mixed integer programming.
– Pure integer programming.

4
Integer Programming (Ex. 9.1-1)
Capital budgeting: Five projects are being evaluated over a 3-year
planning horizon. The following table gives the expected returns for
each project and the associated yearly expenditures:

Which projects should be selected over the 3-year horizon?

Formulate the IP.


5
Integer Programming (Ex. 9.1-1)
Maximize:
20x1 + 40x2 + 20x3 + 15x4 + 30x5

Subject to:
5x1 + 4x2 + 3x3 + 7x4 + 8x5 ≤ 25 (Y1 Funds)
1x1 + 7x2 + 9x3 + 4x4 + 6x5 ≤ 25 (Y2 Funds)
8x1 + 10x2 + 2x3 + 1x4 + 10x5 ≤ 25 Y3 Funds
xi = {0,1}

• Binary Integer Programming problem.

6
Integer Programming (Ex. 9.1-1)
Maximize:
20x1 + 40x2 + 20x3 + 15x4 + 30x5

Subject to:
5x1 + 4x2 + 3x3 + 7x4 + 8x5 ≤ 25 (Y1 Funds)
1x1 + 7x2 + 9x3 + 4x4 + 6x5 ≤ 25 (Y2 Funds)
8x1 + 10x2 + 2x3 + 1x4 + 10x5 ≤ 25 Y3 Funds
xi = {0,1}

IP solution: x1 = x2 = x3 = x4 = 1, x5 = 0 ⇒ z = 95

LP solution: x1 = .58, x2 = x3 = x4 = 1, x5 = .74 ⇒ z = 108.7


Can you round-off the LP solution?
7
Integer Programming (Ex. 9.1-2)
Set-covering problem: To promote on-campus safety, the UoA Public Safety
Department is in the process of installing emergency telephones at selected
locations. The department wants to install the minimum number of telephones
that serve each of the campus main streets. The figure maps the campus principal
streets.

8
Integer Programming
• Fixed-charge problem (Ex. 9.1-3)
• Either-Or and If-Then Constraints (Ex. 9.1-4)

9
Cutting-Plane
Method

10
Cutting-Plane Method
• Starts at the continuous optimum LP solution
• Special constraints (called cuts) added to the solution
space that render an integer optimum extreme point.

• Only look at pure integer programming problems.

11
Cutting-Plane Method (Ex. 9.2-2)
Maximize: z = 7x1 + 10x2

Subject to:
−x1 + 3x2 ≤ 6
−7x1 + 3x2 ≤ 35
x1 , x2 ≥ 0 and integer

12
Cutting-Plane Method (Ex. 9.2-2)
Maximize: z = 7x1 + 10x2 Maximize: z = 7x1 + 10x2

Subject to: Subject to:


x1
−x1 + 3x2 + x3 = 6 − + x2 + x3 = 2
3
3
−7x1 + 3x2 + x4 = 35 −x1 + x2 + x4 = 5
7
x1 , x2 ≥ 0 and integer x1 , x2 ≥ 0 and integer
x3 , x4 ≥ 0 and integer x3 , x4 ≥ 0
A pure IP problem with all Pure IP problem, but slacks may
decision variables and slacks as not be integers!
integers.

13
Cutting-Plane Method (Ex. 9.2-2)
Maximize: z = 7x1 + 10x2

Subject to:
−x1 + 3x2 + x3 = 6
−7x1 + 3x2 + x4 = 35
x1 , x2 ≥ 0 and integer
x3 , x4 ≥ 0 and integer

First solve by removing


integer restrictions.

14
Cutting-Plane Method (Ex. 9.2-2)
Optimum LP Tableau:

Solution has non-integer values!

Generate a cut to try and restrict the solution to integer values…

15
Cutting-Plane Method (Ex. 9.2-2)
Take constraint no. 2 (any constraint with fractional RHS)

Constraint:
1 3 1
x1 − x3 + x4 = 4
22 22 2
Factor all non-integer coefficients into an integer value and a
positive fractional component (less than 1)
1 21
− = −1 +
22 22
3 3
=0+
22 22
1 1
4 =4+
2 2
16
Cutting-Plane Method (Ex. 9.2-2)
Take constraint no. 2 (any constraint with fractional RHS)

Constraint:
21 3 1
1 x1 + −1 + x3 + 0 + x4 = 4 +
22 22 2
21 3 1
⇒ x1 − x3 + x3 + x4 = 4 +
22 22 2

Integer Integer + Fraction

Thus,
21 3 1 1 1
x3 + x4 = or 1 or 2 or …
22 22 2 2 2
17
Cutting-Plane Method (Ex. 9.2-2)
Thus,
21 3 1 1 1
x3 + x4 = or 1 or 2 or …
22 22 2 2 2

21 3 1
⇒ x3 + x4 ≥
22 22 2
21 3 1
⇒ x3 + x4 − s1 = Gomory’s
22 22 2
Fractional
s1 ≥ 0 Cut
s1 has to be an integer

Add the cut to the simplex table as a constraint.


18
Cutting-Plane Method (Ex. 9.2-2)
Generate the cut using constraint #1

Constraint:
7 1 1
x2 + x3 + x4 = 3
22 22 2
Factor all non-integer coefficients into an integer value and a
positive fractional component (less than 1)
7 7
=0+
22 22
1 1
=0+
22 22
1 1
3 =3+
2 2
19
Cutting-Plane Method (Ex. 9.2-2)
Take constraint no. 1

Constraint:
7 1 1
1 x2 + 0 + x3 + 0 + x4 = 3 +
22 22 2
7 1 1
⇒ x2 + x3 + x4 = 3 +
22 22 2

Integer Integer + Fraction

Thus,
7 1 1 1 1 1
x3 + x4 = or 1 or 2 or 3
22 22 2 2 2 2
20
Cutting-Plane Method (Ex. 9.2-2)
Thus,
7 1 1 1 1 1
x3 + x4 = or 1 or 2 or 3
22 22 2 2 2 2

7 1 1
⇒ x3 + x4 ≥
22 22 2
7 1 1
⇒ x3 + x4 − s1 =
22 22 2
s1 ≥ 0
s1 has to be an integer

Add the cut to the simplex table as a constraint.


21
Cutting-Plane Method (Ex. 9.2-2)
7 1 1
x + x − s1 = , s1 ≥ 0 and integer
22 3 22 4 2

Basic x𝟏 x𝟐 x3 x𝟒 𝐬𝟏 Solution
63 31 1
z 0 0 0 66
22 22 2
7 1 1
x𝟐 0 1 0 3
22 22 2
1 3 1
x1 1 0 − 0 4
22 22 2
7 1 1
s1 0 0 − − 1 −
22 22 2
22
Cutting-Plane Method (Ex. 9.2-2)
Basic x𝟏 x𝟐 x3 x𝟒 𝐬𝟏 Solution
63 31 1
z 0 0 0 66
22 22 2
7 1 1
x𝟐 0 1 0 3
22 22 2
1 3 1
x1 1 0 − 0 4
22 22 2
7 1 1
s1 0 0 − − 1 −
22 22 2

• Is the optimality criteria satisfied?


• Is the feasibility criteria satisfied?

• Use Dual-simplex to restore feasibility…

23
Cutting-Plane Method (Ex. 9.2-2)
• Decide leaving and entering variables
Basic x𝟏 x𝟐 x3 x𝟒 𝐬𝟏 Solution
63 31 1
z 0 0 0 66
22 22 2
7 1 1
x𝟐 0 1 0 3
22 22 2
1 3 1
x1 1 0 − 0 4
22 22 2
7 1 1
s1 0 0 − − 1 −
22 22 2

24
Cutting-Plane Method (Ex. 9.2-2)
• Optimal tableau

Basic x𝟏 x𝟐 x3 x𝟒 𝐬𝟏 Solution

z 0 0 0 1 9 62

x𝟐 0 1 0 0 1 3

1 1 4
x1 1 0 0 − 4
7 7 7
1 22 4
x3 0 0 1 − 1
7 7 7

• Determine the next cut…

25
Cutting-Plane Method (Ex. 9.2-2)
• Optimal tableau

Basic x𝟏 x𝟐 x3 x𝟒 𝐬𝟏 Solution

z 0 0 0 1 9 62

x𝟐 0 1 0 0 1 3

1 1 4
x1 1 0 0 − 4
7 7 7
1 22 4
x3 0 0 1 − 1
7 7 7

• Determine the next cut…

26
Cutting-Plane Method (Ex. 9.2-2)
• Final solution

Basic x𝟏 x𝟐 x3 x𝟒 𝐬𝟏 𝐬𝟐 Solution

z 0 0 0 0 3 7 58

x𝟐 0 1 0 0 1 0 3

x1 1 0 0 0 −1 1 4

x3 0 0 1 0 −4 1 1

x4 0 0 0 1 6 −7 4

27
B&B Method

28
B&B Method
Maximize:
z = 5x1 + 4x2
Subject to:
x1 + x2 ≤ 5
10x1 + 6x2 ≤ 45
xi ≥ 0 and integers

Step1: Find the LP solution by removing the integer


restrictions.
LP Solution
x1 = 3.75, x2 = 1.25 ⇒ z = 23.75

29
B&B Method
Maximize: z = 5x1 + 4x2
Subject to: x1 + x2 ≤ 5, 10x1 + 6x2 ≤ 45

LP1 space LP1 space


+ +
𝐱𝟏 ≤ 𝟑 𝐱𝟏 ≥ 𝟒

30
B&B Method
Maximize: z = 5x1 + 4x2
Subject to: x1 + x2 ≤ 5, 10x1 + 6x2 ≤ 45

LP1 space + 𝐱 𝟐 ≥ 𝟐

LP1 space + 𝐱 𝟐 ≤ 𝟏

31
B&B Method
Branching from LP1 space:

Branching
variable

Fathomed Not fathomed


32
Alternate
branching
B&B Method: Summary
Assume a maximization problem. Set initial lower-bound 𝑧 = −∞
and set i = 0.
• Step 1. (Fathom/Bound). Select LPi, and attempt to fathom it:
a) The LPi cannot yield a better z-value than the current lower bound.
b) LPi yields a better feasible integer solution than the current lower-
bound  update the lower-bound.
c) LPi has no feasible solution.
Stop when all LPs are fathomed, otherwise do branching!
• Step 2. (Branching). Select one integer variables xj, whose
optimum value xj* in the LPi solution is not integer. Create two
LP sub-problems:
xj ≤ [xj*] and xj ≥ [xj*] + 1
• Set i = i+1 and go to step 1.
34
B&B Method: Summary
• Extended to mixed problems  never branch at a
continuous variable!

35
Integer Programming (Examples)
• Fixed-charge problem (Ex. 9.1-3)
• Either-Or and If-Then Constraints (Ex. 9.1-4)

36
Fixed charge problem
Sitka Manufacturing is planning to build at least one new plant and
three cities are being considered in: Baytown, Lake Charles, and
Dayton. Once the plant or plants are built, the company want to
have capacity to produce at least 38,000 units each year.

Variable cost Annual


Site Annual fixed cost
(per unit) capacity
Baytown, TX $340,000 $32 21,000
Lake Charles, LA $270,000 $33 20,000
Dayton, OH $290,000 $30 19,000

Formulate the problem as an IPP.

37
Fixed charge problem
Decision variables:

• f1 = 0 or 1: factory built in Baytown.


• f2 = 0 or 1: factory built in Lake Charles.
• f3 = 0 or 1: factory built in Dayton.

• x1 : units produced in Baytown.


• x2 : units produced in Lake Charles.
• x3 : units produced in Dayton.

38
Fixed charge problem
Formulate the objective function

Variable cost Annual


Site Annual fixed cost
(per unit) capacity
Baytown, TX $340,000 $32 21,000
Lake Charles, LA $270,000 $33 20,000
Dayton, OH $290,000 $30 19,000

Minimize:
340,000f1 + 270,000f2 + 290,000f3 +
32x1 + 33x2 + 30x3

39
Fixed charge problem
Formulate the constraints
Variable cost Annual
Site Annual fixed cost
(per unit) capacity
Baytown, TX $340,000 $32 21,000
Lake Charles, LA $270,000 $33 20,000
Dayton, OH $290,000 $30 19,000

x1 + x2 + x3 ≥ 38,000 (reqd. units)


x1 ≤ 21,000f1 (Max capacity)
x2 ≤ 20000f2 (Max capacity)
x3 ≤ 19,000f3 (Max capacity)
f1 , f2 , f3 = 0,1 ; x1 , x2 , x3 ≥ 0 and integer
40
Fixed charge problem
Minimize:
340,000f1 + 270,000f2 + 290,000f3 +
32x1 + 33x2 + 30x3

Subject to:
x1 + x2 + x3 ≥ 38,000 (reqd. units)
x1 ≤ 21,000f1 (Max capacity)
x2 ≤ 20000f2 (Max capacity)
x3 ≤ 19,000f3 (Max capacity)
f1 , f2 , f3 = {0,1}
x1 , x2 , x3 ≥ 0 and integer
Optimal:
f1 = 0, f2 = 1, f3 = 1, x1 = 0, x2 = 19,000, x3 = 19,000
41
Either-Or Constraints
Suppose that one of the requirements in the overall problem is that
Either:
3x1 + 2x2 ≤ 18
Or
x1 + 4x2 ≤ 16
How will you add this as a constraint in an LPP/IP?

42
Either-Or Constraints
Suppose that one of the requirements in the overall problem is that
Either:
3x1 + 2x2 ≤ 18
Or
x1 + 4x2 ≤ 16
How will you add this as a constraint in an LPP/IP?

3x1 + 2x2 ≤ 18 + My
and
x1 + 4x2 ≤ 16 + M(1 − y)

where y is either 0 or 1.
43
If-Then Constraints
Suppose that one of the requirements in the overall problem is that
If:
3x1 + 2x2 ≤ 18
Then
x1 + 4x2 ≤ 16
How will you add this as a constraint in an LPP/IP?

44
If-Then Constraints
Suppose that one of the requirements in the overall problem is that
If:
C1 : 3x1 + 2x2 ≤ 18
Then
C2 : x1 + 4x2 ≤ 16
Equivalent to C1

Either:
C2
C2 : x1 + 4x2 ≤ 16
Or
C1 ′: 3x1 + 2x2 > 18

45
If-Then Constraints
Suppose that one of the requirements in the overall problem is that
If:
3x1 + 2x2 ≤ 18
Then
x1 + 4x2 ≤ 16
Equivalent to C1

Either:
C2
x1 + 4x2 ≤ 16
Or
3x1 + 2x2 ≥ 18 + ε

46
If-Then Constraints
Suppose that one of the requirements in the overall problem is that
If:
3x1 + 2x2 ≤ 18
Then
x1 + 4x2 ≤ 16
Equivalent to

Either:
x1 + 4x2 ≤ 16
Or
−3x1 − 2x2 ≤ −18 − ε

47
If-Then Constraints
Suppose that one of the requirements in the overall problem is that
Either:
x1 + 4x2 ≤ 16
Or
−3x1 − 2x2 ≤ −18 − ε

x1 + 4x2 ≤ 16 + My
and
−3x1 − 2x2 ≤ −18 − ε + M(1 − y)

Do examples 9.1-4 and 9.1-5 on your own.


48
Problem 9-30.
Fixed Charge problem: Oilco is considering two potential drilling
sites for reaching four targets (possible oil wells). The following
table provides the preparation costs at each of the two sites and the
cost of drilling from site i to target j (i = 1, 2; j = 1, 2, 3, 4):

Formulate the problem as an IPP, and find the optimum solution.

49
Problem 9-30.
Decision variables:

• s1 = 0 or 1: if site 1 is being prepared.


• s2 = 0 or 1: if site 2 is being prepared.

• xij = 0 or 1: if site i is assigned to target j

50
Problem 9-30.
Formulate the objective:

Minimize:
2x11 + x12 + 8x13 + 5x14 + 4x21 + 6x22 + 3x23 + x24 +
5s1 + 6s2

51
Problem 9-30.
Formulate the constraints:
x11 + x21 = 1 (reach taget 1)
x12 + x22 = 1 (reach taget 2)
x13 + x23 = 1 (reach taget 3)
x14 + x24 = 1 (reach taget 4)
x11 + x12 + x13 + x14 ≤ Ms1
x21 + x22 + x23 + x24 ≤ Ms2
Optimal:
x11 = 1, x12 = 1, x23 = 1, x24 = 1, and z = 18

52
Problem 9-23.
Bill wants to celebrate by seeing every movie showing in theaters at
least once. If he travels to another town, he will see all the movies
being offered (regardless of repetitions). The table provides the
information about the movie offerings and the round-trip distance
to the neighboring town:

The cost of driving is 0.75$ per mile. Bill wishes to determine the
towns he needs to visit while minimizing his total cost.
53
Problem 9-23.
Decision variables:

• xj = 0 or 1: if town j is visited

54
Problem 9-23.
Formulate the objective.

Minimize:
Cost = 0x1 + 25 × 0.75 × x2 + 30 × 0.75 × x3 + ⋯ +
2 × 7.95 × x1 + 3 × 5.5 × x2 + ⋯

55
Problem 9-23.
Subject to:
x1 + x2 + x4 + x6 ≥ 1 (movie 1)
x3 + x5 ≥ 1 (movie 2)
x1 + x6 ≥ 1 (movie 3)

Similar constraints for other movies also


Optimal: Cost = $ 169.35
Town visited Movie
A 1, 6, 8
C 1, 8, 9
D 2, 4, 7
E 1, 3, 5, 10
56
Thank you!

57
Cutting-Plane Method (Ex. 9.2-2)
Basic x𝟏 x𝟐 x3 x𝟒 𝐬𝟏 Solution
63 31 1
z 0 0 0 66
22 22 2
7 1 1
x𝟐 0 1 0 3
22 22 2
1 3 1
x1 1 0 − 0 4
22 22 2
7 1 1
s1 0 0 − − 1 −
22 22 2

58

You might also like