I have a problem with the following constraint. There are 2 variables
$p \in [0,1] \subseteq \mathcal{R}$
$\sigma \in [0,1] \subseteq \mathcal{Z}$
The constraint over the variables is
$c - p < \sigma $
where $c \in [0,1) \subseteq \mathcal{R}$ is a constant. If $\nu$ is the assignment function, I want $\nu(\sigma)=1$ if $p \leq c$. Now the problem is, I found out from the Gurobi solver that I am trying to use, it does not allow me to define a strict inequality. Therefore, I need to use an $\epsilon = 10^{-6}$ for instance. But if I use it here,
$c - p \leq \sigma + \epsilon $
the case $c-p = 0$, I can assign 1 to $\sigma$. But $\sigma$ would be incorrect in a narrow interval.
Though I found another way of dealing with this by having a floor function, $\lfloor c - p \rfloor \leq 2\sigma - 1$ but I have not found any way to incorporate this into Gurobi. So how exactly does one solve such problems? Any help is appreciated.
Take the constraint $$p-c\leq\sigma,$$ instead of $c-p\leq\sigma$. With $$c,p \in \left[0,1 \right] \subseteq \mathbb{R},$$ $$\sigma \in \left\{0,1 \right\} \subseteq \mathbb{Z}.$$
If $p\leq c$, then $p-c\leq 0$, so $\sigma$ can be 0 or 1.
If $p > c$, then $p-c > 0$, so $\sigma$ can only be 1.
So if you minimize $\sigma$ in your objective function you will be choosing $\sigma = 1$ iff $p \leq c$.
You also need to be careful that minimizing $\sigma$ doesn't affect the optimal $p$, but this would have been the case with your old constraint as well.