•
•
•
Sect.
2
LP1
3
LP2
4
LP2_Tab
5
LP3
6
LP3_Tab
7
Bland
Unbound
8
TwoPhase
9
Dual_Simplex
10
Matrix
11
Matrix1
TeachLP1
TeachLP2
Page 1
Instructions
TeachLP3
Page 2
Instructions
Chapter 3 Examples
Operations Research Models and Methods
Paul A. Jensen and Jonathan F. Bard
http://www.me.utexas.edu/~jensen/ORMM/computation/unit/mp_add/index.html
http://www.me.utexas.edu/~jensen/ORMM/methods/unit/linear/subunits/teach/index.html
Instructions
To use this workbook, you must first load the Math Programming add-in. See the Excel help file
topic "About add-ins" before continuing.
Some problems use the Teach LP add-in. See the Excel help file topic "About add-ins" before
continuing.
For cases using the LP/IP Solver you must first load the Jensen LP/IP Solver.
This workbook comes without control buttons. To make the buttons choose Add Buttons from
the Math Programming menu. This adds buttons to all the worksheets.
When you are moving a workbook to another computer, use the Remove Buttons command.
This simplifies opening the workbook on the other computer. Buttons are removed from all
worksheets.
This workbook comes without control buttons. To make the buttons choose Relink Buttons from
the Teach LP menu. This adds buttons to all Teach LP worksheets.
Page 3
Instructions
Page 4
Instructions
Add-ins Used
Math Programming-Linear-LP/IP Solver
Teach LP-Tableau
Teach LP-Tableau
Teach LP-Tableau
Teach LP-Tableau
Teach LP-Tableau
Teach LP-Tableau
Teach LP-Revised
Page 5
Instructions
Teach LP-Interior
Page 6
Linear Model Name: LP1 Solver: Jensen LP/IP Ph. 1 Iter.
1 Type: LP1 Type: Linear Total Iter.
0 Change Goal: Max Sens.: No Comp. Time
1 Objective: 20 Side: No
1 Solve
0 Variables 1 2 3
100 Vary Name: x+ y+ x-
100 Values: 0 0 10
0 Lower Bounds:
Change Relation 0 0 0
60 Upper Bounds: 1E+10 1E+10 1E+10
Primal
Ratio
---
20
---
---
Teach Linear Programming
Name: Bland Enter LP data in the equality form and press the button
Type: Tableau_Primal
Variables: 7
Constraints: 3 Z
Artificials: 0 LP 1 2 3 4 5 6 7
Option: Self Data X1 X2 X3 X4 X5 X6 X7
x 0 0 0 0 0 0 1
c 10 -57 -9 -24 0 0 0 RHS
1 C1 0.5 -5.5 -2.5 9 1 0 0 0
2 C2 0.5 -1.5 -0.5 1 0 1 0 0
3 C3 1 0 0 0 0 0 1 1
Right Primal
Side Ratio
0 ---
0 ---
0 0
1 ---
Teach Linear Programming
Name:Unbound Enter LP data in the equality form and press the button
Type: Tableau_Primal
Variables: 6 c1 0 0 0 0 0 -1
Constraints: 3 Z
Artificials: 1 LP 1 2 3 4 5 6
Option: Demo Data X1 X2 X3 X4 X5 art1
x 8.5 5 0 34 0 0
c 6 3 0 0 0 -9999 RHS
1 C1 0 1 1 0 0 0 5
2 C2 -4 3 0 1 0 0 15
3 C3 2 -3 0 0 -1 1 2
Primal
Ratio
---
---
---
---
Teach Linear Programming
Name:TwoPhase Enter LP data in the equality form and press the button
Type: Tableau_Primal
Variables: 5 c1 0 0 0 -1 -1
Constraints: 2 Z
Artificials: 2 LP 1 2 3 4 5
Option: Demo Data X1 X2 X3 art1 art2
x 0 3.75 0.75 0 0
c -7 3 0 -9999 -9999 RHS
1 C1 4 8 0 1 0 30
2 C2 -2 1 -1 0 1 3
1 2 3 4 5 6
X1 X2 X3 X4 X5 X6
Red. Cost 0 -0.083 0 1 0 0.167
inimum Reduced Cost -0.083
Column 2
Variable at Minimum X2
1 3 5
Basic Variables X1 X3 X5 C1 C2 C3
cB 2 3 0 π 1 0 0.167
C1 2 2 0 Basis X1 0.5 0 -0.167
C2 3 0 1 Inverse X3 0 0 0.167
C3 0 6 0 X5 -1.5 1 0.5
Minimum Ratio 6
Row 1
Basic Variable 1
Name X1
Teach Linear Programming
Name:Matrix1 Enter LP data in the equality form and press the button
Type: Revised
Variables: 6
Constraints: 3 Z
Artificials: 0 LP 1 2 3 4 5 6
Option: Demo Data X1 X2 X3 X4 X5 X6 Basic Variables
x 0 6 0.5 0 0 0
c 2 1.25 3 0 0 0 RHS Basis
1 C1 2 1 2 1 0 0 7
2 C2 3 1 0 0 1 0 6
3 C3 0 1 6 0 0 1 9
1 2 3 4 5 6
X1 X2 X3 X4 X5 X6
Red. Cost 0.25 0 0 1.125 0 0.125
inimum Reduced Cost 0
Column 2
Variable at Minimum X2
2 5 3
Basic Variables X2 X5 X3 C1 C2 C3
cB 1.25 0 3 π 1.125 0 0.125
C1 1 0 2 Basis X2 1.5 0 -0.5
C2 1 1 0 Inverse X5 -1.5 1 0.5
C3 1 0 6 X3 -0.25 0 0.25
Minimum Ratio 6
Row 1
Basic Variable 2
Name X2
Teach Linear Programming
Name:TeachLP1 Enter LP data in the equality form and press the button
Type: Tableau_Primal
Variables: 9 c1 0 0 0 0 0 0 0 0 -1
Constraints: 3 Z
Artificials: 1 LP 1 2 3 4 5 6 7 8 9
Option: Demo Data X1 X2 X3 X4 X5 X6 X7 X8 art1
x 0 1.185 0 0 2.765 0 0 8.824 0
c 14 3 7 16 19 1 0 0 -9999
1 C1 15 0 18 16 17 2 0 0 1
2 C2 14 14 15 10 11 3 1 0 0
3 C3 18 0 6 16 12 4 0 1 0
RHS
47
47
42
8 9 Right Primal
X8 art1 Side Ratio
0 10000 56.08 ---
0 0.059 2.765 ---
0 -0.046 1.185 1.185
1 -0.706 8.824 ---
Teach Linear Programming
Name: TeachLP2 Enter LP data in the equality form and press the button
Type: Revised
Variables: 9 c1 0 0 0 0 0 0 0 0 -1
Constraints: 3 Z
Artificials: 1 LP 1 2 3 4 5 6 7 8 9
Option: Demo Data X1 X2 X3 X4 X5 X6 X7 X8 art1
x 0 1.185 0 0 2.765 0 0 8.824 0
c 14 3 7 16 19 1 0 0 -9999
1 C1 15 0 18 16 17 2 0 0 1
2 C2 14 14 15 10 11 3 1 0 0
3 C3 18 0 6 16 12 4 0 1 0
1 2 3 4 5 6 7 8 9
X1 X2 X3 X4 X5 X6 X7 X8 art1
Red. Cost 3.685 0 13.84 1.807 0 1.601 0.214 0 10000
inimum Reduced Cost 0
Column 2
Variable at Minimum X2
5 2 8
Basic Variables X5 X2 X8 C1 C2 C3
cB 19 3 0 π 0.979 0.214 0
RHS Basis C1 17 0 0 Basis X5 0.059 0 0
47 C2 11 14 0 Inverse X2 -0.05 0.071 0
47 C3 12 0 1 X8 -0.71 0 1
42
Initial Solution Pi
X Z 1 2 3
1 1 33 1 1 1
2 1 11
3 1 32
4 1 26
5 1 21
6 1 8
7 1 1
8 1 1
Current Solution Pi
X Z 1 2 3
1 6E-06 3.685 0.979 0.214 5E-06
2 1.185 4E-05
3 2E-06 13.84 Iter.: 11
4 1E-05 1.807 Gap 0 Press to iterate
5 2.765 2E-05 Mu 4E-06
6 1E-05 1.601 Press to restart
7 0 0.214
8 8.823 5E-06
Feasibility Vectors
Primal Dual Comp. Slack.
1 3E-09 1 0 1 -2E-05
2 3E-09 2 -6E-17 2 -5E-05
3 2E-09 3 0 3 -2E-05
4 0 4 -2E-05
5 2E-16 5 -5E-05
6 0 6 -2E-05
7 0 7 -2E-05
8 0 8 -4E-05
Next Solution Pi
X Z 1 2 3
1 1E-06 3.685 0.979 0.214 1E-06
2 1.185 9E-06
3 3E-07 13.84
4 3E-06 1.807 Gap 5E-05
5 2.765 4E-06
6 3E-06 1.601
7 2E-05 0.214
8 8.824 1E-06
X_Diag X 1 X2 X3 X4 X5 X6 X7 X8 Z_Inv Z 1
X1 6E-06 0 0 0 0 0 0 0 Z1 0.271
X2 0 1.185 0 0 0 0 0 0 Z2 0
X3 0 0 2E-06 0 0 0 0 0 Z3 0
X4 0 0 0 1E-05 0 0 0 0 Z4 0
X5 0 0 0 0 2.765 0 0 0 Z5 0
X6 0 0 0 0 0 1E-05 0 0 Z6 0
X7 0 0 0 0 0 0 0 0 Z7 0
X8 0 0 0 0 0 0 0 8.823 Z8 0
Inv(MMULT(A,MMULT(MMULT(Z_Inv,Xdiag),TRANSPOSE(A)) MMULT(Z_Inv,Xdiag),dD
1 2 3
1 4E-07 ### ### 0
2 -1E-07 2E-07 ### ###
3 -4E-07 ### 6E-07 0
0
3E-11
0
0
0
Dual Solution
1 2 3
1 1 1
0.557 0.644 0.554
0.644 0.343 0.427
0.9 0.3 0.085
0.956 0.255 0.017
0.972 0.224 0.006
0.977 0.216 0.002
0.979 0.215 0
0.979 0.214 0
0.979 0.214 2E-05
0.979 0.214 5E-06
Z2 Z3 Z4 Z5 Z6 Z7 Z8 XZe Z_Inv*e e
0 0 0 0 0 0 0 2E-05 0.271 1
### 0 0 0 0 0 0 5E-05 ### 1
0 0.072 0 0 0 0 0 2E-05 0.072 1
0 0 0.553 0 0 0 0 2E-05 0.553 1
0 0 0 ### 0 0 0 5E-05 ### 1
0 0 0 0 0.625 0 0 2E-05 0.625 1
0 0 0 0 0 4.667 0 2E-05 4.667 1
0 0 0 0 0 0 ### 5E-05 ### 1
-43
-43
-38