I want to write the following constraint:
Let $z$ be an integer variable such that $0\le z\le M$, and $t$ be a binary variable where $M$ denotes big-M. The logical constraint is as follows:
if $z \leq M$ and $z > 0$ then $t=1$;
if $z=0$ then $t=0$.
Is this $z≤Mt$ sufficient? The $t$ and $z$ variables are not in my objective function but variable $t$ is connected to another variable in the objective function?
Thank you very much, I appreciate your help.