Upload
shalini4071979
View
219
Download
0
Embed Size (px)
Citation preview
8/12/2019 Ip Extended Intro
1/18
Integer Programming
Integer programming is a solution method for manydiscrete optimization problems
Programming = Planning in this context
Origins go back to military logistics in WWII (1940s).
In a survey of Fortune 500 firms, 85% of thoseresponding said that they had used linear or integerprogramming.
Why is it so popular? Many different real-life situations can be modeled as integer
programs (IPs).
There are efficient algorithms to solve IPs.
8/12/2019 Ip Extended Intro
2/18
Standard form of integer program (IP)
maximize c1x1+c2x2++cnxn (objective function)
subject to
a11x1+a12x2++a1nxnb1 (functional constraints)
a21x1+a22x2++a2nxnb2.
am1x1+am2x2++amnxnbm
x1, x2, , xn
Z+ (set constraints)
Note: Can also have equalityor constraint
in non-standard form.
8/12/2019 Ip Extended Intro
3/18
Standard form of integer program (IP)
In vector form:
maximize cx (objective function)subject to Axb (functional constraints)
x (set constraints)
Inputfor IP: 1n vector c, mn matrice A , m1 vector b.
Outputof IP: n1 integer vector x .
Note: More often, we will considermixed integer programs (MIP),
that is, some variables are integer,
the others are continuous.
n
Z
E
8/12/2019 Ip Extended Intro
4/18
Examp e o Integer Program(Production Planning-Furniture Manufacturer)
Technological data:
Production of 1 table requires 5ft pine, 2ft oak, 3hrs labor1 chair requires 1ft pine, 3ft oak, 2hrs labor
1 desk requires 9ft pine, 4ft oak, 5hrs labor
Capacities for 1 week: 1500ft pine, 1000ft oak,
20employees (each works 40hrs).
Market data:
Goal:Find a production schedule for 1 week
that will maximize the profit.
profit demand
table $12/unit 40
chair $5/unit 130
desk $15/unit 30
P P F
8/12/2019 Ip Extended Intro
5/18
Pro uction P anning-Furniture Manu acturer:modeling the problem as integer program
The goal can be achievedby making appropriate decisions.
First define decision variables:
Let xtbe the number of tables to be produced;
xcbe the number of chairs to be produced;
xdbe the number of desks to be produced.
(Always define decision variables properly!)
P P F M
8/12/2019 Ip Extended Intro
6/18
Pro uction P anning-Furniture Manu acturer:modeling the problem as integer program
Objective is to maximize profit:
max 12xt + 5xc+ 15xd Functional Constraints
capacity constraints:
pine: 5xt + 1xc+ 9xd 1500oak: 2xt + 3xc+ 4xd 1000
labor: 3xt + 2xc+ 5xd 800
market demand constraints:
tables: xt 40chairs: xc 130
desks: xd 30
Set Constraints
xt , xc, xdZ+
8/12/2019 Ip Extended Intro
7/18
Solutions to integer programs
A solutionis an assignment of values to variables.
A feasible solutionis an assignment of values tovariables such that all the constraints are satisfied.
The objective function valueof a solution is obtained
by evaluating the objective function at the given point. An optimal solution(assuming maximization) is one
whose objective function value is greater than or equal
to that of all other feasible solutions. There are efficient algorithms for finding the optimal
solutions of an integer program.
8/12/2019 Ip Extended Intro
8/18
Next: IP modeling techniques
Modeling techniques:
Using binary variables
Restrictions on number of options
Contingent decisions
Variables with k possible values
Applications:
Facility Location Problem
Knapsack Problem
8/12/2019 Ip Extended Intro
9/18
Example of IP: Facility Location
A company is thinking about building new facilities inLA and SF.
Relevant data:
Total capital available for investment: $10M
Question:Which facilities should be built
to maximize the total profit?
capital needed expected profit
1. factory in LA $6M $9M
2. factory in SF $3M $5M
3. warehouse in LA $5M $6M
4. warehouse in SF $2M $4M
8/12/2019 Ip Extended Intro
10/18
Example of IP: Facility Location
Define decision variables (i= 1, 2, 3, 4):
Then the total expected benefit: 9x1+5x2+6x3+4x4the total capital needed: 6x1+3x2+5x3+2x4
Summarizing, the IP model is:
max9x1+5x
2+6x
3+4x
4s.t.6x1+3x2+5x3+2x4 10
x1, x2, x3, x4 binary ( i.e., xi{0,1} )
notif0
builtisfacilityif1x i
i
8/12/2019 Ip Extended Intro
11/18
Knapsack problem
Any IP, which has only one constraint,
is referred to as a knapsack problem.
n items to be packed in a knapsack.
The knapsack can hold up to W lbof items.
Each item has weight wilband benefit bi.
Goal:Pack the knapsack such that
the total benefit is maximized.
8/12/2019 Ip Extended Intro
12/18
IP model for Knapsack problem Define decision variables (i= 1, , n):
Then the total benefit:
the total weight:
Summarizing, the IP model is:
max
s.t.
xibinary (i= 1, , n)
notif0packedisitemif1x i
i
n
i
iixb1
n
i ii
xw1
n
iiixb
1
Wxw
n
i
ii 1
8/12/2019 Ip Extended Intro
13/18
Connection between the problems
Note: The version of the facility locationproblem is a special case of the knapsackproblem.
Important modeling skill: Suppose you know how to model Problem A1,,Ap;
You need to solve Problem B;
Notice the similarities between Problems Aiand B; Build a model for Problem B, using the model for
Problem Aias a prototype.
8/12/2019 Ip Extended Intro
14/18
The Facility Location Problem:adding new requirements
Extra requirement:
build at most oneof the two warehouses.
The corresponding constraint is:
x3 +x4 1
Extra requirement:
build at least oneof the two factories.
The corresponding constraint is:
x1 +x2 1
8/12/2019 Ip Extended Intro
15/18
Modeling Technique:Restrictions on the number of options
Suppose in a certain problem, n differentoptions are considered. For i=1,,n
Restrictions:At leastpand at most qof
the options can be chosen. The corresponding constraints are:
notif0
chosenisoptionif1x i
i
pxn
i
i 1
qxn
i
i 1
8/12/2019 Ip Extended Intro
16/18
Modeling Technique: Contingent Decisions
Back to the facility location problem.
Requirement:Cant build a warehouseunlessthere is a factory in the city.
The corresponding constraints are:
x3 x1 (LA) x4 x2 (SF) Requirement: Cant select option 3 unless
at least one of options 1 and 2 is selected.
The constraint: x3x1 + x2 Requirement: Cant select option 4 unless
at least two of options 1, 2 and 3 are selected.
The constraint: 2x4
x1 + x2+x3
M d li T h i
8/12/2019 Ip Extended Intro
17/18
Modeling Technique:Variables with k possible values
Suppose variable y should take
one of the values d1, d2, , dk.
How to achieve that in the model?
Introduce new decision variables. For i=1,,k,
Then we need the following constraints.
otherwise0
dvaluey takesif1x
i
i
value)oneonlycan take(11
yxk
i
i
1)xifdvaluetakeshould( ii1
yxdyk
i
ii
8/12/2019 Ip Extended Intro
18/18
More on Integer Programming and otherdiscrete optimization problems andtechniques:
Math 4620
Linear and Nonlinear Programming
Math 4630Discrete Modeling and Optimization