Originally posted by: rdumeur
Hi,
Is it Reuch - U3 or Reuch*U3 ?
If it is a multiplication, then:
subject to {
forall(h in home, t in time : t >= Ta[h] && t <= Td[h])
Peuch[h,t] <= Reuch[h,t]*U3[h,t];
}
But this won't work with CPLEX which will complain that the problem is not convex.
So using CP you need to use integer variables (you can increase their range to have many values). The problem will look like:
using CP;
int H = 3;
int T = 3;
range home = 1..H;
range time = 1..T;
int Ta[home] = [1,2,3];
int Td[home] = [4,5,6];
dvar int Peuch[home,time];
dvar int Reuch[home,time];
dvar boolean U3[home,time];
// what is the objective?
subject to {
forall(h in home, t in time : t >= Ta[h] && t <= Td[h])
Peuch[h,t] <= Reuch[h,t] * U3[h,t];
}
#CPOptimizer#DecisionOptimization