Originally posted by: CholeYu
I have the answers about the multidimensional data output to excel and tried all of them, but still the error occurs.
Does anybody know why the error occurs? I'll really appreciated your help.
The error is like:" excel: the range is unknown."
.mod
range AllPoint=0..N; //all points in the network
int NK=...; // number of vehicle types
range K=1..NK;
{int} V0=asSet(0..NbCustomers);
dvar boolean x_ij[AllPoint][AllPoint][K];
minimize sum (k in K, i in V0, j in AllPoint: j!=i) Dij[i][j]*x_ij[i][j][k];
subject to {.......}
tuple xTuple{
int node1;
int node2;
int vehicles;
int value;
};
{xTuple} xSet={<i,j,k,x_ij[i][j][k]>|i in AllPoint, j in AllPoint, k in K};
==================
.dat
SheetConnection outputfile("network1.xlsx");
xSet to SheetWrite(outputfile, "xij");
========================================
And in the "network1.xlsx", there is only one sheet, and I named a big range as "xij".
Regards,
Chole
#DecisionOptimization#OPLusingCPLEXOptimizer