Traveling Salesman Problem

advertisement
Case Study 47
47
Traveling Salesman Problem
Traveling Salesman Problem
Problem Description
The traveling salesman problem is a well-known problem in the area of network and
combinatorial optimization. This problem is easy to state: “Starting from his home base,
node 1, a salesman wishes to visit each of several cities represented by nodes 2,…,n,
exactly once and return home, doing so at the lowest travel cost” (see Ahuja et al. 1993).
The simplicity of this problem and its complexity to solve have attracted the attention of
many researchers over a long period of time. The first mathematical model related to the
traveling salesman problem was studied in the 1800s. Researchers have paid attention to
this problem because it is a generic core model that captures the combinatorial essence of
most routing problems.
The purpose of this project is to create a decision support system that enables the user to
solve the traveling salesman problem. We give a mixed-integer programming formulation of
this problem and describe two heuristics that can be used to find feasible solutions. To learn
more about the traveling salesman problem, we refer the students to Ahuja et al. (1993) and
Winston (1994).
Mixed Integer Formulation
The following notation is used:
A
the set of arcs of the network
n
the total number of nodes
N
the node-arc incidence matrix
V
the set of nodes of the network
cij
the cost of using arc (i,j) ((i,j)A)
b
the demand vector.
The decision variables are:
xij
the flow on arc (i,j),
yij
takes the value 1 if the salesman travels from city i to city j.
The objective is to minimize the total travel cost. The first and second sets of constraints
show that each city is visited exactly once. The salesman will enter and leave a city exactly
once. The third set of constraints makes sure that the network is connected and therefore
each city will be visited. The fourth set of constraints is the sub-tour elimination constraints.
The fifth set of constraints is the non-negativity constraints, and the sixth set of constraints is
the integrality constraints.
Case Study 47
min :
Traveling Salesman Problem

cij yij
(i, j ) A
Subject to :
 yij  1
i  1,..., n,
(1)
 yij  1
j  1,..., n,
(2)
1 j  n
1 i  n
N x  b,
(3)
xij  (n  1) yij
(i, j )  A,
(4)
xij  0
(i, j )  A,
(5)
yij  {0,1}
(i, j )  A.
(6)
Heuristic Approaches
1.
Nearest Neighbor: Start with an arbitrary node i1 and construct a path i1, i2,…, ij, ij+1, …,
in, where
 
, with ties broken arbitrary.
i j 1  arg min ci j k : k V \ {i1, i2 ,..., i j }
Complete the path to a tour by adding arc (i1, in).
2.
Nearest Insertion: Given a tour T and a node iV \ T, let
 
d (i, T )  min cij and
jT

i*  argmin d (i, T ) : i V \ T  . Suppose j *  arg min ci j : j  T . Thus i* is the
closest node to T, and
T  {i*}
j*
is the node in T that is closest to
i*.
*
Now construct a sub-tour
by inserting i* between j* and one of its neighbors in T; that is, if (j1,j*) and
(j*,j2) are arcs of T and
ci * j  ci * j
1
2
, insert i* between j1 and j*. This process
terminates with a tour, but again we cannot guarantee that it will be the best tour.
To learn more about the nearest neighbor and nearest intersection heuristics as well as
other heuristic approaches for the traveling salesman problem, we refer the students to
Nemhauser and Wolsey (1999).
Excel Spreadsheets
1.
Build a spreadsheet that presents the node-arc incidence matrix.
2.
Build a spreadsheet that presents the cost of each arc of the network.
User Interface
1.
Build a welcome form.
2.
Build a data entry form. The following are suggestions to help you design this form. In
this form include two option buttons. The option buttons enable the user to select
whether to read the data from a file or manually enter the data. Include a command
button that, when clicked on, performs these actions:
a.
If the user chose to read the data from a file, a text box should appear where the
user types in the name of the file.
Case Study 47
b.
3.
Traveling Salesman Problem
If the user chose to enter the data manually, two text boxes appear where the user
types in the total number of nodes (n) and the total number of arcs (m) of the
network. Upon submission of this information, two tables appear. The first table,
with dimensions n by m, allows the user to enter the node-arc incidence matrix. The
second table, with dimensions 1 by m, allows the user to type in the cost of
traveling in a particular arc.
Build a form that presents the following details about a related example. The user can
understand how the algorithm works by using this form.
a.
The problem statement.
b.
A graphical representation of the corresponding network.
c.
The network flow formulation.
d.
Present how the heuristic approaches were implemented to solve this example.
e.
The optimal objective function value and the optimal tour.
f.
A graphical representation of the optimal solution.
4.
Build a form that allows the user to solve the problem and perform a sensitivity analysis.
Give the user the option to select either the Excel solver or the heuristic approaches
described above to solve the problem. Give the user a number of options (problem
parameters to choose from) for the sensitivity analyses.
5.
Build a form to allow the user to access the reports described below. For this purpose
use option buttons.
Design a logo for this project. Insert this logo in the forms created above. Pick a background
color and a font color for the forms created. Include the following in the forms created: record
navigation command buttons, record operations command buttons, and form operations
command buttons as needed.
Reports
1.
Give a graphical representation of the corresponding network.
2.
Give a graphical representation of the optimal solution (tour).
3.
Give a graphical representation of the solutions (tours) found using the two heuristic
approaches (nearest neighbor and nearest intersection).
4.
Present the total cost of the tour found from the following:
5.
a.
Solving the problem optimally using the Excel solver.
b.
Solving the problem using the nearest neighbor algorithm.
c.
Solving the problem using the nearest intersection algorithm.
Present the results from the sensitivity analysis.
K T
K T
K T
k 1t 1
k 1t 1
k 1t 1
min :   ckt xkt    hkt I kt    Fkt z kt
Case Study 47
Subject to :
K
 zkt  1 Reference
k 1
xkt  I k ,t 1  I kt  d kt
xkt  Pkt z kt
xkt , I kt  0
z kt  {0,1}
for t  1,..., T ,
Traveling Salesman Problem
(1)
Ahuja, R.K., Magnanti, T.L., Orlin, J.B., “Network Flows: Theory, Algorithms and
for k Prentice
1,..., K ; Hall,
t  1,...,
T,
(2)
Applications.”
1993.
for k G.L.,
1,..., Wolsey,
K ; t  1,...,
T , “Integer
(3) and Combinatorial Optimization.” John Wiley &
Nemhauser,
L.A.,
Sons, 1999.
for k  1,..., K ; t  1,..., T ,
(4)
forL.W.,
k  1“Operations
,..., K ; t  1,...,
T.
(Applications
5)
Winston,
Research:
and Algorithms.” Duxbury Press, 3rd Ed.,
1994.
Download