In: Advanced Math
Quiz 4
A manufacturer makes and sales four types of products: Product X, Product Y, Product Z, and Product W.
The resources needed to produce one unit of each product and the sales prices are given in the following Table.
| 
 Resource  | 
 Product X  | 
 Product Y  | 
 Product Z  | 
 Product W  | 
| 
 Steel (lbs)  | 
 2  | 
 3  | 
 4  | 
 7  | 
| 
 Hours of Machine Time (hours)  | 
 3  | 
 4  | 
 5  | 
 6  | 
| 
 Sales Price ($)  | 
 4  | 
 6  | 
 7  | 
 8  | 
Formulate an LP that can be used to maximize sales revenue for the manufacturer.
LP Formula
Let Pi be the number of product type i produced by the manufacturer, where i = X, Y, X, and W.
MAXIMIZE 4 PX + 6 PY + 7 PZ + 8 PW
Subject To
2 PX + 3 PY + 4 PZ + 7 PW <= 4600 ! Available Steel
3 PX + 4 PY + 5 PZ + 6 PW <= 5000 ! Available Machine Hours
PX + PY + PZ + PW = 950 ! Total Demand
PW >= 400 ! Product W Demand
PX >=0
PY >=0
PZ >=0
PW >=0
Suppose manufacturer raises the price of Product Y by 50¢ per unit. What is the new optimal solution to the LP?
| 
 Objective Function Value:  | 
|
| 
 PX:  | 
|
| 
 PY:  | 
|
| 
 PZ:  | 
|
| 
 PW:  | 
% by using the below matlab code the change in price of y is not affecting the solution of the linear program
x = optimvar('x','LowerBound',0);
y = optimvar('y','LowerBound',0);
z = optimvar('z','LowerBound',0);
w = optimvar('w','LowerBound',400);
prob = optimproblem('Objective',4*x + 6.5*y+ 7*z +
8*w,'ObjectiveSense','min');
prob.Constraints.c1 = x + y +z + w == 950;
prob.Constraints.c2 = 2*x + 3*y +4*z+7*w<= 4600 ;
prob.Constraints.c3 = 3*x+ 4*y+5*z+6*w <= 5000;
prob.Constraints.c4 = w >= 400;
problem = prob2struct(prob);
[sol,fval,exitflag,output] = linprog(problem);
sol
fval
prob.Variables
the output of matlab is

| Objective Function Value: | 5400 | 
| Px | 550 | 
| Py | 0 | 
| Pz | 0 | 
| Pw | 400 |