0% found this document useful (0 votes)
1 views

L8. Notes and Problems

The document outlines a linear programming problem involving two products, X and Y, with a profit function of P = 3x + 5y. It details the constraints on production and labor, leading to a solution of x = 2, y = 6, and a maximum profit of P = 36. Additionally, it discusses the sensitivity analysis of the constraints and their impact on the profit.

Uploaded by

srishparnami16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

L8. Notes and Problems

The document outlines a linear programming problem involving two products, X and Y, with a profit function of P = 3x + 5y. It details the constraints on production and labor, leading to a solution of x = 2, y = 6, and a maximum profit of P = 36. Additionally, it discusses the sensitivity analysis of the constraints and their impact on the profit.

Uploaded by

srishparnami16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Supposing a company has 2 products X and Y.

The amount of X made is x, and amount of Y made is y.


Each unit of X gives profit 3, and each unit of Y gives profit 5.

So, total profit we can write this mathematically as Profit P = 3x + 5y

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.

Constraints for this problem (from slide 2 of ppt 32)


x <= 4; (max capacity for making X is 4)
2y <= 12 --- > y <= 6; (max for making Y is 6)
3x + 2y <= 18; (Each X takes 3 workers, each Y takes 2 workers, 18 workers max)
x, y >= 0; (negative production not possible)

Setting up the problem for Solver:


Variables: x y
Value: 2 6
Values
Objective Max P= 3 5= 36
Constraints: RHS
1 0= 2 <= 4
0 1= 6 <= 6
3 2= 18 <= 18

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

2. If it falls below 2, shadow

int is from x<=2 to x<=infinity

an one constraint is being


Objective is P = 3x + 5y (Example from L8 Slide 2)
Constraints for this problem (from slide 2 of ppt 32)
x <= 4;
2y <= 12 --- > y <= 6;
3x + 2y <= 18;
x, y >= 0;

Setting up the problem for Solver:


Variables: x y
Value:
Values
Objective Max P= 3 5= 0
Constraints: RHS
1 0= 0 <= 4
0 1= 0 <= 6
3 2= 0 <= 18
Objective is P = 3x + 5y (Example from L8 Slide 2)
Constraints for this problem (from slide 2 of ppt 32)
x <= 4;
2y <= 12 --- > y <= 6;
3x + 2y <= 18;
x, y >= 0;

Variables x y

x y = Values

Final Value

Objective Function 3 =

Constraints =
=
=
from L8 Slide 2)

<= RHS

<=
<=
<=
Example problem from L8 ppt, slide 6

Product 1 earnings: 6l1 + 5r1 - 35


Product 2 earnings: 3l2 + 7r2 - 60

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)

120 <= r1 + r2 <= 150; (total RM betwen 120 and 150)

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;

Maximize total earnings = 6l1 + 3l2 + 5r1 + 7r2 - 95

Variables: l1 l2 r1 r2
Values: 270 30 129 21
Values
Objective: Maximize 6 3 5 7 -95 = 2407

Constraints: 1 0 0 0 = 270 >=


0 1 0 0 = 30 >=
0 0 1 0 = 129 >=
0 0 0 1 = 21 >=
1 1 0 0 = 300 >=
0 0 1 1 = 150 >=

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 =

Final Value 270 30 129 21

Objective Function 6 3 5 7 -95 =

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

300 <= 300


150 <= 150
-60 <= 0
0 <= 0

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 =

Final Value 270 30 129 21 0

Objective Function 6 3 5 7 -95 =

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

Values <= RHS

>=
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

Demand 200 200 300 100 Col total 200 200


Note: Total demand <= total supply so all demand can be met
(Example from L8 slide 8) Objective: Minimize total cost
c11 * x11 + c12*x12 + .... + c34*x34 = sumproduct(cij,xij) = 2100
Constraints:
No plant can send more than it's supply limit
----> Row totals of xij <= Supply
Demand for every market must be met
----> Col totals of xij = Demand
Negative transport cannot exist
----> xij >= 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

Cost cij: 1 2 3 4 Supply


A 30 45 44 33 700
B 31 49 37 30 1000
C 36 38 44 35 700
D 49 30 44 50 800
Demand 800 1000 1200 1000

Cost cij: market 1 market 2 market 3 market 4 Supply Value Sign


plant A 700 0 0 0 700 =
plant B 0 0 840 160 1000
plant C 0 0 0 700 700
plant D 0 800 0 0 800
Demand Value 700 800 840 860
Sign <=
Demand Real 800 1000 1200 1000
Sign >=
Demand 70% 560 700 840 700

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

Cost cij: market 1 market 2 market 3 market 4 Supply Sign Supply


plant A 0 100 200 0 300 <= 300
plant B 200 100 0 0 300 <= 300
plant C 0 0 100 100 200 <= 200
Demand 200 200 300 100
Sign = = = =
Demand 200 200 300 100

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

Objective Cell (Min)


Cell Name Original Value Final Value
$G$13 Mimize total cost = sumproduct(cij,xij) = Col tota 55 55

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

Mimize total cost = sumproduct(cij,xij) = 55


Constraints:
Row totals = 1; Each task gets only one worker
Col totals = 1; Each worker only gets one task
xij >= 0; No negative assignment
Row total
0 0 1
1 0 1
0 1 1
` 0 1
0 0 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

xij matrix: 1 2 3 4 5 Supply Value Sign


A 0 0 1 0 0 1 <=
B 0 0 0 1 0 1
C 0 0 0 0 1 1
D 1 0 0 0 0 1
E 0 1 0 0 0 1
Demand Valu 1 1 1 1 1
Sign =
Demand Real

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

Cost cij: A B C D E TOTAL


1 0 0 1 0 0 1
2 0 0 0 1 0 1
3 0 0 0 0 1 1
4 1 0 0 0 0 1
5 0 1 0 0 0 1
TOTAL 1 1 1 1 1

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

Maximinze total profit = sumproduct(pij,xij) = 263


Constraints:
Row totals = 1; Each worker gets 1 job
Col totals <= 1; Jobs are more than workers, so not all jobs get workers
xij >= 0; No negative assignment
Row total
1
1
1
Profit pij: J1 J2 J3 J4
W1 67 58 90 75
W2 58 88 89 56
W3 74 99 80 72

Profit pij: J1 J2 J3 J4 Jobs


W1 0 0 0 1 1
W2 0 0 1 0 1
W3 0 1 0 0 1
Workers 0 1 1 1

263

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy