Chapter 2 Preliminaries: an overview of optimisation techniques
2.3 Summary of solution approaches to combinatorial optimisation problems
2.4.4 Soft constraint
Many real-life problems are over-constrained. In NRPs for example, nurses often have
cardinality(x/v,l,u)
wherexis a set of variables (x1, …,xn);vis anm-tuple of domain values of the variables
x;landuarem-tuples of nonnegative integers defining the lower and upper bounds of times the valuevbeen taken for variablex, respectively. The constraint defines that, forj
= 1, …,m, at leastljand at mostujof the variables take the valuevj.
cardinality(x,v,l,u)
wherexis a set of variables (x1, …,xn);vis a set of domain values of the variablesx;l
anduare nonnegative integers defining the lower and upper bounds of times of the valuevbeen taken for variablex, respectively. The constraint defines that, forj= 1, …,
respects all the preferences. However, we still want to find some solutions, preferably one that minimizes the total number of conflicts. In case of the NRP example, we may want to construct a roster in which the number of respected preferences is satisfied as many as possible among the employees.
In classic CSP, we seek feasible solutions to a given problem. Hence, we cannot apply CSP directly to the over-constrained problems, because no solutions can be found. There have been several methods proposed as remedies. Most of these methods use so- called soft constraints that are allowed to be violated. The constraints that are not allowed to be violated are calledhard constraints.
Valued-CSPs [19] and semi-rings-CSPs [20] are two generic paradigms for over- constrained CSP. They can be seen as extensions of the classic CSP, which allow tackling over-constrained problems or preferences between solutions to be dealt with.
There are various specific frameworks for over-constrained CSP. The simplest framework, Max-CSP framework tries to maximize the number of satisfied constraints. In this framework all constraints are either violated or satisfied, the objective is equivalent to minimizing the number of violated constraints. Max-CSP has been extended to the Weighted-CSP framework by [21] and [22], associating a degree of violation (not just a Boolean value) to each constraint and minimizing the sum of all the weighted violations. The Possibilistic-CSP framework proposed by [23] associates a preference to each constraint (a real value between 0 and 1) representing its importance. The objective of the framework is the hierarchical satisfaction of the most important constraints, i.e. the minimization of the highest preference level for a violated constraint. The Fuzzy-CSP framework proposed by [24-26] is somewhat similar to the Possibilistic-CSP but a preference is associated to each tuple of each constraint. A preference value of 0 means the constraint is highly violated and 1 stands for satisfaction. The objective is to maximize the smallest preference value induced by a variable assignment. All above mentioned frameworks can be described as a specification of the two generic paradigms. For more information about how the generic
and specific frameworks model and solve the over-constrained CSPs, we refer to several surveys and tutorial papers [27-29].
Another approach to model and solve over-constrained problems was proposed by [27] and refined by [28]. The idea is to identify a “cost" variablezwith each soft constraintc, and replace the constraintc by the disjunction ((c(z 0) (c (z0)) where c is a constraint of the type z( )c for some violation measure ( )c depending on c. The newly defined problem is not over-constrained anymore.
If we are asked to minimize the (weighted) sum of violation costs, we can solve the problem with a traditional CP solver. In this thesis, we follow the scheme proposed by Regin et al. [27] to soften global constraints.
A violation measure for a soft constraint c(x1…xn) is a function . This measure is
represented by a cost variable z, which is to be minimized. There exist several useful violation measures for soft constraints, such as variable-based violation measure and decomposition-based violation measure [29]. The variable-based violation measure counts the minimum number of the variables that need to change their values in order to satisfy the constraints. The decomposition-based measure counts the number of the constraints in the binary decomposition that are violated. In this thesis, we introduce and apply variable-based measure for soft constraints.
Example 9 (variable-based violation measure): Problem
1 2 3 4 1 2 3 4 { , }, { , } { , }, { , } ( , , , ) x a b x a b x a b x b c alldifferent x x x x
is an over-constrained CSP. We need to soften the AllDifferent constraint by defining some violation measure, say. The variable-based violation measure varis defined as the minimum number of variables that need to change values in order to satisfy the constraint. So for each assignment, we have the variable-based violation measure as shown in Table 2.1:
Table 2.1 Variable-based violation measure for assignments 1 x x2 x3 x4 var a a a b 2 a a b b 2 a a b c 1 a b a c 1 … … … … …