Originally posted by: Nadia.pmz
Dear Alex
Thank you very much for your quick response.
But I did not really get your meaning So I will explain the problem clearly and I would appreciate if you can help me.
I have a parameter Cijt (i,j, t indices of sizes 4,4 and 3 respectively)
As I cannot enter it in its current form (like two dimensional matrices) in Excel to read it for my code, I am using tuple:
range I=1..4;
range J=1..4;
range T=1..3;
tuple cprime{int I;int J;int T; float c;};
{cprime} cprimedata=...;
float c[I][J][T];
execute{for(var X in cprimedata) c[X.I][X.J][X.T]=X.c;};
dvar float+ Y[I][J][T];
minimize sum(i in I, j in J, t in T) Y[i][j][t]*c[i][j][t];
subject to {
forall(t in T) sum(i in I, j in J) Y[i][j][t]>=4;
}
And in my .dat file I have:
SheetConnection my_sheet("Data.xlsx");
cprimedata from SheetRead (my_sheet, "MM");
Then how should I enter these elements of Cijt in form of cprimedata in Excel? Cijt was of size 48 (4*4*3) and I thought I should enter these 48 elements respectively
#DecisionOptimization#OPLusingCPLEXOptimizer