Doing a thing well is often a waste of time.
Real-life problems frequently involve both hard and soft constraints. For example, in time-tabling problems, while a resource constraint such as “a teacher can teach only one class at a time” must be satisfied, a teacher’s request to have her “schedule concentrated in just two days” is only a preference, not essential.
When we formalize problems that have both hard and soft constraints, we get a constraint network augmented with a global cost function (also called criterion function or objective function) over all the variables. Constraint optimization problems (COPs) find a complete assignment of values to all the variables, satisfying the hard constraints ...