Discrete and Continuous Models for Partitioning Problems