Constrained Optimization with Qualitative Preferences