You are on page 1of 23

Model Programa Integer

Komarudin
komarudin74@ui.ac.id
Tapi dunia nyata tidak linear!!
• 1948: first public presentation on Simplex
• The Econometric Society
• attended by Hotelling,
von Neumann, Koopmans, etc.

Hotelling:
“But we all know the
world is nonlinear.”

Fortunately linear programming


permit us to approximate most of
the kinds of nonlinear relations
50 years of Integer Programming
Why integer programs?
• Advantages of restricting variables to take on
integer values
– More realistic
– More flexibility (modeling advantage)

• Disadvantages
– More difficult to model
– Can be much more difficult to solve
Integer Programming – more realistic
• When are “non-integer” solutions okay?
– Solution is naturally divisible
• e.g., $, pounds, hours
– Solution represents a rate
• e.g., units per week
– Solution only for planning purposes
• When is rounding okay?
– When numbers are large
• e.g., rounding 114.286 to 114 is probably okay.
• When is rounding not okay?
– When numbers are small
• e.g., rounding 2.6 to 2 or 3 may be a problem.
– Binary variables
• yes-or-no decisions
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.
Integer programming – modeling advantage

• Yes/no decision
– Bangun warehouse? Buat rute baru?
• k of n choice
– Setiap pekerja hanya diassign tepat 1 shift per hari
• Disjunctive relation
– Kegiatan A sebelum kegiatan B, ATAU kegiatan B
sebelum kegiatan A
• Fixed charge
– Fixed cost and variable cost
Contoh model programa integer
Integer programming – methods

Branch & Bound Branch & Cut


Contoh 1: Capital Budgeting Allocation
StockCompany is considering 6 investments. The cash required from each
investment as well as the NPV of the investment is given. The cash
available for the investments is $14,000. Stockco wants to maximize its
NPV. What is the optimal strategy?
An investment can be selected or not. One cannot select a fraction of an
investment.

Investment 1 2 3 4 5 6

Cash Required            
(1000s) $5 $7 $4 $3 $4 $6

NPV added            
(1000s) $16 $22 $12 $8 $11 $19
Integer Programming Formulation
What are the decision variables?

1, if we invest in i  1,...,6,


xi  
0, else

Objective and Constraints?

Max 16x1+ 22x2+ 12x3+ 8x4+ 11x5+ 19x6

5x1+ 7x2+ 4x3+ 3x4+ 4x5+ 6x6  14


xj e {0,1} for each j = 1 to 6
How to model (additional) “logical” constraints

• Exactly 3 stocks are selected.

• If stock 2 is selected, then so is stock 1.

• If stock 1 is selected, then stock 3 is not selected.

• Either stock 4 is selected or stock 5 is selected, but not


both.
How to model (additional) “logical” constraints

• Exactly 3 stocks are selected.


• x1+ x2+ x3+ x4+ x5+ x6 = 3
• If stock 2 is selected, then so is stock 1.
• x1  x2
• If stock 1 is selected, then stock 3 is not selected.
• x1 + x3  1
• Either stock 4 is selected or stock 5 is selected, but not
both.
• x4 + x5 = 1
Contoh 2: California Manufacturing Company

• The California Manufacturing Company is a diversified company


with several factories and warehouses throughout California, but
none yet in Los Angeles or San Francisco.
• A basic issue is whether to build a new factory in Los Angeles or
San Francisco, or perhaps even both.
• Management is also considering building at most one new
warehouse, but will restrict the choice to a city where a new
factory is being built.

Question: Should the California Manufacturing Company expand


with factories and/or warehouses in Los Angeles and/or San
Francisco?
Data for California Manufacturing

Net Present Capital


Decision Yes-or-No Decision Value Required
Number Question Variable (Millions) (Millions)
1 Build a factory in Los Angeles? x1 $8 $6
2 Build a factory in San Francisco? x2 5 3
3 Build a warehouse in Los Angeles? x3 6 5
4 Build a warehouse in San Francisco? x4 4 2
Capital Available: $10 million
Binary Decision Variables
Decision Decision Possible Interpretation Interpretation
Number Variable Value of a Value of 1 of a Value of 0

x1 Build a factory in Do not build


1 0 or 1
Los Angeles this factory

x2 Build a factory in Do not build


2 0 or 1
San Francisco this factory
Build a
x3 Do not build
3 0 or 1 warehouse in
this warehouse
Los Angeles
Build a
x4 Do not build
4 0 or 1 warehouse in
this warehouse
San Francisco
Algebraic Formulation
Let x1 = 1 if build a factory in L.A.; 0 otherwise
x2 = 1 if build a factory in S.F.; 0 otherwise
x3 = 1 if build a warehouse in Los Angeles; 0 otherwise
x4 = 1 if build a warehouse in San Francisco; 0 otherwise

Maximize NPV = 8x1 + 5x2 + 6x3 + 4x4 ($millions)


subject to Resource Availability
Capital Spent: 6x1 + 3x2 + 5x3 + 2x4 ≤ 10 ($millions)
Mutually exclusive decisions
Max 1 Warehouse: x3 + x 4 ≤ 1
Warehouse only if Factory: x3 ≤ x1 Contingent decisions
x4 ≤ x2
and
x1, x2, x3, x4 are binary variables.
Contoh 3: Fixed Charge and Facility Example

• Which of six farms should be purchased that will meet current


production capacity at minimum total cost, including annual
fixed costs and shipping costs?
• Data: Plant
Available
Capacity
(tons,1000s)
A 12
Farms Annual Fixed Projected Annual B 10
Costs Harvest (tons, 1000s) C 14
($1000)
1 405 11.2
2 390 10.5 Shipping cost per tons
3 450 12.8 Plant
4 368 9.3 Farm A B C
5 520 10.8
6 465 9.6 1 18 15 12
2 13 10 17
3 16 14 18
4 19 15 16
5 17 19 12
6 14 16 12
Some Other Applications
• Investment Analysis
– Should we make a certain fixed investment?
– Examples: Turkish Petroleum Refineries (1990), South African National Defense
Force (1997), Grantham, Mayo, Van Otterloo and Company (1999)
• Site Selection
– Should a certain site be selected for the location of a new facility?
– Example: AT&T (1990)
• Designing a Production and Distribution Network
– Should a certain plant remain open? Should a certain site be selected for a
new plant? Should a distribution center remain open? Should a certain site be
selected for a new distribution center? Should a certain distribution center be
assigned to serve a certain market area?
– Examples: Ault Foods (1994), Digital Equipment Corporation (1995)
Some Other Applications
• Dispatching Shipments
– Should a certain route be selected for a truck? Should a certain size truck
be used? Should a certain time period for departure be used?
– Examples: Quality Stores (1987), Air Products and Chemicals, Inc. (1983),
Reynolds Metals Co. (1991), Sears, Roebuck and Company (1999)
• Scheduling Interrelated Activities
– Should a certain activity begin in a certain time period?
– Examples: Texas Stadium (1983), China (1995)
• Scheduling Asset Divestitures
– Should a certain asset be sold in a certain time period?
– Example: Homart Development (1987)
• Airline Applications:
– Should a certain type of airplane be assigned to a certain flight leg?
Should a certain sequence of flight legs be assigned to a crew?
– Examples: American Airlines (1989, 1991), Air New Zealand (2001)
Special Kinds of Integer Programming Models

• Knapsack Problem
• Set Covering Problem
• Set Partitioning Problem
• Set Packing Problem
• The Traveling Salesman Problem
• The Quadratic Assignment Problem
Fire Station Problem
Set Covering Problem

Locate fire stations so that


each district has a fire
1 2 3 station in it, or next to it.

5 6
7
4 Minimize the number of
8 9 fire stations needed.

11 12 13
10
14 15 16
Model Programa Integer

Komarudin
komarudin74@ui.ac.id

You might also like