3.1 Search Procedure
The constraint model describes how the inference is
performed so the model needs to be accompanied by
the search procedure that explores the possible
instantiations of variables X
e
.
Our search strategy resembles the greedy
approach for solving Travelling Salesman Problems
(TSP) (Ausiello et al., 1999). The variable X
e
for
instantiation is selected in the following way. If the
path is empty, we start at the initial position I and
instantiate the variable X
{I,w}
such that weight({I,w})
is the smallest among the weights of arcs going from
I. By instantiating the variable we mean setting it to
1; the alternative branch is setting the variable to 0.
If the path is non-empty then we try to extend it to
the nearest waste. Formally, if u is the last node in
the path then we select the variable X
{u,w}
with the
smallest weight({u,w}), where w is a waste vertex. If
this is not possible (due to the capacity constraint),
we go to the closest collector.
The optimisation is realised by the branch-and-
bound approach: after finding a solution with the
total cost Bound, the constraint Obj < Bound is
posted and search continues until any solution is
found. The last found solution is the optimum.
4 CP MODEL BASED ON
FINITE STATE AUTOMATA
The second model that we propose brings a radically
new approach not seen so far when modelling VRPs
or TSPs. Recall that we are looking for a path in the
graph that satisfies some additional constraints. We
can see this path as the word in a certain regular
language. Hence, we can base the model on the
existing regular constraint (Pesant, 2004). This
constraint allows a more global view of the problem
so the hope is that it can infer more information than
the previous model and hence decreases the search
space to be explored.
First, it is important to realise that the exact path
length is unknown in advance. Each waste vertex is
visited exactly once, but the collector vertices can be
visited more times and it is not clear in advance how
many times. Nevertheless, it is possible to compute
the upper bound on the path’s length. Let us assume
that the path length is measured as the number of
visited vertices, the robot starts at the initial position
and finishes at some collector vertex (we will use the
dummy destination in a slightly different meaning
here), and the weight/cost of arcs is non-negative.
Let K = |W| be the number of waste vertices and
cap 1 be the robot’s capacity. Then the maximal
path length is 2K+1. This corresponds to visiting a
collector vertex immediately after visiting a waste
vertex. Recall that each waste vertex must be visited
exactly once and there is no arc between the
collector vertices.
Our model is based on four types of constraints.
First, there is a restriction on the existence of a
connection between two vertices – a routing
constraint. This constraint describes the routing
network (see Figure 2). It roughly corresponds to the
constraints (1)-(5) from the previous model. Note
that the sub-tour elimination constraints (6)-(7) are
not necessary here. Second, there is a restriction on
the robot’s capacity stating that there in no
continuous subsequence of waste vertices whose
length exceeds the given capacity – a capacity
constraint. This constraint corresponds to the
constraints (8)-(11) from the previous model. Third,
each waste must be visited exactly once, while the
collectors can be visited more times (even zero
times) – an occurrence constraint. This restriction
was included in the constraints (1)-(5) of the
previous model, while we model it as a separate
constraint. Finally, each arc is annotated by a weight
and there is a constraint that the sum of the weights
of used arcs does not exceed some limit – a cost
constraint. This constraint is used to define the total
cost of the solution as in (12).
In the constraint model we use three types of
variables. Let N = 2K + 1 be the maximal path
length. Then we have N variables Node
i
, N variables
Cap
i
, and N variables Cost
i
(i = 1,...,N) so we
assume the path of maximal length. Clearly, the real
path may be shorter so we introduce a dummy
destination vertex that fills the rest of the path till the
length N. In other words, when we reach the dummy
vertex, it is not possible to leave it. This way, we can
always look for the path of length N and the model
gives flexibility to explore the shorter paths too.
The semantic of the variables is as follows. The
variables Node
i
describe the path hence their domain
is the set of numerical identifications of the vertices.
We use positive integers 1,...,K (K = |W|) to identify
the waste vertices, K+1,...,K+L for the collector
vertices (L = |C|), and 0 for the dummy destination
vertex. In summary, the initial domain of each
variable Node
i
consists of values 0,..., K+L. Cap
i
is
the used capacity of the robot after leaving vertex
Node
i
(Cap
1
= 0 as the robot starts empty), the initial
domain is {0,…, cap}. Cost
i
is the cost of the arc
used to leave the vertex Node
i
(Cost
N
= 0), the initial
domain consists of non-negative numbers. Formally:
ICAART 2011 - 3rd International Conference on Agents and Artificial Intelligence
316