operations research - linprog.pdf
TRANSCRIPT
OPERATIONS RESEARCH: 343Linear Programming
Panos [email protected], Room: 347
(slides courtesy of Herbert Wiklicky)
Imperial College
London
OPERATIONS RESEARCH: 343 – p.1/21
Overview
1. Linear Programming
OPERATIONS RESEARCH: 343 – p.2/21
Overview
1. Linear Programming
2. Game Theory
OPERATIONS RESEARCH: 343 – p.2/21
Overview
1. Linear Programming
2. Game Theory
3. Integer Programming
OPERATIONS RESEARCH: 343 – p.2/21
Some Books
Course Notes:http://www.doc.ic.ac.uk/∼pp500 (for LP)http://www.doc.ic.ac.uk/∼br (for IP & Games)
H.Taha:Operation Research
F.Hillier & J.Lieberman:Introduction to Operation Research
F.Hillier & J.Lieberman:Introduction to Mathematical Programming
J.G.Eckert & M.Kupferschmid:Introduction to Operation Research
OPERATIONS RESEARCH: 343 – p.3/21
1. Linear Programming
OPERATIONS RESEARCH: 343 – p.4/21
Linear Programming (LP)
Optimal Decision Tool
OPERATIONS RESEARCH: 343 – p.5/21
Linear Programming (LP)
Optimal Decision ToolLinear Objective Function
OPERATIONS RESEARCH: 343 – p.5/21
Linear Programming (LP)
Optimal Decision ToolLinear Objective Function
Linear Constraints
OPERATIONS RESEARCH: 343 – p.5/21
Linear Programming (LP)
Optimal Decision ToolLinear Objective Function
Linear ConstraintsEqualities and Inequalities
OPERATIONS RESEARCH: 343 – p.5/21
Linear Programming (LP)
Optimal Decision ToolLinear Objective Function
Linear ConstraintsEqualities and Inequalities
popular decision toolsurvey of Fortune 500 firms:
85% responding said they use LP
OPERATIONS RESEARCH: 343 – p.5/21
Example 1
Manufacturer produces: A (acid) and C (caustic).Ingredients used producing A and C are: X and Y.
OPERATIONS RESEARCH: 343 – p.6/21
Example 1
Manufacturer produces: A (acid) and C (caustic).Ingredients used producing A and C are: X and Y.
Each ton of A requires: 2lb of X; 1lb of Y
Each ton of C requires: 1lb of X ; 3lb of Y
OPERATIONS RESEARCH: 343 – p.6/21
Example 1
Manufacturer produces: A (acid) and C (caustic).Ingredients used producing A and C are: X and Y.
Each ton of A requires: 2lb of X; 1lb of Y
Each ton of C requires: 1lb of X ; 3lb of Y
Supply of X limited to: 11lb/week
Supply of Y limited to: 18lb/week
OPERATIONS RESEARCH: 343 – p.6/21
Example 1
Manufacturer produces: A (acid) and C (caustic).Ingredients used producing A and C are: X and Y.
Each ton of A requires: 2lb of X; 1lb of Y
Each ton of C requires: 1lb of X ; 3lb of Y
Supply of X limited to: 11lb/week
Supply of Y limited to: 18lb/week
A sells for: £1000/ton
C sells for: £1000/ton
OPERATIONS RESEARCH: 343 – p.6/21
Example 1
Manufacturer produces: A (acid) and C (caustic).Ingredients used producing A and C are: X and Y.
Each ton of A requires: 2lb of X; 1lb of Y
Each ton of C requires: 1lb of X ; 3lb of Y
Supply of X limited to: 11lb/week
Supply of Y limited to: 18lb/week
A sells for: £1000/ton
C sells for: £1000/ton
Market research: max 4 tons of A/week can be sold.
OPERATIONS RESEARCH: 343 – p.6/21
Example 1
Manufacturer produces: A (acid) and C (caustic).Ingredients used producing A and C are: X and Y.
Each ton of A requires: 2lb of X; 1lb of Y
Each ton of C requires: 1lb of X ; 3lb of Y
Supply of X limited to: 11lb/week
Supply of Y limited to: 18lb/week
A sells for: £1000/ton
C sells for: £1000/ton
Market research: max 4 tons of A/week can be sold.
Maximize weekly value of sales of A and C.
OPERATIONS RESEARCH: 343 – p.6/21
Example 1 (cont)
How much A and C to produce?
OPERATIONS RESEARCH: 343 – p.7/21
Example 1 (cont)
How much A and C to produce?
Answer: A pair of numbers
x1 (weekly prod. of A)
x2 (weekly prod. of C)
OPERATIONS RESEARCH: 343 – p.7/21
Example 1 (cont)
How much A and C to produce?
Answer: A pair of numbers
x1 (weekly prod. of A)
x2 (weekly prod. of C)
There are many pairs of (x1, x2):e.g. (0, 0), (1, 1), (3, 5), . . .
OPERATIONS RESEARCH: 343 – p.7/21
Example 1 (cont)
How much A and C to produce?
Answer: A pair of numbers
x1 (weekly prod. of A)
x2 (weekly prod. of C)
There are many pairs of (x1, x2):e.g. (0, 0), (1, 1), (3, 5), . . .
Not all (x1, x2) possible weekly productions:e.g. x1 = 27, x2 = 2 are not possible
i.e. (27, 2) not feasible.
OPERATIONS RESEARCH: 343 – p.7/21
Example 1 (cont)
Amount A produced is non-negative:
OPERATIONS RESEARCH: 343 – p.8/21
Example 1 (cont)
Amount A produced is non-negative: x1 ≥ 0
OPERATIONS RESEARCH: 343 – p.8/21
Example 1 (cont)
Amount A produced is non-negative: x1 ≥ 0
x1
x2
OPERATIONS RESEARCH: 343 – p.8/21
Example 1 (cont)
Amount A produced is non-negative: x1 ≥ 0
x2
x1
x1 = 0
OPERATIONS RESEARCH: 343 – p.8/21
Example 1 (cont)
Amount C produced is non-negative:
OPERATIONS RESEARCH: 343 – p.9/21
Example 1 (cont)
Amount C produced is non-negative: x2 ≥ 0
OPERATIONS RESEARCH: 343 – p.9/21
Example 1 (cont)
Amount C produced is non-negative: x2 ≥ 0
x1
x2
OPERATIONS RESEARCH: 343 – p.9/21
Example 1 (cont)
Amount C produced is non-negative: x2 ≥ 0
x2
x1x2 = 0
OPERATIONS RESEARCH: 343 – p.9/21
Example 1 (cont)
X required for x1 tons of A & x2 tons of C is: 2x1 + x2.
OPERATIONS RESEARCH: 343 – p.10/21
Example 1 (cont)
X required for x1 tons of A & x2 tons of C is: 2x1 + x2.X limited to 11lb/week:
OPERATIONS RESEARCH: 343 – p.10/21
Example 1 (cont)
X required for x1 tons of A & x2 tons of C is: 2x1 + x2.X limited to 11lb/week: 2x1 + x2 ≤ 11
OPERATIONS RESEARCH: 343 – p.10/21
Example 1 (cont)
X required for x1 tons of A & x2 tons of C is: 2x1 + x2.X limited to 11lb/week: 2x1 + x2 ≤ 11
x1
x2
OPERATIONS RESEARCH: 343 – p.10/21
Example 1 (cont)
X required for x1 tons of A & x2 tons of C is: 2x1 + x2.X limited to 11lb/week: 2x1 + x2 ≤ 11
x2
x1
2x1 + x2 = 11
OPERATIONS RESEARCH: 343 – p.10/21
Example 1 (cont)
Y amount required & supply restriction:
OPERATIONS RESEARCH: 343 – p.11/21
Example 1 (cont)
Y amount required & supply restriction: x1 + 3x2 ≤ 18
OPERATIONS RESEARCH: 343 – p.11/21
Example 1 (cont)
Y amount required & supply restriction: x1 + 3x2 ≤ 18
x1
x2
OPERATIONS RESEARCH: 343 – p.11/21
Example 1 (cont)
Y amount required & supply restriction: x1 + 3x2 ≤ 18
x2
x1
x1 + 3x2 = 18
OPERATIONS RESEARCH: 343 – p.11/21
Example 1 (cont)
Cannot sell more than 4 tons of A/week:
OPERATIONS RESEARCH: 343 – p.12/21
Example 1 (cont)
Cannot sell more than 4 tons of A/week: x1 ≤ 4
OPERATIONS RESEARCH: 343 – p.12/21
Example 1 (cont)
Cannot sell more than 4 tons of A/week: x1 ≤ 4
x1
x2
OPERATIONS RESEARCH: 343 – p.12/21
Example 1 (cont)
Cannot sell more than 4 tons of A/week: x1 ≤ 4
x2
x1
x1 = 4
OPERATIONS RESEARCH: 343 – p.12/21
Feasible Region (FR)
FEASIBLE REGION (FR)
x1O
x2
OPERATIONS RESEARCH: 343 – p.13/21
Feasible Region (FR)
FEASIBLE REGION (FR)
x1O
x2
OPERATIONS RESEARCH: 343 – p.13/21
Feasible Region (FR)
FEASIBLE REGION (FR)
x1O
x2
OPERATIONS RESEARCH: 343 – p.13/21
Feasible Region (FR)
FEASIBLE REGION (FR)
x1O
x2
S
OPERATIONS RESEARCH: 343 – p.13/21
Feasible Region (FR)
FEASIBLE REGION (FR)
x1O
x2
S
P
OPERATIONS RESEARCH: 343 – p.13/21
Feasible Region (FR)
FEASIBLE REGION (FR)
x1O
x2
S
PQ
R
OPERATIONS RESEARCH: 343 – p.13/21
Example 1 (cont)
The Feasible Region (OPQRS) representsALL FEASIBLE PAIRS (x1, x2)
OPERATIONS RESEARCH: 343 – p.14/21
Example 1 (cont)
The Feasible Region (OPQRS) representsALL FEASIBLE PAIRS (x1, x2)
Corners (Vertices) O,P,Q,R,S have special significance
O=(0,0), P=(0,6), Q=(3,5), R=(4,3), S=(4,0)
OPERATIONS RESEARCH: 343 – p.14/21
Example 1 (cont)
The Feasible Region (OPQRS) representsALL FEASIBLE PAIRS (x1, x2)
Corners (Vertices) O,P,Q,R,S have special significance
O=(0,0), P=(0,6), Q=(3,5), R=(4,3), S=(4,0)
feasible (x1, x2) ⇒ sales value:
£1000 × (x1 + x2)
OPERATIONS RESEARCH: 343 – p.14/21
Example 1 (cont)
The Feasible Region (OPQRS) representsALL FEASIBLE PAIRS (x1, x2)
Corners (Vertices) O,P,Q,R,S have special significance
O=(0,0), P=(0,6), Q=(3,5), R=(4,3), S=(4,0)
feasible (x1, x2) ⇒ sales value:
£1000 × (x1 + x2)
LP problem: MAXIMIZE this amount
OPERATIONS RESEARCH: 343 – p.14/21
Example 1 (Summary)
Maximize:
x1 + x2
OPERATIONS RESEARCH: 343 – p.15/21
Example 1 (Summary)
Maximize:
x1 + x2
Subject to:
2x1 + x2 ≤ 11x1 + 3x2 ≤ 18
x1 ≤ 4x1, x2 ≥ 0
OPERATIONS RESEARCH: 343 – p.15/21
Example 1 (Summary)
Maximize:
x1 + x2 ◭ objective function
Subject to:
2x1 + x2 ≤ 11x1 + 3x2 ≤ 18
x1 ≤ 4x1, x2 ≥ 0
OPERATIONS RESEARCH: 343 – p.15/21
Example 1 (Summary)
Maximize:
x1 + x2 ◭ objective function
Subject to:
2x1 + x2 ≤ 11 ◭ constraintx1 + 3x2 ≤ 18 ◭ constraint
x1 ≤ 4 ◭ constraintx1, x2 ≥ 0 ◭ constraint
OPERATIONS RESEARCH: 343 – p.15/21
Linear Programming
LINEAR PROGRAM (LP):
optimizing (maximizing or minimizing) linear functionsubject to linear constraints.
OPERATIONS RESEARCH: 343 – p.16/21
Linear Programming
LINEAR PROGRAM (LP):
optimizing (maximizing or minimizing) linear functionsubject to linear constraints.
(Linear: no powers, exponentials, product terms).
OPERATIONS RESEARCH: 343 – p.16/21
Example 1 (cont)
PROPERTY (*):
The set {O,P,Q,R, S} contains LP solution
OPERATIONS RESEARCH: 343 – p.17/21
Example 1 (cont)
PROPERTY (*):
The set {O,P,Q,R, S} contains LP solution
Evaluate objective x1 + x2 at O,P,Q,R, S.
OPERATIONS RESEARCH: 343 – p.17/21
Example 1 (cont)
PROPERTY (*):
The set {O,P,Q,R, S} contains LP solution
Evaluate objective x1 + x2 at O,P,Q,R, S.
O=(0,0) P=(0,6) Q=(3,5) R=(4,3) S=(4,0)0 6 8 7 4
OPERATIONS RESEARCH: 343 – p.17/21
Example 1 (cont)
PROPERTY (*):
The set {O,P,Q,R, S} contains LP solution
Evaluate objective x1 + x2 at O,P,Q,R, S.
O=(0,0) P=(0,6) Q=(3,5) R=(4,3) S=(4,0)0 6 8 7 4
⇒ Q = (3, 5) has maximal value
x1 = 3, x2 = 5 optimal.
OPERATIONS RESEARCH: 343 – p.17/21
Example 1 (cont)
x1O
Q
Px2
R
S
x1 + x2 > 8
x1 + x2 < 8
OPERATIONS RESEARCH: 343 – p.18/21
Property (*)
Feasible Region (FR): area in polygon OPQRSlies entirely within that half plane for which:
x1 + x2 ≤ 8
OPERATIONS RESEARCH: 343 – p.19/21
Property (*)
Feasible Region (FR): area in polygon OPQRSlies entirely within that half plane for which:
x1 + x2 ≤ 8
Since 5 + 3 = 8no feasible point has higher objective value than Q.
OPERATIONS RESEARCH: 343 – p.19/21
Property (*)
PROPERTY (*) holds for any linear function:c1x1 + c2x2.
OPERATIONS RESEARCH: 343 – p.20/21
Property (*)
PROPERTY (*) holds for any linear function:c1x1 + c2x2.
For Example:Minimise: 3x1 − x2 over polyhedron OPQRS
OPERATIONS RESEARCH: 343 – p.20/21
Property (*)
PROPERTY (*) holds for any linear function:c1x1 + c2x2.
For Example:Minimise: 3x1 − x2 over polyhedron OPQRS
O=(0,0) P=(0,6) Q=(3,5) R=(4,3) S=(4,0)0 -6 4 9 12
OPERATIONS RESEARCH: 343 – p.20/21
Property (*)
PROPERTY (*) holds for any linear function:c1x1 + c2x2.
For Example:Minimise: 3x1 − x2 over polyhedron OPQRS
O=(0,0) P=(0,6) Q=(3,5) R=(4,3) S=(4,0)0 -6 4 9 12
P: x1 = 0, x2 = 6 is optimal.
OPERATIONS RESEARCH: 343 – p.20/21
Simplex Algorithm
SIMPLEX ALGORITHM
efficient method for finding optimal vertexwithout necessarily examining all
OPERATIONS RESEARCH: 343 – p.21/21
Simplex Algorithm
SIMPLEX ALGORITHM
efficient method for finding optimal vertexwithout necessarily examining all
PROPERTY (*) does not imply that points other thanvertices cannot be optimal.
OPERATIONS RESEARCH: 343 – p.21/21
Simplex Algorithm
SIMPLEX ALGORITHM
efficient method for finding optimal vertexwithout necessarily examining all
PROPERTY (*) does not imply that points other thanvertices cannot be optimal.
e.g. maximise 2x1 + x2 (on OPQRS):any point on segment QR optimal
OPERATIONS RESEARCH: 343 – p.21/21