In reply to Moein75:
In 4th condition you have provided e1[1] == 0
Whereas in 3rd condition you have provided if s1 == 1 then e1[1] == 1
So it will consider 4th condition and generate e1[1] = 0 and accordingly it will generate s1 =0 and s2 =1
That’s why 3rd condition is ignored…
you can remove 4th condition in the constraint and check again