Reformulating Dynamic Linear Constraint Satisfaction Problems

Proceedings of the Ninth Symposium on Abstraction, Reformulation and Approximation
Reformulating Dynamic Linear Constraint Satisfaction Problems
as Weighted CSPs for Searching Robust Solutions
Laura Climent and Miguel A. Salido and Federico Barber
Instituto de Automática e Informática Industrial
Universidad Politécnica de Valencia.
Valencia, Spain
In this paper, we focus our attention on searching for robust solutions. A solution is robust if it has a high probability
of remaining valid faced with changes in the problem. However, it is difficult to characterize such robustness, mainly
when there is no information associated about the possible
future changes.
We consider DynCSPs whose constraints are dynamic and
the information about their dynamism is unknown. We do
not analyze constraint deletion since it cannot invalidate a
solution and it only relaxes the problem. However, a modification in a constraint could invalidate a solution if it is a
restrictive modification over an original constraint.
In this context, we focus our attention in DynCSPs with
linear constraints in the form: AX + l{<, ≤, >, ≥}0, where
X represents the variables, A represents the coefficients of
the variables and l is a constant. The obtained solution space
is a convex and n-dimensional space, where n is the number
of variables of the DynCSP.
In order to clarify the explanation of our approach and
without loss of generality, we will show an example in a
convex and 2-dimensional space.
Abstract
Constraint programming is a successful technology for
solving combinatorial problems modeled as constraint
satisfaction problems (CSPs). Many real life problems
come from uncertain and dynamic environments, which
means that the initial description of the problem may
change during its execution. In these cases, the solution
found for a problem may become invalid. The search
of robust solutions for dynamic CSPs (DynCSPs) has
become an important issue in the field of constraint programming. In this paper we reformulate DynCSPs with
linear constraints as weighted CSPs (WCSPs), and we
present an approach that searches for robust solutions
in problems without associated information about possible future changes. Thus, the best solution for a modeled WCSP will be a robust solution for the original
DynCSP.
1
Introduction
Many real life problems can be modeled as constraint satisfaction problems and can be solved using constraint programming techniques. Much effort has been spent to increase the efficiency of the constraint satisfaction algorithms. This effort resulted in the design of constraint reasoning tools to solve real problems.
Nevertheless, many of these techniques assume that the
set of variables, domains and constraints involved in the CSP
are known and fixed when the problem is modeled. This is a
strong limitation when we deal with real situations where the
DynCSP may evolve because of the environment, the user or
other agents (Verfaillie and Schiex 1994). Thus, the solution
found for a problem may become invalid after changes in the
parameters of the DynCSP.
We consider the importance of preventing the loss of a
solution because it could entail several negative effects in
the modeled problem. For example, in a scheduling problem composed of several machines, the loss of a solution
could cause the stop of the production system, the breakage
of machines, the loss of the material/object in production,
etc. In addition, these negative effects probably will have
associated an economic loss.
;
&
&¶
&¶
&¶
&
&¶
&
&
;
Figure 1: Example of the DynCSP P and changes over its
constraints.
c 2011, Association for the Advancement of Artificial
Copyright Intelligence (www.aaai.org). All rights reserved.
Figure 1 shows a DynCSP called P, which it is composed
of two variables x0 and x1 with domains D0 : {3..7} and
34
CSP(0) , CSP(1) , ..., CSP(i+1) , each CSP(i) resulting
from a change in the previous one (CSP(i−1) ), representing
new facts about the dynamic environment being modeled.
As a result of such incremental change, the set of solutions
of each CSP(i) can potentially decrease (in which case is
considered a restriction) or increase (in which case is considered a relaxation).
In this paper, we will refer to the CSP(0) as the original
DynCSP. Since the information about the dynamism of the
constraints is unknown, we assume that any constraint could
change in the future. Thus, the set CSP(1) , ..., CSP(i+1) is unknown when the DynCSP is solved.
We focus our attention in DynCSPs in which the set of
solutions of each CSP(i) decreases in relation to CSP(i−1)
(more restricted problem).
D1 : {2..6} (discontinuous lines) respectively, and four dynamic constraints (continuous lines):
•
•
•
•
C1
C2
C3
C4
: x0 + x1 − 12 ≤ 0
: x1 − x0 − 2 ≤ 0
: x1 + x0 − 6 ≥ 0
: x0 − x1 − 4 ≤ 0
It can be observed that the Cartesian product of the variable domains involve 25 tuples and 21 are solutions. If we do
not know any information about the dynamism of the constraints, then, what is the most robust solution? In Figure
1, four possible modifications, one for each original constraint, are represented (C1 , C2 , C3 and C4 ). If the original
constraints of the problem change in this way, the solution
space will be reduced and the tuples (x0 = 3, x1 = 3),
(x0 = 3, x1 = 5), (x0 = 4, x1 = 2), (x0 = 4, x1 = 6),
(x0 = 6, x1 = 2), (x0 = 6, x1 = 6), (x0 = 7, x1 = 3)
and (x0 = 7, x1 = 5) will not satisfy the new constraints
C1 , C2 , C3 and C4 .
The solutions located close to the bounds of the original
constraints have a low probability of remaining valid after
changes in the problem. For this reason, the main idea of
our technique is based on searching for solutions which are
located as far as possible from the bounds of the solution
space.
In this example, it can be observed that the most robust
solution is the centered solution (x0 = 5, x1 = 4). Nevertheless, in problems with a n-dimensional solution space,
it is not easy to obtain this solution. To this end, we reformulate the original DynCSP as a WCSP and a cost is assigned to each valid tuple of each constraint. Thus, the best
solution for the modeled WCSP (the solution with the minimum associated cost) will be the most robust solutions for
the original DynCSP.
1.1
Definition 3. A Weighted Constraint Satisfaction
Problem (WCSP) is a specific subclass of valued CSP
(Schiex, Fargier, and Verfaillie 1995), (Larrosa and Schiex
2004), (Givry et al. 2003). A WCSP is defined as P =
X , D, S(k), C, where:
• X and D are the set of variables and domains respectively,
as in standard CSP.
• S(k) is the valuation structure, where k ∈ N+ denotes the
maximum cost.
• C is the set of constraints as cost functions (namely,
Ci : j∈var(Ci ) Dj → {0, 1, ..., k}), where Ci ∈ C is defined over a subset of variables var(Ci ).
The
valuation
structure
S(k) = ({0, 1, ..., k}, ⊕, >), where:
is
defined
as
• {0, 1, ..., k} is the set of costs, which are natural numbers
bounded by k.
• ⊕ is the sum of costs.
∀a, b ∈ {0, 1, ..., k}, a ⊕ b = min{k, a + b}
Technical Background
• > is the standard order among naturals.
By following standard notations and definitions in the literature we summarize the basic definitions that will be used in
the rest of the paper.
A tuple t is an assignment to an ordered set of variables
Xt ⊆ X . For a subset B of Xt , the projection of t over B
is noted as t ↓B . When Ci assigns a cost k to a tuple t, it
means that t is an invalid tuple for Ci . Otherwise (the cost
assigned is lower than k) t is a valid tuple for Ci with the
corresponding cost.
The cost of a tuple t, noted V(t), is the sum of all the
applicable costs:
Ci (t ↓var(Ci ) )
V(t) =
Definition 1. A Constraint Satisfaction Problem (CSP)
is defined by a triple P = X , D, C where, X is a finite
set of variables X = {x1 , x2 , ..., xn }, D is a set of domains
D = {D1 , D2 , ..., Dn } such that for each variable xi ∈ X
there is a set of values that the variable can take, and C is a
finite set of constraints C = {C1 , C2 , ..., Cm } which restrict
the values that the variables can simultaneously take.
Ci ∈C,var(Ci )⊆Xt
The number of tuples of a constraint Ci is composed by
the elements of the Cartesian product of the domains of the
variables involved in Ci . The tightness of a constraint is the
relation of the number of forbidden tuples to the number of
all possible tuples. The tightness is defined in the interval
[0,1].
The tuple t is consistent if V(t) < k. The main objective
is to find a complete assignment with the minimum cost.
Example.
Figure 2 shows a WCSP P
=
It can
{x, y}, {{v1 , v2 }, {v1 , v2 }}, S(5), {C1 , C2 }.
be observed that the set of costs is [0,...,5]. Let’s assume
var(C1 ) = {x, y} and var(C2 ) = {x, y}. The costs
assigned by the constraints are represented as labeled
edges connecting the values of the tuples involved in the
Definition 2. A Dynamic Constraint Satisfaction Problem (DynCSP) (Dechter and Dechter 1988), (González
and Meseguer 2008) is a sequence of static CSPs
35
C4 : Bend ≤ 8
C5 : Bbegin − Aend ≥ 3
C6 : Aend − Abegin ≥ 2
C7 : Bend − Bbegin ≥ 1}
In real life problems, delays can occur in activities of the
schedule. For this reason, the constraints related to the duration of the activities (C6 and C7 ) are dynamic.
A solution for P is: S1 = {Abegin = 0, Aend =
2, Bbegin = 5, Bend = 6}. Figure 3 shows the schedule
that represents this solution. This solution is located on the
C6 and C7 boundaries.
corresponding constraint. The cost assignment of the
constraint C1 is represented in Figure 2 (a) meanwhile the
cost assignment of the constraint C2 is represented in Figure
2 (b).
&
&
[
Y
\
[
Y
Y
\
Y
Y
Y
Y
Y
$FWLYLW\$
D
$FWLYLW\%
E
7LPHK
Figure 2: An example of WCSP P .
Figure 3: Schedule that represents the solution S1 .
Table 1 shows the set of tuples of P with their corresponding costs assigned by the constraints and their V(t)
values. In addition, it shows which tuples are solutions for
P . The tuples (x = v1 , y = v2 ) and (x = v2 , y = v2 )
are not solutions of P because their values of V(t) are not
lower than 5. However, the tuples (x = v1 , y = v1 ) and
(x = v2 , y = v1 ) are solutions of P . The best solution for
P is (x = v2 , y = v1 ) because V(x = v2 , y = v1 ) = 1,
which is the minimum global cost of the problem.
Let’s consider a delay of 1 hour over the duration of the
first activity (Aend − Abegin = 3). After this change in the
initial specification of the problem, the solution S1 becomes
invalid since it does not satisfy the constraint C5 : Bbegin −
Aend ≥ 3.
Following the initial modeling of the scheduling problem, and considering that the duration of all the activities
might be extended, we can search for a solution located farther from the C6 and C7 boundaries. This solution could be
S2 = {Abegin = 0, Aend = 3, Bbegin = 6, Bend = 7}. Figure 4 shows the schedule that represents S2 . The solution S2
can be considered more robust than S1 because if a delay occurs (≤1 hour) in any activity (restrictive modifications over
C6 and/or C7 ), the solution S2 remains valid.
Table 1: Set of tuples of P and their corresponding costs.
x
v1
v1
v2
v2
y
v1
v2
v1
v2
Cost C1
0
4
0
5
Cost C2
3
1
1
0
V(t)
3
5
1
5
Solution?
Yes
No
Yes
No
$FWLYLW\$
1.2
A toy example of a scheduling problem
Following, we present a toy example of a scheduling problem. It can be considered a dynamic problem since constraints may change. We model this problem as a DynCSP
and we present different solutions with different robustness
degree. In this scheduling problem, two activities A and B
have to finish in 8 hours or sooner: Aend ≤ 8; Bend ≤ 8.
In addition, the activity B has to start at least 3 hours after the end of the activity A: Bbegin − Aend ≥ 3. The
duration of the activity A is greater than or equal to 2
hours: Aend − Abegin ≥ 2. The duration of the activity
B is greater than or equal to 1 hour: Bend − Bbegin ≥ 1.
The original DynCSP that models the scheduling problem is
P = X , D, C, where:
$FWLYLW\%
7LPHK
Figure 4: Schedule that represents the solution S2 .
In scheduling problems, searching for a solution located
far from the bounds of the constraints related to the duration
of the activities, means including buffer times between activities. The most common way to generate robust schedules
is by including buffer times because they can absorb delays
and avoid their propagation over the schedule (Climent et al.
2008). However, the buffers also decrease the optimality of
the schedule, due to they increase the makespan.
Figure 3 shows the first schedule, whose makespan is
6 hours. Figure 4 shows the second schedule, whose
makespan is 8 hours because it is composed of two buffers
of one hour each one. Therefore, the second schedule is
more robust than the first one, although the first one has the
optimal makespan.
In many dynamic problems, there exists an optimality criterion so it is necessary to find a trade-off between robustness and optimality.
• X = {Abegin , Aend , Bbegin , Bend }
• D = {DAbegin : [0, 8], DAend : [0, 8], DBbegin : [0, 8],
DBend : [0, 8]}
• C = {C1 : Abegin ≥ 0
C2 : Bbegin ≥ 0
C3 : Aend ≤ 8
36
1.3
Stability, Flexibility and Robustness
the variables could be lost temporarily. The technique consists basically on penalizing the values that are no longer
valid due to changes in the problem. Thus, although these
values can be used later, the algorithm will try to find solutions that do not include them. This idea is incorporated
in a technique of hill-climbing, where the penalties are used
by min-conflicts to make the selection of values for the variables.
An example of the second set of approaches can be seen
in (Fargier and Lang 1993), where there is a probability of
existence associated with each constraint. The most robust
solution is the solution that maximizes the probability of satisfying the constraints.
Another example of the second set of approaches is shown
in (Climent, Salido, and Barber 2010), where there are two
parameters associated with each constraint. The first parameter represents the probability of change of the constraint
and the second one represents its amount of change. According to these parameters, several restricted CSPs are generated. The most robust solution is the solution that satisfies
the highest number of restricted CSPs.
Note that in the above approaches that search for robust
solutions, there exists knowledge about the future changes
that could occur. It is important to consider the dependence
of the algorithm with the knowledge about the dynamic environment. For instance, some approaches might require a
list of the possible changes and/or an associated probability distribution. In this way, depending on the associated
information about the dynamism to the problem, some approaches could be used and others not. In this paper, we
propose an approach for solving dynamic problems with no
knowledge about the future changes.
There is a misunderstanding between the concept of robustness and stability of the solutions in DynCSPs. Some researchers talk about stability while others about robustness
to refer to the same concept. However there is a difference
between stable and robust.
In general, a solution is stable in a dynamic system, if
by means of a few changes in the solution we can obtain a
new solution that is similar to the original one. However, the
robustness is a measure of feature persistence in systems that
compel us to focus on perturbations because they represent
changes in the composition or topology of the system. The
perturbations are small differences in the current state of the
system (Jen 2003).
Furthermore, in (Verfaillie and Jussien 2005) the concept
of flexible solution is introduced as a solution that, in case
of change, can be easily modified to produce a solution of
the new problem, in a similar way than a stable solution.
However, a robust solution is considered a solution that is
able to resist changes, i.e., to remain valid in spite of these
changes.
Taking into account all these concepts, we can classify the
nature of the solutions as:
• A stable (also called flexible) solution has the ability of
sharing as many values as possible with a new solution
of the problem if a change occurs (Hebrard, Hnich, and
Walsh 2003). It is measured in terms of similarity of the
new solution with the original one.
• A robust solution has a high probability of remaining
valid faced with changes in the problem. It is measured in
terms of the persistence of the solution.
In this paper, we focus our attention on the search of robust solutions. Regarding the concept of robustness, there
is not a general measure of the robustness. Depending on
the types of changes and the knowledge about these future
changes, the robustness measure will differ.
2
3
The Centroid of the Solution Space
In section 1, we refer to the idea that solutions located close
to the bounds of the solution space are less robust solutions
in a DynCSP. This is due to the fact that these solutions
have a low probability of remaining valid faced with restrictive modifications over the constraints. However a solution
that is located as far as possible from the bounds of the solution space has a high probability of remaining valid after
changes, so these solutions are considered to be more robust
solutions.
Taking into account the Euclidean geometry definitions,
we can calculate the centroid or gravity center of a geometric
figure. Note that the centroid of a figure is located as far
as possible of all the bounds of the figure. As it has been
explained previously, we deal with linear constraints. The
resultant solution space with these constraints is a convex
space. The centroid of a convex geometric figure always lies
in the geometric figure. In addition, it could be considered to
be the most robust point, since it has the highest probability
of remaining inside the geometric figure after changes in its
bounds.
If we consider a 2-dimensional solution space, its centroid
is the intersection of all straight lines that divide the solution
space into two parts of equal moment. Figure 5, shows a
DynCSP R which it is composed of two variables x0 and x1
Related Work
Due to the fact that the real world is dynamic in its nature,
new techniques attempting to model the real world problems
must be taken into consideration. In the field of the robust
optimization in linear programming, there exist several techniques which can be classified based on the way of modeling
the uncertainties: deterministic, probabilistic and possibilistic (Beyer and Sendhoff 2007). Nevertheless, we focus our
attention in the field of constraint satisfaction in uncertain
and dynamic environments. The techniques that have been
proposed in this area can be classified based on the kind of
solutions that they obtain (Verfaillie and Jussien 2005).
The frameworks that have been proposed for finding robust solutions differ mainly in the assumption of the changes
that may occur. On the one hand, some techniques focus
their attention in possible changes in the variables and the
values that they can take. On the other hand, other techniques focus their attention in the constraints.
An example of the first set of approaches can be seen in
(Wallace and Freuder 1998). This technique solves a restricted class of recurrent DynCSPs in which the values of
37
;
best solution for the modeled WCSP (the solution with the
minimum cost) is considered to be one of the most robust
solutions for the original DynCSP. Algorithm 1 shows the
reformulation of the DynCSP as a WCSP and the solving
process.
&
&
&HQWURLG
4.1
&
&
;
Figure 5: Example of the DynCSP R and its centroid.
with domains D0 : {1..8} and D1 : {1..7} respectively, and
the constraints:
D(t, Ci ) =
• C 1 : x1 − 6 ≤ 0
|a1 x1 + ... + an xn + l|
a21 + ... + a2n
(1)
The maximum distance of any t ∈ T (Ci ) from Ci is denoted as maxD(T (Ci ), Ci ):
• C 2 : x0 − 7 ≤ 0
• C 3 : x1 − 2 ≥ 0
• C 4 : x0 − 3 ≥ 0
maxD(T (Ci ), Ci ) = max{D(t, Ci )}∀t ∈ T (Ci )
The geometric figure of the solution space of R is a square
whose centroid is the solution (x0 = 5, x1 = 4). Note that
this point is the intersection of the two straight lines that
divide the square in two equal areas.
The concept of centroid can be extended to a
n-dimensional solution space. The centroid of this solution
space is the intersection of all hyperplanes that divide the
solution space into two parts of equal moment (Gao 2006).
In DynCSPs with discrete domains, the centroid of a solution space may not be a solution, so that the most robust
solution is the nearest solution to the centroid of the solution
space.
4
Calculating the Costs
The first step of the WCSP modeling consists on calculating
the cost associated to each tuple of each constraint Ci ∈ C.
The set of valid tuples of Ci is denoted as T (Ci ). The
penalty of a tuple t ∈ T (Ci ) is indirectly related to the distance between Ci and t.
A constraint Ci is represented as a hyperplane in the
search space. A tuple t is represented as a point of the search
space. In order to calculate the distance of t from Ci we
use the Euclidean distance from a point to an hyperplane
D(t, Ci ) (see equation 1). Note that the value of the numerator is the value of the constraint Ci for the tuple t. Particularly, if t is located on the Ci boundary then D(t, Ci ) = 0.
(2)
The main utility of the cost functions is to prioritize
among the valid tuples of each constraint. In addition, they
forbid the invalid tuples. The cost function for the tuples of
Ci is denoted as Ci (t ↓var(Ci ) ) (see equation 3).
Ci (t ↓var(Ci ) ) =
⎧
(D(t, Ci ) − maxD(T (Ci ), Ci ))2 ⎪
⎪
⎪
⎨
if t ∈ T (Ci )
⎪
2
⎪
⎪
⎩k, where k > maxD(T (Ci ), Ci ) if t ∈
/ T (Ci )
(3)
Algorithm 1 (lines 1-5) calculates the cost associated to
each tuple of each constraint of the DynCSP.
As it was pointed out in Definition 3, Ci (t ↓var(Ci ) ) assigns a cost of k to a tuple t that does not satisfy the
constraint Ci , since it is a non valid tuple (see equation 3). Note that for t ∈ T (Ci ), Ci (t ↓var(Ci ) )∈
[0, maxD(T (Ci ), Ci )2 ] . Consequently, k must be greater
than maxD(T (Ci ), Ci )2 .
The penalization assigned to each tuple t ∈ T (Ci ) is 0
if its distance from the constraint Ci (D(t, Ci )) is the maximum possible (maxD(T (Ci ), Ci )). This is due to the fact
that t is considered the most robust tuple for Ci since t is the
valid tuple with the highest probability of remaining valid
faced with changes in Ci . On the other hand, we assign
the maximum penalization (maxD(T (Ci ), Ci )2 ) to a tuple t ∈ T (Ci ) that is located on the Ci boundary, that it is
to say D(t, Ci ) = 0. Note that t is the least robust tuple for
Ci because it has the lowest probability of remaining valid
after modifications in Ci .
Modeling DynCSPs as WCSPs
The aim of modeling a DynCSP as a WCSP is for obtaining an approximation to the centroid of the solution space
of the DynCSP. Searching for the centroid of a DynCSP requires to determine the solution space of the DynCSP which
is NP-complete. However, our aim is not to calculate all the
solutions of the DynCSP, but to find a solution close of the
centroid of the solution space. To this end, we have developed a technique based on the assignment of penalizations
to the tuples of each constraint. The solution with the minimum global penalization is located close to the centroid of
the solution space.
The developed technique assigns costs to the tuples of
each constraint Ci ∈ C, where C is the set of constraints.
The cost associated to each tuple represents the penalization assigned to it, which depends on the distance of the tuples to Ci . The solutions obtained for the modeled WCSP
are the solutions of the original DynCSP. Furthermore, the
38
4.2
Solving the WCSP
sentation of P.
After the assignment of costs to the tuples of all the constraints of the DynCSP, the WCSP is generated and solved
by a general WCSP solver.
Table 2: Valid tuples of C1 for the resultant WCSP of P and
their costs (left). The solutions of P and their global costs
(V(s))(right).
Algorithm 1: Reformulation of the DynCSP as a
WCSP and the solving process.
Data: A DynCSP (P ), P = X , D, C and k.
Result: Robust solution Sol and V(Sol).
begin
1
foreach Ci ∈ C do
2
foreach t ∈ Ci do
3
if t ∈ T (Ci ) then
4
Ci (t ↓var(Ci ) ) =
(D(t, Ci ) − maxD(T (Ci ), Ci ))2 ;
else
5
Ci (t ↓var(Ci ) ) = k;
T (C1 )
x0 x1
3
2
3
3
3
4
3
5
3
6
4
2
4
3
4
4
4
5
4
6
5
2
5
3
5
4
5
5
5
6
6
2
6
3
6
4
6
5
6
6
7
2
7
3
7
4
7
5
Generate WCSP = X , D, S(k), C ;
Sol ← Solve WCSP;
if ∃ Sol then
return (Sol, V(Sol));
else
return (N o Solution exists);
6
7
8
9
10
Algorithm 1 shows the generation (line 6) and the resolution (line 7) of the WCSP. The obtained solution for the
WCSP (line 8) is a solution of the original DynCSP and it
is considered to be one of the most robust solutions. As discussed in Definition 3, the cost of a tuple t (V(t)) is the sum
of all the applicable costs, so the best solution of a WCSP is
the solution s with the minimum sum of penalties (V(s)).
The complexity of the modeling phase of Algorithm 1
(lines 1-5) is related to the number of valid tuples of the constraints and the number of constraints of the DynCSP. The
format used for the specification of the WCSPs has been the
WCSP file format1 , which allows us to assign a default cost
to the invalid tuples of a constraint. Thus, for each Ci ∈ C,
it is just necessary to calculate the cost of each t ∈ T (Ci ).
First of all, it is calculated the distance of any t ∈ T (Ci )
from Ci (see equation 1). Once the maximum distance is
determined (see equation 2), a penalty is assigned to each
t ∈ T (Ci ) (see equation 3). Thus, the modeling phase of
Algorithm 1 is O((2 ∗ |T (C)|) ∗ |C|), where |C| denotes the
number of constraints of the DynCSP and |T(C)| is the number of valid tuples of the constraints (see equation 4). The
arity of the constraints is denoted as |C| and the size of the
domains is denoted as |D|.
|T (C)| = (|D||C| ) ∗ (1 − tightness)
4.3
0
0
2
4
8
0
2
4
8
12
2
4
8
12
18
4
8
12
18
24
8
12
18
24
Solutions
x0
x1
3
3
3
4
3
5
4
2
4
3
4
4
4
5
4
6
5
2
5
3
5
4
5
5
5
6
6
2
6
3
6
4
6
5
6
6
7
3
7
4
7
5
V(s)
40
40
40
40
36
32
36
40
40
32
32
32
40
40
36
32
36
40
40
40
40
In Table 2 (left), it can be seen the valid tuples of C1
(T (C1 )) for the modeled WCSP and their associated costs
(C1 (t ↓var(C1 ) )). In this example, Ci (t ↓var(Ci ) ) ∈ [0, 24]
∀i ∈ {1, .., |C|} ∀t ∈ T (Ci ).
In the right hand side of Table 2, the solutions of the modeled WCSP and their global costs are shown. One of the best
solutions found by a WCSP solver (the solution s with the
minimum V(s)), corresponds to the solution located in the
center of the polygon that represents P : (x0 = 5, x1 = 4)
(V((x0 = 5, x1 = 4)) = 32).
It can be observed that the solutions located on the bounds
of the solution space of P ((x0 = 3, x1 = 3), (x0 = 3, x1 =
5), (x0 = 4, x1 = 2), (x0 = 4, x1 = 6), (x0 = 6, x1 = 2),
(x0 = 6, x1 = 6), (x0 = 7, x1 = 3) and (x0 = 7, x1 = 5))
are the least robust solutions for P . These solutions have the
maximum global cost of 40 (see Table 2, right). It means
that the sum of their penalizations is the maximum possible
for P .
Figure 6 shows the centroid of the geometric figure that
represents the solution space of P . It represents one of the
best solutions found for the modeled WCSP of P (x0 =
5, x1 = 4).
(4)
Example
Following, we apply the modeling phase to the example introduced in section 1 (P). Figure 1 shows the graphic repre1
C1 (t ↓var(C1 ) )
5
Evaluation
In this section, we evaluate the quality of the solutions obtained by the reformulation technique. To this end, we will
http://graphmod.ics.uci.edu/group/WCSP file format
39
;
&
generated from the original instance. The percentage of
static CSPs satisfied by the solutions found by our technique
is presented in %Sat. The runtime (in milliseconds) of the
WCSP modeling phase is denoted as timeM and the runtime of solving the WCSP with ToulBar2 solver is denoted
as timeS. All instances were executed on a PC Pentium D
840 3.2GHz.
&
&HQWURLG
&
Table 3: Percentage of static CSPs satisfied by the solution
of the modeled WCSP. Runtime (milliseconds) of the modeling and solving phase.
&
;
Figure 6: Example of the DynCSP P and its centroid.
use the solver ToulBar22 for solving the resultant WCSPs.
To the best of our knowledge, there are no benchmarks
of DynCSPs in the literature. Thus, we have generated random instances of DynCSPs. In (Climent, Salido, and Barber
2009) and (Salido, Climent, and Barber 2009), three methods for measuring the robustness of the solutions have been
proposed: checking pseudo-random constraints, checking
pseudo solutions and checking both methods. In this paper, we have used a similar method to checking pseudorandom constraints, but with some differences. The main
difference with this method is that we do not simulate the
dynamism of the constraints randomly. Instead, we have
developed restrictive modifications over all of them. Thus,
the generated DynCSPs are composed of k static CSPs:
CSP(0) , CSP(1) , ..., CSP(k) , where each CSP(i) is more
restrictive than CSP(i−1) , and consequently the set of solutions of each CSP(i) decrease regarding to the previous
ones.
For each CSP(i) , we have modified the constant term of
their constraints in i units with regard to CSP(0) (the original DynCSP). In this way, we generate as many static CSPs
as possible, with the condition that they must maintain at
least one solution.The problems were randomly generated
by increasing the number of variables |X |, the domain size
|D|, the number of binary constraints |C| and the tightness
of the constraints tigh. All constraints must satisfy that
the number of valid tuples according to equation 4 is correct, taking into account that a range of variability of 10%
on the tightness is allowed. Furthermore all random constraints must be non-redundant, that is, a new random constraint must invalidate at least one different tuple than the
rest of the generated constraints. If any of these conditions
are not satisfied, the constraint is ruled out.
Table 3 shows the results obtained for 10 random instances of each DynCSP topology, according to parameters
|X |, |D|, |C| and tigh. For each instance type, we measure
the average number of static CSPs (M od(k)) that could be
2
|X |
|D|
|C|
tigh
M od(k)
%Sat
timeM
timeS
50
100
150
100
100
100
50
50
50
0.1
0.1
0.1
78.2
90.8
99.3
50.9%
68.5%
82.1%
223.3
232.4
237
1344
1110
938
100
100
100
80
120
200
60
60
60
0.2
0.2
0.2
60.8
87.4
158
53%
56.8%
62.9%
158.6
295.5
903
694
2374
13719
100
100
100
50
50
50
30
60
80
0.2
0.2
0.2
46.6
36.1
10.6
78.8%
50.4%
31.5%
26.6
48.1
63.8
203
375
437
150
150
150
200
200
200
60
60
60
0.1
0.25
0.4
184
143
95.6
72.1%
54.9%
50.9%
1158
807
822
6969
8405
6452
The results show that our modeling technique was able
to find a solution that remain valid for a high number of
restricted static CSPs. For example, in instances |X | =
150, |D| = 100, |C| = 50 and tigh = 0.1, an average of
99.3 static and feasible CSPs could be generated. The modeling phase was carried out in 237 milliseconds and the solution for the modeled WCSP was found by ToulBar2 solver in
938 milliseconds. This solution was feasible in 82.1% of the
restricted static CSPs, being the best percentage obtained.
This percentage gives us an approximation of the probability of our solutions of remaining valid after changes.
It is also interesting to analyze how the parameters of the
problem influence in the robustness of the solutions. We obtain the most robust results for under-constrained instances.
The highest percentages are achieved when the number of
variables and the domain sizes were greater and the tightness and the number of constraints were lower.
6
Conclusions and Further Work
In this paper, we reformulate DynCSPs with linear constraints as weighted CSPs (WCSPs) in problems where no
information about the possible changes is given. The main
objective is to find solutions that are close to the centroids of
the hyper-polyhedron generated by the solution space due to
the fact that these solutions have a high probability of remaining valid after changes.
The main advantage of our technique over other algorithms that search for robust solutions, is that they require a
list of the possible changes, the associated probability distributions or other type of knowledge about the future changes.
http://carlit.toulouse.inra.fr/cgi-bin/awki.cgi/ToolBarIntro
40
However, our approach does not require any specific knowledge about the future possible changes, which it is really
useful in many real problems where no information is given.
In any case, all knowledge about further changes can be easily included in the resultant WCSP.
To the best of our knowledge, there are no benchmarks
of DynCSPs in the literature, so we have analyzed the robustness of the obtained solutions by generating random
DynCSPs composed of static CSPs where each CSP is
the result of restrictive modifications in the constraints of
the previous one. The obtained results were promising,
obtaining the best robustness results in under-constrained
DynCSPs.
Summarizing, the benefits of reformulating DynCSPs
with dynamic constraints as WCSPs are:
Climent, L.; Salido, M.; and Barber, F. 2009. Stability of Solutions in Constraint Satisfaction Problems. In Proceedings
of the 12th International Conference of the Catalan Association for Artificial Intelligence, 301–309.
Climent, L.; Salido, M.; and Barber, F. 2010. Robust Solutions in Changing Constraint Satisfaction Problems. In
The 23rd International Conference on Industrial, Engineering and Other Applications of Applied Intelligent Systems,
752–761, Part 1.
Dechter, R., and Dechter, A. 1988. Belief maintenance in
dynamic constraint networks. In Proc. of the 7th National
Conference on Artificial Intelligence (AAAI-88) 37–42.
Fargier, H., and Lang, J. 1993. Uncertainty in constraint
satisfaction problems: a probabilistic approach. Symbolic
and Quantitative Approaches to Reasoning and Uncertainty
97–104.
Gao, J. 2006. Adaptive interpolation methods for spatiotemporal data.
Givry, S. D.; Larrosa, J.; Meseguer, P.; and Schiex, T. 2003.
Solving max-sat as weighted csp. 363–376. Springer Verlag.
González, S., and Meseguer, P. 2008. Open, Interactive and
Dynamic CSP.
Hebrard, E.; Hnich, B.; and Walsh, T. 2003. Super CSPs.
Technical report.
Jen, E. 2003. Stable or robust? what’s the difference? Complexity 8:12–18.
Jonsson, P., and Bäckström, C. 1998. A unifying approach to temporal constraint reasoning. Artificial Intelligence 102(1):143–155.
Larrosa, J., and Schiex, T. 2004. Solving weighted csp by
maintaining arc consistency. Artificial Intelligence 159:1–
26.
Salido, M.; Climent, L.; and Barber, F. 2009. A Tool
for Finding Stable Solutions in Constraint Satisfaction Problems. In Workshop on Planning, Scheduling and Constraint
Satisfaction (CAEPIA).
Schiex, T.; Fargier, H.; and Verfaillie, G. 1995. Valued
constraint satisfaction problems: hard and easy problems.
In In Proceedings of the 14th IJCAI, 631–637.
Verfaillie, G., and Jussien, N. 2005. Constraint solving in
uncertain and dynamic environments: A survey. Constraints
10(3):253–281.
Verfaillie, G., and Schiex, T. 1994. Solution reuse in dynamic constraint satisfaction problems. In In Proceedings
of the 12th National Conference on Artificial Intelligence
(AAAI-94), 307–312.
Wallace, R., and Freuder, E. 1998. Stable solutions for dynamic constraint satisfaction problems. In Proc. 4th International Conference on Principles and Practice of Constraint
Programming, 447–461. Springer.
• Reliable. The reformulating method ensures obtaining robust solutions.
• Practical. The runtime of the modeling phase is low in
comparison with the solving phase.
• Generic. Our approach does not require any specific
knowledge about future changes. In this way, the search
of robust solutions considers any possible restrictive
change in any constraint.
The developed technique could be useful in many real
problems with dynamic and uncertain environments. For
such problems, the objective is beyond the optimality of the
solutions because it is deeply important to obtain robust solutions. Currently, we are applying these techniques to the
railway timetabling in order to generate timetables that can
absorb incidences/delays of trains.
Currently, we are working on the development of efficient
heuristics for finding robust solutions. These heuristics will
be faced on solving DynCSPs with dynamic constraints. We
are also considering to model the dynamism in the domain
constraints of the DynCSPs. Furthermore, we are interested
in the combination of a multi-criterion cost function for the
WCSP modeling, in order to combine the optimality and the
robustness of the solutions. In addition, our approach can
be extended to disjunctive linear relations (DLRs) (Jonsson
and Bäckström 1998) which are a formalism for reasoning
about temporal constraints. The DLRs have associated a set
of disjunctive convex spaces with different centroids.
Acknowledgments
This work has been partially supported by the research
projects TIN2010-20976-C02-01 (Min. de Ciencia e Innovación, Spain) and P19/08 (Min. de Fomento, SpainFEDER), in the fellowship program FPU.
References
Beyer, H., and Sendhoff, B. 2007. Robust optimization- a
comprehensive survey. Computer methods in applied mechanics and engineering 196(33-34):3190–3218.
Climent, L.; Barber, F.; Salido, M.; and Ingolotti, L. 2008.
Robustness and capacity in scheduling: Application to railway timetabling. In IBERAMIA Workshop on Planning,
Scheduling and Constraint Satisfaction, 87–96.
41