L8. Notes and Problems
L8. Notes and Problems
With no other constraints, maximizing P gives us P = infinity, with x = infinity and y = infinity.
This is called an unbounded problem, where the optimal value tends to +/-infinity.
Unbounded problems usually mean some constraints are missing.
Constraints are the limitations on the values of the decision variables and the objective function.
Decision variables are the unknown values in the optimization, in this case x and y.
Objective function is the equation whose value we are trying to maximize/minimize,
in this case we are maximizing P = 3x + 5y; (3x + 5y) is the objective function.
Answer: x = 2; y = 6; P = 36.
Microsoft Excel 16.0 Sensitivity Report
Worksheet: [DOM105 2024 Session 33.xlsx]Slide 2 ppt 32 problem
Report Created: 4/12/2024 10:14:54 AM
Variable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$C$10 Value: x 2 0 3 4.5 3
$D$10 Value: y 6 0 5 1E+030 3
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$F$14:$F$16 <= $H$14:$H$16
$F$14 = Values 2 0 4 1E+030 2
$F$15 = Values 6 3 6 3 3
$F$16 = Values 18 1 18 6 6
For the x <= 4 constraint, shadow price 0, meaning chaning it won't change the value of P = 3x + 5y.
Allowable increase 1E+30 is effectively infinite, which means constraint can be increased from x<=4 to any greater value
(up to x <= infinity) and the shadow price will stay the same.
Allowable decrease of 2, means that shadow price is 0 only down to value of x <= (4-2) = 2. If it falls below 2, shadow
price is no longer 0 and the problem needs to be re-solved.
In summary, the value of P will not change from 36 (shadow price = 0) as long as constraint is from x<=2 to x<=infinity
For the y<=6 constraint, shadow price is 3 allowable increase 3, allowable decerase 3.
This means P will change by 3*(amount of change) for constraint values y<=3 to y<=9.
Eg: If constraint goes from y<=6 to y<=7, P goes from 36 to 36+3*(7-6) = 39
Eg: If the constraint goes from y<=6 to y<=4.5, P goes from 36 to 36 + 3*(4.5-6) = 36 - 4.5 = 31.5
For the 3x+2y<=18 constraint, shadow price is 1, allowable increase 6, allowable decerase 6.
This means P will change by 1*(amount of change) for constraint values 3x+2y<=12 to 24.
Eg: If constraint goes to 3x+2y <= 20.5, P will become 36+1*(20.5-18) = 38.5
Important note: Shadow price is only valid for changes to a single constraint. If more than one constraint is being
changed, the problem needs to be re-solved after making the changes.
rom x<=4 to any greater value
Variables x y
x y = Values
Final Value
Objective Function 3 =
Constraints =
=
=
from L8 Slide 2)
<= RHS
<=
<=
<=
Example problem from L8 ppt, slide 6
l1, l2 >= 30; r1,r2 >= 20; (At least 30 labor and 20 RM in all products)
200 <= l1 + l2 <= 300; (total labor between 200 and 300)
r1 <= 0.7*l1; r2 <= 0.7*l2; (RM <= 0.7*labor for each product)
---> r1 - 0.7*l1 <= 0; r2 - 0.7*l2 <= 0;
Variables: l1 l2 r1 r2
Values: 270 30 129 21
Values
Objective: Maximize 6 3 5 7 -95 = 2407
1 1 0 0 = 300 <=
0 0 1 1 = 150 <=
-0.7 0 1 0 = -60 <=
0 -0.7 0 1 = 0 <=
RHS
30
30
20
20
200
120
300
150
0
0
l1 l2 r1 r2 constant =
Constraints 1 1 0 0 =
0 0 1 1 =
-0.7 0 1 0 =
0 -0.7 0 1 =
1 0 0 0 =
0 1 0 0 =
0 0 1 0 =
0 0 0 1 =
1 1 0 0 =
0 0 1 1 =
Values <= RHS
2502
270 >= 30
30 >= 30
129 >= 20
21 >= 20
300 >= 200
150 >= 120
Microsoft Excel 16.93 Sensitivity Report
Worksheet: [L8. Notes and Problems.xlsx]Sheet4
Report Created: 4/20/25 5:23:00 PM
Variable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$16 Final Value L1 270 0 6 1E+030 1.6
$C$16 Final Value L2 30 0 3 1.6 1E+030
$D$16 Final Value R1 129 0 5 2 2.2857142857
$E$16 Final Value R2 21 0 7 2.2857142857 2
$F$16 Final Value R1+R2>=120 0 -95 -95 95 1E+030
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$H$20 = Values 270 0 30 240 1E+030
$H$21 = Values 30 -1.6 30 155.71428571 1.4285714286
$H$22 = Values 129 0 20 109 1E+030
$H$23 = Values 21 0 20 1 1E+030
$H$24 = Values 300 0 200 100 1E+030
$H$25 = Values 150 0 120 30 1E+030
$H$26 = Values 300 6 300 1E+030 85.714285714
$H$27 = Values 150 5 150 60 30
$H$28 = Values -60 0 0 1E+030 60
$H$29 = Values -3.552714E-15 2 0 109 1
OF
L1>30 L1+L2<=300
L2>30 R1+R2<=150
R1>20 R1-0.7L1<=0
R2>20 R2-0.7L2<=0
L1+L2>=200
R1+R2>=120
L1 L2 R1 R2 =
Constraints 1 0 0 0 =
0 1 0 0 =
0 0 1 0 =
0 0 0 1 =
1 1 0 0 =
0 0 1 1 =
1 1 0 0 =
0 0 1 1 =
-0.7 0 1 0 =
0 -0.7 0 1 =
6L1+3L2+5r1+7R2-95
>=
2502
270 >= 30
30 >= 30
129 >= 20
21 >= 20
300 >= 200
150 >= 120
300 <= 300
150 <= 150
-60 <= 0
0 <= 0
Cost cij: market 1 market 2 market 3 market 4 Supply Transport matrix xij:
plant A 2 4 1 3 300 200 0
plant B 8 2 6 5 300 0 200
plant C 6 1 4 2 200 0 0
Note: Transport problems need both upper and lower limits on the variable values
In this case, supply acts as the upper limit and demand as the lower limit.
In other problems, the opposite can be true, or an entirely different set of values
can also be used.
Row total
100 0 300
100 0 300
100 100 200
300 100
Cost cij: market 1 market 2 market 3 market 4 Supply
plant A 2 4 1 3 300
plant B 8 2 6 5 300
plant C 6 1 4 2 200
Demand 200 200 300 100 800
Cost cij: market 1 market 2 market 3 market 4 Supply Value Sign Supply Real
plant A 200 0 100 0 300 <= 300
plant B 0 200 100 0 300 300
plant C 0 0 100 100 200 200
Demand Valu 200 200 300 100
Sign =
Demand Real 200 200 300 100
OF= 2100
each market must receive 70% of their demand
cannot receive more than their demand
use all the supply
OF= 105380
Supply Real
700
1000
700
800
Cost cij: market 1 market 2 market 3 market 4 Supply
plant A 2 4 1 3 300
plant B 8 2 6 5 300
plant C 6 1 4 2 200
Demand 200 200 300 100 800
OF= 800
Microsoft Excel 16.93 Answer Report
Worksheet: [L8. Notes and Problems.xlsx]Assignment Problem (slide 12)
Report Created: 4/20/25 5:26:58 PM
Result: Solver found a solution. All constraints and optimality conditions are satisfied.
Solver Engine
Engine: Simplex LP
Solution Time: 80.233 Seconds.
Iterations: 16 Subproblems: 0
Solver Options
Max Time Unlimited, Iterations Unlimited, Precision 0.000001, Use Automatic Scaling
Max Subproblems Unlimited, Max Integer Sols Unlimited, Integer Tolerance 1%, Assume NonNegative
Variable Cells
Cell Name Original Value Final Value Integer
$H$5 Assignment matrix xij: 0 0 Contin
$I$5 0 0 Contin
$J$5 1 1 Contin
$K$5 0 0 Contin
$L$5 0 0 Contin
$H$6 Assignment matrix xij: 0 0 Contin
$I$6 0 0 Contin
$J$6 0 0 Contin
$K$6 1 1 Contin
$L$6 0 0 Contin
$H$7 Assignment matrix xij: 0 0 Contin
$I$7 0 0 Contin
$J$7 0 0 Contin
$K$7 0 0 Contin
$L$7 1 1 Contin
$H$8 Assignment matrix xij: 1 1 Contin
$I$8 0 0 Contin
$J$8 0 0 Contin
$K$8 0 0 Contin
$L$8 0 0 Contin
$H$9 Assignment matrix xij: 0 0 Contin
$I$9 1 1 Contin
$J$9 0 0 Contin
$K$9 0 0 Contin
$L$9 0 0 Contin
Constraints
Cell Name Cell Value Formula Status Slack
$H$11 Col total Assignment matrix xij: 1 $H$11=1 Binding 0
$I$11 Col total 1 $I$11=1 Binding 0
$J$11 Col total 1 $J$11=1 Binding 0
$K$11 Col total 1 $K$11=1 Binding 0
$L$11 Col total 1 $L$11=1 Binding 0
$N$5 Row total 1 $N$5=1 Binding 0
$N$6 Row total 1 $N$6=1 Binding 0
$N$7 Row total 1 $N$7=1 Binding 0
$N$8 Row total 1 $N$8=1 Binding 0
$N$9 Row total 1 $N$9=1 Binding 0
Assignment problem example
(Example from L8 slide 12)
Five tasks to be assigned to 5 workers, minimize total cost.
Cost cij: A B C D E Assignment matrix xij:
1 10 4 6 10 12 0 0 1
2 11 7 7 9 14 0 0 0
3 13 8 12 14 15 0 0 0
4 14 16 13 17 17 1 0 0
5 17 11 17 20 19 0 1 0
Col total 1 1 1
1 1
Cost cij: A B C D E
1 10 4 6 10 12
2 11 7 7 9 14
3 13 8 12 14 15
4 14 16 13 17 17
5 17 11 17 20 19
OF= 55
Supply Real
Cost cij: A B C D E
1 10 4 6 10 12
2 11 7 7 9 14
3 13 8 12 14 15
4 14 16 13 17 17
5 17 11 17 20 19
OF= 55
Assignment problem example
L8 ppt slide 13
3 workers, 4 jobs, only one job per worker allowed, maximize profit.
Profit pij: J1 J2 J3 J4 Assignments xij:
W1 67 58 90 75 0 0 0 1
W2 58 88 89 56 0 0 1 0
W3 74 99 80 72 0 1 0 0
Col total 0 1 1 1
263