How to multiply two binary decision variables ?
How to multiply a decision variable by a boolean decision variable in CPLEX ?
How to multiply an integer decision variable and a second decision variable ?
How to multiply two float decision variables ?
I recommend the 2nd one:
// suppose we want b * x <= 7
dvar int x in 2..10;
dvar boolean b;
dvar int bx;
// if we use CP we could write directly
// or rely on logical constraints within CPLEX
// (b==1) => (bx==x);
// (b==0) => (bx==0);