Hi, I am trying to solve the problem as shown. sss I used to following code to solve this: PROC OPTMODEL;
/* declare sets and parameters */
set RESOURCES = /W B S/;
set PRODUCTS = /SWEET PROTEIN/;
num selling_price {PRODUCTS} = [1.84 3.45];
num cost {RESOURCES} = [0.2 0.4 0.8];
num availability {RESOURCES} = [100 250 50];
num required {PRODUCTS, RESOURCES} =
[0.5 0.25
0.4 0.5
0.1 0.25
];
/* declare variables */
var NumProd {PRODUCTS} >= 0;
impvar Revenue = sum {p in PRODUCTS}
selling_price[p] * NumProd[p];
impvar AmountUsed {r in RESOURCES} =
sum {p in PRODUCTS} NumProd[p] * required[p,r];
impvar TotalCost = sum {r in RESOURCES}
cost[r] * AmountUsed[r];
/* declare constraints */
con Usage {r in RESOURCES}:
AmountUsed[r] <= availability[r];
/* declare objective */
max NetProfit = Revenue - TotalCost;
/*print model formulation*/
expand;
/*solve the model*/
solve;
/*print parts of the model*/
print NumProd;
quit; but I get wrong answer. I want to answer the following question: • the profit (formatted as a $XXX.XX), • the amount of each type of feed produced, • a resource usage table showing for each resource: the amount used, the amount available, the percentage used (formatted as a percentage), and the shadow price. Please can someone help
... View more