I have just started to use cplex
library and get stuck in defining IloExprArray
in my code. Here is my snippet of code:
IloExprArray diff;
diff= IloExprArray(iloEnv,list.size());
for( int i=1; i<=10; i++ ) {
for( int j=0; j<9; j++ ) {
double weight = globalObjects->value.at(j)->getmyproperty(i);
diff[j] += ( Ycfg[i][j]*Ycfg[i][j] - 2*weight*Ycfg[i][j] + weight*weight );
//where Ycfg is IloArray<IloNumVarArray>
}
}
But whenever i am running this code it get stuck at diff[j] += ..
line. I also searched on net but didn't get good documentation except of official one. Another question What about if i use IloArray <IloExpr>
instead of IloExprArray
?