What error do you get? What looks odd at first glance is this:
tuple LKW{
int i;
int j;
int r;
float values;
};
setof (LKW) MinLKWKap = (<i,j,r> | i in source, j in destination, r in MinTransportkap );
The tuple LKW has 4 elements but you initialize only 3.
Concerning your array initialization, from glancing at your model (I did not check that), I think you need something like that
tuple LKWKapazitaet {
int source;
int destination;
int kap;
float value;
}
{LKWKapazitaet} MaxLKWKapData = ...;
MaxLKWKapData from SheetRead (my_sheet,"'Transportkapazitaet'!F2:I481"); // this in the .dat
This should get the data directly into the .mod. Then, to create the 3D array from that:
float MaxLKWKap[source][destination][MaxTransportkap];
execute {
for (var lkw in MaxLKWKapData) MaxLKWKap[lkw.source][lkw.destination][lkw.kapa] = lkw.value;
}
Similarly for the minimal capacity. Not sure this is the best approach, but I think it works :-)
#CPLEXOptimizers#DecisionOptimization