I have created a 2D array of tuples in OPL CPLEX. I am able to initialize the array directly from the .dat file but when I'm initializing it from an excel sheet, the error " N:int,a:float with 2 dimensions not supported for sheets" pops out. It seems like the feature to initialize a 2D array of tuples from sheet is not there. Is this the case or I'm making some mistake? Also, is there some other way to go about this? I'm attaching the snippet of the code below.
/*mod file*/
int M=...;
range m=1..M;
int B=...;
range b=1..B;
int T=...;
range t=1..T;
tuple data{
int N;
float a;
}
data d[m][b]=...;
dvar boolean x[b][m][t];
/*dat file for direct initialization*/
M=2;
B=3;
T=2;
d=[[<1,1.5>,<2,1>,<7,5.6>],
[<8,2.7>,<0,5.9>,<9,9.2>]];
/*dat file for initialization from excel*/
M=2;
B=3;
T=2;
SheetConnection sheet("B2.xlsx");
d from SheetRead(sheet,"d");
/*Excel sheet*/
Named Range of d in excel
1 1.5
2 1
7 5.6
8 2.7
0 5.9
9 9.2