I am building a small model that trades water and buys water. For simplicity reasons, I am only discussing the relevant constraints: $\sf varWaterIn_h$ is the amount in litres of water bought per hour, while $\sf varWaterOut_h$ is the amount in litres of water sold per hour. We have a water price defined as $\sf parWaterPrice$ and the prefixes var and par stand for variables and parameters. In addition $M$ stands for a very large number, where we can assume it's sufficiently large. $\sf varFlagIn$ and $\sf varFlagOut$ are binary constraints.
To prohibit water buying and water selling at the same time, we have the following constraints for every hour:
\begin{align}{\sf varWaterIn_h} &\leq M\cdot\sf varFlagIn_h\\{\sf varWaterOut_h} &\leq M \cdot \sf varFlagOut_h\\{\sf varFlagIn_h + varFlagOut_h} &\leq 1\end{align}
In addition there is also somewhere a constraint that specify that all water inflows and outflows needs to be the same, as you cannot have somewhere randomly generating water out of nowhere. It looks like:
$$\sf \dots + varWaterIn_h \dots = \dots + varWaterOut_h + \dots$$
Let us assume that we want to maximise the objective function:
$$\sf \sum_h parWaterPrice_h \cdot (varWaterIn_h - varWaterOut_h)$$
Now, when I specify it as this, I get a satifying answer, where we only have either $\sf varWaterIn_h$ or $\sf varWaterOut_h$. However, it occurs to me that if we just specify the objective function, without the binary constraints, it should work too right?
Meaning:
\begin{align}\max&\quad\sf\sum_h parWaterPrice_h \cdot (varWaterIn_h - varWaterOut_h)\\\text{s.t.}&\quad\sf\dots + varWaterIn_h \dots = \dots + varWaterOut_h + \dots\end{align}
Since we maximize our revenue, so it is impossible that the optimum would be buying and selling water at the same time right? Or am I missing something?
The reason for wanting to specify it as a LP rather than an ILP is the speed at which a LP can be solved.