You are on page 1of 6

Building Negative Redu

ed Cost Paths Using

Constraint Programming.

Louis-Martin Rousseau1;2 , Gilles Pesant1;3 , and Mi hel Gendreau1;2


1
Centre for Resear h on Transportation
Universite de Montreal, C.P. 6128, su ursale Centre-ville
Montreal, CANADA, H3C 3J7
flouism,pesant,mi helgg rt.umontreal. a
http://www. rt.umontreal. a
2
Departement d'Informatique et Re her he Operationnelle,
Universite de Montreal, C.P. 6128, su ursale Centre-ville
Montreal, CANADA, H3C 3J7
http://www.iro.umontreal. a
3
Departement de Genie Informatique,
E ole Polyte hnique Montreal,C.P. 6079, Su . Centre-ville
Montreal, Canada, H3C 3A7
http://www.polymtl. a

1 Introdu tion
Column Generation is a powerful method used to solve Constrained Set Par-
titioning problems. This method an be de omposed in two parts: the master
problem and the sub-problem. The Master Problem that should be solved in
Column Generation is derived from a simple Set Partitioning problem. Letting
o be a feasible set of node in the original graph (whi h ontains N nodes), O be
the set of all possible o, o be the ost of visiting all the nodes in o, A = (aio ) be
a boolean matrix expressing the presen e of a parti ular node (denoted by index
i 2 f1::N g) in a set of nodes o and xo a boolean variable spe ifying whether the
set o is used or not, the Set Partitioning Problem is de ned as:

min
X x
o o

s:t
Xa x
o2O

= 1 8i 2 f1::N g
io o

o2O

x 2 f0; 1gN

This formulation however poses a few problems. Firstly sin e it is impossible


to onstru t and store the set O, it is usual to work with partial set O whi h0

is enri hed iteratively by solving a subproblem, typi ally a knapsa k or shortest


path problem. Se ondly, the set Partitioning formulation is diÆ ult to solve
when O is small and it allows negative dual values whi h an be problemati
0
2 Louis-Martin Rousseau, Gilles Pesant, Mi hel Gendreau
for the subproblem. That is why, in general, we use the following Set Covering
formulation as a Master Problem:

min
X x
o o

s:t
Xa x
o2O 0

 1 8i 2 f1::N g
io o

o2O 0

x 2 f0; 1gN

Depending on the ontext the subproblem may be ome a variant of the simple
Shortest-Path Problem; appli ations in s heduling generally present an a y li
graph (sin e one dimension of the graph is time) as opposed to routing problems
that are y li by nature. However, most real life appli ations present resour e
onstrained sub-problems, typi al resour es being time, apa ity, money, et .
In this paper we will onsider the routing domain of appli ation and thus
on entrate our studies on the Cy li Resour e Constrained Shortest Path Prob-
lems. These problems are also referred to as Pro table Tour Problems (PTP)
in the literature, sin e the obje tive is to onstru t a tour that minimizes the
distan e traveled, while maximizing the total amount of prize (here dual values)
olle ted.
Most of the methods that address the y li ases do so by rst rendering
the asso iated graph a y li . This transformation enables the use of dynami
programming to solve the shortest path problem given that the resour es are
dis rete [3℄. This method is very eÆ ient, however the size of the graph generated
is usually quite impressive, and sin e the problem allows negative weight on the
ar s the shortest paths produ ed are not elementary.
It is hoped that the use of Constraint Programming in ombination with
Operations Resear h methods will allow us to solve Elementary Shortest Path
Problem instan es by working on the smaller original y li graph.
The redu ed ost of a path in the subproblem is al ulated by repla ing the
ost of an ar (the distan es between two nodes) dij by the redu ed ost of that
ar ij where ij = dij I and i is the dual value asso iated with node i.
The obje tive of the Shortest-Path Problem, in a olumn generation ontext,
is the identi ation of multiple paths of negative redu ed ost (a ording to the
dual values provided by the master problem) and not ne essarily one path of
minimal value. However to prove the optimality of the global method we do
need to prove that no path of negative redu ed ost exist.
In this preliminary version we present the model we have hosen to represent
the Pro table Tour Problem, we introdu e some redundant onstraints and we
dis uss the transformation of a PTP into an Asymmetri Traveling Salesman
Problem (ATSP) in order to use known lower bounds. We also point out possible
resear h dire tions to improve the behavior of the proposed model.
Le ture Notes in Computer S ien e 3
2 Model
Sin e the problem we onsider is y li we annot use simple set variables to
re ord solutions as proposed in [5℄. The onstru tion of a omplete solution from
the set of in luded visits would require solving a resour e onstrained TSP. We
thus need to introdu e a new model. Given that in the original graph there are
N nodes, node 0 is opied into node N+1:

2.1 Parameters

dij Is the distan e from node i to node j.


tij Is the travel time from node i to node j.
ai ; bi Are the bounds to node i's time window.
li Is the load to take at node i.
Lmax Is the apa ity of the vehi les.
ij = dij i Is the ost to go from node i to node j.

2.2 Variables

Si 2 f1::N + 1g Su essor of node i.


Pi 2 f0::N g Prede essor of node i.
V  f0::N + 1g Nodes visited by the solution path.
Ti 2 (ai ; bi ) Time of visit of node i.
Li 2 (0; Lmax ) Tru k load after visit of node i.

2.3 Constraints

Si = j ) Pj = i S P Coheren e onstraints.
Si = i , i 62 V S V Coheren e onstraints.
AllDiff(S) Conservation of Flow.
NoSubT our(S) SubTour elimination onstraint.
Si = j ) Ti + tij  Tj Time window onstraints.
Si = j ) Li + lj = Lj Capa ity Constraints.

2.4 Additional Constraints

In order to improve solution time we introdu e redundant onstraints, whi h are


onstraints that do not modify the solution set but that allow improved pruning
and ltering. Most of the onstraints are taken form [6℄ and performe ltering
base on time window narrowing.

2.5 CBC onstraint

The nature of our problem also led us to develop a more omplex redundant
and bounding onstraint, whi h we all the CanBeConne ted (CBC) onstraint.
The problem addressed by this onstraint arises from the fa t that a typi al
4 Louis-Martin Rousseau, Gilles Pesant, Mi hel Gendreau
rst fail solution strategy leads to the onstru tion of small, disjoint, pie es of
solution. Due to resour e onstraint it is possible that those pie es of solution
are in ompatible and that no solution exists. Sin e it is learly advantageous to
dis over su h in onsisten ies as early as possible, we devised the CBC onstraint.

General CBC algorithm :


{ Step one: redu tion of the graph. Sin e we propagate the CBC onstraint at
ea h node of the sear h tree, only partial information is available for pruning.
A rst step is thus taken to lter out irrelevant or in omplete information.
First it is ne essary to remove from the graph all nodes whi h are not in the
required set of variable V, sin e it is unknown whether those nodes will be
part of the nal solution. This an be safely done under the ondition that
we have the triangular inequality on all of the resour es. On e this is done
we are left with the S variables asso iated with the last node of ea h partial
hain; ea h of those variable's domain ontains only nodes that are the start
of those same hains.
{ Step two: nding a feasible solution. We are thus left with a graph of on-
siderably redu ed size, for whi h it is possible to nd a solution (instantiate
all the S and P remaining variables) or prove infeasibility very qui kly. This
problem orresponds to a small resour e onstrained TSP whi h we an solve
very eÆ iently. Here it is feasibility that interest us so we only perform the
sear h until a rst solution is identi ed. We however need to relax the upper
bound on the obje tive, sin e the nodes we have dis arded ould have per-
mitted us to lower the obje tive value. If no solution is found then we have
dete ted an in onsisten y and the global sear h pro edure a ts a ordingly.
{ Step three: bounding. Sin e a solution to this redu ed problem is also a
solution to the general problem where all removed nodes are simply not
visited, we an use this onstraint to al ulate upper bounds. If the value
of the solution found in the CBC onstraint is lower then the upper bound
on the obje tive value we simply store that solution and update the upper
bound.

2.6 Lower Bounds

In order to prune eÆ iently the sear h tree we must be able to al ulate lower
bounds at ea h node. Unfortunately, even if the literature is proli in terms of
lower bounds for the TSP, none expli itly exists for the PTP. It is however fairly
simple to transform a PTP into an asymmetri TSP (see [2℄) by adding N nodes
and 2N ar s. This extra portion of the graph onstitutes a dummy path that
permits the visit of nodes left unvisited by the PTP solution. The ost of visiting
a node thru this dummy path is set to the ost of its asso iated dual value. The
obje tive value of the resulting ATSP optimal solution will be superior to the
P
value of the optimal solution to the PTP by a onstant that equals the sum of
all dual values ( i 1::N i ).
2f g
Le ture Notes in Computer S ien e 5
Original Problem

0 λ 0 λ 0 λ 0 λ

0 0 0 0

Fig. 1. Transformation of a PTP into an ATSP

Well known ATSP lower bounds an then be applied to the transformed


graph. An optimal solution to the Assignment Problem (AP) is a lower bound
for the ATSP sin e it is obtained by relaxing the NoSubT our onstraint. The
Minimal Spanning Three (MST) is another by relaxation of the AllDiff on-
straint. Both of these bounds an be al ulated in polynomial time by spe ialized
algorithms.

3 Resear h Dire tions


To improve the solution quality and eÆ ien y of the proposed method, we are
presently working on two possible extensions.

3.1 CP-Based Heuristi s

Sin e it is possible to obtain good solution on NP hard routing problem using


Lo al Sear h (LS) and Constraint Programming ([7℄,[8℄,[1℄) it would be interest-
ing to see if su h an approa h ould be fast enough to generate good solution to
a PTP subproblem. However, sin e a heuristi approa h would be in apable of
proving the absen e of NRC paths, it will have to be used in onjun tion with
an exa t algorithm.

3.2 CP and Mixed Integer Programming Integration

Re ent advan es in the ombination of CP and MP have shown to be very


eÆ ient on some routing problems, notably on the TSPTW [4℄. The authors
proposed to use spe ialized algorithms that work on di erent relaxations of the
TSP to ompute eÆ iently lower bounds and redu ed osts. They use this infor-
mation in a CP sear h algorithm to lter out values that are in onsistent from
an optimization point of view. Their work also makes extensive use of traditional
CP ltering algorithms.
We proposed to work with a MIP model of the onstrained PTP to study the
possible intera tion between Mathemati al Programming and Constraint Pro-
gramming. What is hoped to be gained for ea h method from lose ollaboration
and ommuni ation is the following:
6 Louis-Martin Rousseau, Gilles Pesant, Mi hel Gendreau
{ For Constraint Programming: LP lower bounds, ri her information for bran h-
ing strategies, redu ed ost ltering (optimization onstraint), rapid identi -
ation of integer solution when the LP is integer, use of Presolve information
and the possibility to use MIP generated uts.
{ For Mixed Integer Programming, variable xing due to onstraint propaga-
tion, Maintaining integer feasibility at ea h node (with the CanBeConne ted
onstraint), and the possibility to use CP generated uts.

4 Preliminary Results
Results obtained by the proposed approa h are en ouraging sin e the method is
able to identify good negative redu ed ost paths. The role played by the CBC
onstraint is ru ial, without it the algorithm hardly produ es any NRC paths.
The CBC onstraint is also responsible for about 75% of the updates made on
the upper bound during the sear h.
Experiments have also been ondu ted to ompare early implementation of
the di erent approa hes. It seems that a heuristi based approa h produ es
better solutions on most of the instan es given a time limit is imposed. However
the pure CP approa h and MIP hybrid, whi h are exa t methods, are both very
eÆ ient on a small subset of the instan es used for omparison.

Referen es
1. Y. Caseau, F. Laburthe, and G. Silverstein. A Meta-Heuristi Fa tory for Vehi le
Routing Problems. In Prin iples and Pra ti e of Constraint Programming CP99,
Le ture Notes in Computer S ien e. Springer-Verlag, 1994.
2. M. Dell'Ami o, F. MaÆoli, and P. Varbrand. On prize- olle ting tours and the
asymmetri travelling salesman problem. Te hni al report, Dipartimento di Elet-
troni a e Informazione Polite ni o di Milano, Milano, Italie, 1994.
3. J. Desrosiers, M.M. Solomon, and F. Soumis. Time onstrained routing and s hedul-
ing. Handbooks of Operations Resear h and Management S ien e, 8:35{139, 1993.
4. F. Fo a i, A. Lodi, and M. Milano. " Solving TSP with time windows with on-
straints . In International Conferen e on Logi Programming, November 1999.
5. Ulri h Junker, Stefan E. Karis h, Niklas Kohl, Bo Vaaben, Torsten Fahle, and
Meinolf Sellmann. A framework for onstraint programming based olumn gen-
eration. In Prin iples and Pra ti e of Constraint Programming, pages 261{274,
1999.
6. G. Pesant, M. Gendreau, J.-Y. Potvin, and J.-M. Rousseau. An Optimal Algorithm
for the Traveling Salesman Problem with Time Windows using Constraint Logi
Programming. Publi ation CRT-96-15, Centre de re her he sur les transports, Uni-
versite de Montreal, Montreal, 1996.
7. L.-M. Rousseau, M. Gendreau, and G. Pesant. Using onstraint-based operators
with Variable Neighborhood Sear h to solve the Vehi le Routing Problem with
Time Windows. journal of Heuristi s. forth oming.
8. P. Shaw. Using Constraint Programming and Lo al Sear h Methods to Solve Ve-
hi le Routing Problems. In Prin iples and Pra ti e of Constraint Programming -
CP98, volume 150 of Le ture Notes in Computer S ien e, Pisa, Italy, O tober 1998.
Springer-Verlag.

You might also like