OR_01 10 2015

26
Operations Research Formulating LP’s İrem UÇAL SARI, Ph.D. 1

Transcript of OR_01 10 2015

Page 1: OR_01 10 2015

Operations Research

Formulating LP’s İrem UÇAL SARI, Ph.D.

1

Page 2: OR_01 10 2015

Formulating LP Giapetto Example • Giapetto's wooden soldiers and trains.

• Each soldier sells for $27, uses $10 of raw materials and takes $14 of labor & overhead costs.

• Each train sells for $21, uses $9 of raw materials, and takes $10 of overhead costs.

• Each soldier needs 2 hours finishing and 1 hour carpentry; each train needs 1 hour finishing and 1 hour carpentry.

• Raw materials are unlimited, but only 100 hours of finishing and 80 hours of carpentry are available each week.

• Demand for trains is unlimited; but at most 40 soldiers can be sold each week.

• How many of each toy should be made each week to maximize profits?

2

Page 3: OR_01 10 2015

Advertisement Example

• Dorian makes luxury cars and jeeps for high-income men and women. It wishes to advertise with 1 minute spots in comedy shows and football games. Each comedy spot costs $50K and is seen by 7M high-income women and 2M high-income men. Each football spot costs $100K and is seen by 2M high-income women and 12M high-income men. How can Dorian reach 28M high-income women and 24M high-income men at the least cost?

3

Page 4: OR_01 10 2015

Diet Example

• Ms. Fidan’s diet requires that all the food she eats come from one of the four “basic food groups“. At present, the following four foods are available for consumption: brownies, chocolate ice cream, cola, and pineapple cheesecake. Each brownie costs 0.5$, each scoop of chocolate ice cream costs 0.2$, each bottle of cola costs 0.3$, and each pineapple cheesecake costs 0.8$. Each day, she must ingest at least 500 calories, 6 oz of chocolate, 10 oz of sugar, and 8 oz of fat. The nutritional content per unit of each food is shown in Table. Formulate an LP model that can be used to satisfy her daily nutritional requirements at minimum cost.

4

Calories Chocolate (ounces)

Sugar (ounces)

Fat (ounces)

Brownies 400 3 2 2

Chocolate ice cream (1 scoop) 200 2 2 4 Cola (1 bottle) 150 0 4 1 Pineapple cheesecake (1 piece) 500 0 4 5

Page 5: OR_01 10 2015

Post Office Example

• A PO requires different numbers of employees on different days of the week. Union rules state each employee must work 5 consecutive days and then receive two days off. Find the minimum number of employees needed.

5

Mon Tue Wed Thu Fri Sat Sun Staff Needed 17 13 15 19 14 16 11

Page 6: OR_01 10 2015

Customer Service Level Example

• CSL services computers. Its demand (hours) for the time of skilled technicians in the next 5 months is given below.

• It starts with 50 skilled technicians at the beginning of January. Each technician can work 160 hrs/month. To train a new technician they must be supervised for 50 hrs by an experienced technician for a period of one month time. Each experienced technician is paid $2K/mth and a trainee is paid $1K/mth. Each month 5% of the skilled technicians leave. CSL needs to meet demand and minimize costs.

6

t Jan Feb Mar Apr May dt 6000 7000 8000 9500 11000

Page 7: OR_01 10 2015

Loan Policy Model

• T-Bank is in the process of devising a loan policy that involves a maximum of $12 million. The following table provides the pertinent data about available types of loans.

• Bad depts are unrecoverable and produce no interest revenue. • Competition with other financial institutions requires that the bank

allocate at loeast 40% of the funds to farm and commercial loans. To assist the housing industry in the region, home loans must equal at least 50% of the personal, car, and home loans. The bank also has a stated policy of not allowing the overall ratio of bad debts on all loans to exceed 4%.

7

Type of loan Interest rate Bad-debt ratio

Personal 0.140 0.10

Car 0.130 0.07

Home 0.120 0.03

Farm 0.125 0.05

Commercial 0.100 0.02

Page 8: OR_01 10 2015

Operations Research

Solving LPs Graphical Solution

İrem UÇAL SARI, Ph.D.

8

Page 9: OR_01 10 2015

Solving LPs

• The Graphical Solution

• The Simplex Algorithm

• The Big M method

9

Page 10: OR_01 10 2015

LP Solutions: Four Cases

• The LP has a unique optimal solution.

• The LP has alternative (multiple) optimal solutions.

• It has more than one (actually an infinite number of) optimal solutions.

• The LP is infeasible.

• It has no feasible solutions. The feasible region contains no points.

• The LP is unbounded.

• In the feasible region there are points with arbitrarily large (in a max problem) objective function values.

10

Page 11: OR_01 10 2015

The Graphical Solution

• Any LP with only two variables can be solved graphically.

11

X1

1 2 3 4

1

2

3

4

X2

-1

-1

Page 12: OR_01 10 2015

The Graphical Solution Giapetto Example

• Giapetto Example

• Since the Giapetto LP has two variables, it may be solved graphically.

• The feasible region is the set of all points satisfying the constraints.

max z = 3x1 + 2x2

s.t. 2x1 + x2 ≤ 100 (Finishing constraint)

x1 + x2 ≤ 80 (Carpentry constraint)

x1 ≤ 40 (Demand constraint)

x1, x2 ≥ 0 (Sign restrictions)

12

Page 13: OR_01 10 2015

13

The set of points satisfying the LP is bounded by the five sided polygon DGFEH. Any point on or in the interior of this polygon (the shade area) is in the feasible region.

Page 14: OR_01 10 2015

• Having identified the feasible region for the LP, a search can begin for the optimal solution which will be the point in the feasible region with the largest z-value (maximization problem).

• To find the optimal solution, graph a line on which the points have the same z-value. In a max problem, such a line is called an isoprofit line while in a min problem, this is called the isocost line

• (The figure shows the isoprofit lines for z = 60, z = 100, and z = 180)

Isoprofit / Isocost

Page 15: OR_01 10 2015

• A constraint is binding (active, tight) if the left-hand and right-hand side of the constraint are equal when the optimal values of the decision variables are substituted into the constraint.

• The finishing and carpentry constraints are binding.

• A constraint is nonbinding (inactive) if the left-hand side and the right-hand side of the constraint are unequal when the optimal values of the decision variables are substituted into the constraint.

• The demand constraint for wooden soldiers is nonbinding since at the optimal solution x1 < 40 (x1 = 20).

Binding

Page 16: OR_01 10 2015

Advertisement Example

(Winston 3.2, p.61)

• Since the Advertisement LP has two variables, it may be solved graphically.

• The feasible region is the set of all points satisfying the constraints.

min z =50x1 + 100x2

s.t. 7x1 + 2x2 ≥ 28 (high income women)

2x1 + 12x2 ≥ 24 (high income men)

x1,x2≥0

16

Page 17: OR_01 10 2015

17

Page 18: OR_01 10 2015

Advertisement Example Solution

• Since Dorian wants to minimize total advertising costs, the optimal solution to the problem is the point in the feasible region with the smallest z value.

• An isocost line with the smallest z value passes through point E and is the optimal solution at

x1 = 3.6 and x2 = 1.4 giving z = 320

• Both the high-income women and high-income men constraints are satisfied, both constraints are binding.

18

Page 19: OR_01 10 2015

Modified Giapetto (1)

• maks z = 4x1 + 2x2

• s.t.

• 2x1 + x2 ≤ 100 (Finishing constraint)

• x1 + x2 ≤ 80 (Carpentry constraint)

• x1 ≤ 40 (Demand constraint)

• x1, x2 ≥ 0 (Sign restrictions)

21

Page 20: OR_01 10 2015

22

Points on the line between points G (20,

60) and F (40, 20) are the alternative

optimal solutions. (z=200)

Thus, for 0≤c≤1,

c [20 60] + (1-c) [40 20]

= [40-20c, 20+40c]

will be optimal

Page 21: OR_01 10 2015

Modified Giapetto (2)

• max z = 3x1 + 2x2

• s.t.

• 2x1 + x2 ≤ 100 (Finishing constraint)

• x1 + x2 ≤ 80 (Carpentry constraint)

• x1 ≤ 40 (Soldier Demand constraint)

• x2 ≥ 90 (Train demand constraint)

• x1, x2 ≥ 0 (Sign restrictions)

23

Page 22: OR_01 10 2015

24 No points satisfy all constraints

Infeasible LP

Page 23: OR_01 10 2015

Modified Giapetto (3)

• max z = 3x1 + 2x2

• s.t.

• 2x1 + x2 ≤ 100 (Finishing constraint)

• x1 + x2 ≤ 80 (Carpentry constraint)

• x1 ≤ 40 (Soldier Demand constraint)

• x2 ≥ 90 (Train demand constraint)

• x1, x2 ≥ 0 (Sign restrictions)

25

Page 24: OR_01 10 2015

26

x1

90

40 H

x2 Isoprofit line never lose contact with the feasible region: Unbounded LP!

Page 25: OR_01 10 2015

Graphical Solution- Example

• Mehmet is a farmer who wants to plant wheat and corn in his 45 turn field. He gets 200 TL profit from 1 turn planted wheat and 300 TL profit from 1 turn planted corn. The worker and fertilizer requirements for the products are given in the Table. Mehmet has 100 workers and 120 tons of fertilizer. Determine how many turns should he plant corn and wheat to maximize his profit by using LP and graphical solution.

Worker Fertilizer

Wheat 3 workers 2 tons

Corn 2 workers 4 tons 27

Page 26: OR_01 10 2015

Graphical Solution- Example

• min z = x1 - x2

• st;

• x1 + x2 6

• x1 - x2 0

• x2 - x1 3

• x1, x2 0

28