Sie sind auf Seite 1von 35

QMT425-FSKM

Topic 3 : Linear Programming 1. 2. 3. Objectives of the business frequently to maximize profit or minimize cost. LP is a technique that helps in resource allocation decisions. LP is a model consisting of linear relationships representing a firms decisions given an objective and resource constraints.

Steps in application 1. 2. 3. Identify problem as solvable by linear programming. Formulate a mathematical model of the unstructured problem. Solve the model.

Requirements of a linear programming problem 1. 2. 3. 4. One objective function. (maximize or minimize objective) One or more constraints. Alternative courses of action. Objective function and constraints are linear.

Assumption of LP 1. 2. 3. 4. 5. Certainty Proportionality Additively Divisibility Non-negative

Model Components Decision variables: mathematical symbols representing levels of activity of a firm. Objective function: a linear mathematical relationship describing an objective of the firm, in terms of decision variables, that is maximized or minimized Constraints: restrictions placed on the firm by the operating environment stated in linear relationships of the decision variables. Parameters: numerical coefficients and constants used in the objective function and constraint equations.

QMT425-FSKM

Formulating LP Problems 1. 2. 3. 4. Completely understand the managerial problem being faced. Identify the objective and the constraints. Define the decision variables. Use decision variable to write mathematical expressions for objective function and the constraints.

A Maximization Model Example Problem Definition The Beaver Creek Pottery Company is a small crafts company. The company employs skilled artisans to produce clay bowls and mugs. The two primary resources used by the company are special pottery clay and skilled labor. 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 resource requirements for production and profit per item produced. Product Bowl Mug Labor (hr/ unit) 1 2 Resource Requirements Clay Profit (lb/ unit) (RM/ unit) 4 3 40 50

There are 40 hours of labor and 120 pounds of clay available each day for production. Product Bowl Mug Available Labor (hr/ unit) 1 2 40 Resource Requirements Clay Profit (lb/ unit) (RM/ unit) 4 3 120 40 50

QMT425-FSKM

Decision Variables: x1= number of bowls to produce/day x2= number of mugs to produce/day Objective function Maximize Z = 40x1 + 50x2 where Z= profit per day Resource Constraints: x1 + 2x2 40 hours of labor 4x1 + 3x2 120 pounds of clay Non-negativity Constraints: x1 0; x2 0 Complete Linear Programming Model: Maximize Z = 40x1 + 50x2 subject to x1 + 2x2 40 4x1 + 3x2 120 x1 , x2 0 A Minimization Model Example A farmer is preparing to plant a crop 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 phosphate, as follows: Brand Super-gro Crop-quick Nitrogen (lb/ bag) 2 4 Chemical contribution Phosphate (lb/ bag) 4 3

The farmers requires at least 16 pounds of nitrogen and 24 pounds of phosphate. Super-gro costs RM6 per bag and Crop-quick costs RM3. The farmer wants to know how many bags of each brand to purchase in order to minimize the total cost of fertilizing.

QMT425-FSKM

Brand Super-gro Crop-quick Requires at least Decision variables x1 = bags of Super-gro x2 = bags of Crop-quick Objective function

Chemical contribution Nitrogen Phosphate (lb/ bag) (lb/ bag) 2 4 4 3 16 24

Cost (RM/ bag) 6 3

Minimize Z = 6x1 + 3x2 where 6x1 = cost of bags of Super-gro 3x2 = cost of bags of Crop-quick Model constraints 2x1 + 4x2 16 lb (nitrogen constraint) 4x1 + 3x2 24 lb (phosphate constraint) x1, x2 0 (nonnegativity constraint) Complete LP model Minimize Z = 6x1 + 3x2 subject to 2x1 + 4x2 16 4x1 + 3x2 24 x1, x2 0

QMT425-FSKM

Exercise 1. The Flair Furniture Company produces inexpensive tables and chairs. Each table takes 4 hours of carpentry and 2 hours in the painting and varnishing shop. Each chair requires 3 hours in carpentry and 1 hour in painting and varnishing. During the current production period, 240 hours of carpentry time are available and 100 hours in painting and varnishing time are available. Each table sold yields a profit of RM7, each chair produced is sold for a RM5 profit. Determine the best possible combination of tables and chairs to manufacture in order to reach the maximum profit. The Kalo Fertilizer Company makes a fertilizer using two chemicals that provide nitrogen, phosphate and potassium. A pound of ingredient 1 contributes 10 ounces of nitrogen and 6 ounces of phosphate, while a pound of ingredient 2 contributes 2 ounces of nitrogen, 6 ounces of phosphate and 1 ounce of potassium. Ingredient 1 costs RM3 per pound and ingredient 2 costs RM5 per pound. The company wants to know how many pounds of each chemical ingredient to put into a bag of fertilizer to meet minimum requirements of 20 ounces of nitrogen, 36 ounces of phosphate and 2 ounces of potassium while minimizing cost.

2.

QMT425-FSKM

Graphical Method Graphical solution is limited to LP problems with only two decision variables. Graphical methods provide visualization of how a solution for a linear programming problem is obtained.

Example: Maximization model How many bowls (x1) and mugs (x2) to produce daily, given limited amounts of labor and clay. Maximize Z = 40x1 + 50x2 subject to x1 + 2x2 40 4x1 + 3x2 120 x1 , x2 0 First step Plot the constraints on the graph. x1 + 2x2 = 40 x1 = 0, x2 = 20 x2 = 0 , x1 = 40 4x1 + 3x2 = 120 x1 = 0, x2 = 40 x2 = 0 , x1 = 30

QMT425-FSKM

Second step Shade the feasible solution area (area on the graph bounded by the constraint equation).

Third step Find the optimal solution. We can use either Isoprofit solution method or corner point solution method. 1. Isoprofit solution method Let Z = 800 800 = 40x1 + 50x2 x1 = 0, x2 = 16 x2 = 0 , x1 = 20

Optimal solution x1 = 24, x2 = 8 Z = 40 (24) + 50 (8) = RM1360

QMT425-FSKM

2.

Corner point solution method

B C

A (x1 = 0, x2 = 20) Z = 40(0) + 50(20) = 1000 B (x1 = 24, x2 = 8) use simultaneous equation Z = 40(24) + 50(8) = 1360 C (x1 = 30, x2 = 0) Z = 40(30) + 50(0) = 1200 D (x1 = 0, x2 = 0) Z = 40(0) + 50(0) = 0 Optimal solution x1 = 24, x2 = 8 Z = 40 (24) + 50 (8) = RM1360 * Produce 24 bowls and 8 mugs to get max. profit RM1360. Example: Minimization model How many bags of Super-gro (x1) and Crop-quick (x2) to purchase in order to minimize the total cost of fertilizing?

QMT425-FSKM

Minimize Z = 6x1 + 3x2 subject to 2x1 + 4x2 16 4x1 + 3x2 24 x1, x2 0 First step Plot the constraints on the graph. 2x1 + 4x2 = 16 x1 = 0, x2 = 4 x2 = 0 , x1 = 8 4x1 + 3x2 = 24 x1 = 0, x2 = 8 x2 = 0 , x1 = 6

Second step Shade the feasible solution area (area on the graph bounded by the constraint equation).

QMT425-FSKM

Third step Find the optimal solution. We can use either Isocost solution method or corner point solution method. 1. Isocost solution method Let Z = 18 18 = 6x1 + 3x2 x1 = 0, x2 = 6 x2 = 0 , x1 = 3

Optimal solution x1 = 0, x2 = 8 Z = 6(0) + 3(8) = RM24

10

QMT425-FSKM

2.

Corner point solution method

B C

0, x2 = 8) Z = 6(0) + 3(8) = 24 B (x1 = 4.8, x2 = 1.6) use simultaneous equation Z = 6(4.8) + 3(1.6) = 33.6 C (x1 = 8, x2 = 0) Z = 6(8) + 3(0) = 48 Optimal solution

A (x1 =

x1 = 0, x2 = 8 Z = 6(0) + 3(8) = RM24 * Should not purchase Super-gro and purchase 8 bags of Crop-quick and the minimum total cost will be RM24.

Exercise Find optimal solution for ex.1 and 2 using graphical method.

11

QMT425-FSKM

Slack and Surplus Variables In graphical solution, the model constraints are considered as equations (=), rather than or inequalities. There is a standard procedure for transforming inequality constraints into equations. The complete LP model with slack or surplus variables referred as standard form LP model.

Slack Variables In graphical solution, the model constraints are considered as equations (=), rather than or inequalities. There is a standard procedure for transforming inequality constraints into equations. The complete LP model with slack variables referred as standard form LP model.

Slack variables A slack variable is added to a constraint to convert it to an equation (=). Slack variables represents the amount of unused resources. Slack variable contribute nothing to the objective function value.

Example: The Beaver Creek Pottery Company: Maximize Z = 40x1 + 50x2 subject to x1 + 2x2 40 (labor) 4x1 + 3x2 120 (clay) x1 , x2 0 Convert to standard form of LP model Maximize Z = 40x1 + 50x2 + 0s1 + 0s2 subject to x1 + 2x2 + s1 = 40 (labor) + s2 = 120 (clay) 4x1 + 3x2 x1 , x2 , s1 , s2 0 Consider a hypothetical solution x1 = 5, x2 = 10. Substituting these values into the equation yields. Z = 40(5) + 50(10) = 700 (5) + 2(10) + s1 = 40, then s1 = 15 4(5) + 3(10) + s2 = 120, then s2 = 70 In this example, x1 = 5 bowls, x2 = 10 mugs. s1 = 15 hr represents the amount of unused labor s2 = 70 lb represents the amount of unused clay

12

QMT425-FSKM

Surplus Variables A surplus variable is subtracted from a constraint to convert it to an equation (=). Surplus variable represents an excess above a constraint requirement level. Surplus variable contribute nothing to the objective function value.

Example: Fertilizer model LP model Minimize Z = 6x1 + 3x2 subject to 2x1 + 4x2 16 (nitrogen) 4x1 + 3x2 24 (phosphate) x1, x2 0 Standard form of LP model Minimize Z = 6x1 + 3x2 + 0s1 + 0s2 subject to 2x1 + 4x2 - s1 = 16 4x1 + 3x2 - s2 = 24 x1 , x2 , s1 , s2 0 Consider a hypothetical solution x1 = 0, x2 = 10. Substituting these values into the equation yields Z = 6(0) + 3(10) = 30 2(0) + 4(10) - s1 = 16, then s1 = 24 4(0) + 3(10) - s2 = 24, then s2 = 6 In this example s1 and s2 can be interpreted as the extra amount of nitrogen and phosphate above the minimum requirement level, 16 lb and 24 lb that would be obtained by purchasing 10 bags of Crop-quick fertilizer.

Artificial Variables An artificial variable is a variable that has no physical meaning in terms of a real world LP problem. It simply allow us to create a basic feasible solution to start the simplex algorithm. An artificial variable is not allowed to appear in the final solution to the problem. Whenever an artificial or surplus variable is added to one of the constraints, it must also be included in the other equations and in the objective function, just as what we have done for slack variables. Each artificial variable is assigned an extremely high cost to ensure it does not appear in the final solution. To handle constraint, surplus variable is subtracted and then artificial variable is added.

13

QMT425-FSKM

To convert an equality (=), we add an artificial variable to the equation.

Example 1: Maximize Z = x1 + 2x2 + 2x3 subject to x1 + x2 + 2x3 12 2x1 + x2 + 5x3 = 20 x1 + x2 - x3 8 x1, x2, x3 0 Standard form: Maximize Z = x1 + 2x2 + 2x3 + 0s1 + 0s2 - MA1 - MA2 subject to x1 + x2 + 2x3 + s1 = 12 2x1 + x2 + 5x3 + A1 = 20 x1 + x2 - x3 - s2 + A2 = 8 x1 , x2 , x3, s1 , s2 , A1 , A2 0 Example 2: Minimize Z = 6x1 + 3x2 subject to 2x1 + 4x2 16 4x1 + 3x2 = 24 x1, x2 0 Standard form: Minimize Z = 6x1 + 3x2 + 0s1 + MA1 + MA2 subject to 2x1 + 4x2 - s1 + A1 = 16 4x1 + 3x2 + A2 = 24 x1 , x2 , s1 , A1 , A2 0

14

QMT425-FSKM

Simplex Method (Maximization) Setting up the first simplex tableau Before setting up the first simplex tableau, it is essential to write the problem in standard form. Consider the Pottery Company problem: Maximize Z = 40x1 + 50x2 subject to x1 + 2x2 40 4x1 + 3x2 120 x1 , x2 0 In standard form, the problem written as: Maximize Z = 40x1 + 50x2 + 0s1 + 0s2 subject to x1 + 2x2 + s1 = 40 4x1 + 3x2 + s2 = 120 x1 , x2 , s1 , s2 0 We begin the solution at the origin:

First simplex tableau Cj 0 0 Basic variables s1 s2 Zj Cj-Zj x1 40 1 4 0 40 x2 50 2 3 0 50 s1 0 1 0 0 0 s2 0 0 1 0 0 Quantity 40 120 0

Basic feasible solution x1 = 0 x2 = 0 s1 = 40 s2 = 120 Z=0 Variables in solution mix are referred as basic variables, in this example are s1 and s2. Variables not in the solution mix are called non-basic variables (x1 and x2). Cj : Profit contribution per unit of each variable. Zj : In the quantity column, provides total contribution.

15

QMT425-FSKM

Calculations for the values of Zj are as follows: Zj (for column x1) = 0(1) + 0(4) = 0 Zj (for column x2) = 0(2) + 0(3) = 0 Zj (for column s1) = 0(1) + 0(0) = 0 Zj (for column x1) = 0(0) + 0(1) = 0 Cj Zj Cj-Zj 40 0 40 50 0 50 0 0 0 0 0 0

Simplex solution procedure 1. Determine which variable to enter into the next solution mix. Identify the column with the largest positive number in the Cj-Zj row. The column identified is called the pivot column. 2. Determine which variable to replace. Divide each amount in the quantity column with amount in pivot column. The row with the smallest nonnegative number will be replaced in the next tableau. This row referred as pivot row. 3. Compute new values for the pivot row. Divide every number in the row by pivot number. 4. Compute new values for each remaining row. All remaining rows are calculated as follows: New row numbers = numbers in old row Number in old row above or below pivot number x Corresponding number in the new row. The row replaced in step 3

5. Compute the Zj and Cj-Zj rows. If all numbers in the Cj-Zj row are zero or negative, we have found the optimal solution. Iteration 1 Cj 0 0

Basic variables s1 s2 Zj Cj-Zj Basic variables x2 s2 Zj Cj-Zj

x1 40 1 4 0 40 x1 40 5/2 25 15

x2 50 2 3 0 50 x2 50 1 0 50 0

s1 0 1 0 0 0 s1 0 1/2 -3/2 25 -25

s2 0 0 1 0 0 s2 0 0 1 0 0

Quantity 40 120 0

Iteration 2 Cj 50 0

Quantity 20 60 1000

16

QMT425-FSKM

Iteration 3 Cj 50 40

Basic variables x2 x1 Zj Cj-Zj

x1 40 0 1 40 0

x2 50 1 0 50 0

s1 0 4/5 -3/5 16 -16

s2 0 -1/5 2/5 6 -6

Quantity 8 24 1360

Optimal solution: x1 = 24, x2 = 8 , s1 = 0, s2 = 0 Z = 40 (24) + 50 (8) = RM1360 Row s2 (1 iteration) Column Current row x1 x2 s1 s2 Quantity 4 3 0 1 120 (2 iteration) Pivot column coefficient 3 3 3 3 3 (3 iteration) Pivot column coefficient x x x x x x x x x x x x New pivot row 1 0 20 New pivot row 1 0 -3/5 2/5 24 = = = = = = = = = = = = New row number 5/2 0 -3/2 1 60 New row number 0 1 4/5 -1/5 8

Row x2 (2 iteration) Column Current row x1 x2 s1 s2 Quantity Exercise 1 0 20

1. Max z = 300x1 + 250x2 subject to 2x1 + x2 40 x1 + 3x2 45 x1 12 x1 , x2 0 (Optimal solution: x1 = 12, x2 = 11, s1 = 5, s2 = 0, s3 = 0, Z = 6350) 2. Max z = 7x1 + 5x2 subject to 2x1 + x2 100 4x1 + 3x2 240 x1 , x2 0 (Optimal solution: x1 = 30, x2 = 40, s1 = 0, s2 = 0, Z = 410)
17

QMT425-FSKM

Four Special Cases in LP Four special cases may arise when solving an LP problem 1. Multiple Optimal Solutions/Alternate optimal solution This is the case when the objective functions isoprofit or isocost line runs perfectly parallel to one of the problems constraint. Provide greater flexibility to the decision maker. Example: Maximize Z = 40x1 + 30x2 subject to x1 + 2x2 40 4x1 + 3x2 120 x1 , x2 0 Two corner points having the same maximum value indicate the LP problem has alternate optimal solution (Point B and C).

Multiple optimal solutions is detected if the final tableau has Cj-Zj value equal to 0 for a non-basic variable ( variable that is not in the final solution mix). Cj 2 0 Basic Var x2 s2 Zj Cj-Zj x1 3 3/2 1 3 *0
18

x2 2 1 0 2 0

s1 0 1 1/2 2 -2

s2 0 0 1 0 0

Quantity 6 3 12

QMT425-FSKM

2. An Infeasible Problem Infeasibility is a condition that arises when there is no solution to a LP problem that satisfies all of the constraints given. Infeasible problems do not typically occur, but when they do there are a result of errors in defining the problem or in formulating the LP model.

Example: Maximize Z= 5x1 + 3x2 subject to 4x1 + 2x2 8 x1 4 x2 6 x1, x2 0

The tableau is the final tableau because all Z 0 . An infeasible problem is detected When an artificial variable still in the final solution mix. Cj 3 -M -M Basic Var x2 A1 A2 Zj Cj-Zj x1 5 2 1 -2 6+M -1-M x2 3 1 0 0 3 0 s1 0 0 -1/2 3/2+M/2 -3/2M/2
19

s2 0 0 -1 0 M -M

s3 0 0 0 -1 M -M

A1 -M 0 1 0 -M 0

A2 -M 0 0 1 -M 0

Quantit y 4 4 2 12-6M

QMT425-FSKM

3. An Unbounded Problem The solution space is not completely closed in. In an unbounded problem the objective function can increase indefinitely without reaching a maximum value. Like an infeasible solution, typically reflects an error in defining the problem or in formulating the model. Example: Maximize Z= 4x1 + 2x2 subject to x1 4 x2 2 x1, x2 0

An unbounded problem is detected when all entries in the pivot column are nonpositive, hence there will be no leaving variable. Cj 9 0 Basic Var x2 s2 Zj Cj-Zj x1 6 -1 -2 -3 15 x2 9 1 0 9 0 s1 0 2 -1 18 -18 s2 0 0 1 0 0 Quantity 30 10 270 Ratio 30/-1 = -30 10/-1 = -10

20

QMT425-FSKM

4. Degeneracy A redundant constraint is one that does not affect the feasible solution region. Example: Maximize Z = x1 + 2x2 subject to x1 + 1x2 20 2x1 + x2 30 x1 25 x1 , x2 0

When more than one row have similar smallest nonnegative numbers. Lead to a situation known as cycling. Cj 0 0 Basic Var x2 s2 x1 5 x2 8 1 x3 2 1 s1 0 -2 s2 0 0 s3 0 0 10 Quantity 10/ 1/ 4 =40 20/4= 5 10/2 = 5

4 2 2 3

0 0 8 0

1/3 2 8 -6

-1 2/5 16 -16

1 0 0 0

0 1 0 0

20 10

s3 Zj Cj-Zj

80

21

QMT425-FSKM

Sensitivity Analysis with the simplex tableau

Sensitivity analysis is the analysis of the parameter changes on the optimal solution. Changes in Resources or RHS Values - Making changes in the resources or the RHS values result in changes in the feasible region and often the optimal point. This would also affect the value of the objective function. Shadow price (marginal value or dual value) is the change in value of the objective function for every additional unit of a scarce resource. It is also refer to maximum amount the firm should pay for every additional unit of resource to make available.

Example: High Note Sound is a firm that makes compact disks CD players (x1) and stereo receivers (x2). LP model: Maximize Profit = 50x1 + 120x2 subject to 2x1 + 4x2 80 (hours of electricians time available) 3x1 + x2 60 (hours of audio technicians time available) x1 , x2 0 The graphical solution of the above problem is as follows:

Optimal solution: x1 = 0 CD player, x2 = 20 stereo receivers, Z = RM2400

22

QMT425-FSKM

Maximize Profit = 50x1 + 120x2 subject to 2x1 + 4x2 81 3x1 + x2 60 x1 , x2 0

1 additional unit of the electricians hour, assuming no cost incurred, causes the total profit to increase to RM2430. This is an increase of RM30. Hence, the 1 additional hour of electricians time is worth RM30. This is known as shadow price for electricians hour.

Shadow prices can be obtained from an optimal solution simplex tableau. These are the numbers in the z-row of slack variable columns. Basic Var x2 s2 Z x1 5/2 10 x2 1 0 0 s1 -1/4 30 s2 0 1 0 Quantity 20 40 2400

23

QMT425-FSKM

The tableau indicates the optimal solution is: x1 = 0 CD players x2 = 20 stereo receivers s1 = 0 hour of unused time of electricians s2 = 40 hours of unused time of audio technicians Z = RM2400

Example

The management of a company has formulated the following linear programming problem. Let x1 = quantity of product 1 to produce x2 = quantity of product 2 to produce x3 = quantity of product 3 to produce Maximize Profit, Z = 7 x 1 + 3 x 2 + 9 x 3 subject to (raw material) 4x1 + 5x2 + 6x3 360 kg 2x1 + 4x2 + 6x3 300 hours (machine time) 9x1 + 5x2 + 6x3 600 hours (workers time) x1,x2,x3 0

The following is the final simplex tableau for the above problem. Use this to answer the questions below. Basic x1 x3 s2 Z x1 1 0 0 0 x2 0 0.83 -1 7.5 x3 0 1 0 0 s1 -0.2 0.3 -1.4 1.3 s2 0 0 1 0 s3 0.2 -0.13 0.4 0 RHS 48 28 36 a

24

QMT425-FSKM

1. State and the interpret the optimal solution.

x1 = 48; produce 48 units of product 1 x2 = 0; produce 0 unit of product 2 x3 = 28; produce 28 units of product 3 s1 = 0; raw material is fully utilized s2 = 36; 36 hours machine time is unused s3 = 0; workers time is fully utilized
2. Determine the value of a.

Z = a = maximize profit = 7 x 1 + 3 x 2 + 9 x 3 = 7( 48) + 3(0) + 9( 28) = RM588

3. How many hours of workers time, machine time and amount of raw material are used to reach the optimal solution?

amount of raw material used: 4(48)+5(0)+6(28) = 360 kg hours of machine time used : 2(48)+4(0)+6(28) = 264 hours; unused = 300-264 = 36 hours hours of workers time used: 9(48)+5(0)+6(28) = 600 hours

4. What are the shadow prices of the resources?

The shadow prices of raw material = RM1.30 machine time = RM0 workers time = RM0
5. What does a zero shadow price mean? How could this happen?

Shadow price RM0 means that 1 additional unit of the resource is worth nothing. The resource is not fully utilized. e.g. optimal solution s2 = 36
6. Is it worthwhile to pay RM2 for 1 additional kg of the raw material? Explain.

Not worthwhile because the maximum amount to pay is RM1.30.


7. Should the company pay RM4 for 3 more kg of the raw material? Explain.
RM4 = RM1.33 / kg ; 3kg Not worthwhile because the maximum amount to pay is RM1.30

25

QMT425-FSKM

The Dual

Every LP primal model has a dual model. The first way of stating a linear problem is called the primal of the problem. The second way of stating the same problem is called the dual. The optimal solutions for both ways are equivalent, but are derived through alternative procedures.

Example: Primal model Maximize Profit = 50x1 + 120x2 subject to 2x1 + 4x2 80 3x1 + x2 60 x1 , x2 0

Step to form a dual

1. If the primal is a maximization, the dual is a minimization and vice versa. 2. The RHS values of the primal constraints become the duals objective function coefficients. 3. The primal objective function coefficients become the RHS values of the dual constraints. 4. The transpose of the primal constraint coefficients become the dual constraint coefficients. 5. Constraint inequality signs are reversed.

Dual model for above problem Minimize Opportunity Cost = 80y1 + 60y2 subject to 2y1 + 3y2 50 4y1 + y2 120 y1, y2 0

26

QMT425-FSKM

Optimal tableau of primal model Primal model Cj Basic Var 120 x2 0 s2 Zj Cj-Zj Primal solution: x1 = 0 x2 = 20 s1 = 0 s2 = 40 Z = RM2400

x1 50 5/2 60 -10

x2 120 1 0 120 0

s1 0 -1/4 30 -30

s2 0 0 1 0 0

Quantity 20 40 2400

In the final simplex tableau of primal problem, the absolute values of the numbers in the cj zj row under slack variables represent the solutions to the dual problem
Dual solution: y1 = 30 y2 = 0 s1 = 10 s2 = 0 Z = RM2400

Optimal tableau of dual model Dual model Cj

Basic Var y1 s1 Zj Cj-Zj

y1 80 1 0 80 0

y2 60 -5/2 20 -40

s1 0 0 1 0 0

s2 0 -1/4 -1/2 -20 -20

Quantity 30 10 2400

80 0

Dual solution: y1 = 30 y2 = 0 s1 = 10 s2 = 0 Z = RM2400

27

QMT425-FSKM

To obtain primal solution, in the final simplex tableau of dual problem, the absolute values of the numbers in the cj zj row under slack variables represent the solutions to the primal problem
Primal solution: x1 = 0 x2 = 20 s1 = 0 s2 = 40 Z = RM2400

Sample questions

1.

Use the graphical method to solve the following linear programming model.

Minimize cos t = 6 x + 8 y Subject to x+ y5 3x + 2 y 18 y4 x, y 0


2. Consider the following linear programming problem.

Minimize Z = 2000 x1 + 700 x 2 + 1600 x3 Subject to

5 x1 + 2 x 2 + 2 x3 20 4 x1 + x 2 + 2 x3 30
x1 , x 2 , x3 0
a) b) Cj 30 0 0 Write the dual for the above linear programming problem in variable Y. The following is an incomplete final simplex tableau for the dual from Question 2(a). Basic variable Y2 S2 S3 Zj Cj-Zj 20 Y1 1.25 0.75 -0.5 30 Y2 1 0 0 0 S1 0.25 -0.25 -0.5 0 S2 0 1 0 0 S3 0 0 1 Quantity 500 200 600

i. Complete the above simplex tableau. ii. State the optimal solution for the dual. iii. State the optimal solution for the primal based on the final simplex tableau.
28

QMT425-FSKM

3.

A manufacturer has two versions of a toy house. The version X requires 23 sq cm of plywood, 2 pounds of plastic and 15 minutes of assembling. The version Y requires 31 sq cm of plywood, 3 pounds of plastic and 25 minutes of assembling. There are 9000 sq cm of plywood, 100 pounds of plastic and 42 hours of assembling time available. Each unit of version X results in RM4 of profit and for version Y the unit profit is RM5. The manufacturer will not produce more than 25 units of version Y and there must be a minimum of 5 units of each version produced to cater for previous orders. Formulate (do not solve) a linear programming model with the objective of maximizing profit.

4.

A manufacturer produces two types of cotton cloths: denim and corduroy. Corduroy is a heavier grade cotton cloth. Maximize profit = 6 X1 + 4.5 X 2 subject to 3.5 X1 + 2.5 X 2 3250 (cotton usage, meters)

3.2 X 1 + 3 X 2 3000 (processing time, hours) X 1 510 (demand for corduroy, meters) X1, X 2 0
The final simplex tableau for the above problem is shown below: Cj 0 6 4.5 Basic Variable S1 X2 X1 Zj Cj-Zj 6 X1 0 0 1 6 0 4.5 X2 0 1 0 4.5 0 0 S1 1 0 0 0 0 0 S2 -0.83 0.33 0 1.5 -1.5 0 S3 -0.83 -1.07 1 1.2 -1.2 Quantity 325 456 510

X1 = number of meters of corduroy produced, X2 = number of meters of denim produced, S1, S2, and S3 are the slack variables for cotton usage, processing time and demand for corduroy respectively. a) Determine the optimal production level and calculate the maximum profit obtained. b) How much cotton and processing time are left over in the optimal solution? c) What is the maximum amount the manufacturer is willing to spend for an additional processing time? d) If we increase one hour of processing time at cost RM3 will it be worthwhile? Why?

29

QMT425-FSKM

5.

Solve the following linear programming model graphically.

Maximize Z = 40 x1 + 50 x2 Subject to

x1 + 2 x2 40 4 x1 + 3 x2 120 x1 + x2 100
x1, 6. x2 0 Rahman the successful farmer has a 50 acres farm on which to plant tomatoes and cucumbers. He has 300 hours of labor per week and 800 tons of fertilizer available and has contracted for shipping space for a maximum of 26 acres worth of tomatoes and 37 acres worth of cucumbers. An acre of tomatoes requires 10 hours of labor and 8 tons of fertilizer, whereas an acre of cucumbers requires 3 hours of labor and 20 tons of fertilizer. The profit from an acre of tomatoes is RM400 and the profit from an acre of cucumbers is RM300. Formulate the linear programming model for this problem to maximize profit. The simplex tableau for the above problem (6) is given below. The s1, s2, s3, s4 and s5 are the slack variables for available land, labor, fertilizer and shipping space for tomatoes and cucumbers, respectively. Cj 0 300 0 400 0 Basic Var s4 x2 s3 x1 s5 Zj Cj - Zj 400 x1 0 0 0 1 0 300 x2 0 1 0 0 0 0 s1 0.43 1.43 -25.14 -0.43 -1.43 0 s2 -0.14 -0.14 1.71 0.14 0.14 0 s3 0 0 1 0 0 0 s4 1 0 0 0 0 0 s5 0 0 0 0 1 Quantit y 4.57 28.57 57.14 21.43 8.43

7.

a) b) c) d) e) 8.

Complete the above simplex tableau. Does this tableau optimal? Explain. Specify the optimal solution and the total profit. Of all the available resources, how much of each has been used? Does this problem have any alternative optimal solution? Explain. State the dual solution. Write the dual of this primal model: Maximize 30x1 + 20x2 + 40x3 Subject to: 5x1 + 9x2 + 8x3 450 3x1 4x2 120 x1, x2, x3 0

30

QMT425-FSKM

9. Cj 7 9 0

Consider the simplex tableau below. Solution Mix X1 X3 S3 Zj Cj-Zj 7 X1 1 0 0 7 0 3 X2 0.5 0.5 -2.5 8 -5 9 X3 0 1 0 9 0 0 S1 0.5 -0.17 -3.5 2 -2 0 S2 -0.5 0.33 2.5 -0.5 0.5 0 S3 0 0 1 0 0 Quanti ty 30 40 90 570

a) Perform another simplex iteration. b) Give the solution obtained. c) Is the solution obtained in b) optimal? Explain.

SOLUTION:

1. Graphical method

X+Y=5 X = 0, Y = 5 Y = 0, X = 5 3X + 2Y =18 X = 0, Y = 9 Y = 0, X = 6 Y=4

A C D

A B C D

CORNER POINT X Y 0 5 0 9 3.33 4 1 4

Z 40 72 52 38

Choose lowest Z value

Optimal solution: X = 1, Y = 4 with minimum cost Z = RM38

31

QMT425-FSKM

2. a)

Max Z = 20 y1 + 30 y 2 Subject to

5 y1 + 4 y 2 2000 2 y1 + y 2 700 3 y1 + 2 y 2 1600


y1 , y 2 0
b) i. Complete the above simplex tableau. Cj 30 0 0 Basic variable Y2 S2 S3 Zj Cj-Zj 20 Y1 1.25 0.75 -0.5 37.5 -17.5 30 Y2 1 0 0 30 0 0 S1 0.25 -0.25 -0.5 7.5 -7.5 0 S2 0 1 0 0 0 0 S3 0 0 1 0 0 Quantity 500 200 600 15000

ii. Optimal sol. for dual model Y1 = 0 Y2 = 500 S1 = 0 S2 = 200 S3 = 600 Z = 15 000

ii. Optimal sol. for primal model X1 = 7.5 X2 = 0 Refer to X3 = 0 Cj-Zj row S1 = 17.5 of dual S2 = 0 final Z = 15 000 tableau

32

QMT425-FSKM

3.

x = toy house (version X) produced y = toy house (version Y) produced Max Z = 4 x + 5 y Subject to 23 x + 31 y 9000 2 x + 3 y 100 15 x + 25 y 2520 y 25 y5 x5 x, y 0

4. a) Optimal production level/Optimal solution: X1 = 510 X2 = 456 S1 = 325 S2 = 0 S3 = 0 Max profit, Z = 6.0 X1 + 4.5X2 = 6(510) + 4.5(456) = RM5112 b) From optimal solution, cotton left over = 325 meters and no processing time left (fully utilized). c) RM 1.50 d) Not worthwhile because the maximum amount to pay is RM 1.50.

33

QMT425-FSKM

5.

Graphical method

An infeasible problem

6.

x = acre of land with tomatoes y = acre of land wuth cucumbers Max Z = 400 x + 00 y Subject to x + y 500 (land available) 10 x + 3 y 300 (labor) 8 x + 20 y 800 (fertilizer) x 26 (shipping space, tomatoes) y 37 (shipping space, cucumbers) x, y 0

7.

a)
Cj 0 300 0 400 0 Basic Var s4 x2 s3 x1 s5 Zj C j - Zj 400 x1 0 0 0 1 0 400 0 300 x2 0 1 0 0 0 300 0 0 s1 0.43 1.43 -25.14 -0.43 -1.43 257 -257 0 s2 -0.14 -0.14 1.71 0.14 0.14 14 -14 0 s3 0 0 1 0 0 0 0 0 s4 1 0 0 0 0 0 0 0 s5 0 0 0 0 1 0 0 Quantity 4.57 28.57 57.14 21.43 8.43 17143

34

QMT425-FSKM

b) The optimal solution and the total profit. X1 = 21.43 X2 = 28.57 S1 = 0 S2 = 0 S3 = 57.14 S4 = 4.57 S5 = 8.43 Total profit, Z = 400X1 + 300X2 = 400(21.43) + 300(28.57) = RM 17143 c)
Resources: Land - fully utilized Labor - fully utilized- fully utilized Used fertilizer = 8X1 + 20X2 = (21.43) + 20(28.57) = 742.84, unused = 57.14 Used shipping space for tomatoes = X1 = 21.43, unused = 4.57 Used shipping space for cucumbers = X2 = 28.57, unused = 8.43

d) No. Alternative optimal solution occurs when there is a zero value in row Cj-Zj of the final tableau under a variable that is not in the final solution mix. e) Dual solution.: y1 = 257, y2 = 14, y3 = 0, y4 = 0, y5 = 0, s1 = 0, s2 = 0, Z = 17143 8. The dual model: Minimize Z = 450y1 + 120y2 Subject to: 5y1 + 3y2 30 9y1 - 4y2 20 40 8y1 y1, y2 0 9. a) a) Cj 7 9 0 Solution Mix X1 X3 S2 Zj Cj-Zj 7 X1 1 0 0 7 0 3 X2 0 0.83 -1 7.47 -4.47 X3 = 28.12 S3 = 0 9 X3 0 1 0 9 9 0 S1 -0.2 0.29 -1.4 1.21 -1.21 0 S2 0 0 1 0 0 0 S3 0.2 -0.13 0.4 0.23 -0.23 Quantity 48 28.12 36 589.1

b) Optimal solution X1 = 48 X2 = 0 S2 = 36 S1 = 0 Z = 589.1

c) The solution is optimal. All values in Cj-Zj row are zero or negative.

35

Das könnte Ihnen auch gefallen