Calcite | Level 5

## question about parameter initiate for transportation problem

Hi Everyone,

I followed SAS OR example and made some modification as following. However, there are some error message I have no idea how to sole. Could you give me some suggestions? Thank you!

The error message of the following code are:

_
771
NOTE 771-782: The name 'o_city' hides an outer declaration.
55 {d_city in D_CITY} <transport_cost[o_city,d_city] = col(d_city)>;
______
771
NOTE 771-782: The name 'd_city' hides an outer declaration.

data demand_data;
input d_city \$ Demand;
datalines;
Boston 150
New_York 150
;

data supply_data;
input o_city \$ Supply;
datalines;
Detroit 200
Pittsburgh 100
;

data transport_cost_data;
input o_city \$ Boston New_York;
datalines;
Detroit 30 20
Pittsburgh 40 10
;

proc optmodel;

/* specify parameters */
set <str> O_CITY;
num Supply {O_CITY};
read data supply_data into O_CITY = [o_city] Supply;

print Supply;

set <str> D_CITY;
num Demand {D_CITY};
read data demand_data into D_CITY = [d_city] Demand;

print Demand;

num transport_cost {O_CITY, D_CITY};
{d_city in D_CITY} <transport_cost[o_city,d_city] = col(d_city)>;

/* model description */
var x{O_CITY,D_CITY} >= 0;
min total_cost = sum{i in O_CITY, j in D_CITY}transport_cost[i,j]*x[i,j];
constraint supply_rule {i in O_CITY}: sum{j in D_CITY}x[i,j]=Supply[i];
constraint demand_rule {j in D_CITY}: sum{i in O_CITY}x[i,j]=Demand[j];

/* solve and output */
solve;
print x;