Let's say I define the following function in SAGE
$$ f(x,y,z,w)=|x+y-\lfloor x+y\rceil|+|y-z-\lfloor y-z \rceil|+|z+w-\lfloor z+w \rceil | + |w-x-\lfloor w-x \rceil | - |x|-|y|-|z|-|w|, $$ and want to find the maximum of $f$ for $x \in I_x, y \in I_y, z \in I_z, w \in I_w$, some predefined intervals. I am aware of the function
which can be used to minimise multivariate differentiable functions, but since the rounding function is non-differentiable, SAGE returns an error. Is there any way to get SAGE to maximise such a function (or any linear function involving rounding) without having to consider each interval piecewise?