Originally posted by: FANS_Nader_Al_Theeb
Hi, sorry for replaying twice, but I want to show the DEV_cot definition which could also help
IloNumVarArray3 DEV_cot(env,nbComm);
for( c = 0; c < nbComm; c++)
{
DEV_cot[c] = IloNumVarArray2 (env, nbDNodes);
for( o=0; o<nbDNodes; o++)
{
DEV_cot[c][o] = IloNumVarArray (env, nbTimes); } }
// then in defintion of objective, I have
IloExpr cost_Comm(env);
for ( c = 0; c < nbComm; c++){
for( o=0; o<nbDNodes; o++){
for (t=0; t<nbTimes; t++){
std::cout << "p_c = " << p_c[c] << std::endl;
std::cout << "fc = " << fc[c] << std::endl;
std::cout << "DEV_cot = " << DEV_cot[c][o][t] << std::endl;
cost_Comm += ((p_c [c] * DEV_cot[c][o][t]) / fc[c] ); } } }
// and finally I have the following obj
model.add(IloMinimize(env, cost_Comm ));
cost_Comm.end()
Thanks
#CPLEXOptimizers#DecisionOptimization