Originally posted by: SystemAdmin
[ArushGadkar said:]
Hello,
I have a two dimensional variable array P of size [5][6]declared as :
typedef IloArray<IloNumVarArray> NumVarMatrix;
IloInt Nodes = 5;
IloInt Slots = 6;
// Initialization
NumVarMatrix P(env,Nodes);
for(a = 0 ; a < Nodes ; a++)<br />{
P[a] = IloNumVarArray(env,Slots,0,1,ILOINT);
}
This works fine .....
Now if i have a three dimensional array P[3][3][10] defined as :
typedef IloArray<IloArray<IloNumVarArray> > NumVarMatrix;
IloInt N = 3;
IloInt K = 10;
// Initialization
NumVarMatrix P(env,N);
for(a = 0 ; a < N ; a++)<br />{
for(b= 0 ; b < N ; b++)<br /> {
P[a][b] = IloNumVarArray(env,K,0,1,ILOINT);
}
}
This is giving me a ERROR.
Can you tell me the correct way of initializing this [3][3][10]
I have just three constraints which i think are correctly put in. I think It is the way i am declaring the P matrix.
Your help is greatly appreciated.
Arush.
#CPLEXOptimizers#DecisionOptimization