You are on page 1of 8

CARP 6/6/01

Problem: Capacitated arc Routing problem


Original graph G=(V,E) where E= ED  ER is the set of edges (undirected).

ED edges of complete graph, with arc costs cij.


ER set of required edges. Each required edge has a demand dij
(the non required edges have not demand)

One vehicle with capacity W. Placed in depot O (possibly some required edges are connected with
O)

Find the set of routes that start and finish in O of overall minimum distance, such that for each route
the demand of the route (sum of demands of required edges in the route) does not exceed the
capacity of the vehicle.

We assume that the demand of each required edge is satisfied completely by one single route (this
implies dijW) although it my be necessary to traverse a required edge more than once in order to
“reach” other required edges in other routes. Thus we will say that the edge is “serviced” once
although it may be necessary to traverse it several times (in different routes, or in the same route if
it is not required)

Transform the problem into a problem in a directed network: Find a family of paths in a network.

Before defining the network, we assume that the graph does not contain nodes that are not incident
to any required edge. As Rob pointed out, they can be removed and the distances between the
remaining nodes updated (if needed) form shortest path distances.

The network:

Nodes: They can be classified in four groups:

- Source node: O´s, (which is a copy of the node O where the depot is located)
- First-level nodes:
- Copies of all original nodes: i’
when (i,j) or (j,i) is a required edge
- A copy of the depot O’ (the role to be explained later on)

- Second-level nodes: All the nodes of the network: i


- Sink node: Os (which is another copy of the node O where the depot is located)

***********Oscar comment****

La única manera de comenzar una ruta sirviendo un arco es que el nodo O sea incidente a una arista requerida.
Por lo que no tiene sentido hacer una réplica del nodo O en el primer nivel si O no es indicente a una arista
requerida.

Elena: This is true, but if we always add the copy of the depot we don’t have to look instance by instance to
see if we need it or not.
********
Arcs: The arcs of the network that correspond to “servicing” a required edge will be the arcs
connecting first-level and second-level nodes (in this direction). The remaining arcs correspond
either to “traversing” an edge without servicing or have a different meaning.

The arcs can be classified in five groups:


- Arcs connecting the source node (O´s) with first-level nodes.
They represent the beginning of a route. These arcs correspond to traversing edges without
servicing. Routes that start “servicing” an edge will use the arc (O´ s, O’) at this stage.
- Arcs connecting stage 1 nodes (nodes i’) with stage 2 nodes (nodes i). Arc (i’,j) is defined only
when {i,j} is a required edge. These will represent the required edges when serviced.
- Arcs connecting two stage 3 nodes. For each edge (i,j) of the complete graph, two arcs are
defined: (i,j) and (j,i). They will represent when an edge is traversed but not serviced.
- Backward arcs, connecting second-level nodes with their corresponding first-level node. That is if
node i´ is a first-level node, there is an arc (i,i´) going from level 2 to level 1. These are “artificial”
arcs that permit to service more than one required edge in each route.
- Arcs connecting second-level nodes with the sink node. They represent the end of a route.
- We also include an arc connecting O´s with Os to allow empty routes (as will be explained later)

Example

Required arcs
O 2 6

Here, we are assuming that the original graph contains also nodes 3 and 4 but they are not
connected to any required arc
“servicing” arcs

O End of the route


This arc is used when a route O´
starts “servicing”

1´ 1

O´s 2´ 2
Os


5
Arcs to represent that the
route starts traversing an edge
without servicing “servicing”. 6´
6

Tricky (artificial) arcs


In this stage all arcs connecting every pair of nodes
in both directions. They represent when an edge is
traversed but not serviced

In the network the arcs have costs. They are the costs of the associated edges of the original graph.
Arcs also have demands that are all zero excepting the arcs that represent the required edges (i.e. the
arcs connecting first-level and second-level nodes). For those arcs the demand is the same as the
one of the associated required edge.

In this network, each path from O´ s to Os corresponds to a route (possibly empty) that starts and
ends in the depot. Excepting the case when the path consists of the arc (O´ s , Os) all the other paths
correspond to routes that service at least one required arc.

We will look for a family of K paths in the network that will give the K routes to be performed. A
priori we do not know exactly the number of routes although we have an upper bound on that
number given by the number of required arcs (that here is represented by K). For this reason we
allow to build empty paths (because possibly we will not perform K routes but a smaller number of
routes).

We have to include some constrains on the paths:


1) Each of the paths must be “feasible” in the sense that the overall demand serviced cannot
exceed the capacity of the vehicle.
2) We have to make sure that after performing all the routes (paths) all the required arcs have been
serviced.
3) For each route, the solution must be connected, i.e. one single path instead of one path plus
several circuits.

Variables:

xijk: integer variable that represents if arc (i,j) (of the network) is used in route k. They are all binary
variables excepting for the backward arcs that are general integer.

Since a required edge is serviced once, the arcs connecting first level and second level nodes are
binary.
Traversing (without servicing) variables are also binary because of the following. Recall from RPP
that in an optimal solution each route contains at most two copies of each edge.
If it is a required edge with value 2 in the optimal solution, in the network this corresponds with
servicing once one associated arc and traversing also one time the other associated arc.
If it is a non required edge that has value 2 in the optimal solution, in the actual route this
corresponds with traversing twice the arc, once in each direction. Thus the directed variables in the
network are at most one.

But in the optimal solution a route may be use one arc (i,i’) more than once. In fact the value of that
arc represents the number of required arcs with endnode “i” that are serviced in the route.

Therefore, with these variables the model will be

Min k (i,j) cij xijk

(i,j) xijk = (j,r) xjrk for all node j of the network excepting the source and the
sink and for all path k. (Network flow equilibrium)

(O’s,j) xO’s,jk = 1 The path starts in O’s

(j,Os) xj,Osk = 1 The path ends in Os

(i,j) dij xijk  W For all path k

k (xi’jk+ xj’ik) = 1 Which means that each required arc is serviced one among
all the routes
For each k the path connected.

and the variables x as defined before.

This model also work for (RPP) now K=1 and the capacity constraint does not exist.
The number of variables is big but comparable to the number of variables of other models it is
K*(V+2*ER+V+2*ED+V)

The number of inequalities is : 3K +ER+ exponential number of connectivity constraints

I propose to focus on an LP based algorithm for CARP that we can combine with a heuristic,
possibly also based on the LP solution. Broadly speaking, I propose to try an algorithm similar to
the one for RPP.

Inequalities:

1. Knapsack inequalities

Oscar: ¿Si a un problema 0-1 tipo mochila, incluyes todas las facetas tipo mochila (las de
recubrimientos minimales) entonces los vértices de la envolvente convexa del programa lineal
resultante son 0-1? No ¿verdad?
Elena: Yes. What happens is that there are exponentially many of those. Additionally, one problem
has inequalities of more types than knapsack type ones. Thus, even if you add all the knapsack type
facets you have fractional vertices, because of the intersection of the knapsack facets with the other
types of inequalities.

Oscar:¿Donde puedo averiguar más sobre el problema de separación del problema mochila 0-1?.

Wolsey, L:, “Integer Programming”, Wiley Interscience, 1999, pgs 147-151

Nemhauser, G., Wolsey L., Integer Programming and Combiantorial Optimization, Wiley, 1988.
Pgs 265-270 y 459-464

Oscar: Ya nos aclaraste que se deben haber incluido todas las desigualdades tipo knapsack y las tipo
conenctividad (es decir, las variables asociadas a una ruta deben inducir un grafo conexo, y como
decimos mas arriba no es evidente saber cómo garantizar esto...) para que se cumpla "Thus x*(I),
the roundup of x* would be feasible. Note that x*(I) will also be connected." Pero, si x*(I) es
factible para las restricciones tipo knapsack y para conectividad, entonces para una ruta dada las
variables de x*(I) que corresponden a esa ruta inducen en efecto una ruta en el grafo, porque las
desigualdades tipo flujo se satisfacen. ¿no?

Elena: Yse; I think so. The only problem is that even is there are no more violated knapsack type
inequalities for x*, x*(I) does not necessarily satisfy the capacity constraints.
Imagine that the capacity constraint is 10 x1 + 9 x2 + 8 x3  15 and one has the solution
x1==x2=x3=0.1. If one solves the separation problem to identify violated knapsack constrains, one
can see that there is none. However x*(I)=(1,1,1) which is not feasible for the kanpsack constraint.

Oscar: Lo que no nos queda claro es que si la solución fraccionaria x* satisface todas las
desigualdades knapsack entonces x*(I) también las satisfacerá a todas, porque esto implicaría que
"Si a un problema 0-1 tipo mochila, incluyes todas las facetas tipo mochila (las de recubrimientos
minimales) entonces los vértices de la envolvente convexa del programa lineal resultante son 0-1",
lo cual creo que implicaría, que aunque el número de desigualdades válidas tipo mochila sea
exponencial podría existir un algoritmo polinomial (como el de Edmonds para matching) para el
problema de la mochila. ¿no?

Elena: As shown in the above example this is not true. But in any case the argument is wrong
because the separation problem for the knapsack problem is not solvable in polynomial time (in fact
you have to solve a knapsack problem). So any procedure that uses violated knapsack inequalities is
not polynomial (if the inequalities are obtained with the exact separation algorithm).

2. Connectivity

2. a. It is true that if U is a subset of nodes and one does not know it route k has to pass through any
of the nodes in U, the inequality

(**)

may not be valid.

Nevertheless, connectivity can also be achieved by eliminating sub-circuits. In our case Subtour
Elimination Constrains (SEC’s) are valid because we are looking for paths. So we don’t want to
have subcircuits. In general, a SEC is the following

Where the x’s are binary variables that represent the edges of a graph.
Note that if we have a set of nodes U and the sum of the arcs that have both ends in U is |U| or
more, this means that there is some circuit. Thus, to avoid the circuit the inequality is valid. In
general, if we have a fractional solution of a graph, the separation algorithm to identify one such
violated inequality is applying Gomory –Hu.

In our case these inequlities will be expressed as

Now the edges of the graph with the two endnodes in U correspond to servicing or traversing arcs
of the network that have both ends in U
In our case to solve the separation problem we should consider the LP solution in the network, and
transform it into the associated solution for the original graph (that is, forget about the tricky
backward arcs). If we calculate the minimum capacity cut-set associated to this fractional (or even
integer) solution and the value is 0, this means that we have a disconnected component which
necessarily contains a cycle. Then taking U as the set of nodes the corresponding inequality (that we
can express in terms of the variables of the network) is valid and violated by the current solution.

I haven’t had time to think more about it, but it is possible that even if the capacity of minimum cut-
set is greater than 0 but smaller than 2?? (I guess), the same type of inequality be valid.

2.b. There are other inequalities that are valid for our model and we can use (I guess that instead of
the previous ones) to attain connectivity. They are the following:
Let me drop the super-index. Suppose U is a subset of nodes. And both i and j are nodes of U.
In the two cases the left hand side represents either servicing or traversing one arc with the two
endnodes in U. If the route is going to use edges in U, necessarily the route has to “enter” the node
set U. Note that the right hand side (r.h.s) of the inequality is the sum of the values of the edges that
“enter” U. Thus, if the r.h.s. is 0 (that is the set of nodes U is disconnected) none of the arcs
connecting to nodes of U can be used and must be 0.
The reasoning is also true if instead of “entering” U we think in terms of “leaving” U.

What follows is loud woice thinking: To solve the separation problem for these inequalities we
would have to find the minimum capacity cutset “entering” or “leaving” U. Because of the flow
equilibrium equalities in the model, I guess that for any cut-set the “entering” capacity and the
“leaving” capacity have the same value. Thus, in order to find the cut set with minimum “entering”
or “leaving” capacity we just have to find the undirected minimum capacity cut set and divide it by
2.

2.c. Since there are an exponential number of connectivity inequalities, I think that we should
include some of them in the original model (to make it stronger). I think that we should include the
inequalities:

The reasoning is quite similar to the case of 2.b.

The left hand side of the inequality represents one arc connecting one first-level node with a
second-level node.
The right hand side of the inequality represents the sum of all the arcs connecting the source node
with the first-level nodes. If the route were empty, none of the arcs of the r.h.s. would be used. In
that case we couldn’t “service” any arc. Thus the left-hand-side should also be 0.
(I found routes that violated these inequalities when I did my rudimentary testing with the toy data
problems).

3. Other inequalities:

a. In my rudimentary experimentation I noticed that in the LP solutions a route would service


(partially) an arc in the two directions (for instance sijk=0.2 y sjik=0.3).
This can be partially avoided (not completely) with the following inequalities:

These inequalities say that if a route services a fraction of one arc, at least this amount of flow must
be sent in a different way than servicing the opposite arc. The inequalities help to reinforce the
model and, if violated, can be easily identified in the LP iterations.
b. Other types of valid inequalities are

Sketch of LP algorithm for CARP.

I_ I think for the moment we should focus on an LP based algorithm that uses the inequalities of
types 1, 2 (possibly 2.b) and 3 (a and b).
Initially I would add to the model only inequalities 2.c.

At each iteration

- to identify violated inequalities (1) we have to find the violated knapsack inequalities and lift
them
- to identify the violated inequalities (2b), I think that the procedure I suggest is correct. (in any
case we can always think about 2.a)
- it is straight forward to identify violated inequalities 3a and 3b.

In my limited experience there are many alternative LP optima and after adding the inequalities the
value of the LP solution does not change.

I think that it can be convenient to do the following: When an inequality is identified for a given
route, we sould also add the same inequality for the other routes. Otherwise we could ge the same
solution but just interchanging the routes.

II_ Heuristic to combine with I_


Here we should explore two possibilities. One is just doing something similar to what we did with
RPP. The other one is the approach suggested by Rob that consists in trying to have a connected
solution derived from the LP solution and work from that.

III_ Explore the possibility of extending the model to add fixed costs to the routes (they would be the
cost of the trucks)

You might also like