1 linear programming (lp) 線性規劃 - george dantzig, 1947

46
1 Linear Programming (LP) 線線線線 - George Dantzig, 1947

Upload: sheena-long

Post on 05-Jan-2016

223 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

1

Linear Programming (LP)

線性規劃- George Dantzig, 1947

Page 2: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

2

[1] LP Formulation

(a) Decision Variables :

All the decision variables are non-negative.

(b) Objective Function : Min or Max

(c) Constraints

nxxx ,,, 21

21 32 xxMinimize

0,0

414

343..

21

21

21

xx

xx

xxts

s.t. : subject to

Page 3: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

3

[2] Example

A company has three plants, Plant 1, Plant 2, Plant 3. Because of declining earnings, top management has decided to revamp the company’s product line.

Product 1: It requires some of production capacity

in Plants 1 and 3.

Product 2: It needs Plants 2 and 3.

Page 4: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

4

The marketing division has concluded that the

company could sell as much as could be

produced by these plants.

However, because both products would be

competing for the same production capacity in

Plant 3, it is not clear which mix of the two

products would be most profitable.

Page 5: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

5

The data needed to be gathered:

1. Number of hours of production time available per week in each plant for these new products. (The available capacity for the new products is quite limited.)

2. Production time used in each plant for each batch to yield each new product.

3. There is a profit per batch from a new product.

Page 6: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

6

Production Timeper Batch, Hours

Production TimeAvailable

per Week, HoursPlant

Product

Profit per batch

1

2

3

4

12

18

1 2

1 0

0 2

3 2

$3,000 $5,000

Page 7: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

7

: # of batches of product 1 produced per week : # of batches of product 2 produced per week : the total profit per week

Maximizesubject to

1x2x

Z

1 2

1 2

1 2

1 2

1 2

3 5

1 0 4

0 2 12

3 2 18

0, 0

Z x x

x x

x x

x x

x x

Page 8: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

81x0 2 4 6 8

2x

2

4

6

8

10

[3] Graphical Solution (only for 2-variable cases)

0,0 21 xx

Feasibleregion

Page 9: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

91x0 2 4 6 8

2x

2

4

6

8

10

0,0 21 xx

41 x

Feasibleregion

Page 10: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

101x0 2 4 6 8

2x

2

4

6

8

10

0,0 21 xx

122 2 x41 x

Feasibleregion

Page 11: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

111x0 2 4 6 8

2x

2

4

6

8

10

0,0 21 xx

122 2 x41 x

1823 21 xx

Feasibleregion

Page 12: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

12

1x0 2 4 6 8 10

2x

2

4

6

8

21 5310 xxZ

21 5320 xxZ

Maximize:

21 5336 xxZ

)6,2(

The optimal solution

The largest value

Slope-intercept form:

21 53 xxZ

Zxx

5

1

5

312

Page 13: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

13

1 1 2 2 n nZ c x c x c x

22222121

11212111

bxaxaxa

bxaxaxa

nn

nn

0,,0,0 21

2211

n

mnmnmm

xxx

bxaxaxa

Max

s.t.

[4] Standard Form of LP Model

Page 14: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

14

[5] Other Forms

The other LP forms are the following:

1. Minimizing the objective function:

2. Greater-than-or-equal-to constraints:

.2211 nn xcxcxcZ

1 1 2 2i i in n ia x a x a x b

Minimize

Page 15: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

15

3. Some functional constraints in equation form:

4. Deleting the nonnegativity constraints for

some decision variables:

ininii bxaxaxa 2211

jx : unrestricted in sign

where 0, 0j j j j jx x x x x

Page 16: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

16

[6] Key Terminology

(a) A feasible solution is a solution

for which all constraints are satisfied

(b) An infeasible solution is a solution

for which at least one constraint is violated

(c) A feasible region is a collection

of all feasible solutions

Page 17: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

17

(d) An optimal solution is a feasible solution

that has the most favorable value of

the objective function

(e) Multiple optimal solutions have an infinite

number of solutions with the same

optimal objective value

Page 18: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

18

,23 21 xxZ

1x

0,0

1823

21

21

xx

xx

122 2 x4

and

Maximize

Subject to

Example

Multiple optimal solutions:

Page 19: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

19

21 2318 xxZ

1x0 2 4 6 8 10

2x

2

4

6

8

Feasibleregion

Every point on this red line

segment is optimal,

each with Z=18.

Multiple optimal solutions

Page 20: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

20

(f) An unbounded solution occurs when

the constraints do not prevent improving

the value of the objective function.

2x

1x

Page 21: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

21

[7] Case Study

The Socorro Agriculture Co. is a group of three farming communities.

Overall planning for this group is done in its Coordinating Technical Office.

This office currently is planning agricultural production for the coming year.

Page 22: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

22

GroupUsable Land

(Acres)Water Allocation

(Acre Feet)

123

400600300

600800375

The agricultural production is limited by both the amount of available land and the quantity of water allocated for irrigation.

These data are given below.

Page 23: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

23

The crops suited for this region include sugar

beets, cotton, and sorghum, and these are the three

products being considered for the upcoming

season.

These crops differ primarily in their expected net

return per acre and their consumption of water.

Page 24: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

24

CropSugar beetsCottonSorghum

Net Return($/Acre)

In addition, there is a maximum quota for the total acreage that can be devoted to each of these crops by Socorro Agriculture Co .

Water Consumption

(Acre Feet/Acre)

MaximumQuota

(Acres)600500325

321

1,000750250

Page 25: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

25

Because of the limited water available for irrigation, the Socorro Agriculture Co. will be unable to use all its land for planting crops.

To ensure equity among the three groups, it has been agreed that it will plant the same proportion of its available land.

For example, if Group 1 plants 200 of its available 400 acres, then Group 2 must plant 300 of its 600 acres, while Group 3 plants 150 acres of its 300 acres.

Page 26: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

26

The job facing the Coordinating Technical

Office is to plan how many acres to devote to

each crop while satisfying the given

restrictions.

The objective is to maximize the total net

return as a whole.

Page 27: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

27

The quantities to be decided are the number of acres to devote to each of the three crops at each of the three groups.

The decision variables represent these nine quantities.

)9,,2,1( jx j

1x 2x 3xCropSugar beetsCottonSorghum

4x 5x 6x7x 8x 9x

Allocation(Acres)Group

1 2 3

Page 28: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

28

Maximize Z=

),(250)(750)(000,1 987654321 xxxxxxxxx

The measure of effectiveness Z is the total net return and the resulting linear programming model for this problem is

1. Usable land for each group:

300

600

400

963

852

741

xxx

xxx

xxx

Page 29: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

29

3. Total land use for each crop:

325

500

600

987

654

321

xxx

xxx

xxx

2. Water allocation for each group:

375xx2x3

800xx2x3

600xx2x3

963

852

741

Page 30: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

30

4. Equal proportion of land planted:

400

xxx

300

xxx300

xxx

600

xxx600

xxx

400

xxx

741963

963852

852741

Page 31: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

31

5. Nonnegativity:

,0jx ( j =1, 2, …, 9)

0)(3)(4

0)(2)(

0)(2)(3

741963

963852

852741

xxxxxx

xxxxxx

xxxxxx

The final form is

Page 32: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

32

An optimal solution is

,0,0,0,150,250,100,25,100,3

1133

)x,x,x,x,x,x,x,x,x( 987654321

The resulting optimal value of the objective

function is $633,333.33.

Page 33: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

33

[8] Case Study - Personal Scheduling

UNION AIRWAYS needs to hire additional customer service agents.

Management recognizes the need for cost control while also consistently providing a satisfactory level of service to customers.

Based on the new schedule of flights, an analysis has been made of the minimum number of customer service agents that need to be on duty at different times of the day to provide a satisfactory level of service.

Page 34: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

34

** ** ** * * * * * * * * * * * *

ShiftTime Period Covered Minimum #

of Agents needed

Time Period

6:00 am to 8:00 am8:00 am to10:00 am10:00 am to noon Noon to 2:00 pm2:00 pm to 4:00 pm4:00 pm to 6:00 pm6:00 pm to 8:00 pm8:00 pm to 10:00 pm10:00 pm to midnightMidnight to 6:00 am

1 2 3 4 548796587647382435215

170 160 175 180 195Daily cost per agent

Page 35: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

35

The problem is to determine how many agents should be assigned to the respective shifts each day to minimize the total personnel cost for agents, while meeting (or surpassing) the service requirements.

Activities correspond to shifts, where the level of each activity is the number of agents assigned to that shift.

This problem involves finding the best mix of shift sizes.

Page 36: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

36

1x2x3x

4x5x

: # of agents for shift 1 (6AM - 2PM)

: # of agents for shift 2 (8AM - 4PM)

: # of agents for shift 3 (Noon - 8PM)

: # of agents for shift 4 (4PM - Midnight)

: # of agents for shift 5 (10PM - 6AM)

The objective is to minimize the total cost of the agents assigned to the five shifts.

Page 37: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

37

Min

s.t.54321 195180175160170 xxxxx

0ix )5~1( iall 15

52

43

82

73

64

87

65

79

48

5

54

4

43

43

32

321

21

21

1

x

xx

x

xx

xx

xx

xxx

xx

xx

x

Page 38: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

38

15

52

43

82

64

87

79

48

5

54

4

43

32

321

21

1

x

xx

x

xx

xx

xxx

xx

x

)15,43,39,31,48(),,,,( 54321 xxxxx

Total Personal Cost = $30,610

Page 39: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

39

Basic assumptions for LP models:

1. Additivity: c1x1+ c2x2 ; ai1x1+ ai2x2

2. Proportionality: cixi ; aijxj

3. Divisibility: xi can be any real number

4. Certainty: all parameters are known with certainty

Page 40: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

40

Other Examples

• Galaxy manufactures two toy doll models:– Space Ray. – Zapper.

• Resources are limited to– 1000 pounds of special plastic.– 40 hours of production time per week.

Page 41: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

41

• Marketing requirement– Total production cannot exceed 700 dozens.

– Number of dozens of Space Rays cannot exceed

number of dozens of Zappers by more than 350.

• Technological input– Space Rays requires 2 pounds of plastic and

3 minutes of labor per dozen.– Zappers requires 1 pound of plastic and

4 minutes of labor per dozen.

Page 42: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

42

• The current production plan calls for: – Producing as much as possible of the more profitable

product, Space Ray ($8 profit per dozen).– Use resources left over to produce Zappers ($5 profit

per dozen), while remaining within the marketing guidelines.

• The current production plan consists of:

Space Rays = 450 dozenZapper = 100 dozenProfit = $4100 per week

8(450) + 5(100)

Page 43: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

43

Management is seeking a production schedule that will increase the company’s profit.

Page 44: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

44

A linear programming model can provide an insight and an intelligent solution to this problem.

Page 45: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

45

• Decisions variables::

– X1 = Weekly production level of Space Rays (in dozens)

– X2 = Weekly production level of Zappers (in dozens).

• Objective Function:

– Weekly profit, to be maximized

The Galaxy Linear Programming Model

Page 46: 1 Linear Programming (LP) 線性規劃 - George Dantzig, 1947

46

Max 8X1 + 5X2 (Weekly profit)

subject to

2X1 + 1X2 1000 (Plastic)

3X1 + 4X2 2400 (Production Time)

X1 + X2 700 (Total production)

X1 - X2 350 (Mix)

Xj> = 0, j = 1,2 (Nonnegativity)

The Galaxy Linear Programming Model