Reputation: 11
I already read the other Topics About writing multidimensional Arrays from CPLEX to Excel, and tried the solution provided, but it did not work.
In my case I have a 4-dimensional variable. So I build a 5-dimensional tuple and want it to be written in Excel. Running CPLEX, I get the error message "The element "Ausgabe" is not defined" and "the index for array "y#0 is out of range: 5". How can I fix the Problem?
.mod
int nbSzenarien = ...;
int nbStandorte = ...;
int nbKunden = ...;
int nbProdukte = ...;
range S = 1..nbSzenarien;
range J = 1..nbStandorte;
range I = 1..nbKunden;
range K = 1..nbProdukte;
dvar float+ y[S][J][I][K];
tuple Verteilung {
int S;
int J;
int I;
int K;
float value;};
{Verteilung} Ausgabe ={<s,i,j,k, y[s,i,j,k]>|s in S, i in I, j in J, k in K};
Thank you!
Upvotes: 1
Views: 550
Reputation: 5940
Make sure that the definition of Ausgabe
is after the the subject to
block.
Upvotes: 1