Originally posted by: SystemAdmin
Dear all,
I am trying to
int transIndx = 0;
// add modified Transformed constrains after getting first feasible solution
for (int i = 0; i < h; i++) {
for (int j = i+1; j < h; j++) {
for (int s = 0; s < l; s++) {
for (int t = s + 1; t < l; t++) {
if ( s >= m[i] - x_DQ*l/h && s <= m[i] + x_DQ*l/h && t >= m[j] - x_DQ*l/h && t <= m[j] + x_DQ*l/h) {
//first expression
IloExpr exprT(env);
exprT = Z
transIndx - X[i][s] - X[j][t];
mod.add( exprT >= -1);
exprT.end();
//another expression
IloExpr exprImP(env);
exprImP = X[i][s] + X[j][t];
mod.add( exprImP <= 1);
exprImP.end();
transIndx++;
}
}
}
}
}
#CPLEXOptimizers#DecisionOptimization