Originally posted by: ShaCplex
Hi Alex,
But here is my code which is not working:
.mod file
tuple TRIPS{
int tripID;
int depT;
int arrT;
};
{TRIPS} trips={<1,1,1>,<2,2,2>};
tuple AIRCRAFTS{
int aircraftID;
int MGTime;
}
{AIRCRAFTS} aircrafts={<1,1>,<2,2>,<3,3>};
dvar boolean X [trips][trips][aircrafts];
float cost [trips][trips][aircrafts]=...;
dexpr float TotalCost=sum(t1 in trips,t2 in trips, a in aircrafts) cost[t1][t2][a] * X [t1][t2][a];
/*subject to
{
forall(a1 in trips,a2 in trips, b in aircrafts) X[a1][a2][b]==a1.number*a2.number*b.Time mod 2;
}
*/
tuple someTuple{
int a;
int b;
int c;
float cost;
};
{someTuple} someSet = {<i.tripID,i2.tripID,j.aircraftID,cost[i][i2][j]> | i in trips, i2 in trips, j in aircrafts};
.dat
SheetConnection sheet("excel.xlsx");
cost from SheetRead(sheet,"H1:H8")
someSet to SheetWrite(sheet,"J1:K8");
It fails with the following error:
Array data element "cost" of type float with 3 dimensions not supported for sheets.
Kindly assist...
I want to provide the cost explicitly. there is no formula..
#DecisionOptimization#OPLusingCPLEXOptimizer