Originally posted by: SystemAdmin
I can think of different ways to implement that.
First:
model.add(A <= 1); // This must always be satisfied.
model.add(IloIfThen(env, y[i][j] == 1, A + x[i][j] <= 1)); // More restrictive if y[i][j] == 1
Second (using a helper variable):
IloNumVar b(env, 0, 1, "b");
model.add(A <= b);
model.add(IloIfThen(env, y[i][j] == 1, b <= 1 - x[i][j]));
Third (turning your problem into a QCP):
model.add(A + y[i][j] * x[i][j] <= 1);
#CPLEXOptimizers#DecisionOptimization