Linear Programming Pptx

62
LINEAR PROGRAMMING Model Formulation and Graphical Solution

description

qwertyuiop

Transcript of Linear Programming Pptx

LINEAR PROGRAMMINGModel Formulation and Graphical Solution

Linear Programming: An Overview� Linear Programming is a mathematical

programming technique to optimizeperformance (e.g. profit or cost) under a setof resource constraints (e.g. machine-hours,of resource constraints (e.g. machine-hours,money, materials, etc.) as specified by anorganization.

Model Components� Decision variables - mathematical symbolsrepresenting levels of activity of a firm.� Objective function - a linear mathematicalrelationship describing an objective of the firm, interms of decision variables - this function is to bemaximized or minimized.terms of decision variables - this function is to bemaximized or minimized.� Constraints – requirements or restrictions placedon the firm by the operating environment, stated inlinear relationships of the decision variables.� Parameters - numerical coefficients and constantsused in the objective function and constraints.

In order to apply Linear Programming, certain requirements have to be met� There should be an objective function which should be clearly

identifiable and measureable in quantitative terms. For e.g.maximization of profit, minimization of loss.

� The activities to be included should be distinctly identifiableand measureable in quantitative terms. For e.g. productsincluded in a production planning problem.The resources of the system, which are to be allocated for the� The resources of the system, which are to be allocated for theattainment of the goal, should also be identifiable andmeasurable quantitatively. They must be in a limited supply.

� The relationships representing the objective as also theresource limitation considerations, represented by the objectivefunction and constraints equations, or inequalities, respectively,must be linear in nature.

� There should be a series of feasible alternative courses of actionavailable to the decision maker which are determined byresource constraint.

General Statement of LPP

1 1 2 2

11 1 12 2 1 1

............. objective function

...........

...........

n n

n n

Maximize c x c x c x

Subject to

a x a x a x b

a x a x a x b

+ + +

+ + + ≤+ + + ≤

21 1 22 2 2 2...........

..n na x a x a x b+ + + ≤

1 1 2 2

1 2

. Constraints

...

...........

, ,............, 0 Non-negativity Restriction

m m mn n m

n

a x a x a x b

x x x

+ + + ≤

Summary of Model Formulation Steps

Step 1 : Clearly define the decision variables

Step 2 : Construct the objective function

Step 3 : Formulate the constraints

A Maximization Problem

Product mix problem - Beaver Creek Pottery Company

� Beaver Creek Pottery Company is a small crafts operation run by tribal council.

� The company employs skilled artisans to produce clay bowls and mugs with authentic design and colours.colours.

� The two primary resources of the company are special pottery clay and skilled labour.

� Given these limited resources, the company desires to know how many bowls and mugs to produce each day in order to maximize profit.

� The two products have the following resourcerequirements for production and profit per itemproduced (i.e., the model parameters):

Resource Requirements

Product Labor (hr/unit)

Clay (lb/unit)

Profit ($/unit)

Bowl 1 4 40

Mug 2 3 50

LP Model Formulation

Resource 40 hrs of labor per dayAvailability: 120 lbs of clayDecision x1 = number of bowls to produce per dayVariables: x2 = number of mugs to produce per day 2

Objective Maximize Z = $40x1 + $50x2Function: Where Z = profit per dayResource 1x1 + 2x2 ≤ 40 hours of laborConstraints: 4x1 + 3x2 ≤ 120 pounds of clayNon-Negativity x1 ≥ 0; x2 ≥ 0 Constraints:

Complete Linear Programming Model

1 240 50

1 2 40

Maximize Z = $ x $ x

subject to

x x

+

+ ≤1 2

1 2

1 2

1 2 40

4 3 120

0

x x

x x

x , x

+ ≤+ ≤

Feasible Solutions

� A feasible solution does not violate any of the constraints:Example x1 = 5 bowls

x2 = 10 mugsZ = $40x1 + $50x2 = $700Z = $40x1 + $50x2 = $700

Labor constraint check:1(5) + 2(10) = 25 < 40 hours, within constraintClay constraint check:4(5) + 3(10) = 70 < 120 pounds, within constraint

Infeasible Solutions

� An infeasible solution violates at least one of the constraints:Example

x1 = 10 bowlsx2 = 20 mugsx2 = 20 mugsZ = $1400

Labor constraint check:1(10) + 2(20) = 50 > 40 hours, violates constraint

Graphical Solution of LP Models

� Graphical solution is limited to linearprogramming models containing only twodecision variables (can be used with threevariables but only with great difficulty).

� Graphical methods provide visualization of how asolution for a linear programming problem isobtained.

Coordinate AxesGraphical Solution of Maximization Model

1 2

1 2

40 50

1 2 40

Maximize Z = $ x $ x

subject to

x x

+

+ ≤1 2

1 2

1 2

1 2 40

4 3 120

0

x x

x x

x , x

+ ≤+ ≤

1 2

1 2

40 50

1 2 40

Maximize Z = $ x $ x

subject to

x x

+

+ ≤1 2

1 2

1 2

1 2 40

4 3 120

0

x x

x x

x , x

+ ≤+ ≤

Graph of Labor Constraint

1 2

1 2

40 50

1 2 40

Maximize Z = $ x $ x

subject to

x x

+

+ ≤

Clay Constraint Area

1 2

1 2

1 2

1 2 40

4 3 120

0

x x

x x

x , x

+ ≤+ ≤

1 2

1 2

40 50

1 2 40

Maximize Z = $ x $ x

subject to

x x

+

+ ≤

Graph of Both Model Constraints

1 2

1 2

1 2

1 2 40

4 3 120

0

x x

x x

x , x

+ ≤+ ≤

Extreme (Corner) Point Solutions

1 240 50

1 2 40

Maximize Z = $ x $ x

subject to

x x

+

+ ≤1 2

1 2

1 2

1 2 40

4 3 120

0

x x

x x

x , x

+ ≤+ ≤

Solutions at All Corner Points

Slack Variables

� Standard form requires that all constraints be inthe form of equations (equalities).

� A slack variable is added to a ≤ constraint (weakinequality) to convert it to an equation (=).inequality) to convert it to an equation (=).

� A slack variable typically represents an unusedresource.

� A slack variable contributes nothing to theobjective function value.

Point Solution values Z Slack

A $ 1,0000 20x bowls, x mugs= = 1 20 60s hr; s lb= =A $ 1,000

B $ 1, 360

C $ 1,200

1 20 20x bowls, x mugs= =

1 224 8x bowls, x mugs= =

1 230 0x bowls, x mugs= =

1 20 60s hr; s lb= =

1 20 0s hr; s lb= =

1 210 0s hr; s lb= =

Linear Programming Model: Standard Form

1 2 1 240 50 0 0

1 2 40

Maximize Z = $ x $ x s s

subject to

x x s

+ + +

+ + =

Solution Points A, B, and C with Slack

1 2 1

1 2 2

1 2 1 2

1 2 40

4 3 120

0

x x s

x x s

x ,x ,s ,s

+ + =+ + =

A Minimization Problem

Fertilizing Farmers Field� A farmer is preparing to plant a crop in the spring and needs to fertilize a field. � There are two brands of fertilizer to choose from, Super-gro and Crop-quick.� Each brand yields a specific amount of nitrogen and � Each brand yields a specific amount of nitrogen and phosphate per bag, as follows: Chemical Contribution

Brand Nitrogen (lb/bag)

Phosphate (lb/bag)

Super-gro 2 4

Crop-quick 4 3

LP Model Formulation

Decision Variables:x1 = bags of Super-Grox2 = bags of Crop-Quick

The Objective Function:The Objective Function:Minimize Z = $6x1 + 3x2Where: $6x1 = cost of bags of Super-Gro

$3x2 = cost of bags of Crop-QuickModel Constraints:

2x1 + 4x2 ≥ 16 lb (nitrogen constraint)4x1 + 3x2 ≥ 24 lb (phosphate constraint)x1, x2 ≥ 0 (non-negativity constraint)

LP Model Formulation and Constraint Graph

1 2

1 2

6 3

2 4 16

Minimize Z = $ x $ x

subject to

x x lb. of nitrogen

+

+ ≥

Graph of Both Model Constraints

1 2

1 2

1 2

2 4 16

4 3 24

0

x x lb. of nitrogen

x x lb. of phosphate

x ,x

+ ≥+ ≥≥

Feasible Solution Area

1 2

1 2

6 3

2 4 16

Minimize Z = $ x $ x

subject to

x x lb. of nitrogen

+

+ ≥1 2

1 2

1 2

2 4 16

4 3 24

0

x x lb. of nitrogen

x x lb. of phosphate

x ,x

+ ≥+ ≥≥

Feasible Solution Area

Optimal Solution Point

1 2

1 2

6 3

2 4 16

Minimize Z = $ x $ x

subject to

x x lb. of nitrogen

+

+ ≥1 2

1 2

1 2

2 4 16

4 3 24

0

x x lb. of nitrogen

x x lb. of phosphate

x ,x

+ ≥+ ≥≥

Surplus Variables

� A surplus variable is subtracted from a ≥ constraintto convert it to an equation (=).

� A surplus variable represents an excess above aconstraint requirement level.Surplus variables contribute nothing to the� Surplus variables contribute nothing to thecalculated value of the objective function.

� Subtracting slack variables in the farmer problemconstraints:

2x1 + 4x2 - s1 = 16 (nitrogen)4x1 + 3x2 - s2 = 24 (phosphate)

Linear Programming Model: Standard Form

1 2 1 2

1 2 1

6 3 0 0

2 4 16

Minimize Z = $ x $ x s s

subject to

x x s

+ + +

+ − =1 2 1

1 2 2

1 2 1 2

2 4 16

4 3 24

0

x x s

x x s

x ,x ,s ,s

+ − =+ − =

Par Inc. Ltd. – A Maximization Problem

� Par, Inc., is a small manufacturer of golf equipment and supplies whose management has decided to move into the market for medium –and high priced golf bags. � Par’s distributor is enthusiastic about the new � Par’s distributor is enthusiastic about the new product line and has agreed to buy all the golf bags Par produces over the next three months.� After a thorough investigation of the steps involved in manufacturing a golf bag, management determined that each golf bag produced will require the following operations:

1. Cutting and dyeing the material2. Sewing3. Finishing 4. Inspection and PackagingThe director of manufacturing analyzed each ofThe director of manufacturing analyzed each ofthe operations and concluded that if the companyproduces a medium-priced standard model, eachbag will require 7/10 hour in the cutting anddyeing department, ½ in the sewing department,1 hour in the finishing and 1/10 hour in theinspection and packaging department.

� The more expensive deluxe model will require 1 hour for cutting and dyeing, 5/6 hour of sewing, 2/3 hour of finishing, and ¼ hour for inspection and packaging.

Production Time (hours)

Department Standard Bag Deluxe BagCutting and Dyeing 7/10 1Sewing 1/2 5/6Finishing 1 2/3Inspection and Packaging

1/10 1/4

� Par’s Production is constrained by a limited number of hours available in each department.� After studying departmental workload projections, the director of manufacturing estimates that 630 hours of cutting and dyeing, 600 hours for sewing, 708 hours of finishing, and 135 hours for inspection and packaging will be available for the production of golf bags during the next finishing, and 135 hours for inspection and packaging will be available for the production of golf bags during the next three months.� The accounting department analyzed the production data, assigned all relevant variable costs, and arrived at prices for both bags that will result in a profit contribution of $10 for every standard bag and $9 for every deluxe bag produced. � Let us develop a mathematical model for the same.

Model Formulation� Maximize (Total Profit)s. t.

(Cutting and Dyeing)

(Sewing)

10 9S D+

71 630

10S D+ ≤

1 5600S D+ ≤ (Sewing)

(Finishing)

(Inspection and Packaging)

6002 6

S D+ ≤

21 708

3S D+ ≤

, 0S D≥

1 1135

10 4S D+ ≤

Graphical SolutionCORNER POINTS OBJECTIVE FUNCTION

VALUEA (0,0) 0B (708, 0) 7080B (708, 0) 7080C (540, 252) 7668D (300, 420) 6780E (0, 540) 4860

SLACK VARIABLES� In linear programming terminology, any unused capacityfor a constraint is referred to as the slack associatedwith the constraint.

Constraint Hours RequiredFor S = 540 and D = 252

Hours Available

Unused HoursFor S = 540 and D = 252 Available Hours

Cutting and dyeing

7/10 (540) + 1 (252) = 630 630 0

Sewing 1/2 (540) + 5/6 (252) = 480 600 120

Finishing 1 (540) + 2/3 (252) = 708 708 0

Inspection and Packaging

1/10 (540) + 1/4 (252) = 117 135 18

� Often variables called slack variables, are added to the formulation of the linear programming problem to represent the slack, or idle capacity.

� Unused capacity makes no contribution to profit ; Unused capacity makes no contribution to profit ; thus, slack variables have coefficients of zero in the objective function . After the addition of four slack variables, denoted and , the mathematical model of Par, Inc., problem becomes….

1 2 3, ,S S S 4S

1 2 3 410 9 0 0 0 0S D S S S S+ + + + +

17

1 1 63010

S D S+ + =

1 5

Maximize Z = s.t.

Standard Form of Maximization Problem

21 5

+1S 6002 6

S D+ =

32

1 +1S 7083

S D+ =

1 2 3 4, , , , , 0S D S S S S ≥

41 1

+1S 13510 4

S D+ =

� Referring to the standard form of the Par, Inc.,problem, we see that at an optimal solution

(S = 540 and D = 252), the values for the slackvariablesarevariablesare

Constraint Value of Slack Variable

Cutting and dyeing 0

Sewing 120

Finishing 0

Inspection and Packaging 18

A Simple Minimization Problem� M&D Chemicals produces two products that are sold as

raw materials to companies manufacturing bath soaps and laundry detergents.� Based on an analysis of current inventory levels and

potential demand for the coming month, M&D’s

44

potential demand for the coming month, M&D’s management specified that the combined production for products A and B must total atleast 350 gallons.� Separately, a major customer’s order for 125 gallons of

product A must also be satisfied.

� Product A requires 2 hours of processing time per gallon and product B requires 1 hour of processing time per gallon.� For the coming month, 600 hours of processing time are

available.

45

available.� M&D’s objective is to satisfy these requirements at a

minimum total production cost.� Production cost are Rs. 2 per gallon for product A and Rs.3

gallon for product B.

� Minimize (Total Cost)s. t.

(Demand for product A)

2 3A B+

1 125A≥

1 1 350A B+ ≥(Total Production)

(Processing Time)

1 1 350A B+ ≥

2 1 600A B+ ≤

, 0A B≥

Graphical SolutionCORNER POINTS OBJECTIVE FUNCTION

VALUEA (125, 225) 925B (125, 350) 1300B (125, 350) 1300C (250, 100) 800

SURPLUS VARIABLES� In linear programming terminology, any excess quantitycorresponding to constraint is referred to as thesurplus. ≥

Constraint ProductionFor A = 250 and B = 100

Resource Available

Excess CapacityFor A = 250 and B = 100 Available Capacity

Demand for Product A

1 (250) 125 125

Total production

1 (250) + 1 (100) 350 0

Processing Time

2 (250) + 1 (100) 600 0

� Minimize s. t.

1 2 32 3 0 0 0A B S S S+ + + +

11 125A S− =

Standard Form Of M&D Chemical’s Problem

11 125A S− =

21 1 350A B S+ − =

32 1 600A B S+ + =

1 2 3, , , , 0A B S S S ≥

Simple Maximization Problem

1 28 5

2 500

Max Z = x x

s.t.

x x

+

+ ≤1 2

1

2

1 2

2 500

150

250

0

x x

x

x

x ,x

+ ≤≤≤

Simple Minimization Problem

1 22 5Min Z = 3x . x

s.t.

+

1 2

1 2

1 2

2 4 40

3 2 50

0

s.t.

x x

x + x

x ,x

+ ≥≥≥

Mixed Constraint Problem

1 29 00 000 3 00 000

2 20

Max Z = , , x , , x

s.t.

5x x

+

+ ≤1 2

2

1

1 2

2 20

5

3

0

5x x

x

x

x ,x

+ ≤≤≥

Infeasible Solution

1 22

2 3 18

Max Z = 4x x

s.t.

x x

+

+ ≤1 2

1 2

1 2

2 3 18

10

0

x x

x x

x ,x

+ ≤+ ≥

Unbounded Solution

1 22 2

1

Max Z = x x

s.t.

x x

+

− ≥1 2

1 2

1 2

1

3

0

x x

x x

x ,x

− ≥+ ≥

Multiple Optimal Solution

1 2

1 2

100 40

5 2 1000

Max Z = x x

s.t.

x x

+

+ ≤1 2

1 2

1 2

1 2

5 2 1000

3 2 900

2 500

0

x x

x x

x x

x ,x

+ ≤+ ≥+ ≤