Topic
No replies
FANS_Nader_Al_Theeb
FANS_Nader_Al_Theeb
1 Post
ACCEPTED ANSWER

Pinned topic Using expressions

‏2012-04-01T01:15:16Z |
Hi

I'm trying to code a program in CPLEX - c++:

I used expressions and for loops to find a summation like the follwing
IloExpr costSum_Comm(env);

for (int c=0; c<nbComm; c++){
for(int o=0; o<nbNodes; o++){
//for (k=0; j<nbTimes){
for (int t=0; t<curr_t; t++){
*costSum_Comm = costSum_Comm + ((p_c [c] * DEV_cot[c][o][t]) / fc[c] );*
}
}
}
but always I got the following error:

*error: no match for ‘operator*’ in ‘p_c.IloNumArray::operator](((IloInt)c)) * ((IloArray<IloNumVarArray>*)((IloArray<IloArray<IloNumVarArray> >)DEV_cot.IloArray<X>::operator[ with X = IloArray<IloArray<IloNumVarArray> >](((long int)c)))->IloArray<X>::operator[ with X = IloArray<IloNumVarArray>](((long int)o)))->IloArray<X>::operator[ with X = IloNumVarArray(((long int)t))

Any Help

Thanks