1. The variable can take any value in its domain. If it is a continuous variable, then it
can of course also take fractional values. The piece-wise linear function then specifies
the variable's contribution to the objective function, which is given by a convex
combination of two adjacent break-points.
2. Yes, you can specify discontinuous piece-wise linear functions. For example, the points
{(0,0), (10,0), (10,1), (20,1)} define a step function that is 0 in [0,10) and 1 in
(10,20]. The value at the discontinuous point 10 will be the better of the two options.
Thus, if you are minimizing, the objective value at point 10 will be 0.
3. See above.
Please see
http://www.gurobi.com/documentation/8.0/refman/py_model_setpwlobj.html for
further details.
Best regards,
Tobias