operations research - linprog.pdf

72
OPERATIONS RESEARCH: 343 Linear Programming Panos Parpas [email protected], Room: 347 (slides courtesy of Herbert Wiklicky) Imperial College London OPERATIONS RESEARCH: 343 – p.1/21

Upload: phmphn

Post on 20-Jan-2016

79 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: operations research - LinProg.pdf

OPERATIONS RESEARCH: 343Linear Programming

Panos [email protected], Room: 347

(slides courtesy of Herbert Wiklicky)

Imperial College

London

OPERATIONS RESEARCH: 343 – p.1/21

Page 2: operations research - LinProg.pdf

Overview

1. Linear Programming

OPERATIONS RESEARCH: 343 – p.2/21

Page 3: operations research - LinProg.pdf

Overview

1. Linear Programming

2. Game Theory

OPERATIONS RESEARCH: 343 – p.2/21

Page 4: operations research - LinProg.pdf

Overview

1. Linear Programming

2. Game Theory

3. Integer Programming

OPERATIONS RESEARCH: 343 – p.2/21

Page 5: operations research - LinProg.pdf

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

Page 6: operations research - LinProg.pdf

1. Linear Programming

OPERATIONS RESEARCH: 343 – p.4/21

Page 7: operations research - LinProg.pdf

Linear Programming (LP)

Optimal Decision Tool

OPERATIONS RESEARCH: 343 – p.5/21

Page 8: operations research - LinProg.pdf

Linear Programming (LP)

Optimal Decision ToolLinear Objective Function

OPERATIONS RESEARCH: 343 – p.5/21

Page 9: operations research - LinProg.pdf

Linear Programming (LP)

Optimal Decision ToolLinear Objective Function

Linear Constraints

OPERATIONS RESEARCH: 343 – p.5/21

Page 10: operations research - LinProg.pdf

Linear Programming (LP)

Optimal Decision ToolLinear Objective Function

Linear ConstraintsEqualities and Inequalities

OPERATIONS RESEARCH: 343 – p.5/21

Page 11: operations research - LinProg.pdf

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

Page 12: operations research - LinProg.pdf

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

Page 13: operations research - LinProg.pdf

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

Page 14: operations research - LinProg.pdf

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

Page 15: operations research - LinProg.pdf

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

Page 16: operations research - LinProg.pdf

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

Page 17: operations research - LinProg.pdf

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

Page 18: operations research - LinProg.pdf

Example 1 (cont)

How much A and C to produce?

OPERATIONS RESEARCH: 343 – p.7/21

Page 19: operations research - LinProg.pdf

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

Page 20: operations research - LinProg.pdf

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

Page 21: operations research - LinProg.pdf

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

Page 22: operations research - LinProg.pdf

Example 1 (cont)

Amount A produced is non-negative:

OPERATIONS RESEARCH: 343 – p.8/21

Page 23: operations research - LinProg.pdf

Example 1 (cont)

Amount A produced is non-negative: x1 ≥ 0

OPERATIONS RESEARCH: 343 – p.8/21

Page 24: operations research - LinProg.pdf

Example 1 (cont)

Amount A produced is non-negative: x1 ≥ 0

x1

x2

OPERATIONS RESEARCH: 343 – p.8/21

Page 25: operations research - LinProg.pdf

Example 1 (cont)

Amount A produced is non-negative: x1 ≥ 0

x2

x1

x1 = 0

OPERATIONS RESEARCH: 343 – p.8/21

Page 26: operations research - LinProg.pdf

Example 1 (cont)

Amount C produced is non-negative:

OPERATIONS RESEARCH: 343 – p.9/21

Page 27: operations research - LinProg.pdf

Example 1 (cont)

Amount C produced is non-negative: x2 ≥ 0

OPERATIONS RESEARCH: 343 – p.9/21

Page 28: operations research - LinProg.pdf

Example 1 (cont)

Amount C produced is non-negative: x2 ≥ 0

x1

x2

OPERATIONS RESEARCH: 343 – p.9/21

Page 29: operations research - LinProg.pdf

Example 1 (cont)

Amount C produced is non-negative: x2 ≥ 0

x2

x1x2 = 0

OPERATIONS RESEARCH: 343 – p.9/21

Page 30: operations research - LinProg.pdf

Example 1 (cont)

X required for x1 tons of A & x2 tons of C is: 2x1 + x2.

OPERATIONS RESEARCH: 343 – p.10/21

Page 31: operations research - LinProg.pdf

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

Page 32: operations research - LinProg.pdf

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

Page 33: operations research - LinProg.pdf

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

Page 34: operations research - LinProg.pdf

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

Page 35: operations research - LinProg.pdf

Example 1 (cont)

Y amount required & supply restriction:

OPERATIONS RESEARCH: 343 – p.11/21

Page 36: operations research - LinProg.pdf

Example 1 (cont)

Y amount required & supply restriction: x1 + 3x2 ≤ 18

OPERATIONS RESEARCH: 343 – p.11/21

Page 37: operations research - LinProg.pdf

Example 1 (cont)

Y amount required & supply restriction: x1 + 3x2 ≤ 18

x1

x2

OPERATIONS RESEARCH: 343 – p.11/21

Page 38: operations research - LinProg.pdf

Example 1 (cont)

Y amount required & supply restriction: x1 + 3x2 ≤ 18

x2

x1

x1 + 3x2 = 18

OPERATIONS RESEARCH: 343 – p.11/21

Page 39: operations research - LinProg.pdf

Example 1 (cont)

Cannot sell more than 4 tons of A/week:

OPERATIONS RESEARCH: 343 – p.12/21

Page 40: operations research - LinProg.pdf

Example 1 (cont)

Cannot sell more than 4 tons of A/week: x1 ≤ 4

OPERATIONS RESEARCH: 343 – p.12/21

Page 41: operations research - LinProg.pdf

Example 1 (cont)

Cannot sell more than 4 tons of A/week: x1 ≤ 4

x1

x2

OPERATIONS RESEARCH: 343 – p.12/21

Page 42: operations research - LinProg.pdf

Example 1 (cont)

Cannot sell more than 4 tons of A/week: x1 ≤ 4

x2

x1

x1 = 4

OPERATIONS RESEARCH: 343 – p.12/21

Page 43: operations research - LinProg.pdf

Feasible Region (FR)

FEASIBLE REGION (FR)

x1O

x2

OPERATIONS RESEARCH: 343 – p.13/21

Page 44: operations research - LinProg.pdf

Feasible Region (FR)

FEASIBLE REGION (FR)

x1O

x2

OPERATIONS RESEARCH: 343 – p.13/21

Page 45: operations research - LinProg.pdf

Feasible Region (FR)

FEASIBLE REGION (FR)

x1O

x2

OPERATIONS RESEARCH: 343 – p.13/21

Page 46: operations research - LinProg.pdf

Feasible Region (FR)

FEASIBLE REGION (FR)

x1O

x2

S

OPERATIONS RESEARCH: 343 – p.13/21

Page 47: operations research - LinProg.pdf

Feasible Region (FR)

FEASIBLE REGION (FR)

x1O

x2

S

P

OPERATIONS RESEARCH: 343 – p.13/21

Page 48: operations research - LinProg.pdf

Feasible Region (FR)

FEASIBLE REGION (FR)

x1O

x2

S

PQ

R

OPERATIONS RESEARCH: 343 – p.13/21

Page 49: operations research - LinProg.pdf

Example 1 (cont)

The Feasible Region (OPQRS) representsALL FEASIBLE PAIRS (x1, x2)

OPERATIONS RESEARCH: 343 – p.14/21

Page 50: operations research - LinProg.pdf

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

Page 51: operations research - LinProg.pdf

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

Page 52: operations research - LinProg.pdf

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

Page 53: operations research - LinProg.pdf

Example 1 (Summary)

Maximize:

x1 + x2

OPERATIONS RESEARCH: 343 – p.15/21

Page 54: operations research - LinProg.pdf

Example 1 (Summary)

Maximize:

x1 + x2

Subject to:

2x1 + x2 ≤ 11x1 + 3x2 ≤ 18

x1 ≤ 4x1, x2 ≥ 0

OPERATIONS RESEARCH: 343 – p.15/21

Page 55: operations research - LinProg.pdf

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

Page 56: operations research - LinProg.pdf

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

Page 57: operations research - LinProg.pdf

Linear Programming

LINEAR PROGRAM (LP):

optimizing (maximizing or minimizing) linear functionsubject to linear constraints.

OPERATIONS RESEARCH: 343 – p.16/21

Page 58: operations research - LinProg.pdf

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

Page 59: operations research - LinProg.pdf

Example 1 (cont)

PROPERTY (*):

The set {O,P,Q,R, S} contains LP solution

OPERATIONS RESEARCH: 343 – p.17/21

Page 60: operations research - LinProg.pdf

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

Page 61: operations research - LinProg.pdf

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

Page 62: operations research - LinProg.pdf

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

Page 63: operations research - LinProg.pdf

Example 1 (cont)

x1O

Q

Px2

R

S

x1 + x2 > 8

x1 + x2 < 8

OPERATIONS RESEARCH: 343 – p.18/21

Page 64: operations research - LinProg.pdf

Property (*)

Feasible Region (FR): area in polygon OPQRSlies entirely within that half plane for which:

x1 + x2 ≤ 8

OPERATIONS RESEARCH: 343 – p.19/21

Page 65: operations research - LinProg.pdf

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

Page 66: operations research - LinProg.pdf

Property (*)

PROPERTY (*) holds for any linear function:c1x1 + c2x2.

OPERATIONS RESEARCH: 343 – p.20/21

Page 67: operations research - LinProg.pdf

Property (*)

PROPERTY (*) holds for any linear function:c1x1 + c2x2.

For Example:Minimise: 3x1 − x2 over polyhedron OPQRS

OPERATIONS RESEARCH: 343 – p.20/21

Page 68: operations research - LinProg.pdf

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

Page 69: operations research - LinProg.pdf

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

Page 70: operations research - LinProg.pdf

Simplex Algorithm

SIMPLEX ALGORITHM

efficient method for finding optimal vertexwithout necessarily examining all

OPERATIONS RESEARCH: 343 – p.21/21

Page 71: operations research - LinProg.pdf

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

Page 72: operations research - LinProg.pdf

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