Hello,
I am working on a project which is basically a transportation problem, and I have to make a dummy dataset for testing the model. But I am not able to make 4 Dimensional Data. Below is the mod file code that I am using. Any type of help is appreciated.
/* Sets */
int I = ...;
int J = ...;
int T = ...;
range Products = 1..I;/* Set of Blood Products */
range Locations = 1..J;/* Set of Locations of the hospitals */
range Time = 1..T;/* Set of Time Periods */
/* Parameters */
int demand[Products][Locations][Time] = ...;/* Demand of the Blood Product i in period t at location j */
int cost[Products][Time] = ...;/* Cost of the Blood Product i in period t */
int hold[Products][Locations][Time] = ...;/* Holding Cost of the Blood Product i at location j in period t */
int Maxcap[Locations][Time] = ...;/*Max capacity of inventory in period t at location j.*/
int MaxT[Time] = ...;/*Max transportation capacity in period t.*/
int Transportcost[Products][Locations][Locations][Time] = ...;/*Per unit transporting cost of Blood Product i from location j to location k in period t.*/
/* Decision Variables */
dvar int+ x[Products][Locations][Time];
dvar int+ t[Products][Locations][Locations][Time];
dvar int+ i[Products][Locations][Time];
------------------------------
Faraz Omar
------------------------------