A Fixed Position Constraints in a Travelling Salesman Problem (TSP) with Multiple Job Facilities

Page 1

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: In this paper, we have considered fixed position constraints in the usual travelling salesman problem with multiple job facilities at each station. With fixed position(s) constraints one means that the station(s) (cities or nodes) are visited in such a way that a particular station(s) is to be visited in a certain specific step(s). The problem can be described as follows: There are ‘N’ stations to be visited and ‘M’ distinct jobs to be performed by a salesman. The distance between each pair of stations and facilities for jobs at each station, are known. The salesman starts from a station (home station denoted as ‘A0’) and returns back to it after completing all the jobs on the basis of performing the jobs as early as possible. The objective is to find a tour of the salesman by using the fixed position constraints such that the total distance traveled is minimum

while completing all the ‘M’ jobs, on the basis of first come first serve. Key words: Travelling Salesman Problem, Fixed Position Constraints, Lexicographic Search Approach and Lower Bound. 1. Introduction: The travelling salesman problem is a kind of mathematical puzzle with a long enough history [6, 7]. Many solution procedures have been developed such as [6, 9, 11, 12] for the travelling salesman problem (TSP) which is stated as follows: Suppose a salesman wants to visit a certain number of cities allotted to him. He knows the distance (or cost or time) of journey between every pair of city ‘i’ and city ‘j’ denoted by cij . The problem is to select a route that starts from a given home city, passes through each and every city once and only once and returns back to his starting city in the


shortest total distance. Here, we have considered fixed position constraints in the travelling salesman problem with multiple job facilities at each station [8]. The problem can be described as follows: There is a set of stations containing ‘N’ elements and a set of jobs containing ‘M’ elements those are to be performed by a salesman. The distance between each pair of stations and facilities for jobs at each station are known. A salesman starts from a given home station and returns to it after completing all the jobs. The salesman in his tour may or may not visit all the stations and should not visit a station more than once. The problem is to find a tour of the salesman such that with fixed position constraints the total distance travelled by him is minimum, while completing all the ‘M’ jobs. Thus, the constraint of the problem is with fixed position constraints which mean that the station(s) (cities or nodes) are visited in such a way that a particular station(s) is to be visited in a certain specific step(s). The importance of restricted constraints like precedence constraints, fixed position constraints and mixed constraints etc. in a routing problem has been very well discussed by Scrogg and Tharp [17]. It occurs frequently in many realistic situations. For example, a salesman has a quota of products to sell on a tour and he may want to visit the better prospects early. An early supply to a station may be made to the flood prone areas than the other stations to avoid the difficult situation it might fall in; a CEO of a company may plan a tour and need to be in a certain station on a particular date, etc.

Here we have considered, a problem of a matrix of order (1010) with 20 jobs and solved the problem by lexicographic search approach, developed by Pandit [3, 4, 5, 13, 14]. Also we have given computational results with N = 5, 10, 25, 100, 150 and M = 6, 10, 20, 25, 40. 2. A brief review of literature: The procedure for solving the travelling salesman problem usually can be divided into three basic parts- a starting point, a solution generation scheme and a termination rule. The termination rule is such that, the iteration is stopped if and only if, a tour is optimal, and the method is exact. In approximate methods the tour reached at termination generally depends on the starting point, so it is possible to produce many final tours by using different starting points. The best of these final tours is then selected [1, 2]. The pioneers in solving the problem were Dantzig, Fulkerson and Johnson [7], Flood, M.M. [15], Crores, G.A. [10], Little, Murthy, Sweeney and Karel [17] and later on several algorithms have been developed for the solution of the usual travelling salesman problem. These include dynamic programming, integer programming, branch and bound, tour-to-tour approximations and the GilmoreGomery method [16] and lexicographic search. 3. Notation and statement of the problem: Let N  Set of stations (nodes) defined by N  A0 , A1, A2 ,, AN 1 ; „

A0 ‟ being the home station.

2


K  J 1 , J 2 ,, J M , a set of

constraints. We reduce the modified cost matrix into an equivalent canonical matrix with elements dij  dij   i   j ; where, and i  min dij

‘M’ jobs to be performed.

d ( Ai , Aj )  Distance

or

cost

associated with the node pairs ( Ai , A j ) and (i, j  0, 1, 2,, ( N  1)). A salesman starts from station ( A0 , say) and returns to it after

j

β j  min (dij  αi ) . i

The new matrix is non-negative, with at least one zero in each row and each column.

completing all the jobs. He completes all the ‘M’ either by visiting all the ‘N’ stations or a subset of it and at each station only subset of ‘M’ jobs can be completed; also he should not visit a station which is already visited. The number ‘M’ and ‘N’ are positive integers which are not necessarily equal. At home station no job is available and the travel distance from any station to itself is ∞, i.e., d ( Ai , Ai )   ; 

4. Mathematical formulation: Mathematically, the problem may be stated as Minimize Z    d ( Ai , A j ) x( Ai , A j ) i

j

(i, j  0,1,2,, ( N  1))    dij xij

;

i

j

... ... ... (1) (For simplicity we write d ( Ai , A j )  d ij

Ai  N . Moreover, the salesman has to obey fixed position constraints involved in the tour. With fixed position constraints the objective is to find a tour which completes all the ‘M’ jobs and minimizes the total distance travelled. The distance variables x( Ai , A j )

and x( Ai , A j )  xij ) N 1

 x0 j  1

subject to

,

j 1

N 1

 x j0  1

...

...

j 1

... (2) Since the salesman starts from a depot „ A0 ‟ and goes back to it.

may be 0 or 1 according as

 1, if the salesman visits station from the station. x( Ai , A j )    xik   xkj  0, 1  0, otherwise. ik k j

 k, j

... ... (3) Since the salesman may or may not visit all the stations. When the salesman visits kth station from the ith and visits jth station from the kth

Let us assume that the fixed position constraints, considered here are of the type: Station „x‟ is to be visited at kth step; k is any of 1, 2, , n . Station „y‟ is to be visited at lth step; l is any of

 xik  1,  xkj  1; otherwise  0.

ik

1, 2, , n and k < l. etc.

k j

The unwanted sub-tours are eliminated by lexicographic search procedure.

We modify the cost (distance) matrix utilizing the fixed position 3


In addition to the mathematical formulation the fixed position constraints are: Station(s) „x‟ and „y‟ are to be visited at kth step and lth step, respectively; k and l are any of

Suppose there are 10 stations 20 jobs ( A0 , A1, A2 ,, A9 ) and ( J1 , J 2 ,, J 20 ) ; each station contains

some job facilities, where an arbitrarily chosen distance matrix with job facilities at each station, is given in Table 1. Here the distance and job matrix is symmetric; but it is equally applicable to an asymmetric matrix.

1, 2, , n and k  l .

5. Numerical illustration: For illustration, we consider the following example: Table 1: Distance and job matrix A0 A1 A2 A3 A4 A5 Station Jobs  A0 J 2 , J 9 , J 10 , J 11

J 5 , J 14

A1 A2

J 3 , J 13 , J 17

A3

J 5 , J 9 , J 11 , J 18 , J 20

A4

J 3 , J 4 , J 15

A5

J 1 , J 9 , J 19

A6

J3, J7 , J9

A7

J 3 , J 6 , J 9 , J 11 , J 16

A8

J 8 , J 12 , J 15

A9

6 

1 17 

Here, we consider the fixed position relations as: The stations A6 , A4 , A9 and A3 must be visited at the Step-1, Step-3, Step-5 and Step-6 respectively.

2 4 9 

3 2 1 7 

7 12 18 16 7 

A6

A7

A8

2 8 16 6 8 5 

14 20 12 11 17 12 10 

9 13 16 13 19 4 16 10 

where

A9

9 11 18 2 13 2 17 11 8   i  min dij and j

 j  min (dij  i ) i

This new matrix is non-negative with at least one zero in each row and each column (cf. Table 3), i.e.

6. Computational procedure: 6.1. Part-I: Formation of modified, reduced cost matrix and alphabet table(s): Step 1: Modify the cost matrix by assigning d ij   for which the tour between station „i‟ and station „j‟ is not possible, following the fixed position constraints. Step 2: Reduce the modified cost matrix into an equivalent canonical matrix (reduced modified cost matrix) (cf. Table 3) with elements dij  dij  i   j ; ... ... ... (4)

 dij xij   dij xij  ( i    j   , a constant )

i j

i j

… (5) the second part of the equation (5) can be used as a bias of the matrix or in other words this part is a fixed part for any tour. Step 3: Using the reduced cost matrix, we list under column i, nodes (i  0, 1, 2,, ( N  1)) the {0, 1, 2,, ( N  1)}

in

order such that The ordering

J 0(i ) , J1(i ) , , J r(i ) , , J s(i ) , , J N(i )1

rs 4

if

dijr  dijs .


Step 2 : Move out of the current Lk and go to the next block of order k  1 node i, is defined as the alphabetic order for column i, the table thus formed ; containing all the columns go to 0. Step 3 : Is V ( Lk )  d (S k )  Vt ? 0, 1, 2,, ( N  1) , is called the alphabet If yes, go to 4. If no, go to table (cf. Table 4). 5. Step 4: Construct another table Step 4 : Move to next sub-block using the 1st row of reduced cost matrix, ( 0) of Lk 1 ,with ak   (say); with this new arranging the nodes J i , Lk . (i  0,1,2,, ( N  1)) such that r  s if Go to 1. d r 0  d s 0 . The ordering thus obtained Step 4a : Check for fulfillment of gives another alphabet table (cf. Table fixed position constraints 5). This arrangement of column matrix is Is k < l ? If used for lower bound setting. The yes go to 5 If no go to 1. alphabet table thus enables us to list the Step 5 : Form tours in a systematic way such that the where is the L  ( L ; a  r ) a k 1 k k 1 k 1 values of „incomplete words‟ (leaders) at first sub-block of Lk ; put different stages also present a useful 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. ( J 0 , J1 ,, J N 1 ) so obtained for a given

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 ? Yes

No Take the next available entry in Lk

Compute V(Lk)

All M jobs are over ?

No

Is V(Lk) + d’(Sk) > Vt ?

No Is V(Lk )  Vt?

Is the 1st col. of alphabet table A exhausted?

Yes

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

No

Yes Yes

Check for the fulfillment of fixed position constraints

No Yes

Is VT

 Vt?

No Is k < l ?

Is k =1 ?

Yes k = k+1

Yes Search is over; current T is the optimal sequence with value Vt

Stop

No

No Move out of the current Lk & go to the next block of order k - 1

Move to next sub-block of Lk-1, with say ak = β

Yes Vt = VT , Ln* = T

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

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 Step-9

A1 , A2 , A5 , A7 , A8

Un-restricted

All these fixed position constraints lead to the following implications: As A6 is to be visited at step-1 (first step) therefore,

A9  A0   A9  A4   Also, as A3 comes

As A6 is visited at first step therefore, A6 cannot come in the further steps-

A0  A1   A0  A2   A0  A3   A0  A4   A0  A5   A0  A7   A0  A8   A0  A9  

A6  A0   A6  A3   A6  A4   A6  A9  

A1  A6   A2  A6   A3  A6   A4  A6   A5  A6   A7  A6   A8  A6   A9  A6  

immediately after A9 (i.e., step-5 to step-6) therefore,

A4  A0   A4  A3   A4  A9  

A9  A1   A9  A2   A9  A5   A9  A7   A9  A8  

A3  A0   A3  A4   A3  A9  

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  4

A0

 2

 0

 10

8

0

0

A3

0

 5

A4

 5

1

0

10

16

A5

 11

 9

2

 13

17

6

15

17

1

12

2

9

4

 14

 5

6

11

18

1

5

2

 7

 0

 0

0

11

5

2

0

 1

10

4

4

0

2

2

3

11

A7

 4

10

2

 1

A8

5

9

12

9

15

0

 1

A9

0

2

βj

0

0

0

0

0

0

0

5

0

0

33+5= 38

A6

A1

A2

Fixed Position

A6  0

 15

 16

A1 A2

A0 

αi

A4  0 A1   A3  2 A2   A0  4 A3   A9  9 A5  10

A0  0 A4  0 A7  6 A3  8 A8  15

Table 4 : Alphabet table A3 A5 A6 A4 At Step-6

At Step-3

A1  0 A7  2 A2  5 A8  9 A5  12

A2  0 A1  1 A5  6 A7  11 A8  18

Table 5: LB

A7

A8

At Step-1

A9  0 A5  0 A8  2 A7  0 A0  5 A1  3 A4  5 A2  11 A7  5 A8  11

3

A9

 A0

At Step-5

A8  0 A3  1 A9  1 A2  2 A5  2

A5  0 A7  1 A9  4 A0  5 A1  9

A3  0 A0   A1   A2  

A2  0 A1  4 A7  4 A5  5 A8  5


A4   A8  11 A1  16 A5   A7  13 A5  17 A7   A2  15 A9  17 A8   A6   A6   A9  

A0   A4   A6   A8  

A0   A3   A6   A9  

A1  10 A0   A0  4 A3  9 A3  14 A3   A4  7 A2  12 A2  16 A4   A1  10 A4  15 A6   A9   A6   A6  

A4   A5   A6   A7   A8  

A3   A4   A6   A9  

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. Fixed Position→

1

A0  Step-1

Step-2

A6 A6

( 0)

Step-3

Step-4

Step-5

Step-6

A9

A3

A4 0

A5

( 0)

0

A4

( 5)

5

A2

( 5)

0

A9

( 22)

17

A3

( 22)

0

Step-7 A1 ( 22) 0

Step-8 A8

(33)

11

Step-9

Step-10

Remark

A7

A0

38  Vt

(34)

1

(38)

4

× × 2

A7

13 (35)  4

 Vt

× 37  Vt A7 ( 24) 4 2 A8 ( 24)4 0 A1 (33) 4 9 A0 (37) 4 3   Vt 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 8 × 27  Vt A 9 A A0 ( 27) 0 9 8 ( 24) 0 7 ( 25)  0 1 A2 ( 27) 0 2  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  21  Vt A8 (18)0 9 A7 (19)0 1 A2 ( 21)0 2 A0 ( 21) 0 30   Vt 36 A6 (0)0 0 A2 (11)0 11 A4 (11)4 0 A5 (17)4 6 × ×  Vt A 11 A 8 (11) 0 37 4 ( 26) 15 × × × 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


Station A0

Jobs available ---

A6

J 1 , J 9 , J 19

A1

J 2 , J 9 , J 10 , J 11

A4

J 5 , J 9 , J 11 , J 18 , J 20

A5

J 3 , J 4 , J 15

A9

J 8 , J 12 , J 15

A3

J 3 , J 13 , J 17

A8

J 3 , J 6 , J 9 , J 11 , J 16

A7

J3, J7 , J9

A2

J 5 , J 14

A0

---

Total

---

Table 7: Optimum solution Jobs to be performed # Jobs to be performed ----J1 , J 9 , J19 3 J 2 , J10 , J11 3 J 5 , J18 , J 20 3 J 3 , J 4 , J15 3 J 8 , J12 2 J13, J17 2 J 6 , J16 2 J7 1 J14 1 -------

20

Distance --2 8 2 7 2 2 13 10 12 1 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

Number of Stations

Number of Jobs

No. of Problems Tried in the Respective Dimensions

1 2 3 4 5 6 8 9 10 11 12

5 8 10 12 15 18 20 25 30 40 50

8 10 15 15 15 20 20 25 30 30 40

6 6 6 6 6 6 6 6 6 6 6

9. Conclusion: It is seen that the time required for the search of the optimal solution is fairly less. 10. References: [1]

Achuthan, N.R., Caccetta, L. and Hill, S.P. (1998)

: “Capacited Vehicle Routing Problem: Some New Cutting Planes”. AsiaPacific Journal of

5

Average CPU Run time (in Sec.) Alphabet Table Search Table

0.00000 0.00000 0.05494 0.05494 0.08932 0.08932 0.10989 0.10989 0.16483 0.85389 1.54920

[2]

Ahuja, R.K., Magnanti, T. L. and Orlin, J.B. (1993)

[3]

Ahmed, N

0.0000 0.0000 0.0000 0.0045 0.0284 0.1046 0.0984 0.6457 0.8972 1.0356 1.7218

Operational Research (APORS), Vol. 20, No. 1. : “Network Flows. Theory, Algorithms and Applications”. Prentice Hall, Englewood Cliffs, N. J. : “The Oil Tankers


and Das, S (2012)

[4]

[5]

[6]

Ahmed, N and Das, S (2013)

Ahmed, N and Duttadeka, S (2015)

Bansal, S. P. and Kumar, S. (1971)

:

:

:

[7]

Bellman (1958)

:

[8]

Christofides, N. (1970)

:

[9]

Clarke, G. and Wright, J.W.(1964)

[10] Crores,

:

:

Dispatching Problem” OPSEARCH, Vol. 49, No. 4, 366 – 385. “The Problem of Maximum Attainable Flow in Minimum Cost in a Network” OPSEARCH, Vol. 50, No. 2, 197 – 214. “A precedence constraints in a travelling salesman problem (TSP) with multiple job facilities”. MAT (Journal of Statistics and Mathematical Engineering), Vol. 01, Issue 03, 1 – 17. “Optimal Tour with Multiple Job Facilities at each Station”. Indian Journal of Mathematics, Vol.13, No. 1, pp. 45-49. “On a Routing Problem”. Quarterly Applied Mathematics, Vol. XVI, No. 1, pp. 87-90. “The Shortest Hamiltonian Chain of a Graph”. SIAM Journal of Applied Mathematics, 19, pp 689-696. “Scheduling of Vehicles from a Central Depot to a number of Delivery Points”. Opns. Res., Vol. 12, pp 568-581. “A Method of

G.A.(1958)

[11] Dantzig, G., Fulkerson, R. and Johnson, S. (1954)

:

[12] Das, S. (1976)

:

[13] Das, S. (1978)

:

[14] Das, S and Ahmed, N and (2001)

:

[15] Flood, M.M.(1956)

:

[16] Little, D.C.I. et. al. (1963)

:

[17] Scroggs, R.E. and Tharp, A.L. ( )

2

Solving Travelling Salesman Problem”. Opns. Res., Vol.6, pp 791-812. ““Solution of a Large-Scale Travelling Salesman Opns. Res., Vol. 5, pp. 266-267. “Routing and Allied Combinatorial Programming Problems (A lexicographic Search Approach)”. Ph. D. Thesis, Dibrugarh University. Unpublished. “The Most Economical Route for a Travelling Salesman Problem”. Paper presented in XI Annual Convention of ORSI. “A Travelling Salesman Problem with Multiple Job Facilities” OPSEARCH, Vol. 38, No. 4, 394 – 406. “The Travelling Salesman Problem”. Opns. Res., Vol.4, pp 6175. “An Algorithm for the Travelling Salesman Problem”. Opns. Res., Vol.11, pp 972-989. “An Algorithm for Solving Travelling Salesmen Problems in Restricted


Contexts�. (Privately

Circulated).

*****

3


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.