Professional Documents
Culture Documents
Chapter 2 (Revisited) Graphical Method Computer Solutions Using LINDO Interpreting Computer Output for LP Section 1 problems
We will learn to use the graphical method to solve small problems and gain insight into some theory behind solving LPs. Nevertheless, we will focus on using a computer software to solve our LP models.
Dr. C. Lightner Fayetteville State University 2
We begin the graphical solution process by graphing each linear constraint of the LP model on the same graph. Refer to the PAR, INC example from Section 1 of your LP notes. Maximize 10 x1 + 9 x2 Subject to:
7/10 x1 + 1 x2 630 1/2 x1 + 5/6 x2 600 1 x1 + 2/3 x2 708 1/10 x1+ 1/4 x2 135 x1 0, x2 0
Dr. C. Lightner Fayetteville State University 3
x2
500
C1
x1
x2
C1
x1
1000
x2
800
C1 C2
600
400
Dr. C. Lightner Fayetteville State University
x1
Determine the Feasible Side of the Line: Using our test point (0,0), we find that x1 =0 and x2 =0 satisfies the above constraint [1 * (0) + 2/3 (0) is less than 708]. Thus all points on the side containing the point (0,0) will satisfy this constraint. We put a red arrow to indicate the feasible side of the line.
10
1000
x2
C1
800
C4
600
C2
400
x1
Dr. C. Lightner Fayetteville State University 11
12
1000
x2
C1
800
C4
600
C2
400
x1
Dr. C. Lightner Fayetteville State University 13
14
1000
C1 C4
x2
800
600
400
x1
15
FEASIBLE REGION
Once the feasible region is drawn, we must determine the point in this region that maximizes (or minimizes) the objective function.
16
1000
x2
800
600
400
x1
18
19
1000
x2
800
600
400
x1
21
22
23
24
1000
x2
Direction of Increase
800
600
400
x1
25
1000
x2
800
Slide 15 shows that the optimal point is formed by the intersection of Constraint 1 and Constraint 3.
600
400
x1
Dr. C. Lightner Fayetteville State University 26
28
29
Computer Solutions
Computer programs designed to solve LP problems are now widely available. Most large LP problems can be solved with just a few minutes of computer time. Small LP problems usually require only a few seconds. We will use LINDO to solve our LP problems.
30
31
32
Reduced Cost
The reduced cost for a decision variable whose value is 0 in the optimal solution is the amount the variable's objective function coefficient would have to improve (increase for maximization problems, decrease for minimization problems) before this variable could assume a positive value. The reduced cost for a decision variable with a positive value is 0. Example Consider the following objective function: Min 2 x1 + 5 x2 + 4 x3 Suppose the optimal value of x1 is zero, with a reduced cost of 1.2. Since this is a minimization problem, this tells us that the current coefficient of x1 , which is 2,
must be decreased by 1.2 in order for the optimal value of x1 to be nonzero. Thus
if the objective function coefficient of x1 was 0.8 (or less), resolving the LP would yield a nonzero value of x1.
Dr. C. Lightner Fayetteville State University 33
SLACK/SURLUS
The slack for less than or equal to constraints is the difference between the right hand side of an equation and the value of the left hand side after substituting the optimal values of the decision variables. The slack represents the amount of unused units of the right hand side resources. The surplus for greater than or equal to constraints is the difference between the right hand side of an equation and the value of the left hand side after substituting the optimal values of the decision variables. The surplus represents the number of units in which the optimal solution causes the constraint to exceed the right hand side lower limit.
34
1)
7667.942
VALUE 539.984253 252.011032 REDUCED COST 0.000000 0.000000
VARIABLE X1 X2
DUAL PRICES
4.374566 0.000000 6.937804 0.000000 0.000000 0.000000 Constraint 2 Constraint 4 X1>=0 Constraint
NO. ITERATIONS=
X2>=0 Constraint
Dr. C. Lightner Fayetteville State University 35
VARIABLE X1 X2
OBJ COEFFICIENT RANGES CURRENT ALLOWABLE ALLOWABLE COEF INCREASE DECREASE 10.000000 3.499325 3.700000 9.000000 5.285714 2.333000
RIGHTHAND SIDE RANGES CURRENT ALLOWABLE RHS INCREASE 630.000000 52.358864 600.000000 INFINITY 708.000000 192.000000 135.000000 INFINITY 0.000000 539.984253 0.000000 252.011032
Dr. C. Lightner Fayetteville State University
ROW 2 3 4 5 6 7
PAR INC
Recall that we rounded values (instead of entering fractions) when entering our model. Therefore, our LINDO output will be slightly different from the actual solution. From the spreadsheet we see that the maximum that PAR can achieve while meeting the constraints is 7667.942 or 7668. The optimal solution is to produce X1 =539.984253 or 540 standard bags, X2=252.011032 or 252 deluxe bags. The reduced costs for both decision variables is zero since their optimal values are nonzero. Row 1 represents the objective function. Row 2 represents constraint 1, row 3 represents constraint 2, row 4 represents constraint 3, etc Refer to the order in which you entered the model into LINDO.
Dr. C. Lightner Fayetteville State University 37
39
SLACK OR SURPLUS 0.000000 6.000000 0.000000 52.000000 28.000000 0.000000 0.000000 28.000000
X1 X2 X3 X4 ROW
2 3 4 5 6 7 8 9
43
VARIABLE X1 X2 X3 X4 X5 X6
46
THE END
See your textbook for more examples and detailed explanations of all topics discussed in these notes.
47