Automatic domain partitioning of piecewise-affine simplicial functions implementing Model Predictive Controllers