I have a problem. I am programming a mixed integer linear model. $S_{ij}$ $\in$ {$0$,$1$}. And $o_{ij}$ is a non-negative continuous variable. $o_{ij}$ lower bound is zero. where $i$ and $j$ $=1,2,3,...,N$. I want to constrain $S_{ij}$ $=0$ when $o_{ij}$ $\le0$. And when $o_{ij}$ $\ge1$,$S_{ij}$ $=1$.
If $o_{ij}$ $\ge1$ then $S_{ij}$ $=1$.
If $o_{ij}$ $\le0$ then $S_{ij}$ $=0$.
I have two constraint
$M*S_{ij}\ge o_{ij}$ $\forall i,j=1,2,3,...,N$
where $M$ is a large positive constant.
$o_{ij} \ge S_{ij}$ $\forall i,j=1,2,3,...,N$
But it doesn't work. I program in python with gurobi. Solution result show all $S_{ij}$ $=1$ and $o_{ij}=$ M (a large positive constant). Sorry, my English is not good. Please help! Thank you!