# Why are these two constraint equations not equivalent?

I've made a CP Model of an hospital in ILOG CPLEX and I want to test the performance of the CPLEX version of it.

In my CP model, I have the following constraint :

forall(c in Chirurgiens, o1 in Operations, o2 in Operations : o1 != o2){
(zeta[o1][o2]==1 ) => psi[o1]+TP[o1]+TC[o1]+ max_time >= psi[o2]+TP[o2];}


where zeta is a boolean and all other variable are Integers.

I've tried to linearize it using a big M and it gave me the following thing :

   forall(c in Chirurgiens, o1 in Operations, o2 in Operations : o1 != o2){
(psi[o1]+TP[o1]+TC[o1]+ max_time) >= psi[o2]+TP[o2] -M*(1-zeta[o1,o2]);}


These two constraint gave me the same result.

But now, I was cleaning my code a little bit and transformed this constraint into the following one :

forall(c in Chirurgiens, o1 in Operations, o2 in Operations : o1 != o2){
(psi[o1]+TP[o1]+TC[o1]+ max_time) - psi[o2]+TP[o2] >= 0 - M*(1-zeta[o1,o2]);}


But now this give me a different result

The only thing that I've changed is that I've moved the psi[o2]+TP[o2] on the other side of the inequality. Isn't this supposed to be a legal move in math ?

• Does the sign for TP[o2] is negative instead of positive? Commented Mar 5 at 9:52
• omg, the whole problem was that i forgot how to do basic maths ! Thanks for you answer, i was stuck on this for hours ! Commented Mar 5 at 10:08