Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 30

Integer Programming (1)

Danu Hadi Syaifullah ST., MSc.


Introduction
Example 1:
• A noodle company makes two kind of product, noodle A and
noodle B. Both kind need two process to be produced: making the
dough and drying through oven.
• Noodle A needs 6 hours/kg to make the dough and noodle B needs
5 hours/kg. For drying, noodle A needs 2 hours/kg and noodle B
needs 3 hours/kg. In a week, the company has capacity of 30 hours
for making dough and 12 hours for drying process.
• If the profit for noodle A is Rp 8.000/kg and Rp 7.000/kg for noodle B,
how much noodle A and B need to be produced to maximize the
profit?
Introduction
Max

Constraint
Introduction
Example 2:
• A furniture company makes two kind of product, table and
cupboard. Both kind need two process to be produced: wood
cutting and assembly.
• A table needs 6 hours to finish cutting process and a cupboard B
needs 5 hours. For assembly, a table needs 2 hours and a cupboard
B needs 3 hours. In a week, the company has capacity of 30 hours
for cutting process and 12 hours for assembly.
• If the profit for a table is Rp 800.000/kg and Rp 700.000/kg for a
cupboard, how much table and cupboard need to be produced to
maximize the profit?
Introduction
• Simply stated, an integer programming problem (IP) is an LP in which
some or all of the variables are required to be non-negative integers
• In this chapter, we find that many real-life situations may be
formulated as IPs
• An IP in which all variables are required to be integers is call a pure
integer programming problem.
• An IP in which only some of the variables are required to be integers
is called a mixed integer programming problem.
• An integer programming problem in which all the variables must be 0
or 1 is called a 0-1 IP (binary IP).
• The LP obtained by omitting all integer or 0-1 constraints on variables
is called LP relaxation of the IP.
Formulating Integer Programming
Problem
Problem Example:
• The CALIFORNIA MANUFACTURING COMPANY is considering expansion by
building a new factory in either Los Angeles or San Francisco, or perhaps
even in both cities.
• It also is considering building at most one new warehouse, but the choice
of location is restricted to a city where a new factory is being built. The net
present value (total profitability considering the time value of money) of
each of these alternatives is shown in the fourth column of Table below. The
rightmost column gives the capital required (already included in the net
present value) for the respective investments, where the total capital
available is $10 million.
• The objective is to find the feasible combination of alternatives that
maximizes the total net present value.
Formulating Integer Programming
Problem
Prototype Problem:
Formulating Integer Programming
Problem
Problem Solution:
Innovative Uses of Binary Variables
in Problem Formulation
• We now will look at some ways in which binary variables can be very
useful.
• In particular, we will see that these variables sometimes enable us to
take a problem whose natural formulation is intractable and
reformulate it as a pure or mixed IP problem:
o Either-or Constraints
o K out of N Constraints Must Hold
o Functions with N Possible Values
o Set-covering problem
o Fixed-charge problem
Either-or Constrains
• Consider the important case where a choice can be made
between two constraints, so that only one (either one) must hold
(whereas the other one can hold but is not required to do so).
• For example, there may be a choice as to which of two resources to
use for a certain purpose, so that it is necessary for only one of the
two resource availability constraints to hold mathematically.
• To illustrate the approach to such situations, suppose that one of the
requirements in the overall problem is that
Either-or Constrains
• At least one of these two inequalities must hold but not necessarily
both. This requirement must be reformulated to fit it into the linear
programming format where all specified constraints must hold.
• Let M be a very large positive number. Then this requirement can be
rewritten as

• The key is that adding M to the right-hand side of such constraints


has the effect of eliminating them.
Either-or Constrains
• To complete the formulation, we add decision variable “y”, and
restrict it into binary.
• Thus, the set of constraints became:

• Because the auxiliary variable y must be either 0 or 1, this formulation


guarantees that one of the original constraints must hold while the
other is, in effect, eliminated.
K out of N Constraints Must Hold
• Consider the case where the overall model includes a set of N possible
constraints such that only some K of these constraints must hold
(Assume that K < N).
• Part of the optimization process is to choose the combination of K
constraints that permits the objective function to reach its best possible
value.
• The N - K constraints not chosen are, in effect, eliminated from the
problem, although feasible solutions might coincidentally still satisfy
some of them.
• This case is a direct generalization of the preceding case, which had K
= 1 and N = 2.
K out of N Constraints Must Hold
• Then, applying the same logic as for the preceding case, we find that
an equivalent formulation of the requirement that some K of these
constraints must hold is:
Exercise (1)
• At least two of the following four inequalities holds:

• Show how to reformulate these restrictions to fit an MIP model


Exercise (2)
• Dorian Auto is considering manufacturing three types of autos:
compact, midsize, and large. The resources required for, and the
profits yielded by, each type of car are shown in Table below.
• Currently, 6,000 tons of steel and 60,000 hours of labor are available.
For production of a type of car to be economically feasible, at least
1,000 cars of that type must be produced. Formulate an IP to
maximize Dorian’s profit!
Functions with N Possible Values
• Consider the situation where a given function is required to take on
any one of N given values
• The equivalent IP formulation of this requirement is the following:

• So this new set of constraints would replace this requirement in the


statement of the overall problem
Functions with N Possible Values
• To illustrate how this case can arise, reconsider the Wyndor Glass Co.
Eighteen hours of production time per week in Plant 3 currently is
unused and available for the two new products or for certain future
products that will be ready for production soon. In order to leave any
remaining capacity in usable blocks for these future products,
management now wants to impose the restriction that the production
time used by the two current new products be 6 or 12 or 18 hours per
week.
• Thus, the third constraint of the original model (3x1+ 2x2 ≤ 18) now
becomes
3x1+ 2x2 = 6 or 12 or 18
Functions with N Possible Values
• In the preceding notation, N = 3 with d1 = 6, d2 = 12, and d3 = 18.
Consequently, management’s new requirement should be formulated
as follows
Set-Covering Problems
• In a set-covering problem, each member of a given set (call it set 1)
must be “covered” by an acceptable member of some set (call it
set 2).
• The objective in a set-covering problem is to minimize the number of
elements in set 2 that are required to cover all the elements in set 1.
Set-Covering Problems
• A hospital ER needs to keep doctors on call, so that a qualified
individual is available to perform every medical procedure that might
be required (there is an official list of such procedures). For each of
several doctors available for on-call duty, the additional salary they
need to be paid, and which procedures they can perform, is known.
The goal to choose doctors so that each procedure is covered, at a
minimum cost.
Exercise (3)
• There are six cities (cities 1–6) in Kilroy County. The county must determine where to
build fire stations. The county wants to build the minimum number of fire stations
needed to ensure that at least one fire station is within 15 minutes (driving time) of
each city.
• The times (in minutes) required to drive between the cities in Kilroy County are
shown in Table below. Formulate an IP that will tell Kilroy how many fire stations
should be built and where they should be located!
Set-Covering Problems
Solution:
Fixed-Charge Problems
• It is quite common to incur a fixed charge or setup cost when
undertaking an activity.
• For example, such a charge occurs when a production run to
produce a batch of a particular product is undertaken and the
required production facilities must be set up to initiate the run.
• If this is the case, the total cost of the activity (say, activity j) can be
represented by a function of the form
Fixed-Charge Problems
Problem example:
• Gandhi Cloth Company is capable of manufacturing three types of
clothing: shirts, shorts, and pants. The manufacture of each type of
clothing requires that Gandhi have the appropriate type of
machinery available.
• The machinery needed to manufacture each type of clothing must
be rented at the following rates: shirt machinery, $200 per week;
shorts machinery, $150 per week; pants machinery, $100 per week.
• Each week, 150 hours of labor and 160 sq yd of cloth are available.
Fixed-Charge Problems
Problem example:
• The variable unit cost and selling price for each type of clothing and
The manufacture of each type of clothing also requires the amounts
of cloth and labor shown in Table below
Fixed-Charge Problems
• The Gandhi problem is an example of a fixed-charge problem. In a
fixed-charge problem, there is a cost associated with performing an
activity at a nonzero level that does not depend on the level of the
activity.
• Thus, in the Gandhi problem, if we make any shirts at all (no matter
how many we make), we must pay the fixed charge of $200 to rent a
shirt machine. Problems in which a decision maker must choose
where to locate facilities are often fixed-charge problems.
• The decision maker must choose where to locate various facilities
(such as plants, warehouses, or business offices), and a fixed charge
is often associated with building or operating a facility.
Fixed-Charge Problems
Solution:
• Note that the cost of renting machinery depends only on the types of
clothing produced, not on the amount of each type of clothing. This
enables us to express the cost of renting machinery by using the following
variables:

• We can now express Gandhi’s weekly profits as:


Fixed-Charge Problems
Solution:
The End

You might also like