I'm new to SAS and not very familiar with summation notation so learning both. I have the following problem: two products: "Gin" and "Kol" produced in three locations: "Eth" "Tan" "Nig" with variable cost as follows: Gin Kol Eth 21.00 22.50 Tan 22.50 24.50 Nig 23.00 25.50 Constraints are demand for Gin is 550 and for Kol is 450 plant capacity Eth 425 Tan 400 Nig 750 My error ridden code so far is: proc optmodel;
set loc={"Eth", "Tan", "Nig"};
set type={"Gin", "Kol"};
number cost{type, loc}=[21.00 22.50
22.50 24.50
23.00 25.50];
number dem{type}=[550 450];
number cap{loc}=[425 400 750];
number fc{loc}=[1500 2000 3000];
var x{loc, type} >=0;
var y binary;
minimize total_cost = sum{i,j in x, i,j in cost} x[i,j]*cost[i,j];
con capacity: sum{i in loc}x[i,j]<=cap[i];
con demand: sum{j in type}x[i,j]<=dem[j];
solve;
print x;
quit; Any help is greatly appreciated!
... View more