How can I create a linear equation in Gurobi (Java) from values (x-y value pairs) that also has the following properties:
$\forall x \leq 0 \Longrightarrow y = 0$
The linear line/equation should have its starting point at the x/y value, from which $y \geq 0$ and is monotonously increasing and should go maximally up to a point, at which y takes the value $\geq 1$ for the first time. All values below this point shall be $y=0$, and all values above this point shall be $y=1$.
As a small example I have attached a table: The linear equation should have its starting point at $x = 10$ and its end point at $x = 40$. For $x = 0, -10 \Longrightarrow y = 0$ and for $x = 40, 50 \Longrightarrow y=1$.
Since the values change, again and again, the whole should, of course, be generally formulated.