Você está na página 1de 11

IDL - International Digital Library Of

Technology & Research


Volume 1, Issue 3, Mar 2017 Available at: www.dbpublications.org

International e-Journal For Technology And Research-2017

A Fixed Position Constraints in a


Travelling Salesman Problem (TSP) with
Multiple Job Facilities
Nazimuddin Ahmed1 and S. Das2
1
Assistant Professor, Department of Statistics, D.H.S.K. College, Dibrugarh-786001,
Assam, India, Email: mdnahmed@yahoo.com
2
Retd. Prof. Dibrugarh University, Dibrugarh-786004, Assam, India,
E mail: shiladas13@gmail.com

Abstract: while completing all the M jobs, on the


In this paper, we have considered basis of first come first serve.
fixed position constraints in the usual Key words:
travelling salesman problem with Travelling Salesman Problem,
multiple job facilities at each station. Fixed Position Constraints,
With fixed position(s) constraints one Lexicographic Search Approach and
means that the station(s) (cities or nodes) Lower Bound.
are visited in such a way that a particular
station(s) is to be visited in a certain 1. Introduction:
specific step(s). The travelling salesman problem
The problem can be described as is a kind of mathematical puzzle with a
follows: long enough history [6, 7]. Many
There are N stations to be solution procedures have been developed
visited and M distinct jobs to be such as [6, 9, 11, 12] for the travelling
performed by a salesman. The distance salesman problem (TSP) which is stated
between each pair of stations and as follows:
facilities for jobs at each station, are Suppose a salesman wants to
known. The salesman starts from a visit a certain number of cities allotted to
station (home station denoted as A0) him. He knows the distance (or cost or
and returns back to it after completing all time) of journey between every pair of
the jobs on the basis of performing the city i and city j denoted by cij . The
jobs as early as possible. The objective is problem is to select a route that starts
to find a tour of the salesman by using from a given home city, passes through
the fixed position constraints such that each and every city once and only once
the total distance traveled is minimum and returns back to his starting city in the
shortest total distance. Here, we have Here we have considered, a
considered fixed position constraints in problem of a matrix of order (1010)
the travelling salesman problem with with 20 jobs and solved the problem by
multiple job facilities at each station [8]. lexicographic search approach,
The problem can be described as developed by Pandit [3, 4, 5, 13, 14].
follows: Also we have given computational
There is a set of stations results with N = 5, 10, 25, 100, 150 and
containing N elements and a set of jobs M = 6, 10, 20, 25, 40.
containing M elements those are to be
2. A brief review of literature:
performed by a salesman. The distance
The procedure for solving the
between each pair of stations and
travelling salesman problem usually can
facilities for jobs at each station are
be divided into three basic parts- a
known. A salesman starts from a given
starting point, a solution generation
home station and returns to it after
scheme and a termination rule. The
completing all the jobs. The salesman in
termination rule is such that, the iteration
his tour may or may not visit all the
is stopped if and only if, a tour is
stations and should not visit a station
optimal, and the method is exact. In
more than once. The problem is to find a
approximate methods the tour reached at
tour of the salesman such that with fixed
termination generally depends on the
position constraints the total distance
starting point, so it is possible to produce
travelled by him is minimum, while
many final tours by using different
completing all the M jobs. Thus, the
starting points. The best of these final
constraint of the problem is with fixed
tours is then selected [1, 2].
position constraints which mean that the
The pioneers in solving the
station(s) (cities or nodes) are visited in
problem were Dantzig, Fulkerson and
such a way that a particular station(s) is
Johnson [7], Flood, M.M. [15], Crores,
to be visited in a certain specific step(s).
G.A. [10], Little, Murthy, Sweeney and
The importance of restricted
Karel [17] and later on several
constraints like precedence constraints,
algorithms have been developed for the
fixed position constraints and mixed
solution of the usual travelling salesman
constraints etc. in a routing problem has
problem. These include dynamic
been very well discussed by Scrogg and
programming, integer programming,
Tharp [17]. It occurs frequently in many
branch and bound, tour-to-tour
realistic situations. For example, a
approximations and the Gilmore-
salesman has a quota of products to sell
Gomery method [16] and lexicographic
on a tour and he may want to visit the
search.
better prospects early. An early supply to
a station may be made to the flood prone 3. Notation and statement of the
areas than the other stations to avoid the problem:
difficult situation it might fall in; a CEO Let N Set of stations (nodes)
of a company may plan a tour and need defined by N A0 , A1, A2 ,, AN 1 ;
to be in a certain station on a particular A0 being the home station.
date, etc.

2
K J 1 , J 2 ,, J M , a set of constraints. We reduce the modified cost
M jobs to be performed. matrix into an equivalent canonical
d ( Ai , Aj ) Distance or cost matrix with elements
dij dij i j ;
associated with the node pairs ( Ai , A j )
where,
and (i, j 0, 1, 2,, ( N 1)). i min dij and
j
A salesman starts from station (
j min (dij i ) .
A0 , say) and returns to it after i

completing all the jobs. He completes all The new matrix is non-negative,
the M either by visiting all the N with at least one zero in each row and
stations or a subset of it and at each each column.
station only subset of M jobs can be 4. Mathematical formulation:
completed; also he should not visit a Mathematically, the problem may
station which is already visited. The be stated as
number M and N are positive integers Minimize
which are not necessarily equal. At home Z d ( Ai , A j ) x( Ai , A j )
station no job is available and the travel i j

distance from any station to itself is , ; (i, j 0,1,2,, ( N 1))


i.e., dij xij
i j
d ( Ai , Ai ) ; ...
Ai N . ... ... (1)
Moreover, the salesman has to (For simplicity we write d ( Ai , A j ) d ij
obey fixed position constraints involved and x( Ai , A j ) xij )
in the tour. With fixed position N 1
constraints the objective is to find a tour subject to x0 j 1 ,
j 1
which completes all the M jobs and N 1
minimizes the total distance travelled. x j0 1 ... ...
j 1
The distance variables x( Ai , A j )
... (2)
may be 0 or 1 according as Since the salesman starts from a depot
A0 and goes back to it.
1, if the salesman visits station from the station.
x( Ai , A j )
0, otherwise. xik xkj 0, 1 k, j
ik k j
... ... (3)
Let us assume that the fixed Since the salesman may or may not visit
position constraints, considered here are all the stations.
of the type: Station x is to be visited at When the salesman visits kth station from
kth step; k is any of 1, 2, , n . Station the ith and visits jth station from the kth
xik 1, xkj 1; otherwise 0.
y is to be visited at lth step; l is any of ik k j

1, 2, , n and k < l. etc. The unwanted sub-tours are


We modify the cost (distance) eliminated by lexicographic search
matrix utilizing the fixed position procedure.

3
In addition to the mathematical Suppose there are 10 stations
formulation the fixed position constraints ( A0 , A1, A2 ,, A9 ) and 20 jobs
are: ( J1 , J 2 ,, J 20 ) ; each station contains
Station(s) x and y are to be
some job facilities, where an arbitrarily
visited at kth step and lth step,
chosen distance matrix with job facilities
respectively; k and l are any of
at each station, is given in Table 1. Here
1, 2, , n and k l . the distance and job matrix is symmetric;
5. Numerical illustration: but it is equally applicable to an
For illustration, we consider the asymmetric matrix.
following example:
Table 1: Distance and job matrix
Jobs Station A0 A1 A2 A3 A4 A5 A6 A7 A8 A9
A0 6 1 2 3 7 2 14 9 9
J 2 , J 9 , J 10 , J 11 A1 17 4 2 12 8 20 11 13
J 5 , J 14 A2 9 1 18 16 12 18 16
J 3 , J 13 , J 17 A3 7 16 6 11 2 13
J 5 , J 9 , J 11 , J 18 , J 20 A4 7 8 17 13 19
J 3 , J 4 , J 15 A5 5 12 2 4
J 1 , J 9 , J 19 A6 10 17 16
J3, J7 , J9 A7 11 10
J 3 , J 6 , J 9 , J 11 , J 16 A8 8
J 8 , J 12 , J 15 A9
Here, we consider the fixed where i min dij and
j
position relations as:
The stations A6 , A4 , A9 and j min (dij i )
i
A3 must be visited at the Step-1, Step-3,
This new matrix is non-negative
Step-5 and Step-6 respectively. with at least one zero in each row and
6. Computational procedure: each column (cf. Table 3),
i.e.
6.1. Part-I: Formation of modified,
reduced cost matrix and alphabet
table(s): dij xij dij xij ( i j , a constant )
i j i j
Step 1: Modify the cost matrix
(5)
by assigning d ij for which the tour
the second part of the equation (5) can be
between station i and station j is not used as a bias of the matrix or in other
possible, following the fixed position words this part is a fixed part for any
constraints. tour.
Step 2: Reduce the modified cost Step 3: Using the reduced cost
matrix into an equivalent canonical matrix, we list under column i,
matrix (reduced modified cost matrix) (i 0, 1, 2,, ( N 1)) the nodes
(cf. Table 3) with elements
dij dij i j ; {0, 1, 2,, ( N 1)} in order
... J 0(i ) , J1(i ) , , J r(i ) , , J s(i ) , , J N(i )1
such that
... ... (4) rs if dijr dijs . The ordering

4
( J 0 , J1 ,, J N 1 ) so obtained for a given Step 2 : Move out of the current
node i, is defined as the alphabetic order Lk and go to the next block of order k 1
for column i, the table thus formed ;
containing all the columns go to 0.
0, 1, 2,, ( N 1) , is called the alphabet Step 3 : Is V ( Lk ) d (S k ) Vt ?
table (cf. Table 4). If yes, go to 4. If no, go to
Step 4: Construct another table 5.
using the 1st row of reduced cost matrix, Step 4 : Move to next sub-block
arranging the
( 0)
nodes J i , of Lk 1 ,with ak (say); with this new
(i 0,1,2,, ( N 1)) such that r s if Lk .
d r 0 d s 0 . The ordering thus obtained Go to 1.
gives another alphabet table (cf. Table Step 4a : Check for fulfillment of
5). This arrangement of column matrix is fixed position constraints
used for lower bound setting. The Is k < l ? If
alphabet table thus enables us to list the yes go to 5 If no go to 1.
tours in a systematic way such that the Step 5 : Form
values of incomplete words (leaders) at Lk 1 ( Lk ; ak 1 r ) where a k 1
is the
different stages also present a useful first sub-block of Lk ; put
hierarchical structure. We can set lower k k 1 . Go to 0a.
bounds to this incomplete word for Step 6 : Check for the
quick convergence to the optimal completion of all the M
solution. Finally, we obtain an initial jobs. All M jobs are over
*
trial solution S n with value Vt. ?
If yes, go to 7. If no, go to 1.
6.2. Part-II: Lexicographic search: Step 7 :
We start with a trial solution Vt V ( Lk ) d (ak ; A0 ) VT Vt ?
with a sequence T. If yes, go to 8. If no, go to 2 with
Step 0 : k 1 ; Lk is a block k k 1.
just entered. Take a1 as the first Step 8 : Vt VT , Ln T set
*

available entry.
k k 1 and go to 2.
Step 0a : k N ?
Step 9 : Is the first column of the
If yes, go to 6. If no, go
Alphabet Table A, exhausted?
to 1.
If yes, go to 11. If no, go to 10.
Step 1 : Compute V ( Lk ) ; Step 10 : Take the next available
V ( Lk ) Vt ? If yes, go to 3 and entry in Lk ; go to 1.
else go to 1a Step 11 : Search is over; current T
Step 1a : k 1? is the optimal sequence with value Vt .
If yes, go to 9. If no, go to Step 12 : Jobs are assigned in the
2. optimal tour.
Flow chart of the solution procedure (algorithm) has been given in Fig. 1 and Fig. 2.

Start

Cost matrix (d ij )

Modified cost matrix

Reduced modified cost matrix


2
Alphabet tables A and B

Trial solution Vt with sequence T


Fig. 1: Formation of alphabet table and a trial solution.

Start

Alphabet table & a trial


sequence L*n of value Vt

k 1 ; Lk is a block just entered

Is k = N ?
No Yes

Take the next All M jobs


Compute V(Lk) No are over ? Yes
available entry in Lk

Is V(Lk) + V(Lk) + d(ak; A0) = VT


No d(Sk) > Vt ? No
Yes
Is V(Lk )
Is the 1st col. of Vt?
Yes
Check for the fulfillment of
alphabet table
A exhausted? fixed position constraints Is VT Vt?
No
No
Yes Is k < l ?
Is k =1 ? Yes
k = k+1
Yes Yes
Search is over; No
No Move to next sub-block of Vt = VT , Ln* = T
current T is the Move out of the current
optimal sequence Lk & go to the next block Lk-1, with say ak =
with value Vt of order k - 1

Form Lk+1=(Lk; ak+1=r)


Put k = k+1
Stop

Fig. 2: Lexicographic search


7. Solution:
The restricted, unrestricted stations with corresponding steps are shown in the
following table:
Table 2: Restricted, unrestricted stations with corresponding steps
Stations (excluding Step Numbers (excluding last step
Constraints
home station) (having home station, step 10))
A6 Step-1
Restricted
A4 Step-3

2
A9 Step-5
A3 Step-6
Any of Step-2, Step-4, Step-7, Step-8 and
Un-restricted A1 , A2 , A5 , A7 , A8
Step-9

All these fixed position constraints lead to the following implications:


As A6 is to be As A6 is visited A9 A0
visited at step-1 at first step A9 A4
(first step) therefore, A6
therefore, Also, as A3 comes
cannot come in
immediately after
the further steps-
A9 (i.e., step-5 to
step-6) therefore,
A0 A1 A6 A0 A1 A6 A4 A0 A9 A1 A3 A0
A0 A2 A6 A3 A2 A6 A4 A3 A9 A2 A3 A4
A0 A3 A6 A4 A3 A6 A4 A9 A9 A5 A3 A9
A0 A4 A6 A9 A4 A6 A9 A7
A0 A5 A5 A6 A9 A8
A0 A7 A7 A6
A0 A8 A8 A6
A0 A9 A9 A6

Thus the reduced modified cost (distance) matrix is


Table 3: Reduced modified distance (cost) matrix
Station A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 i
A0 0 2
A1 4 15 2 0 10 13 11 9 2
A2 0 16 8 0 17 6 15 17 1
A3 0 5 12 2 9 4
A4 1 0 6 11 18 1
A5 5 10 16 14 5 5 2 0 2
A6 3 11 0 0 11 5
A7 4 10 2 1 7 2 0 1 10
A8 5 9 12 9 15 0 1 4 4
A9 0 2
j 0 0 0 0 0 0 0 5 0 0 33+5= 38

Table 5:
Table 4 : Alphabet table LB
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A0
Fixed At At At At
Position Step-6 Step-3 Step-1 Step-5
A6 0 A4 0 A0 0 A1 0 A2 0 A9 0 A5 0 A8 0 A5 0 A3 0 A2 0
A1 A3 2 A4 0 A7 2 A1 1 A8 2 A7 0 A3 1 A7 1 A0 A1 4
A2 A0 4 A7 6 A2 5 A5 6 A0 5 A1 3 A9 1 A9 4 A1 A7 4
A3 A9 9 A3 8 A8 9 A7 11 A4 5 A2 11 A2 2 A0 5 A2 A5 5
A5 10 A8 15 A5 12 A8 18 A7 5 A8 11 A5 2 A1 9 A8 5

3
A4 A8 11 A1 16 A0 A0 A1 10 A0 A0 4 A3 9 A4 A3
A5 A7 13 A5 17 A4 A3 A3 14 A3 A4 7 A2 12 A5 A4
A7 A2 15 A9 17 A6 A6 A2 16 A4 A1 10 A4 15 A6 A6
A8 A6 A6 A8 A9 A6 A9 A6 A6 A7 A9
A9 A8

In the following lexicographic search table (cf. table 6), using fixed position
constraints and lower bounds and deleting the values Vt , the route number 1 gives a trial
solution as Vt 38 and the partial search table is obtained as follows:
Table 6: Lexicographic search table (Partial)
Route
No.
A0
Fixed Step-1 Step-2 Step-3 Step-4 Step-5 Step-6 Step-7 Step-8 Step-9 Step-10 Remark
Position A6 A4 A9 A3
1 A6 ( 0)
0 A5 ( 0)
0 A4 ( 5)
5 A2 ( 5)
0 A9 ( 22)
17 A3 ( 22)
0 A1 ( 22) 0 A8 (33)
11 A7 (34)
1 A0 (38)
4 38 Vt


2 A7 (35) 4
13 Vt

3 A7 ( 24) 4 2 A8 ( 24)4 0 A1 (33) 4 9 A0 (37) 4 37 Vt

8 A6 (0) 0 A5 (0) 0 A4 (5) 5 A1 (6)0 1 A9 (15)0 9 A3 (15)0 0 A2 ( 20)0 5 A7 ( 26) 4 6 Vt



9 A8 ( 24) 0 9 A7 ( 25) 0 1 A2 ( 27) 0 2 A0 ( 27) 0 27 Vt

27 A6 (0)0 0 A1 (3)0 3 A4 (3)0 0 A5 (9)0 6 A9 (9)0 0 A3 (9)0 0 A7 (11)0 2 A8 (11)0 0 A2 (23)0 12 A0 (23) 0 23 Vt

30 A8 (18)0 9 A7 (19)0 1 A2 ( 21)0 2 A0 ( 21) 0 21 Vt

36 A6 (0)0 0 A2 (11)0 11 A4 (11)4 0 A5 (17)4 6 Vt




37 A8 (11) 0 11 A4 ( 26) 15 Vt



The Search is over.
The optimal path from the search table (Table 6) is route No. 30:
A0 A6 A1 A4 A5 A9 A3 A8 A7 A2 A0
Therefore, the value of the path = 21 + = 21 + 38 = 59 units.
When the salesman starts from home station to perform his jobs, during his tour,
we assume that the salesman has to perform his jobs as early as possible (i.e., on the first
come first served basis), from the visit of first station onwards. The job performance table
for the path is:

4
Table 7: Optimum solution
Station Jobs available Jobs to be performed # Jobs to be performed Distance
A0 --- --- --- ---
A6 J 1 , J 9 , J 19 J1 , J 9 , J19 3 2
A1 J 2 , J 9 , J 10 , J 11 J 2 , J10 , J11 3 8
A4 J 5 , J 9 , J 11 , J 18 , J 20 J 5 , J18 , J 20 3 2
A5 J 3 , J 4 , J 15 J 3 , J 4 , J15 3 7
A9 J 8 , J 12 , J 15 J 8 , J12 2 2
A3 J 3 , J 13 , J 17 J13, J17 2 2
A8 J 3 , J 6 , J 9 , J 11 , J 16 J 6 , J16 2 13
A7 J3, J7 , J9 J7 1 10
A2 J 5 , J 14 J14 1 12
A0 --- --- --- 1
Total --- --- 20 59
8. Computational experience:
A computer program of the algorithm has been developed in C languages and is
tested on the system HP COMPAQ dx2280 and Intel Pentium D Processors. Random
numbers are used to construct the cost matrix. The following table (Table: 8) gives the list
of the problems tried along with the average CPU run time (in seconds) for solving them.
Table 8: CPU run time
Serial Number of Number of No. of Problems Tried in the Average CPU Run time (in Sec.)
Number Stations Jobs Respective Dimensions Alphabet Table Search Table
1 5 8 6 0.00000 0.0000
2 8 10 6 0.00000 0.0000
3 10 15 6 0.05494 0.0000
4 12 15 6 0.05494 0.0045
5 15 15 6 0.08932 0.0284
6 18 20 6 0.08932 0.1046
8 20 20 6 0.10989 0.0984
9 25 25 6 0.10989 0.6457
10 30 30 6 0.16483 0.8972
11 40 30 6 0.85389 1.0356
12 50 40 6 1.54920 1.7218

9. Conclusion: Operational
It is seen that the time required Research
for the search of the optimal solution is (APORS), Vol. 20,
No. 1.
fairly less. [2] Ahuja, R.K., : Network Flows.
10. References: Magnanti, T. Theory,
[1] Achuthan, : Capacited L. and Orlin, Algorithms and
N.R., Vehicle Routing J.B. (1993) Applications.
Caccetta, L. Problem: Some Prentice Hall,
and Hill, S.P. New Cutting Englewood Cliffs,
(1998) Planes. Asia- N. J.
Pacific Journal of [3] Ahmed, N : The Oil Tankers

5
and Das, S Dispatching G.A.(1958) Solving Travelling
(2012) Problem Salesman
OPSEARCH, Vol. Problem. Opns.
49, No. 4, 366 Res., Vol.6, pp
385. 791-812.
[4] Ahmed, N : The Problem of [11] Dantzig, G., : Solution of a
and Das, S Maximum Fulkerson, R. Large-Scale
(2013) Attainable Flow in and Johnson, Travelling
Minimum Cost in S. (1954) Salesman Opns.
a Network Res., Vol. 5, pp.
OPSEARCH, Vol. 266-267.
50, No. 2, 197 [12] Das, S. : Routing and
214. (1976) Allied
[5] Ahmed, N : A precedence Combinatorial
and constraints in a Programming
Duttadeka, S travelling Problems (A
(2015) salesman problem lexicographic
(TSP) with Search
multiple job Approach). Ph.
facilities. MAT D. Thesis,
(Journal of Dibrugarh
Statistics and University.
Mathematical Unpublished.
Engineering), Vol. [13] Das, S. : The Most
01, Issue 03, 1 (1978) Economical Route
17. for a Travelling
[6] Bansal, S. P. : Optimal Tour Salesman
and Kumar, with Multiple Job Problem. Paper
S. (1971) Facilities at each presented in XI
Station. Indian Annual
Journal of Convention of
Mathematics, ORSI.
Vol.13, No. 1, pp. [14] Das, S and : A Travelling
45-49. Ahmed, N Salesman Problem
[7] Bellman : On a Routing and (2001) with Multiple Job
(1958) Problem. Facilities
Quarterly Applied OPSEARCH, Vol.
Mathematics, Vol. 38, No. 4, 394
XVI, No. 1, pp. 406.
87-90. [15] Flood, : The Travelling
[8] Christofides, : The Shortest M.M.(1956) Salesman
N. (1970) Hamiltonian Problem. Opns.
Chain of a Res., Vol.4, pp 61-
Graph. SIAM 75.
Journal of Applied [16] Little, D.C.I. : An Algorithm for
Mathematics, 19, et. al. (1963) the Travelling
pp 689-696. Salesman
[9] Clarke, G. : Scheduling of Problem. Opns.
and Wright, Vehicles from a Res., Vol.11, pp
J.W.(1964) Central Depot to a 972-989.
number of [17] Scroggs, R.E. An Algorithm for
Delivery Points. and Tharp, Solving Travelling
Opns. Res., Vol. A.L. ( ) Salesmen
12, pp 568-581. Problems in
[10] Crores, : A Method of Restricted

2
Contexts. Circulated).
(Privately

*****

Você também pode gostar