King Fahd University of Petroleum & Minerals

ISE 421 - Section 02

Term 121

TSP Job

TRAVELLING SALES PERSON PROBLEM

A traveler would like to travel across eight towns with minimal time. He wants to go to each metropolis exactly once and then come back to the the starting city. Your process is to generate the best head to for him. Following will be the travel times it takes to maneuver from any city i actually to another town j.

0| 10| 12| 5| 17| 9| 13| 7

10| 0| 9| 20| 8| 11| 3| 6

12| 9| 0| 14| 4| 10| 1| 16

5| 20| 14| 0| 20| 5| 28| 10

17| 8| 4| 20| 0| 21| 4| 9

9| 11| 10| 5| 21| 0| 2| 3

13| 3| 1| 28| 4| 2| 0| 2

7| 5| 16| 10| 9| 3| 2| 0

i) Start by solving the corresponding task problem to get the starting option. Then make use of Branch and Bound to eradicate any sub-tours.

Solution:

The Hungarian project algorithm was implemented applying excel:

The subsequent table was your input:

| City 1| City 2| City 3| City 4| City 5| City 6| City 7| City 8| City 1| 100| 10| 12| 5| 17| 9| 13| several

City 2| 10| 100| 9| 20| 8| 11| 3| 5

City 3| 12| 9| 100| 14| 4| 10| 1| 18

City 4| 5| 20| 14| 100| 20| 5| 28| 15

City 5| 17| 8| 4| 20| 100| 21| 4| on the lookout for

City 6| 9| 11| 10| 5| 21| 100| 2| a few

City 7| 13| 3| 1| 28| 4| 2| 100| a couple of

City 8| 7| 5| 16| 10| 9| 3| 2| 75

Note: Cost of travelling coming from a city for the same metropolis was penalized by 100.

Solving Task Problem employing Excel Solver:

1) An table containing the assignments is manufactured (see A1-I9). This desk is at first empty. An assignment is made if the cell is comparable to 1, or else 0 – this will be solved simply by " solver”. Call this kind of the " binary table”. 2) An additional table that contain the costs of travelling in one city to a new is written into the schedule. 3) A cell which in turn determines the whole cost is necessary (see B12). The function used is " sumproduct”, which multiplies each benefit in the expense table with its respective binary value (0 or 1). 4) A supply steering column and a demand row could possibly be introduced (see column M & line 10). In cases like this they are not needed, since just about every city provides a " demand” of one go to and a " supply” – to a neighboring town – of 1. They are applied non-etheless with this problem, intended for clarity of formulation.

The data needed to employ excel solver is now complete. Solver is an add-in that can be found inside the data case. The target cellular (to always be minimized is usually total cost (B2). The variable cellular material are the cells in the binary table. Consequently , set " by changing cells” towards the binary table.

There are three constraints:

1) Each city must be designated to just you other city (Column T all = 1) 2) Each town must have simply 1 different city designated to that (Row 12 all =1) 3) The binary table must comprise entirely of binary quantities (B2-I9 most = bin)

The solver options has to be changed to " assume linear model” and " presume nonnegative ”. Click resolve.

The following solution is received:

| City 1| Metropolis 2| City 3| City 4| Town 5| City 6| City 7| Metropolis 8| Town 1| 0| 0| 0| 1| 0| 0| 0| 0

Metropolis 2| 0| 0| 0| 0| 0| 0| 1| 0

City 3| 0| 0| 0| 0| 1| 0| 0| 0

Town 4| 1| 0| 0| 0| 0| 0| 0| 0

City 5| 0| 0| 1| 0| 0| 0| 0| 0

Metropolis 6| 0| 0| 0| 0| 0| 0| 0| 1

Town 7| 0| 1| 0| 0| 0| 0| 0| 0

Metropolis 8| 0| 0| 0| 0| 0| 1| 0| 0

(1-4-1)(2-7-2)(3-5-3)(6-8-6) Cost =30

Z=30 has become the lower destined.

Start by using branching the 1-4-1 subtour

Z=30

(1-4-1)(2-7-2)

(3-5-3)(6-8-6)

Z=30

(1-4-1)(2-7-2)

(3-5-3)(6-8-6)

X41=0

X14=0

X41=0

X14=0

We can resolve the twigs using the same algorithm since before, with the help of a penalty price to 1-4 or 4-1. X14=0:

| City 1| City 2| City 3| City 4| City 5| City 6| City 7| City 8| City 1| 0| 0| 0| 0| 0| 0| 0| you

City 2| 0| 0| 0| 0| 0| 0...

Tags:

Nt2580 Last Project Essay

documents BIOS292 W3 iLab Instructions Article