0% found this document useful (0 votes)
6 views27 pages

Topic-Integer Programming Intro and Branch and Bound Method

The document discusses integer programming, focusing on pure integer models where all variables must be integers. It provides examples of formulating and solving integer programming problems, including a manufacturing scenario and a machine purchasing decision, emphasizing the need for integer solutions. Additionally, it outlines solution techniques such as cutting planes and branch-and-bound methods to find optimal integer solutions.

Uploaded by

Ryan B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views27 pages

Topic-Integer Programming Intro and Branch and Bound Method

The document discusses integer programming, focusing on pure integer models where all variables must be integers. It provides examples of formulating and solving integer programming problems, including a manufacturing scenario and a machine purchasing decision, emphasizing the need for integer solutions. Additionally, it outlines solution techniques such as cutting planes and branch-and-bound methods to find optimal integer solutions.

Uploaded by

Ryan B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Topic : Integer Programming

Pure (or Total) Integer Models


We have already seen several examples of problems where the variables should actually
be integer values (number of mugs/bowls to make, number of bake sale items to produce,
etc.). When all of the variables in a model must be integers, it is called a pure integer
model, sometimes referred to as a total integer model.

We now illustrate this concept with an example:

A manufacturer of baby dolls makes two types of dolls ‘Molina’ and ‘Suzie’. Processing of
these two dolls is done on two machines A and B. The processing time for each ‘Molina’ is
2 hours and 6 hours on machines A and B, respectively and that for each ‘Suzie’ is 5 hours
and 5 hours on machines A and B, respectively. There is 16 hours of time per day available
on machines A and 30 hours machines B. The profit contribution for a ‘Molina’ is Rs. 6 and
that for ‘Suzie’ is Rs. 18. Formulate and solve this problem as an integer programing
problem to determine the optimal weekly production schedule of the two dolls.

Step 1: Define Decision Variables.


𝑥1 = #
𝑥2 = #

Step 2: Express the Objective (what should be maximized or minimized):

Maximize Profit =

Step 3: Express the Constraints.

1
Solve the following problem

Minimize Z  4 x1  3x2
subject to;
200 x1  100 x2  4000; x1  2 x2  50; 40 x1  40 x2  1400;
x1 , x2  0 and integers.

Solution: Using Graphical Method

2
Consider an example from the Taylor textbook (2019).

A machine shop plans to purchase some new machines (presses and lathes). Estimates for
floor space, purchase price, and daily profit increase for each machine type are below.

Floor Space
Machine Purchase Price Daily Profit
(ft2)
Press 15 $8000 $100
Lathe 20 $4000 $150

The purchase amount is limited to $40,000, and no more than 200 ft 2 are available for the
new machines. Which machines should be purchased to maximize daily profit?

Step 1: Define Decision Variables.


𝑥1 = # presses to purchase
𝑥2 = # lathes to purchase

Step 2: Express the Objective (what should be maximized or minimized):

Maximize Profit =

Step 3: Express the Constraints.

Purchase Price Limit:

Floor Space Limit:

Variable Restrictions:

If we enter this model into Excel.

3
Summarize the optimal solution below.

Maximum Daily Profit =

# Presses to Purchase = # Lathes to Purchase =

This LP solution is not implementable for the machining company, since they cannot
purchase fractional amounts of machines. They need both decision variables to be integer.

If you had to give a recommendation based on the LP solution, you could try rounding it.
Be aware that rounding the LP solution is not guaranteed to find the optimal (best objective
value) solution to the IP; in some cases, it will not even find a feasible solution (one that
satisfies all the constraints). If you rounded this solution to be integer (which is not
guaranteed to give the best integer solution), summarize the solution.

# Presses to Purchase = # Lathes to Purchase =

Daily Profit = 100𝑥1 + 150𝑥2 =

4
To find the optimal solution to the IP, we need to solve the model with the additional
requirement that the variables only take on integer values. In so doing, we change the
problem from a linear program to an integer program. In this class, we will always
assume that integer programming problems must be linear in terms of all the variables. (It
is possible to have nonlinear integer problems, but they are extremely difficult to solve and
will not be covered in this class.)

In terms of optimization software, it is fairly simple to move from a linear to an integer


program. We just need to tell the software which variables need to be integer. In Excel, we
do this by adding a constraint. Select the cells of the variables that must be integer, and
select int where you normally have <= or >=.

Select int from the


drop-down menu,
and the Constraint
part will be filled in
automatically.
Click OK.

After clicking OK, the Solver dialog window appears as follows.

This appears after


you click OK above.

Click this button


to check your
settings, which
are displayed on
the next page.

5
To verify that the optimization is set up properly, click on Options and verify that Ignore
Integer Constraints is unchecked. See below.

Currently, the search


algorithm is set to stop
when we get within 5% of
the best possible solution.
Change this to 0 if you want
Make sure this box is to ensure that you find the
UNCHECKED!! If it is absolute best integer
checked, there is no solution (but it might take
point to adding the longer).
integer constraints
we just did. These set limits for how
long you will allow the
search to go on.

After clicking OK and Solve, we obtain the following results.

Summarize the optimal IP solution.

# Presses to Purchase = # Lathes to Purchase =

Maximum Daily Profit =

6
Note that we had the following results across the different solutions.

Method Optimal LP Solution Rounded LP Solution Optimal IP Solution


Profit $1055.55 $950 $1000

Key Points
 The optimal LP solution always gives a best-case bound for the IP. No integer
solution will be better than the LP solution.
 If the rounded LP solution is feasible (which it might not be), it gives a worst-case
bound for the IP. You know that you can do at least that well.
 Based on that info, the optimal LP and rounded LP solutions tells us that the IP
solution must be between $950 and $1055.55.
 To find the actual IP solution of $1000, you need to use methods that use IP
solution techniques, which are typically based on repeated solutions of LP models.

7
IP Solution Techniques

IP can be harder to solve than linear programming problems. Why is that? We now briefly
discuss the geometry of integer programs, so we can see where the difficulty arises.

To illustrate, consider the machining company example.


𝑥1 = # presses to purchase and 𝑥2 = # lathes to purchase

The overall model was given by


Maximize 𝑍 = 100𝑥1 + 150𝑥2
Subject to 8000𝑥1 + 4000𝑥2 ≤ 40,000
15𝑥1 + 30𝑥2 ≤ 200
𝑥1, 𝑥2 ≥ 0 and integer

The graph below shows the feasible region for the LP constraints (without integer
restrictions). Indicate which solutions are feasible to the IP.

How many points are feasible (satisfy the


constraints) of the LP?

How points are feasible (satisfy the


constraints) of the IP?

When we rounded the LP solution, which


integer point did we find?

(𝑥1, 𝑥2) =

We know from our Excel model that


the optimal solution did not occur at
the rounded solution. Rather, it
occurred at the point (𝑥1, 𝑥2) = (1,6).

It might seem like having more feasible choices would make finding the LP optimal solution
harder than the IP optimal solution, but that would be incorrect. Even though there are an
infinite number of feasible points to the LP, how many points would you need to consider
to find the optimal? Why?

8
When we have an LP feasible region in which all of the extreme points happen to be at
integer points, then the optimal solution to the LP will automatically be integer valued.

 In these cases, when we solve the LP version, we get the IP solution with no extra
effort. Solving the LP (which is pretty quick) will yield the IP solution.
 We saw that transportation problems had this property. For these problems,
we do not need to tell our software to use IP solution techniques.
Transportation LPs will always yield integer solutions.

In most IP models, however, the feasible region will have extreme points (corners) at some
non-integer points. We saw this in the machining example above.

 In these cases, when we solve the LP version, we could (and usually do) get an
optimal extreme point that is not integer valued.
 As we have seen, rounding the LP solution might not yield the best integer solution.
In fact, it might not even yield a feasible integer solution.
 There are two main solution approaches to obtaining the IP solution, and they both
start with solving the LP version of the IP (ignore the integer restrictions).
o If the LP solution gives an integer solution, then there is no need for further
work. The integer solution of the LP is optimal to the IP.
o If the LP solution is non-integer, then we need to use one of two options.
▪ Cutting Planes: One solution technique for IPs is to derive valid
linear inequalities that cut off parts of the blue feasible region that do
not contain integer points. If these cutting planes chop off enough of
the LP feasible region to make the corner points integer values, then
its LP relaxation will automatically have integer solutions.

▪ Branch-and-Bound: Another solution technique is to use a divide-


and-conquer approach to finding the best integer point. We will
discuss this in more detail below.

9
Branch-and-Bound Method for IPs
The idea of branch-and-bound is to split the problem into smaller problems in order to
search for the optimal IP solution. Throughout, we will keep track of the best-known
integer solution. We will also remember that the optimal LP solution gives a best-case for
the optimal IP solution. We will use these two facts to keep us from looking for IP solutions
in unpromising areas of the feasible region. Recall our objective is to max 100𝑥 + 150𝑥 .

The process always starts by solving the LP relaxation. As we know, this yields

𝑥1 = 2.222, 𝑥2 = 5.556, 𝑍𝐿𝑃 = 1055.56

As we saw earlier, we can round this solution down to find an integer-feasible solution.

𝑥 = 2, 𝑥 = 5, 𝑍 = 100𝑥 + 150𝑥 =950

At this point, what can we say about the optimal solution of the IP, denoted 𝑍𝐼𝑃?

Since there is a gap between the best-known IP solution and the LP upper bound, we will
continue searching for a better IP solution. We want to break the problem into two
separate problems by forcing some variable that has a fractional value away from its
current solution. This is called branching. We generally select the variable that is farthest
away from being an integer (has the largest fractional value). In our example, would we
branch on 𝑥1 or 𝑥2?

Currently, 𝑥2 = 5.556, which is unacceptable. We will break the overall problem into two
regions. One where 𝑥2 ≤ 5 and one where 𝑥2 ≥ 6.

The two new subproblems are as follows

10
Node2-Sub LP1
Maximize = 100𝑥1 + 150𝑥2
Subject to 8000𝑥1 + 4000𝑥2 ≤ 40,000
15𝑥1 + 30𝑥2 ≤ 200
𝑥2 ≤ 5
𝑥1, 𝑥2 ≥ 0

Node3-Sub LP1
Maximize = 100𝑥1 + 150𝑥2
Subject to 8000𝑥1 + 4000𝑥2 ≤ 40,000
15𝑥1 + 30𝑥2 ≤ 200
𝑥2 ≥ 6
𝑥1, 𝑥2 ≥ 0

We can solve them graphically below.

Added constraint: 𝑥2 ≤ 5 Added constraint: 𝑥2 ≥ 6

Optimal: (𝑥 , 𝑥 ) = (2.5, 5) Optimal: (𝑥 , 𝑥 ) = (1.33, 6)


𝑍 = 100(2.5) + 150(5) = 1000 𝑍 = 100(1.33) + 150(6) = 1033.33

11
Node 1: LP
𝑥1 = 2.222,
𝑥2 = 5.556,
= 1055.56
𝑥2 ≥ 6
𝑥2 ≤ 5

Node 2 Node 3
𝑥1 = 2.5 𝑥1 = 1.33
𝑥2 =5 Best-Known IP Solution: 𝑥2 = 6
= 1000 𝑥1 = 2, 𝑥2 = 5, 𝑍𝐼𝑃 = 950 𝑍𝐿𝑃 = 1033.33

Observation: As we branch down, we add constraints to the LP. This


makes the objective value of the child node no better than the objective
value of the parent node. (Usually, it is worse.)

12
Since we have not found any new integer solutions, the process continues. If we branch off
of Node 2, what is the best possible value we could find for an IP solution?

If we branch off of Node 3, what is the best possible value we could find for an IP solution?

Since both of these are higher than the best-known IP solution of 950, there is a chance
that a better IP solution exists. We need to branch again in the hopes of finding a
solution with an objective over 950.

While you could branch off either Node 2 or Node 3, we typically choose the one with
the highest value, since it has the best potential of finding a good IP solution.

In our case, we would branch off Node 3. Since 𝑥2 is already an integer, we would not need
to branch on it.

To move away from the current solution where 𝑥1 = 1.33, we would create two new nodes:
one with 𝑥1 ≤ 1 and one with 𝑥1 ≥ 2.

Node4-Sub LP2
Maximize = 100𝑥1 + 150𝑥2
Subject to 8000𝑥1 + 4000𝑥2 ≤ 40,000
15𝑥1 + 30𝑥2 ≤ 200
𝑥2 ≥ 6
𝑥1 ≤ 1
𝑥1, 𝑥2 ≥ 0

Node5-Sub LP2
Maximize = 100𝑥1 + 150𝑥2
Subject to 8000𝑥1 + 4000𝑥2 ≤ 40,000
15𝑥1 + 30𝑥2 ≤ 200
𝑥2 ≥ 6
𝑥1 ≥ 2
𝑥1, 𝑥2 ≥ 0

We can solve them graphically below.

13
After solving those two problems (either graphically or with software), we obtain the
following updated branch-and-bound search tree.

14
Node 1: LP
𝑥1 = 2.222,
𝑥2 = 5.556,
= 1055.56
𝑥2 ≥ 6
𝑥2 ≤ 5

Node 2 Node 3
𝑥1 = 2.5 𝑥1 = 1.33
𝑥2 =5 𝑥2 = 6
= 1000 𝑍𝐿𝑃 = 1033.33

𝑥1 ≤ 1
𝑥1 ≥ 2

Node 4
𝑥1 = 1 Node 5
𝑥2 = 6.17 Infeasible
Best-Known IP Solution:
= 1025.5
𝑥1 = 2, 𝑥2 = 5, 𝑍𝐼𝑃 = 950

At this point, there is no use considering Node 5 any more. There is no chance that we will
find an improved integer solution there, so that node is done. We say that it is fathomed,
which means that we will never branch off it again. (The line below it indicates this.)

Since we still have active nodes with potential to yield a solution better than the best-
known IP solution of 950, we continue branching. If we branch on Node 4, the best
possible IP solution is 1025.5. If we branch on Node 3, its best possible solution is 1000.
We choose to branch on the node with the highest potential, so we select Node 4.

At Node 4, the only fractional variable is 𝑥2, so we will branch on that.

To move away from the current solution where 𝑥2 = 6.17, we would create two new nodes:
one with 𝑥2 ≤ 6 and one with 𝑥2 ≥ 7.

15
After solving those two problems (either graphically or with software), we obtain the
following updated branch-and-bound search tree.

16
Node 1: LP
𝑥1 = 2.222,
𝑥2 = 5.556,
= 1055.56
𝑥2 ≥ 6
𝑥2 ≤ 5

Node 2 Node 3
𝑥1 = 2.5 𝑥1 = 1.33
𝑥2 =5 𝑥2 = 6
= 1000 𝑍𝐿𝑃 = 1033.33

𝑥1 ≤ 1
𝑥1 ≥ 2

Node 4
𝑥1 = 1 Node 5
𝑥2 = 6.17 Infeasible
= 1025.5
𝑥2 ≤ 6
𝑥2 ≥ 7

Node 6
𝑥1 = 1
𝑥2 = 6 Node 7
= 1000 Best-Known IP Solution: Infeasible
𝑥1 = 1, 𝑥2 = 6, 𝑍𝐼𝑃 = 1000

Since we have found an integer solution with a better objective value, we update the box
that stores the best-known IP solution to reflect = 1000.

There is no need to branch off Node 7, since it is infeasible. There is no chance of finding a
better integer solution in that region. Similarly, there is no further need to branch off Node
6. The purpose of branching is to find an integer solution, and we already have one.

The only node that is still active is Node 2. The best possible objective we could obtain
by branching from Node 2 is 1000.

17
Considering that branching means solving two more LPs (which takes some effort), is it
worthwhile to continue branching off Node 2? Why or why not?

The final branch-and-bound tree is shown below.

Best-Known IP Solution:
𝑥1 = 1 Node 1: LP
𝑥2 = 6 𝑥1 = 2.222,
= 1000 𝑥2 = 5.556,
= 1055.56
𝑥2 ≥ 6
𝑥2 ≤ 5

Node 2 Node 3
𝑥1 = 2.5 𝑥1 = 1.33
𝑥2 =5 𝑥2 = 6
= 1000 𝑍𝐿𝑃 = 1033.33

𝑥1 ≤ 1
𝑥1 ≥ 2

Node 4
𝑥1 = 1 Node 5
𝑥2 = 6.17 Infeasible
= 1025.5

𝑥2 ≤ 6
𝑥2 ≥ 7

Node 6
𝑥1 = 1 Node 7
Infeasible
𝑥2 = 6
= 1000

18
What do we need to take away about the branch-and-bound process?

 You should understand the following.


o Branching is done when the LP solution has fractional values.
o Every time we branch, two new LP problems must be solved.
o We keep track of the best-known IP solution.
o We use the LP objective value at each node to determine whether or not it is
worthwhile to continue exploring that part of the tree.
o If the LP bound indicates that there will be no better integer solution in that
region, we fathom the node (remove it from consideration).
o The process continues until no active nodes remain.
Note:
There are many real-world IPs that cannot be solved to optimality in a reasonable amount
of time (or computer memory). As a result, there is still a lot of active research about how
to make IP solvers work faster. The key is to try to develop LP relaxations that are as tight
as possible (try to eliminate the blue areas that do not contain integer points).

Solve the following IPP using Branch and Bound Method


1. Maximize = 5𝑥1 + 4𝑥2
Subject to 𝑥1 + 𝑥2 ≥ 2
5𝑥1 + 3𝑥2 ≤ 15
3𝑥1 + 5𝑥2 ≤ 15
𝑥1, 𝑥2 ≥ 0 and integers

Solution:

19
Node 2:

Node 3

20
Node 4

Node 5
No feasible solution

21
Node 6

Node 7

22
Solution Tree:

23
2. Maximize = 2𝑥1 + 3𝑥2
Subject to 𝑥1 + 3𝑥2 ≤ 9
3𝑥1 + 𝑥2 ≤ 7
𝑥1 - 𝑥2 ≤ 1
𝑥1, 𝑥2 ≥ 0 and integers

3. Minimize = 3𝑥1 + 2.5𝑥2


Subject to 𝑥1 + 2𝑥2 ≥20
3𝑥1 + 2𝑥2 ≥50
𝑥1, 𝑥2 ≥ 0 and integers
Solution:
Node 1

Node2:

24
Node 3:

25
Node 4:

Node 5:

26
27

You might also like