Вы находитесь на странице: 1из 9

Lecture 3 Material

Instructor: K. Gita Ayu October 25, 2011

1
1.1

Graphical Method
Important Terms

Decision Variables describe the decisions to be made. Function to be maximized or minimized or commonly referred as Objective Function. The coecient of variable in the objective function is called the objective function coecient of the variable. Restriction to the decision variables is often called Constraints. The coecients of the decision variables in the constraints are called technological coecients. The number of the right-hand side of each constraint (rhs). The sign restriction (variable-type constraint) of the decision variables (e.g. urs for unrestricted in sign, bin for binary, int for integer, and so on). A set of point S is a convex set if the line segment joining any pair of points in S is contained in S. A point P in S is an extreme point (corner point) for any convex set S if each line segment contains the point P and lies completely in S has P as an endpoint of the line segment. See page 59 for the sample of convex and nonconvex sets. Feasible Region for an LP is the set of all points that satises all main constraints and variable-type constraints. Feasible region is a convex set. A point in the feasible region is called feasible point while point that is not in the feasible region is called infeasible point. An empty feasible region is called infeasible region. An Optimal Solution is a point in the feasible region with the best objective function value (largest for maximization and smallest for the minimization). Objective function line is called an isoprot line (in a maximization problem) or isocost line (in a minimization problem). A constraint is binding if the left -hand side (lhs) and right-hand side (rhs) are equal when the optimal values of the decision variables are substituted into the constraint. Otherwise, such constraint is nonbinding. Unbounded feasible region is a convex feasible region for which the value of at least one variable can assume arbitrarily large values. Goal Programming is often used to choose among alternative optimal solutions.

1.2

Example 1: Giapettos Woodcarving (Winston, p. 49)

Giapettos Woodcarving, Inc., manufactures two types of wooden toys: soldiers and trains. A soldier sells for $27 and uses $10 worth of raw materials. Each soldier that is manufactured increases Giapettos variable labor and overhead costs by $14. A train sells for $21 and uses $9 worth of raw materials. Each train built increases Giapettos variable labor an overhead costs by $10. The manufacture of wooden soldiers and trains requires two types of skilled labor: carpentry and nishing. A soldier requires 2 hours of nishing and 1 hour of carpentry labors. A train requires 1 hour of nishing and 1 hour of carpentry labor. Each week, Giapetto can obtain all the needed raw material but only 100 nishing hours and 80 carpentry hours. Demand for trains is unlimited, but at most 40 soldiers are bought each week. Giapetto wants to maximize weekly prot (revenue - cost). Formulate the mathematical model of Giapettos situation that can be used to maximize Giapettos weekly prot. Solution Decision variables: X1 = # soldiers produced each week X2 = # trains produced each week

max z =

3X1 + 2X2

(prot) (available nishing labor hour) (available carpentry labor hour) (at most 40 soldiers are bought each week) (nonnegative constraint)

s.t. 2X1 + X2 100 X1 + X2 80 X1 40 X1 , X2 0

Figure 1: Giapetto Problem By solving the LP above using graphical method (see Figure ??), the optimal solution is found to be z = 180,with X1 = 20, and X2 = 60. 2

2
2.1

Sensitivity Analysis
Change in Objective Function Coecient

(Basis and optimal solution remains because feasible region remains) Revisit the Giapetto example, we have z = 3X1 +2X2 . The slope can be determined by applying Y = aX +b formula, which is found to be 3 . 2 Let c1 = objective function coecient for X1 variable c2 = objective function coecient for X2 variable For what values of c1 does the current basis remain optimal? Rewrite the objective function: z = c1 X1 + 2X2 . What is the slope of the objective function? -c1 /2 Look at the graph, there are two options: Flatter It cannot be atter than the carpentry constraint otherwise point A will be the new optimal solution. The slope of the carpentry constraint is 1 and since 3 1, by replacing the 2 coecient of the rst variable in the objective function to c1 we get c1 /2 1, which is equal to 2 c1 , where the current basis remains optimal. Shall we choose c1 < 2 then the current basis will no longer be optimal. Steeper If it is steeper than the nishing constraint then the optimum solution will move to point C. The slope of the nishing constraint is 2 and since 3 2, by replacing the coecient of the rst 2 variable in the objective function toc1 we get c1 /2 2, which is equal to c1 4, where the current basis remains optimal. Shall we choose c1 > 4 then the current basis will no longer be optimal.

Thus, the current basis remains optimal for 2 c1 4 e.g. the prot for selling one soldier is determined to be $4. Since $4 is within the interval, the current basis remains optimal and the total prot can be calculated by replacing the $3 to $4 and is found to be 4(20) + 2(60) = $200 (compared to previously $180) *Remark: -2 is smaller than -1 thus when we said steeper it means value will be smaller and vice versa.

For what values of c2 does the current basis remain optimal? (Take Home EXERCISE) Caution: treat X1 as Y-axis and X2 as X-axis, the opposite point of view of the previous exercise. Rewrite the objective function: z = 3X1 + c2 X2 . What is the slope of the objective function? c2 /3 Look at the graph, there are two options: Flatter If it is atter than the nishing constraint then point C will be the new optimal solution. The slope of the nishing constraint is 1 and since 2 1 , by replacing the coecient of the 2 3 2 1 second variable in the objective function to c2 , we get c2 /3 2 , which is equal to 3 c2 , in 2 which the current basis remains optimal. 3 Shall we choose c2 < 2 then the current basis will no longer be optimal. Steeper It cannot be steeper than the carpentry constraint otherwise point A will be the new optimal 2 solution. The slope of the carpentry constraint is 1 and since 3 1, replacing the coecient of the second variable in the objective function to c2 will yield c2 /3 1, which is equal to c2 3 in which the current basis remains optimal. Shall we choose c2 > 3 then the current basis will no longer be optimal. Thus, the current basis remains optimal for
3 2

c2 3

e.g. the prot for selling one train is increased to $3. Since $3 is within the interval, the current basis remains optimal which allows us to calculate the total prot by replacing the $2 to $3 to obtain the total prot of 3(20) + 3(60) = $240 (compared to previously $180)

2.2

Change in RHS Coecient

(Basis remains but optimal solution changes because feasible region changes) Note: changing the RHS coecient will shift the constraint parallel to its current position. Revisit the Giapetto example. Let b1 = rhs of the nishing constraint b2 = rhs of the carpentry constraint For what values of b1 does the current basis remain optimal? The current optimal solution, point A, lies in the intersection between fnishing and carpentry constraints (binding constraints). Thus, in order for the basis to remain optimal, the nishing and carpentry constraints shall remain binding. Look at the graph. There are two options:

Moving upwards As long as the bind between nishing and carpentry constraints remains feasible, the optimal solution will still occur where the nishing and carpentry constraints intersect.The furthest up you can go is up to point D(40, 40). Calculate the rhs of the nishing constraint for point D which is 2(40) + (40) = 120 to nd the upper limit of nishing constraint (b1 120). Moving downwards As long as the nishing and carpentry constraints are binding remains feasible, the optimal solution will still occur where the nishing and carpentry constraints intersect. The furthest down you can go is up to point A(0, 80). Calculate the rhs of the nishing constraint for point A which is 2(0) + (80) = 80 to nd the lower limit of nishing constraint (b1 80). Thus, the current basis remains optimal for 80 b1 120. In other words, we can dene b1 = 100 + , thus 20 20. Note that, the values of the decision variables and the objective function value change! As mentioned previously, the current basis remains optimal shall the value of b1 shifted within the range and it is not dicult to determine how a change in the rhs of a constraint changes the values of the decision variable. For example, let b1 = 100 + . Note that the current optimum solution is in point B in which the two binding constraints are nishing and carpentry constraints. Solve these two binding constraints by replacing the b1 value and we get: Finishing constraint: 2X1 + X2 = 100 + Carpentry constraint:X1 + X2 = 80 This yields X1 = 20 + and X2 = 60 . Thus, an increase in the number of available nishing hours results in a decrease in the number of trains produced and an increase in the number of soldiers produced.

Figure 2: Giapetto Problem

For what values of b2 does the current basis remain optimal? (Take Home EXERCISE) Look at the graph. There are two options: Moving upwards As long as the bind between nishing and carpentry constraints remains feasible, the optimal solution will still occur where the nishing and carpentry constraints intersect.The furthest up you can go is up to point X(0, 100). Calculate the rhs of the carpentry constraint for point X which is 0 + 100 = 100 to nd the upper limit of nishing constraint (b2 100). Moving downwards As long as the nishing and carpentry constraints are binding remains feasible, the optimal solution will still occur where the nishing and carpentry constraints intersect. The furthest down you can go is up to point C(40, 20). Calculate the rhs of the nishing constraint for point C which is 40 + 20 = 60 to nd the lower limit of nishing constraint (b2 60). Thus, the current basis remains optimal for 60 b2 100. In other words, we can dene b2 = 80 + , thus 20 20. Note that, the values of the decision variables and the objective function value change!

2.3

Shadow Price/Dual Price

The shadow price for the i-th constraint of an LP: the amount by which the optimal z-value is improved (increased in a max problem and decreased in a min problem) if the RHS of the i-th constraint is increased by 1. Revisit the Giapetto problem, if (100 + ) nishing hours are available (assuming the current basis remains optimal) the LPs optimal solution is: X1 = 20 + and X2 = 60 (by solving 2X1 + X2 = 100 + and X1 + X2 = 80) 2X1 + X2 X1 + X2 = = 100 + 80

Apply substitution method to obtain:X1 = 20 + , thus X2 = 60 . Thus, the optimal z-value = 3X1 + 2X2 = 180 + which implies a one-unit increase in the number of available nishing hour increases the optimal z-value by $1. If (80 + ) carpentry hours are available (assuming the current basis remains optimal), the LPs optimal solution is: 2X1 + X2 X1 + X2 = = 100 80 +

Apply substitution method to obtain:X1 = 20 , thus X2 = 60 + 2. Thus, the optimal z-value = 3X1 + 2X2 = 180 + which implies a one-unit increase in the number of available carpentry hour increases the optimal z-value by $1. For example, if 95 carpentry hours are available, then b2 = 95 80 = 15, thus the new z-value is given by: New optimal z-value = old optimal z-value + (constraint is shadow price) bi = 180 + (1)15 = 195 Note: for maximization:new optimal z-value = old optimal z-value + (constraint is shadow price) bi minimization: new optimal z-value = old optimal z-value (constraint is shadow price) bi 6

3
3.1

Computer and Sensitivity Analysis


Example 2: Winco Product (Winston, p. 232)

Winco sells four types of products. The resources needed to produce one unit of each and the sales prices are given in the table below. At present, 4600 units of raw material and 5000 labor hours are available. To meet customer demands, exactly 950 total units must be produced. Customers also demand that at least 400 units of product 4 be produced. Formulate an LP that can be used to maximize Wincos sales revenue. Product 1 2 3 $4 Product 2 3 4 $6 Product 3 4 5 $7 Product 4 7 6 $8

RM Labor hours Sales price

Decision variables: Xi = # units of product i manufactured where i = {prod 1, prod 2, prod3, prod 4} max z = 4X1 + 6X2 + 7X3 + 8X4 (revenue) (available raw materials) (available labor hours) (total units must be produced) (minimum units of product 4 to be produced) (nonnegative constraint)

s.t. 2X1 + 3X2 + 4X3 + 7X4 4600 3X1 + 4X2 + 5X3 + 6X4 5000 X1 + X2 + X3 + X4 = 950 X4 400 X1 , X2 , X3 , X4 0

The REDUCED COST portion of the LINDO output gives information about how changing the objective function coecient for a NBV will change the LPs optimal solution. For any NBV, say Xk , the reduced cost is the amount by which the objective function coecient of Xk must be improved before the LP will have an optimal solution with Xk as the BV.

3.2

LINDO Output (Example 2: Winco Product)

See the LINDO output of Winco product on the following page. Suppose ... Winco raises the price of product 2 by 50 per unit. What is the new optimal solution to the LP? Check whether the change is within the allowable increase in the objective coecient range table. Since the change is within the allowable increase (max 0.6667), we can nd the new optimal solution. Thus, the new optimal solution is 6650 (old) + 0.50(400) = 6850 with the same Xs The sales price of product 1 is increased by 60 per unit. What is the new optimal solution? Check whether the change is within the allowable increase in the objective coecient range table. Since the change is within the allowable increase (max 1), we can nd the new optimal solution. Thus, the new optimal solution is 6650 (old) + .60(0) = 6650 with the same Xs The sales price of product 3 is decreased by 60 . What is the new optimal solution to the LP? No longer within the allowable decrease (max 0.50) Thus, we cannot determine the new optimal solution without recalculating the model That a total of 980 units must be produced. Determine the new optimal z-value! RHS of the total units produced is changed from 950 to 980, which is increased by 30 Within the allowable increase (max 50) Thus, the new optimal solution is 6650 (old) + (30)(shadow price or dual price = 3) = 6740 with dierent Xs That 4500 units or raw material are available. What is the new optimal z-value? What if only 4400 units of raw material are available? Available RM is reduced from 4600 to 4500, which is reduced by 100 Within the allowable decrease (max 150) Thus, the new optimal solution is 6650 (old) - 100(1) = 6550

Вам также может понравиться