Monotone Pieces Analysis for Qualitative Modeling