1 introduction to linear programming contents introduction to linear programming applications of...

24
1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book.

Upload: marjory-shaw

Post on 21-Dec-2015

285 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

1

INTRODUCTION TO LINEAR PROGRAMMING

CONTENTS

Introduction to Linear Programming

Applications of Linear Programming

Reference: Chapter 1 in BJS book.

Page 2: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

2

A Typical Linear Programming Problem

Linear Programming Formulation:

Minimize c1x1 + c2x2 + c3x3 + …. + cnxn

subject toa11x1 + a12x2 + a13x3 + …. + a1nxn b1

a21x1 + a22x2 + a23x3 + …. + a2nxn b2

::

am1x1 + am2x2 + am3x3 + …. + amnxn bm

x1, x2, x3 , …., xn 0

or,

Minimize j=1, n cjxj

subject to

j=1, n aijxj - xn+i = bi for all i = 1, …, m

xj 0 for all j =1, …, n

Page 3: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

3

Matrix Notation

Minimize cx

subject to

Ax = b x 0

where

a11 a12 ….. a1n 1

a21 a22 ….. a2n 1

A = ::

::

::

::

am1 am2 amn 1

b1

b2

b = ::bm

x1

x2

::

x = xn

Xn+1

::Xn+m

c1

c2

::

c = cn

0

::0

Page 4: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

4

An Example of a LP

Giapetto’s woodcarving manufactures two types of wooden toys: soldiers and trains

Constraints:

100 finishing hour per week available 80 carpentry hours per week available produce no more than 40 soldiers per week

Objective: maximize profit

Soldier Train

Selling Price $27 $21

Raw Material required

$10 $9

Variable Cost $14 $10

Finishing Labor required

2 hrs 1 hr

Carpenting labor required

1 hr 1 hr

Page 5: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

5

An Example of a LP (cont.)

Linear Programming formulation:

Maximize z = 3x1 + 2x2 (Obj. Func.)

subject to

2x1 + x2 100 (Finishing constraint)

x1 + x2 80 (Carpentry constraint)

x1 40 (Bound on soldiers)

x1 0 (Sign restriction)

x2 0 (Sign restriction)

Page 6: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

6

Assumptions of Linear Programming

Proportionality Assumption

Contribution of a variable is proportional to its value.

Additivity Assumptions

Contributions of variables are independent.

Divisibility Assumption

Decision variables can take fractional values.

Certainty Assumption

Each parameter is known with certainty.

Page 7: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

7

Linear Programming Modeling and Examples

Stages of an application:

Problem formulation

Mathematical model

Deriving a solution

Model testing and analysis

Implementation

Page 8: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

8

Capital Budgeting Problem

Five different investment opportunities are available for investment.

Fraction of investments can be bought.

Money available for investment:Time 0: $40 millionTime 1: $20 million

Maximize the NPV of all investments.

Inv.1 Inv. 2 Inv. 3 Inv. 4 Inv. 5

Time 0 cash Outflow

$11 $5 $5 $5 $29

Time 1 cash Outflow

$3 $6 $5 $7 $3

NPV $17 $16 $16 $14 $39

Page 9: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

9

Transportation Problem

The Brazilian coffee company processes coffee beans into coffee at m plants. The production capacity at plant i is ai.

The coffee is shipped every week to n warehouses in major cities for retail, distribution, and exporting. The demand at warehouse j is bj.

The unit shipping cost from plant i to warehouse j is cij.

It is desired to find the production-shipping pattern xij from plant i to warehouse j, i = 1, .. , m, j = 1, …, n, that minimizes the overall shipping cost.

Page 10: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

10

Static Workforce Scheduling

Number of full time employees on different days of the week are given below.

Each employee must work five consecutive days and then receive two days off.

The schedule must meet the requirements by minimizing the total number of full time employees.

Day 1 = Monday 17

Day 2 = Tues. 13

Day 3 = Wedn. 15

Day 4 = Thurs. 19

Day 5 = Friday 14

Day 6 = Satur. 16

Day 7 = Sunday 11

Page 11: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

11

Multi-Period Financial Models

Determine investment strategy for the next three years Money available for investment at time 0 = $100,000 Investments available : A, B, C, D & E No more than $75,000 in one invest Uninvested cash earns 8% interest Cash flow of these investments:

0 1 2 3A -1 + 0.5 + 1 0B 0 -1 + 0.5 + 1C -1 + 1.2 0 0D -1 0 0 + 1.9E 0 0 -1 + 1.5

Page 12: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

12

Cutting Stock Problem

A manufacturer of metal sheets produces rolls of standard fixed width w and of standard length l.

A large order is placed by a customer who needs sheets of width w and varying lengths. He needs bi sheets of length li, i = 1, …, m.

The manufacturer would like to cut standard rolls in such a way as to satisfy the order and to minimize the waste.

Since scrap pieces are useless to the manufacturer, the objective is to minimize the number of rolls needed to satisfy the order.

Page 13: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

13

Multi-Period Workforce Scheduling

Requirement of skilled repair time (in hours) is given below.

At the beginning of the period, 50 skilled technicians are available.

Each technician is paid $2,000 and works up to 160 hrs per month.

Each month 5% of the technicians leave.

A new technician needs one month of training, is paid $1,000 per month, and requires 50 hours of supervision of a trained technician.

Meet the service requirement at minimum cost.

Month 1 Month 2 Month 3 Month 4 Month 5

6,000 7,000 8,000 9,500 11,000

Page 14: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

14

Solution: Capital Budgeting Problem

Decision Variables:

xi: fraction of investment i purchased

Formulation:

Maximize z = 13x1 + 16x2 + 16x3 + 14x4 + 39x5

subject to

11x1 + 53x2 + 5x3 + 5x4 + 29x5 40 3x1 + 6x2 + 5x3 + x4 + 34x5 20 x1 1 x2 1 x3 1 x4 1 x5 1 x1, x2, x3, x4, x5 0

Page 15: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

15

Solution: Transportation Problem

Decision Variables:

xij: amount shipped from plant i to warehouse j

Formulation:

Minimize z =

subject to

= ai, i = 1, … , m

bj, j = 1, … , n

xij 0, i = 1, … , m, j = 1, … , n

m n

ij iji=1j=1

c x

n

ijj=1

x

m

iji=1

x

Page 16: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

16

Solution: Static Workforce Scheduling

LP Formulation:

Min. z = x1+ x2 + x3 + x4 + x5 + x6 + x7

subject to

x1 + x4 + x5 + x6 + x7 17x1+ x2 + x5 + x6 + x7 13x1+ x2 + x3 + x6 + x7 15x1+ x2 + x3 + x4 + x7 19x1+ x2 + x3 + x4 + x5 14 x2 + x3 + x4 + x5 + x6 16 x3 + x4 + x5 + x6 + x7 11

x1, x2, x3, x4, x5, x6, x7 0

Page 17: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

17

Solution: Multiperiod Financial Model

Decision Variables:

A, B, C, D, E : Dollars invested in the investments A, B, C, D, and ESt: Dollars invested in money market fund at time t (t = 0, 1, 2)

Formulation:

Maximize z = B + 1.9D + 1.5E + 1.08S2

subject to

A + C + D + S0 = 100,000 0.5A + 1.2C + 1.08S0 = B + S1

A + 0.5B + 1.08S1 = E + S2

A 75,000 B 75,000 C 75,000 D 75,000

E 75,000A, B, C, D, E, S0, S1, S2 0

Page 18: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

18

Solution: Multiperiod Workforce Scheduling

Decision Variables:

xt: number of technicians trained in period tyt: number of experienced technicians in period t

Formulation:

Minimize z = 1000(x1 + x2 + x3 + x4 + x5) + 2000(y1 + y2 + y3 + y4 + y5)

subject to

160y1 - 50 x1 6000 y1 = 50160y2 - 50 x2 7000 0.95y1 + x1 = y2

160y3 - 50 x3 8000 0.95y2 + x2 = y3

160y4 - 50 x4 9500 0.95y3 + x3 = y4

160y5 - 50 x5 11000 0.95y4 + x4 = y5

xt, yt 0, t = 1, 2, 3, … , 5

Page 19: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

19

Cutting Stock Problem (contd.)

Given a standard sheet of length l, there are many ways of cutting it. Each such way is called a cutting pattern.

The jth cutting pattern is characterized by the column vector aj, where the ith component, namely, aij, is a nonnegative integer denoting the number of sheets of length li in the jth pattern.

Note that the vector aj represents a cutting pattern if and

only if i=1,n aijli l and each aij is a nonnegative number.

Page 20: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

20

Cutting Stock Problem (contd.)

Formulation:

Minimize i=1,n xi

subject to

i=1,n aij xi bi i = 1, …, m

xi 0 j = 1, …, n

xi integer j = 1, …, n

Page 21: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

21

Feasible Region

Feasible Region: Set of all points satisfying all the constraints and all the sign restrictions

Example:

Max. z = 3x1 + 2x2 subject to

2x1 + x2 100x1 + x2 80 x1 40 x1 0x2 0

Page 22: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

22

Example 1

Maximize z = 50x1 + 100x2

subject to

7x1 + 2x2 282x1 + 12x2 24x1, x2 0

Feasible region in this example is unbounded.

Page 23: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

23

Example 2

Maximize z = 3x1+ 2x2

subject to

1/40x1 + 1/60x2 11/50x1 + 1/50x2 1x1 30x2 20x1, x2 0

This linear program does not have any feasible solutions.

Page 24: 1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book

24

Example 3

Max. z = 3x1+ 2x2

subject to

1/40 x1 + 1/60x2 11/50 x1 + 1/50x2 1x1, x2 0

This linear program has multiple or alternative optimal solutions.