Traveling salesman problem

17
Traveling salesman problem for King Josh Enterprises De Mesa, Romayne Angeli DS., Landicho, Stephanie Caridad DR., Montecillo, Ma. Nissa R. Abstract This study applies the algorithms used in operations research to King Josh enterprises, a printing business that delivers its own goods to its customers. The firm wants to determine the most efficient and cost-saving way in which all of its regular customers will be reached only once, and so algorithms used to solve a travelling salesman problem will be used since the problem falls under this one. An analysis of the data gathered, using all the tools and resources available for the study led to the determination of the shortest path to all the enterprise’s customers. I. Brief Background King Josh Enterprise is a printing business located at 14 St. Luke St., Phase I-C, Pacita Complex, San Pedro, Laguna. Currently it has a total of three employees (excluding the owner), two of them are machine operators and one of them works as helper. Among its commercial and social printing services include printing of letterheads, business cards, official receipts, sales invoices, other office forms, wedding invitations, birthday/baptismal invitations, and T-shirt printing. Regular customers of King Josh Enterprises purchase official receipts and sales invoices. Delivery of products is one of the crucial processes of an enterprise – it serves as the bridge between the firm and its customers. It is essential to determine the manner or mode and the pathways in which a product (whether it is good or service) is delivered from the factory or source to the market or the customers. Once the products reach the customers at the right place and time that it is needed, the enterprise saves itself from the possibility of lost business and may even have opened up new opportunities as it saves cost and time. These kind of problem – of finding the shortest route in which every destination point is reached exactly one is an example of travelling salesperson problem, a NP-hard (non- deterministic polynomial-time hard) problem in combinatorial optimization studied in operations research and theoretical computer science. In this study, a printing business, King Josh Enterprises, which distributes its own products (printed receipts) to several customers, will be investigated. So as, the purpose of this study is to find the shortest route from the King Josh Enterprises’ Main Office in 14 St. Luke St., Phase I-C, Pacita Complex, San Pedro, Laguna, to its regular customers in different parts of South Luzon (including Metro Manila). By knowing the shortest route in which King Josh Enterprises will be able to reach its customers, the firm will be able to save up on energy (gasoline), time and money, and 1

Transcript of Traveling salesman problem

Traveling salesman problem for King Josh EnterprisesDe Mesa, Romayne Angeli DS., Landicho, Stephanie Caridad DR.,

Montecillo, Ma. Nissa R.

Abstract

This study applies the algorithmsused in operations research to KingJosh enterprises, a printingbusiness that delivers its own goodsto its customers. The firm wants todetermine the most efficient andcost-saving way in which all of itsregular customers will be reachedonly once, and so algorithms used tosolve a travelling salesman problemwill be used since the problem fallsunder this one. An analysis of thedata gathered, using all the toolsand resources available for thestudy led to the determination ofthe shortest path to all theenterprise’s customers.

I. Brief Background

King Josh Enterprise is a printingbusiness located at 14 St. Luke St.,Phase I-C, Pacita Complex, SanPedro, Laguna. Currently it has atotal of three employees (excludingthe owner), two of them are machineoperators and one of them works ashelper. Among its commercial andsocial printing services includeprinting of letterheads, businesscards, official receipts, salesinvoices, other office forms,wedding invitations,birthday/baptismal invitations, andT-shirt printing. Regular customersof King Josh Enterprises purchaseofficial receipts and salesinvoices.

Delivery of products is one of thecrucial processes of an enterprise –it serves as the bridge between thefirm and its customers. It is

essential to determine the manner ormode and the pathways in which aproduct (whether it is good orservice) is delivered from thefactory or source to the market orthe customers. Once the productsreach the customers at the rightplace and time that it is needed,the enterprise saves itself from thepossibility of lost business and mayeven have opened up newopportunities as it saves cost andtime.

These kind of problem – of findingthe shortest route in which everydestination point is reached exactlyone is an example of travellingsalesperson problem, a NP-hard (non-deterministic polynomial-time hard)problem in combinatorialoptimization studied in operationsresearch and theoretical computerscience.

In this study, a printing business,King Josh Enterprises, whichdistributes its own products(printed receipts) to severalcustomers, will be investigated. Soas, the purpose of this study is tofind the shortest route from theKing Josh Enterprises’ Main Officein 14 St. Luke St., Phase I-C,Pacita Complex, San Pedro, Laguna,to its regular customers indifferent parts of South Luzon(including Metro Manila).

By knowing the shortest route inwhich King Josh Enterprises will beable to reach its customers, thefirm will be able to save up onenergy (gasoline), time and money,and

1

be able to prevent the possibilityof loss of future business due todelays.

II. The Problem

King Josh Enterprises has 25 regularcustomers, purchasing a fixed numberof products monthly to theenterprise. King Josh needs to supply thesecustomers monthly in the followinglocations:

1. Little Souls Dental Clinic -Pacita Complex, San Pedro,Laguna

2. V.G. Evangelio Rice Supply -Pacita Complex, San Pedro,Laguna

3. MBM Wisement Marketing &Advertising Ltd. Co - PacitaComplex, San Pedro, Laguna

4. La Tienda Lavandera - PacitaComplex, San Pedro, Laguna

5. Ross System International,Inc. - San Antonio, San Pedro,Laguna

6. Vintage Lending Corp. -Landayan, San Pedro, Laguna

7. Gonzales & RongavillaPawnshop, Inc. - Golden City,Sta. Rosa, Laguna

8. Amer Marketing - MacariaVillage, Binan, Laguna

9. Aurora KTV Bar & Restaurant -Binan, Laguna

10. 1218 Travel & Tours -San Pedro, Laguna

11. Fiesta FGrill Restaurant- Tunasan, Muntinlupa, City

12. C4JS Machinery -Tunasan, Muntinlupa, City

13. Kim’s Lechonan –Bayanan, Muntinlupa City

14. Rax Engineering - LaMarea, San Pedro, Laguna

15. CER Marketing - SanFrancisco, Binan, Laguna

16. Zanea Incorporated -Tubigan, Binan, Laguna

17. Uno Trading - Alabang,Muntinlupa City

18. Andrea Builders Center -General Malvar, Silang, Cavite

19. EMG Angels Catsup -Bulihan, Silang, Cavite

20. Heaven Grace Academy -Cabuyao, Laguna

21. Aramaru Enterprises -Pillar Village, Las Pinas City

22. Simply Petals Garden -Real, Calamba, Laguna

23. Ignatius InternationalSchool - General Trias, Cavite

24. Primegaz Corp. -Sampaloc, Manila

25. Saga Balloon Supply -Ilaya, Divisoria

Supplying these customers can betedious, exhausting and costly forKing Josh enterprises if delays weremade in bringing for product causedby possible travelling of itsdelivery car back and forth in theseplaces (e.g. The car moves fromPacita to Calamba to Pacita againthen to Las Piñas). And so, to cutoff costs for the enterprise, theshortest route to reach all thesecustomers must be determined.

However, solving for the shortestroute in reaching all of these 25customers requires very complexalgorithms and cannot be solved bysimple software that solvesoptimization models, such asLINGO®and TORA®

softwares (since itwill require too many decisionvariables). So, to be able to solvethe problem, it is acceptable toreduce the number of places to, say,10, since also, some of thecustomers are very near with eachother and they can be classified orconsidered as one group.

2

After the elimination of somelocations, Table 1 summarizes theremaining key places and Figure 1shows the map which contains theremaining key places and King JoshEnterprises.

Table 1. Remaining Key Places

The problem with 10 locations is nowto be solved.

III. Model Formulation

Table 2 shows the distances amongthe customers of King JoshEnterprises and the enterprise’smain branch are indicated. The tablesimply indicates that, in example,in order to reach Rax Engineering inLa Marea, San Pedro, Laguna fromKing Josh Enterprises’s Main branchin Pacita Complex, San Pedro,Laguna, the car being used by theowner needs to travel approximately6.9 kilometers and vice-versa. Or,in case the car is currently in

Primegaz Corp.and wants to go toSaga Balloon Supply, the car needsto travel 3.5 kilometers. The sameinterpretation goes for otherdistances. Logically, samedestination and source points entailzero distance.

To save up on costs, the owner ofKing Josh Enterprises needs to knowthe most efficient route to reachall its customers. And to find thisefficient route, the shortest routeneeds to be determined, sincemajority of the costs (gasoline andtime) are largely dependent on thedistance to be travelled by thedelivery vehicle of the enterprise.

To find the minimum total distancetravelled by King Josh to otherdelivery points, Linear Programming

3

Figure 1. Map of King Josh Enterprise andremaining key places

Customer Place

1 King JoshEnterprises

Pacita, San Pedro,Laguna

2 Rax Engineering La Marea, San Pedro,Laguna

3 Uno Trading Alabang, MuntinlupaCity

4 Andrea BuildersCenter

General Malvar,Silang, Cavite

5 EMG AngelsCatsup

Bulihan, Silang,Cavite

6 Heaven GraceAcademy Cabuyao, Laguna

7 AramaruEnterprises

Pillar Village, LasPinas City

8 Simply PetalsGarden Real, Calamba, Laguna

9 Ignatius Int’lSchool General Trias, Cavite

10 Primegaz Corp. Sampaloc, Manila

11

Saga BalloonSupply Ilaya, Divisoria

Name Address King Josh Enterprises

Rax Engineering

Uno Trading

Andrea Builders Inc.

EM G Angels Catsup

Heaven Grace

AcademyAramaru Enterprises

Simply Petals Garden

Ignatius Int'l

SchoolPrimegaz Corp.

Saga Ballon Supply

1 King Josh Enterprises

Pacita Complex, San Pedro, Laguna 0 6.9 10.8 14.2 14.8 15.4 19 24.4 31.6 34 35.9

2 Rax Engineering La M area, San Pedro, Laguna 6.9 0 7.5 20.2 19.8 14.4 12.7 24.2 21.2 24.3 26.2

3 Uno Trading Alabang, M untinlupa City 10.8 7.5 0 27.4 20.8 20.7 4.7 32.4 33.7 25.3 26.1

4 Andrea Builders Center

General M alvar, Silang, Cavite 14.2 20.2 27.4 0 9.9 33.4 34.2 36.1 25.2 55.4 55.1

5 EM G Angels Catsup Bulihan, Silang, Cavite 14.8 19.8 20.8 9.9 0 21 32.6 38.4 34.9 48.7 50.6

6 Heaven Grace Academy Cabuyao, Laguna 15.4 14.4 20.7 33.4 21 0 27 10.9 53.3 43.4 46.7

7 Aramaru Enterprises

Pillar Village, Las Pinas City 19 12.7 4.7 34.2 32.6 27 0 33.2 24.2 29 30.2

8 Simply Petals Garden Real, Calamba, Laguna 24.4 24.2 32.4 36.1 38.4 10.9 33.2 0 48.8 63.8 65.7

9Ignatius

International School

General Trias, Cavite 31.6 21.2 33.7 25.2 34.9 53.3 24.2 48.8 0 39.3 36.1

10 Primegaz Corp. Sampaloc, M anila 34 24.3 25.3 55.4 48.7 43.4 29 63.8 39.3 0 3.5

11 Saga Balloon Supply Ilaya, Divisoria 35.9 26.2 26.1 55.1 50.6 46.7 30.2 65.7 36.1 3.5 0

can be formulated. LinearProgramming is a decision-makingtool in a form of a mathematicalmethod to identify an extreme pointof a particular equation/function.It determines a way to achieve thebest result (such as maximum profitor minimum cost) with limitedresources (energy, machines,materials, money, personnel, space,time, etc.). This can be done byrepresenting a management problem asa set of mathematical equations,with the objective to eitherminimize cost or maximize profit,then solving it while the set ofresource limits called constraintsare being taken intoconsideration(1).

A. Assumptions

1. The maintenance cost of thecar being used in the deliveryis disregarded, since it isbelieved that maintenance costof the car is for the wholeduration of the travel andthat it cannot be excludedfrom maintenance costsincurred for personal travelsof the owner.

2. No labor costs are incurredsince the owner personallydelivers the orders to thecustomers.

3. Since the gasoline prices areassumed to be constant on theduration of the travel, it canbe eliminated in the problemformulation. Should the costof travel due to the fuel usedup is needed to be determined,the total minimum distancethat will be generated can bemultiplied to the fuelefficiency (liters perkilometre of gasoline) andgasoline price (in Pesos perLiter gasoline)

4. Toll rates are not includedfor problem simplification.

5. All customers should bereached by King JoshEnterprises within a day.

B. Definition of Variables

To formulate the problem, travel among delivery points were represented as variables. First, thelocations were assigned a particularnumber, as follows:

1. King Josh Enterprises2. Rax Engineering3. Uno Trading4. Andrea Builders Center5. EMG Angels Catsup6. Heaven Grace Academy7. Aramaru Enterprises8. Simply Petals Garden9. Ignatius International School10. Primegaz Corp.11. Saga Balloon Supply

4

Table 2. Summary of distances among the customers of King Josh Enterprise andenterprise’s main branch

Then, travel among the deliverypoints were represented byvariables. We then represent thesesubroutes (travel between twolocation points) as

Xij, where i represents the currentlocation of the car in each subrouteand j as its next location.

i,j = 1,2,3,4,5,6,7,8,9,10,11corresponding to the assignednumbers to each locations.

One of the variables, X11, indicatesthat King Josh Enterprises (takingthe subscript 1 corresponding to itsassigned number) went to the sameplace, King Josh Enterprises (thusthe another part of the subscript1). Should it be a part of theroute, it entails zero distance andthe variable takes on a value of 1in the solution.

Another example is the variable X21.This means that the car came fromLocation 2 (which is RaxEngineering) and is going toLocation 1 (which is King JoshEnterprises). In case this wasselected as part of the shortestroute in the solution, X21 takes on avalue of 1 and a cost of 6.9kilometers is incurred. The reverseof this subroute (from King JoshEnterprises to Rax Engineering) isrepresented by X12. Interpretations for the variablerepresentation are the same forother locations.

The decision variables of theproblem is then summarized in (1) as

if Location i is followed byLocation j

Otherwise (1)

In formulating the objectivefunction, the distances aremultiplied to the variables and theresults were added up. The values ofthe variables in the solution canonly take the value of 0 and 1,which represents that the subrouteis not included or is included inthe total minimum distance,respectively.

C. Objective Function

The total distance is thensummarized in (2) in the followingfunction then represent thisdistance as Z. Z is then minimizedaccording to the enterprise’sobjective, and is expressed:

Minimize Total Distance = Z = 0X11 +6.9X21 + 10.8X31 + 14.2X41 + 14.8X51 +15.4X61 + 19X71 + 24.4X81 + 31.6X91 +34X101 + 35.9X111 + 6.9X12 + 0X22 +7.5X32 + 20.2 X42 + 19.8X52 + 14.4X62 +12.7X72 + 24.2X82 + 21.2X92 + 24.3X102 +

5

26.2X112 + 10.8X13 + 7.5X23 + 0X33 +27.4X43 + 20.8X53 + 20.7X63 + 4.7X73 +32.4X83 + 33.7X93 + 25.3X103 + 26.1 X113

+ 14.2X14 + 20.2X24 + 27.4X34 + 0X44 +9.9X54 + 33.4X64 + 34.2X74 + 36.1X84 +25.2X94 + 55.4X104 + 55.1X114 + 14.8X15 +19.8X25 + 20.8X35 + 9.9X45 + 0X55 + 21X65

+ 32.6X75 + 38.4X85 + 34.9X95 + 48.7X105

+ 50.6X115 + 15.4X16 + 14.4X26 + 20.7X36

+ 33.4X46 + 21X56 + 0X66 + 27X76 +10.9X86 + 53.3X96 + 43.4X106 + 46.7X116 +19.0X17 + 12.7X27 + 4.7X37 + 34.2X47 +32.6X57 + 27X67 + 0X77 + 33.2X87 +24.2X97 + 29X107 + 30.2X117 + 24.4X18 +24.2X28 + 32.4X38 + 36.1X48 + 38.4X58 +10.9X68 + 33.2X78 + 0X88 + 48.8X98 +63.8X108 + 65.7X118 + 31.6X19 + 21.2X29 +33.7X39 + 25.2X49 + 34.9X59 + 53.3X69 +24.2X79 + 48.8X89 + 0 X99 + 39.3X109 +36.1X119 + 34.0X110 + 24.3X210 + 25.3X310

+ 55.4X410 + 48.7X510 + 43.4X610 + 29X710

+ 63.8X810 + 39.3X910 + 0X110 + 3.5X1110 +35.9X111 + 26.2X211 + 26.1X311 + 55.1X411

+ 50.6X511 + 46.7X611 + 30.2X711 +65.7X811 + 36.1X911 + 3.5X111 + 0X1111

(2)

D. Annotated Constraints

Another constraint for the enterprise is that it should visit aparticular location only once, and this is expressed according to the following:

In order to visit a particularlocation only once, a singledestination should be selected fromeach current location. And for eachpossible current locations, theconstraint (from Location 1 to 11)is expressed in (3)-(13) as follows:

X12 + X13 + X14 + X15 + X16 + X17 + X18 + X19 + X110 + X111 = 1;

X21 + X23 + X24 + X25 + X26 + X27

+ X28 + X29 + X210 + X211 = 1; X31 + X32 + X34 + X35 + X36 + X37 + X38 + X39 + X310 + X311 = 1;

X41 + X42 + X43 + X45 + X46 + X47

+ X48 + X49 + X410 + X411 = 1; X51 + X52 + X53 + X54 + X56 + X57

+ X58 + X59 + X510 + X511 = 1; X61 + X62 + X63 + X64 + X65 + X67

+ X68 + X69 + X610 + X611 = 1; X71 + X72 + X73 + X74 + X75 + X76

+ X78 + X79 + X710 + X711 = 1; X81 + X82 + X83 + X84 + X85 + X86

+ X87 + X89 + X810 + X811 = 1; X91 + X92 + X93 + X94 + X95 + X96

+ X97 + X98 + X910 + X911 = 1; X101 + X102 + X103 + X104 + X105 + X106 + X107 + X108 + X109 + X111 = 1; X111 + X112 + X113 + X114 + X115 + X116 + X117 + X118 + X119 + X1110 = 1;

(3) – (13)

In order to visit a particular location only once, every destination point (or next location)should only have a single source point or origin, and the constraints(from Location 1 to 11) is expressedin (14)-(28)as follows:

X21 + X31 + X41 + X51 + X61 + X71 + X81 + X91 + X101 + X111 = 1; X12 + X32 + X42 + X52 + X62 + X72 + X82 + X92 + X102 + X112 = 1; X13 + X23 + X43 + X53 + X63 + X73 + X83 + X93 + X103 + X113 = 1; X14 + X24 + X34 + X54 + X64 + X74 + X84 + X94 + X104 + X114 = 1; X15 + X25 + X35 + X45 + X65 + X75 + X85 + X95 + X105 + X115 = 1; X16 + X26 + X36 + X46 + X56 + X76

+ X86 + X96 + X106 + X116 = 1; X17 + X27 + X37 + X47 + X57 + X67 + X87 + X97 + X107 + X117 = 1; X18 + X28 + X38 + X48 + X58 + X68 + X78 + X98 + X108 + X118 = 1; X19 + X29 + X39 + X49 + X59 + X69

+ X79 + X89 + X109 + X119 = 1; X110 + X210 + X310 + X410 + X510 + X610 + X710 + X810 + X910 + X1110 = 1; X111 + X211 + X311 + X411 + X511 + X611 + X711 + X811 + X911 + X111 = 1;

6

(14) – (28)

Lastly, in order for the vehicle to visit a particular location only once, the vehicle should not go backto its previous location. This is expressed in (29)-(139) as follows:

For Location 1:

X21 + X12 <= 1; X31 + X13 <= 1; X41 + X14 <= 1; X51 + X15 <= 1; X61 + X16 <= 1; X71 + X17 <= 1; X81 + X18 <= 1; X91 + X19 <= 1; X101 + X110 <= 1; X111 + X111 <= 1;

(29) – (39)For Location 2:

X12 + X21 <= 1; X32 + X23 <= 1; X42 + X24 <= 1; X52 + X25 <= 1; X62 + X26 <= 1; X72 + X27 <= 1; X82 + X28 <= 1; X92 + X29 <= 1; X102 + X210 <= 1; X112 + X211 <= 1;

(40) – (49)For Location 3:

X13 + X31 <= 1; X23 + X32 <= 1; X43 + X34 <= 1; X53 + X35 <= 1; X63 + X36 <= 1; X73 + X37 <= 1; X83 + X38 <= 1; X93 + X39 <= 1; X103 + X310 <= 1; X113 + X311 <= 1;

(50) – (59)For Location 4:

X14 + X41 <= 1; X24 + X42 <= 1;

X34 + X43 <= 1; X54 + X45 <= 1; X64 + X46 <= 1; X74 + X47 <= 1; X84 + X48 <= 1; X94 + X49 <= 1; X104 + X410 <= 1; X114 + X411 <= 1;

(60) – (69)

For Location 5:

X15 + X51 <= 1; X25 + X52 <= 1; X35 + X53 <= 1; X45 + X54 <= 1; X65 + X56 <= 1; X75 + X57 <= 1; X85 + X58 <= 1; X95 + X59 <= 1; X105 + X510 <= 1; X115 + X511 <= 1;

(70) – (79)

For Location 6:

X16 + X61 <= 1; X26 + X62 <= 1; X36 + X63 <= 1; X46 + X64 <= 1; X56 + X65 <= 1; X76 + X67 <= 1; X86 + X68 <= 1; X96 + X69 <= 1; X106 + X610 <= 1; X116 + X611 <= 1;

(80) – (89)For Location 7:

X17 + X71 <= 1; X27 + X72 <= 1; X37 + X73 <= 1; X47 + X74 <= 1; X57 + X75 <= 1; X67 + X76 <= 1; X87 + X78 <= 1; X97 + X79 <= 1; X107 + X710 <= 1; X117 + X711 <= 1;

(90) – (99)For Location 8:

7

X18 + X81 <= 1; X28 + X82 <= 1; X38 + X83 <= 1; X48 + X84 <= 1; X58 + X85 <= 1; X68 + X86 <= 1; X78 + X87 <= 1; X98 + X89 <= 1; X108 + X810 <= 1; X118+ X811 <= 1;

(100) – (109)For Location 9:

X19 + X91 <= 1; X29 + X92 <= 1; X39 + X93 <= 1; X49 + X94 <= 1; X59 + X95 <= 1; X69 + X96 <= 1; X79 + X97 <= 1; X89 + X98 <= 1; X109 + X910 <= 1; X119 + X911 <= 1;

(110) – (119)For Location 10:

X110 + X101 <= 1; X210 + X102 <= 1; X310 + X103 <= 1; X410 + X104 <= 1; X510 + X105 <= 1; X610 + X106 <= 1; X710 + X107 <= 1; X810 + X108 <= 1; X910 + X109 <= 1; X1110 + X111 <= 1;

(120) – (129)And for Location 11:

X111 + X111 <= 1; X211 + X112 <= 1; X311 + X113 <= 1; X411 + X114 <= 1; X511 + X115 <= 1; X611 + X116 <= 1; X711 + X117 <= 1; X811 + X118 <= 1; X911 + X119 <= 1; X111 + X1110 <= 1;

(130) – (139)

It is also necessary to indicate that the variables are binary or that each takes only the value of either 0 or 1. This is expressed in (140) as

Xij = (0,1)where i,j = 1,2,3,4,5,6,7,8,9,10,11

(140)

IV. Results and Discussion

A. Solution

Using Linear Programming

The whole Linear Programming model of the problem is

Minimize Z = 0X11 + 6.9X21 + 10.8X31 +14.2X41 + 14.8X51 + 15.4X61 + 19X71 +24.4X81 + 31.6X91 + 34X101 + 35.9X111 +6.9X12 + 0X22 + 7.5X32 + 20.2 X42 +19.8X52 + 14.4X62 + 12.7X72 + 24.2X82 +21.2X92 + 24.3X102 + 26.2X112 + 10.8X13 +7.5X23 + 0X33 + 27.4X43 + 20.8X53 +20.7X63 + 4.7X73 + 32.4X83 + 33.7X93 +25.3X103 + 26.1 X113 + 14.2X14 + 20.2X24

+ 27.4X34 + 0X44 + 9.9X54 + 33.4X64 +34.2X74 + 36.1X84 + 25.2X94 + 55.4X104 +55.1X114 + 14.8X15 + 19.8X25 + 20.8X35 +9.9X45 + 0X55 + 21X65 + 32.6X75 + 38.4X85

+ 34.9X95 + 48.7X105 + 50.6X115 + 15.4X16

+ 14.4X26 + 20.7X36 + 33.4X46 + 21X56 +0X66 + 27X76 + 10.9X86 + 53.3X96 +43.4X106 + 46.7X116 + 19.0X17 + 12.7X27 +4.7X37 + 34.2X47 + 32.6X57 + 27X67 + 0X77

+ 33.2X87 + 24.2X97 + 29X107 + 30.2X117

+ 24.4X18 + 24.2X28 + 32.4X38 + 36.1X48

+ 38.4X58 + 10.9X68 + 33.2X78 + 0X88 +48.8X98 + 63.8X108 + 65.7X118 + 31.6X19 +21.2X29 + 33.7X39 + 25.2X49 + 34.9X59 +53.3X69 + 24.2X79 + 48.8X89 + 0 X99 +39.3X109 + 36.1X119 + 34.0X110 + 24.3X210

+ 25.3X310 + 55.4X410 + 48.7X510 +43.4X610 + 29X710 + 63.8X810 + 39.3X910 +0X110 + 3.5X1110 + 35.9X111 + 26.2X211 +26.1X311 + 55.1X411 + 50.6X511 + 46.7X611

8

+ 30.2X711 + 65.7X811 + 36.1X911 +3.5X111 + 0X1111

subject to

X12 + X13 + X14 + X15 + X16 + X17 + X18 + X19 + X110 + X111 = 1; X21 + X23 + X24 + X25 + X26 + X27

+ X28 + X29 + X210 + X211 = 1; X31 + X32 + X34 + X35 + X36 + X37 + X38 + X39 + X310 + X311 = 1; X41 + X42 + X43 + X45 + X46 + X47

+ X48 + X49 + X410 + X411 = 1; X51 + X52 + X53 + X54 + X56 + X57

+ X58 + X59 + X510 + X511 = 1; X61 + X62 + X63 + X64 + X65 + X67

+ X68 + X69 + X610 + X611 = 1; X71 + X72 + X73 + X74 + X75 + X76

+ X78 + X79 + X710 + X711 = 1; X81 + X82 + X83 + X84 + X85 + X86

+ X87 + X89 + X810 + X811 = 1; X91 + X92 + X93 + X94 + X95 + X96

+ X97 + X98 + X910 + X911 = 1; X101 + X102 + X103 + X104 + X105 + X106 + X107 + X108 + X109 + X111 = 1; X111 + X112 + X113 + X114 + X115 + X116 + X117 + X118 + X119 + X1110 = 1;

X21 + X31 + X41 + X51 + X61 + X71 + X81 + X91 + X101 + X111 = 1; X12 + X32 + X42 + X52 + X62 + X72 + X82 + X92 + X102 + X112 = 1; X13 + X23 + X43 + X53 + X63 + X73 + X83 + X93 + X103 + X113 = 1; X14 + X24 + X34 + X54 + X64 + X74 + X84 + X94 + X104 + X114 = 1; X15 + X25 + X35 + X45 + X65 + X75 + X85 + X95 + X105 + X115 = 1; X16 + X26 + X36 + X46 + X56 + X76

+ X86 + X96 + X106 + X116 = 1; X17 + X27 + X37 + X47 + X57 + X67 + X87 + X97 + X107 + X117 = 1; X18 + X28 + X38 + X48 + X58 + X68 + X78 + X98 + X108 + X118 = 1; X19 + X29 + X39 + X49 + X59 + X69

+ X79 + X89 + X109 + X119 = 1; X110 + X210 + X310 + X410 + X510 + X610 + X710 + X810 + X910 + X1110 = 1;

X111 + X211 + X311 + X411 + X511 + X611 + X711 + X811 + X911 + X111 = 1; X21 + X12 <= 1; X31 + X13 <= 1; X41 + X14 <= 1; X51 + X15 <= 1; X61 + X16 <= 1; X71 + X17 <= 1; X81 + X18 <= 1; X91 + X19 <= 1; X101 + X110 <= 1; X111 + X111 <= 1;

X12 + X21 <= 1; X32 + X23 <= 1; X42 + X24 <= 1; X52 + X25 <= 1; X62 + X26 <= 1; X72 + X27 <= 1; X82 + X28 <= 1; X92 + X29 <= 1; X102 + X210 <= 1; X112 + X211 <= 1;

X13 + X31 <= 1; X23 + X32 <= 1; X43 + X34 <= 1; X53 + X35 <= 1; X63 + X36 <= 1; X73 + X37 <= 1; X83 + X38 <= 1; X93 + X39 <= 1; X103 + X310 <= 1; X113 + X311 <= 1;

X14 + X41 <= 1; X24 + X42 <= 1; X34 + X43 <= 1; X54 + X45 <= 1; X64 + X46 <= 1; X74 + X47 <= 1; X84 + X48 <= 1; X94 + X49 <= 1; X104 + X410 <= 1; X114 + X411 <= 1;

X15 + X51 <= 1; X25 + X52 <= 1; X35 + X53 <= 1;

9

X45 + X54 <= 1; X65 + X56 <= 1; X75 + X57 <= 1; X85 + X58 <= 1; X95 + X59 <= 1; X105 + X510 <= 1; X115 + X511 <= 1;

X16 + X61 <= 1; X26 + X62 <= 1; X36 + X63 <= 1; X46 + X64 <= 1; X56 + X65 <= 1; X76 + X67 <= 1; X86 + X68 <= 1; X96 + X69 <= 1; X106 + X610 <= 1; X116 + X611 <= 1;

X17 + X71 <= 1; X27 + X72 <= 1; X37 + X73 <= 1; X47 + X74 <= 1; X57 + X75 <= 1; X67 + X76 <= 1; X87 + X78 <= 1; X97 + X79 <= 1; X107 + X710 <= 1; X117 + X711 <= 1; X18 + X81 <= 1; X28 + X82 <= 1; X38 + X83 <= 1; X48 + X84 <= 1; X58 + X85 <= 1; X68 + X86 <= 1; X78 + X87 <= 1; X98 + X89 <= 1; X108 + X810 <= 1; X118+ X811 <= 1;

X19 + X91 <= 1; X29 + X92 <= 1; X39 + X93 <= 1; X49 + X94 <= 1; X59 + X95 <= 1; X69 + X96 <= 1; X79 + X97 <= 1; X89 + X98 <= 1; X109 + X910 <= 1; X119 + X911 <= 1;

X110 + X101 <= 1; X210 + X102 <= 1; X310 + X103 <= 1; X410 + X104 <= 1; X510 + X105 <= 1; X610 + X106 <= 1; X710 + X107 <= 1; X810 + X108 <= 1; X910 + X109 <= 1; X1110 + X111 <= 1;

X111 + X111 <= 1; X211 + X112 <= 1; X311 + X113 <= 1; X411 + X114 <= 1; X511 + X115 <= 1; X611 + X116 <= 1; X711 + X117 <= 1; X811 + X118 <= 1; X911 + X119 <= 1; X111 + X1110 <= 1;

Xij = (0,1); i,j = 1,2,3,4,5,6,7,8,9,10,11 (141)

King Josh Enterprises needs to knowthe shortest route in which it willbe able to reach all its customersat least exactly once. This is atype of a Travelling SalespersonProblem, when the objective is tofind the least costly route if atravelling salesman wishes to visitexactly one each of a list of anumber of cities and then returningto the home city(2).

The solution for this problem isthen determined using LINGO®

software. The solution reportgenerated by LINGO® is shown at thefigure below.

10

The whole report is summarized in Table 3.

Table 3. Summary of Solution as solved inLINGO®

Variables ValueX18, X86, X65, X54, X49, X911,X1110, X107, X73, X32, X21

1

X11, X81, X12, X22, X62, X102,X23, X33, X103, X44, X94, X45,X55, , X26, X56, X66, , X37,X77, X97, X68, X88, X79, X99,X119, X210, X310, X710, X1010,X1011, X1111 X31, X13, X41, X14,X51, X15, X61, X16, X71, X83,X17, X38, X91, X19, X101, X110,X111, X111, X42, X24, X52, X25,X35, X53, X72, X27, X82, X28,

X92, X29, X112, X211, X43, X34,X63, X36, X93, X39, X113, X109,X910, X311, X64, X46, X74, X47,X84, X48, X104, X410, X114, X411,X75, X57, X85, X58, X95, X59,

X105, X510, X115, X511, X76, X67,X96, X69, X106, X610, X116, X611,X87, X78, X117, X711, X98, X89, ,

0

X108, X810, X118, X811

TOTAL DISTANCE (Z)179.1kilometers

1—8 —6—5—4—9—11—10—7—3—2—1

Based on the results, King JoshEnterprises must go to Simply PetalsGarden, then to Heaven GraceAcademy, EMG Angels Catsup, AndreaBuilders Center, IgnatiusInternational School, Saga BalloonSupply, Primegaz Corp., AramaruEnterprises, Uno Trading, RaxEngineering, then back to King JoshEnterprises to incur the minimumtravelling distance of 179.1kilometers.

11

Figure 2. LINGO® solution report for the TSP (Travelling SalespersonProblem) of King Josh Enterprises.

M 6.9 10.8 14.2 14.8 15.4 19 24.4 31.6 34 35.96.9 M 7.5 20.2 19.8 14.4 12.7 24.2 21.2 24.3 26.210.8 7.5 M 27.4 20.8 20.7 4.7 32.4 33.7 25.3 26.114.2 20.2 27.4 M 9.9 33.4 34.2 36.1 25.2 55.4 55.114.8 19.8 20.8 9.9 M 21 32.6 38.4 34.9 48.7 50.615.4 14.4 20.7 33.4 21 M 27 10.9 53.3 43.4 46.719 12.7 4.7 34.2 32.6 27 M 33.2 24.2 29 30.224.4 24.2 32.4 36.1 38.4 10.9 33.2 M 48.8 63.8 65.731.6 21.2 33.7 25.2 34.9 53.3 24.2 48.8 M 39.3 36.134 24.3 25.3 55.4 48.7 43.4 29 63.8 39.3 M 3.535.9 26.2 26.1 55.1 50.6 46.7 30.2 65.7 36.1 3.5 M

M 0 0.2 3.3 0 8.5 9.3 13.1 1.5 27.1 290 M 5.8 18.2 13.9 32.5 29.7 21.8 0 32.5 32.50 5.6 M 21.5 11 18.8 0 26.1 8.6 23.4 24.23.3 18.2 21.7 M 0 31.4 29.4 29.7 0 32.5 32.50 13.9 11.2 0 M 15.1 23.9 28.1 5.8 30.9 30.90 7.9 10.5 22.9 6.6 M 17.7 0 23.6 2.8 2.89.1 11.7 0 29.2 23.7 26 M 27.8 0 30.6 30.64.6 13.3 17.8 21.2 19.6 0 22.3 M 17.5 52.9 54.81.5 0 8.8 0 5.8 32.1 0.2 23.2 M 18.1 14.921.6 20.8 18.1 47.9 37.3 39.9 22.7 55.9 12.6 M 023.5 22.7 18.9 47.6 39.2 43.2 23.9 57.8 9.4 0 M

Using Branch and Bound Method

An alternative solution to find theshortest route for the company is byusing the Branch and Bound Algorithmfor the Travelling Salesman Problemusing the same variables used in LP.The Upper Bound is first calculatedas an assignment problem, withoutconstraint that tour be connected,using the Hungarian Method as shownin Table 4 below:

Table 4. Hungarian Method First Tableau

The process is done by using theHungarian Method for every node(branch) of the Branch and BoundTree. For this instance, we are inthe first node. The first thing todo is to find the minimum value forevery row and subtract this minimumvalue for every value in the rows ofthe table. Table 5 shows the nexttableau after subtracting the rowmin values from the table.

Table 5. Hungarian Method Second TableauM 0 3.9 7.3 7.9 8.5 12.1 17.5 24.7 27.1 290 M 0.6 13.3 12.9 7.5 5.8 17.3 14.3 17.4 19.36.1 2.8 M 22.7 16.1 16 0 27.7 29 20.6 21.44.3 10.3 17.5 M 0 23.5 24.3 26.2 15.3 45.5 45.24.9 9.9 10.9 0 M 11.1 22.7 28.5 25 38.8 40.74.5 3.5 9.8 22.5 10.1 M 16.1 0 42.4 32.5 35.814.3 8 0 29.5 27.9 22.3 M 28.5 19.5 24.3 25.513.5 13.3 21.5 25.2 27.5 0 22.3 M 37.9 52.9 54.810.4 0 12.5 4 13.7 32.1 3 27.6 M 18.1 14.930.5 20.8 21.8 51.9 45.2 39.9 25.5 60.3 35.8 M 032.4 22.7 22.6 51.6 47.1 43.2 26.7 62.2 32.6 0 M

After this, the minimum value forevery column is now subtracted fromevery value in the columns of thetable. Table 6 shows the next tableafter subtracting the column min

values from the table and after linehas been drawn to pass through allthe zeros in the table. (If thetotal of lines drawn is equal to 11,then we go to next step, if not, theminimum value of that is not coveredby the line will be subtracted fromall the values that are not coveredby the line and this min value willbe added to the intersection valuewhere two lines meet, this processis repeated until the total numberof lines is equal to 11)

Table 6. Hungarian Method Third Tableau

M 0 3.9 7.3 7.9 8.5 12.1 17.5 10.4 27.1 290 M 0.6 13.3 12.9 7.5 5.8 17.3 0 17.4 19.36.1 2.8 M 22.7 16.1 16 0 27.7 14.7 20.6 21.44.3 10.3 17.5 M 0 23.5 24.3 26.2 1 45.5 45.24.9 9.9 10.9 0 M 11.1 22.7 28.5 10.7 38.8 40.74.5 3.5 9.8 22.5 10.1 M 16.1 0 28.1 32.5 35.8 M IN = 14.3 8 0 29.5 27.9 22.3 M 28.5 5.2 24.3 25.513.5 13.3 21.5 25.2 27.5 0 22.3 M 23.6 52.9 54.810.4 0 12.5 4 13.7 32.1 3 27.6 M 18.1 14.930.5 20.8 21.8 51.9 45.2 39.9 25.5 60.3 21.5 M 032.4 22.7 22.6 51.6 47.1 43.2 26.7 62.2 18.3 0 M

Then, a 0 is selected such that itwill encompass 1 row and 1 columnand no 2 or more 0‘s will be at thesame column or table. Table 7 showsthis.

Table 7. Hungarian Method Optimal Tableu

The resultant forms the root of the tree – that is:

X15 = X21 = X37 = X49 = X54 = X68 = X73 =X86

= X92 = X1011 = X1110 = 1Z =116.2

12

However, this can’t be a solutionfor a TSP Problem, since there arecyclic routes like 3-7-3, 6-8-6, 11-10-11. To solve this, the tree willnow be branched by letting X1110 andX1011 =0. The 2nd node will bebranched from the first node withz=116.2 with X1110 = 0, and the thirdnode is with X1011=0.

The Hungarian method is repeatedwith this new node. That is,assigning the value of X1110 in thetableu with very large number M.After using the Hungarian Methodagain, the optimal solution will besolved for this 2nd node.

The optimal solution for the 2nd nodeis:

X12 = X21 = X37 = X45 = X54 = X68 = X73 =X86 =

X911 = X109 = X1110 = 1Z =143.7

A separate Hungarian method will be done for the third node with X1011=0 and assigning M in its value in the tableau.

The optimal solution for the 2nd nodeis:

X12 = X21 = X37 = X45 = X54 = X68 = X73 =X86 =

X910 = X1011 = X119 = 1Z =143.7

As seen, this optimal solution from node 2 and 3 will be branched again since it contains cyclic routes again, such as 1-2-1, 4-5-4, and 6-8-6. This time, X68 and X86 will now be equal to 0, and this will be two branch nodes of the 2nd and 3rd node.

The Branching and Hungarian Methodcontinues until the optimal solutionin every node produces no cyclic

routes. And since this problem is aminimization it is not necessary tofurther branch a node containing az-value less than the z-values ofother nodes of same level.

In continuation of the solution ofthis problem, Figure 3, summarizesthe branch and bound method done.

The optimal solution for the 16th

node and the optimal solution forthe whole problem is:

X18 = X21 = X32 = X49 = X54 = X65 = X73 =X86

= X911 = X107 = X1110 = 1Z = 179.1

13

Figure 3. Branch and Bound Tree for the TravellingSalesman Problem

Hence, the optimal solution yieldedusing the Branch and Bound Algorithmis same as with the LinearProgramming Model that is solvedusing the LINGO® software.

B. Sensitivity Analysis

Sensitivity Analysis determines howresponsive or sensitive the optimalsolution is to changes in values ofvariables in the solution. Itaddresses issues such as thepossibility of available resourcesthat not allocated properly that canbe solved by determining whatresources should be added toeliminate bottlenecks rather thanthe usual approach of allocating theresources available or at hand(3).

A variable is an economic activitythat consumes (input) resources forproducing (output) profit. Asdefined, reduced cost per unitactivity is equal to the cost ofconsumed resources per unit activityminus the profit per unit ofactivity. A variable that iseconomically attractive, will have azero reduced cost in the optimumsolution, which shows that anequilibrium point has been reachedat which output equals the input(1).On the other hand, if the variable’sreduced cost is positive, then thecost of its consumed resources perunit is higher than its profit perunit, and so, the variable(activity) should not be taken. Thereduced cost is just the allowableincrease (when maximizing) from thecurrent value of this coefficient toremain within its allow-

able range to stay optimal or theallowable decrease (when minimizing)(4).

Table 8, shows the summary of thereduced costs, as solved in LINGO®,of each variables. As seen, X18, X86,X65, X54, X49, X911, X1110, X107, X73, X32,and X21 has 0.0 reduced cost whichproves it is the optimum variables.X81, X68, X56 X45, X94, X119, X1011, X710,X37, X23, and X12 has also 0.0 reducedcost, since the value of theircoefficient is equal to the optimumsolution. As for X11, X22, X33, X44,X55, X66, X77, X88, X99, X1010, and X1111,

its reduced costs value is also 0since the distance between place i toj if i=j is, no further change can bedone to its coefficient.

14

The other remaining variables’reduced costs, shows, how much theycan be decreased before the optimalsolution would change. For example,X31 and X13 has 2.9 value of reducedcost, so, its coefficient can be

decreased up to 2.9 before anoptimal solution changes. Insimpler terms, the distance betweenplace 3 and 1, Uno Trading and KingJosh Enterprise, respectively, canbe decreased up to 2.9 kilometers,without affecting the optimumsolution.

Sensitivity analysis reveals shadowprices, that is, the value per unitof a particular constraint. Shadowprice is the amount of change in thevalue of the objective function if aparticular constraint incurs a unitchange. This also reveals thechanges to the objective functioncaused by a new variable introducedinto the function. (4)

However, since shadow price isdefined as the value per unit of aspecific constraint, sensitivityanalysis for the dual price cannotbe interpreted in this company’sproblem since the constraints ofthis problem is used only to signifythat each location must be an entryand exit point once and the otherconstraint signifies that a salesmanshould visit a particular locationonly once and should not go back tothe previous location. So, the dualprice or shadow price for this

15

Table 8. Summary of reduced cost of variable- as part of solution in LINGO®

Variable ReducedCost

X11, X21, X81, X12, X22,X32, X62, X102, X23, X33,X73, X103, X44, X54, X94,X45, X55, X65, X26, X56,X66, X86, X37, X77, X97,X107, X18, X68, X88, X49,X79, X99, X119, X210, X310,X710, X1010, X1110, X911,

X1011,X1111

0.0

X31, X13 2.9X41, X14 1.6X51, X15, 1.3X61, X16 0.6

X71, X83, X17, X38 7.4X91, X19 11.7X101, X110 9.3X111, X111 12.4X42, X24 8.0

X52, X25, X35, X53 6.7X72, X27, 1.5X82, X28 0.2X92, X29 1.7X112, X211 3.1X43, X34 14.2X63, X36 5.3X93, X39 13.2

X113, X109, X910, X311 2.0X64, X46 13.3X74, X47 17.3X84, X48 6.4X104, X410 25.4X114, X411 26.3X75, X57 14.8X85, X58 7.8X95, X59 8.8X105, X510 17.8X115, X511 20.9X76, X67, 7.9X96, X69 25.9X106, X610 11.2X116, X611 15.7X87, X78 4.5X117, X711 2.4X98, X89, 11.8X108, X810 22.0X118, X811 25.1

problem means nothing to itsobjective function.

V. Solution Specification

The owner of the King JoshEnterprises needs to deliver theorders to the ten of their regularcustomers within a day, with thegiven distances as shown previouslyin Table 1. This means that theyneed to identify the shortest routeto be travelled to minimize theircosts to be incurred.

In the Linear Programming Model, theoptimal solution is generated usingthe LINGO® software by inputting theobjective function and constraints.Moreover, in the Branch and BoundAlgorithm, the optimal solution isgenerated using the Hungarian Methodin the Microsoft Excel® program.Both methods yielded the sameresultant optimal solution. Hence,the best route for the company totravel covers a total distance of179.1 kilometers.

Based on the Sensitivity analysis,the reduced cost of the optimumvariables X18, X86, X65, X54, X49, X911,X1110, X107, X73, X32, and X21 is 0. AndTable 8 shows that the amount of theother variables can be decreasedbefore the optimum solution changes.The interpretation of shadow pricesis irrelevant to the problem.

VI. Conclusion

As illustrated in the results, thecompany will be able to minimizetheir costs and time to be incurredused in delivering their products ifthey are to follow the mostefficient route generated – that is,the route with the shortestdistance.

The company must deliver the ordersto their customers, starting fromthe King Josh Enterprises, to SimplyPetals Garden, Heaven Grace Academy,EMG Angels Catsup, Andrea BuildersCenter, Ignatius InternationalSchool, Saga Balloon Supply,Primegaz Corp., Aramaru Enterprises,Uno Trading, Rax Engineering, thenback again to their starting point.By following this sequence, thecompany will be able to travel at aminimal distance of 179.1kilometers.

In addition, based on the prevailinggasoline price in the market, whichis P42.95, and the Fuel EfficiencyRatio of their vehicle, which is10.67 km/L, the total fuel cost theycan utilize in the delivery is aboutP720.93 – that is, much lesser ifother route is to be followed.

VII. Recommendation

Though it is advisable for thecompany to follow the sequence ofthe generated route, the finaldecision still lie solely to theowner, who delivers their products.However, the generated route seemedto be ideal in nature, since it onlydepends on the distance to betraveled for each destination.

For future studies related to thisproblem, it is advisable to considersome other factors that have notbeen considered such as customerprioritization for delivery,altering traffic volume, andunexpected circumstances that mayoccur during the duration of thedelivery. Considering these factorswill be much closer to reality.

References

16

(1) Frederick S. Hillier & Gerald J.Lieberman, Introduction toOperations Research, McGraw-Hill:Boston MA; 8th. (International)Edition, 2005(2) F.C.J. Lokin. Twente Universityof Technology, Enschede,Netherlands, 1978(3) Wayne Winston, OperationsResearch: Applications andAlgorithms, Duxbury Press; 4th.Edition, 2003(4) Hamdy A. Taha, OperationsResearch: An Introduction, PrenticeHall; 5th. Edition, 1992

17