SlideShare a Scribd company logo
1 of 6
1
Experimentation system for supporting
solving Time and Cost Dependent TSP
Problem
Traveling Eco-Salesman
Adrian Aleksander Strugala
Faculty of Electronics
Wroclaw University of Science and Technology
Wrocล‚aw, Poland
209227@student.pwr.wroc.edu.pl
Abstractโ€” The article presents different approaches to finding the optimal solution for a problem, w hich extendsthe classical
traveling salesman problem. Takes into consideration possibility of choosing toll highw ay and the standard road betw een two
cities. Describes experimentation system. Provides mathematical model, results of the investigation, and conclusion.
Index Termsโ€” Traveling Salesman Problem; Time and Cost dependent; Ant Colony Optimization; Nearest Neighbour; God;
artificialintelligence; AI
โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” ๏ต โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”
1 INTRODUCTION
Observing the past centuries we can conclude, that
the humanity tends to search for optimal roads.
Merchants, travelers, and explorers were creating more
and more detailed maps [1]. In the digital era, everyone
can use free and open real-time maps found on the
Internet. Some of them provide a feature for finding the
shortest road connecting a set of cities [2], but very few
can answer common question โ€œIs it really worth to pay
for toll highway or should I just stay on the free road?โ€ A
solution of Traveling Eco-Salesman Problem provides
an answer to this question.
The Traveling Salesman Problem describes a
theoretical problem of finding the least expensive road
(in the meaning of time, money or distance) connecting
given a collection of cities [3] [4].
Traveling Eco-Salesman Problem introduces a new
extension to the classical problem: each of the city can
be connected to each other both by regular โ€“ free road
or toll highway. This is modification inspired by [5].
Following assumptions are made: every city is
connected with each other by free road. Additionally,
cities may be connected by toll highway, but they do not
have to. Cost of traveling toll road is greater than 0 and
time of traveling toll road is shorter than the time of
traveling the corresponding free road. There is given
initial and ending city. Each city has to be visited once
and cannot be visited more than once. The goal is to find
the optimal (based on time and cost of travel) road
connecting all the cities [6].
Four different approaches to cost management are
being taken into consideration:
The first is; only free roads can be chosen. This is
classical TSP.
The second is; toll roads are chosen whenever
possible. The result of this approach is the fastest
possible solution but uses the highest amount of money.
The third is; there is given additional parameter โ€“ limit
of combined cost of all chosen toll roads. The limit must
not be exceeded.
The final is; the computed solution is optimal in the
meaning of minimizing Goal Function (7), where goal
depends on the cost of the chosen roads and time
difference between toll highway and free road for every
chosen toll road.
Three algorithms for solving TSP are implemented
and compared: Ant Colony Optimization, Nearest
Neighbour, and God.
Following sections, covers listed topics. 2 โ€“ statement
of the problem with the introduction of the mathematical
model. 3 โ€“ description of four different approaches to
finding the optimal solution for the problem and
description of three implemented TSP engines. 4 โ€“
description of experimentation system with examples. 5
โ€“ results of the investigation. 6 - conclusion, and plans
for future work and 7 - references.
2 PROBLEM STATEMENT
The whole system is represented as a directed graph
G(V,E).
Vertices of this graph are a representation of cities.
๐‘‰ = ( ๐‘ฃ0, ๐‘ฃ1,โ€ฆ , ๐‘ฃ๐‘›
) (1)
A number of vertices is equal to n.
2
Each edge is represented as a value of time needed
for travel from origin todestination city. They are two sets
of arcs โ€“ one for free roads and one for the toll. They are
collected in matrices. For free roads, it is written as a
matrix ๐‘‡๐‘…nร—n. Analogical, distances for toll roads are ๐‘‡๐‘‡ nร—n.
To answer a question when toll road is worth to
choose, a correlation between the cost of the road and
time of traveling this road had to be formulated.
This correlation is a statement of Goal Factor (GP)
(2) for a single path:
๐บ๐‘ƒ = ๐ถ ร— ๐‘‡ ร— ๐ผ [โ‚ฌ ร— ๐‘ ] (2)
Where GP is the value of Goal Factor, C is the cost of
the travel, T is a time of the travel for a single path and I
is practical importance factor based on the value of
saved time.
Empirical meaning of the Goal Factor is to find a road
connecting two cities with the possible minimal time and
cost of the travel.
Following assumptions are made:
1) Time of traveling free road (TF) is always longer
than traveling on the toll road (TT):
โˆ€( ๐‘Ž < ๐‘›, ๐‘ < ๐‘›) ๐‘‡๐‘… ๐‘Ž,๐‘
> ๐‘‡ ๐‘‡ ๐‘Ž,๐‘
(3)
2) Cost of traveling free road (CF) is always lower
than traveling on the toll road (CT) :
โˆ€( ๐‘Ž < ๐‘›, ๐‘ < ๐‘›) ๐ถ ๐‘… ๐‘Ž,๐‘
< ๐ถ ๐‘‡ ๐‘Ž,๐‘
(4)
3) Cost of traveling free road is a cost of gasoline
only (CG). Cost of gasoline is calculated as the
multiplication of distance, average combustion
and price of fuel:
๐ถ ๐น = ๐ถ ๐บ = ๐‘  ร— ๐‘๐‘œ๐‘š๐‘๐‘ข๐‘ ๐‘ก๐‘–๐‘œ๐‘› ร— ๐‘“๐‘ข๐‘’๐‘™ ๐‘๐‘Ÿ๐‘–๐‘๐‘’ [โ‚ฌ] (5)
4) Cost of traveling toll road is a cost of highway
payment (CP) and gasoline (CG). Combustion on
the highway is 1.25 times higher than on the
national road, because of higher average
velocity:
๐ถ ๐‘‡ = ๐ถ ๐บ ร— 1.25 + ๐ถ ๐‘ƒ[โ‚ฌ] (6)
The final Goal Function (7) is the minimal sum of
Goal Factors for single paths. This is the key function of
the future research:
๐บ = minโˆ‘ ๐บ ๐‘ƒ(๐‘Ž,๐‘)
[โ‚ฌ ร— ๐‘ ] (7)
3 SOLUTION TO THE PROBLEM
The basis for solving the problem is to find optimal
route for TSP. This is done by Ant Colony Optimization
algorithm, [6] Nearest Neighbour [9] or God [10]
algorithms. Pseudocode of Ant Colony Optimization is
presented in Figure 1., pseudocode of Nearest
Neighbour is presented in Figure 2. and pseudocode of
God is presented in Figure 3.
Ants are released from the hive. Their goal is to
solve Traveling Salesman Problem. According to a real-
life example, at first, they are choosing the route
randomly and leaving pheromones. The strongest
pheromone trail is left on the most commonly used
route, which is considered as the optimal path.
Figure 1. Pseudocode of Ant Colony Optimization
Nearest Neighbour was one of the first solutions to
TSP problem [9]. The idea is very straightforward.
Starting from the initial city, the program chooses the
nearest city already considered. Then adds it to the path
and marks as visited. City, which is set as an ending
point, is simply added as the last city in the path.
Figure 2. Pseudocode of Attention Whore
God algorithm comes from human considerations
of the beginning of the word and life [10]. One of the
theories says that at beginning of everything God
created our universe. In this theory, God created an
infinite number of universes, with random laws of
physics, rules of chemistry and other rules governing
the world. Universes were collapsing one after another,
and only one of them survived โ€“ with the optimal rules.
This is our universe.
Adjusting God to the TSP is as follows. The program
chooses random route connecting all the cities,
numerous times. It uses all the strengths of parallel
programming โ€“ drawing random routes may occur in the
same. The only limit is a computational power of the
Input: distance matrix, no. of ants, no. of cities
Output: shortest route
1: current shortest route = initial solution;
2: while (ant can chose different path than current shortest)
3: while (ant < no. of ants)
4: while (no. of cities in current path != no. of cities)
5: select city i with probability based on distance and
pheromone matrices;
6: add city i to shortest path for this ant;
7: leave pheromone trial;
8: shortest path in this iteration = compare paths for each ant
and take the shortest;
9: if (shortest path in this iteration < current shortest path)
10: current shortest path = minimum path in this iteration;
11: evaporate pheromone trials;
12: shortest route = current shortest path;
Input: distance matrix, no. of cities
Output: shortest route
1: current shortest route = initial solution;
2: add starting city as the first;
2: for (no. of cities -2)
3: find nearest neighbour (exclude already visited);
4: add nearest neighbour to path;
5: mark nearest neighbour as visited;
6: add ending city as the last;
7: shortest route = found path;
3
computer.
Figure 3. Pseudocode of God
The field of investigations consists of finding the most
optimal, in the meaning of minimizing Goal (7), solution.
This is done by approaching the problem of cost
management in four different ways.
Following scenarios were implemented based on Ant
Colony Optimization algorithm. Each of the scenarios
puts different constraints on the TSP algorithms and
changes its behavior significantly.
Only free roads. The first idea is to answer the
question if choosing toll roads is profitable in any case.
In this scenario the only cost of the travel is the cost of
fuel and importance parameter is equal to 1:
๐ผ = 1 (11)
Toll roads whenever possible. The second idea is
to investigate this scenario: Choosing toll road is always
profitable. This is opposite approach to the first one.
I parameter from equation (2) is calculated as follows:
๐ผ =
๐ถ ๐น
๐ถ ๐‘‡
(12)
Cost limit. The third idea is to introduce additional
constraint of limiting overall cost of travel. This is the
most flexible approach and the most practical for future
users.
โˆ‘ ๐ถ(๐‘Ž,๐‘) < ๐ฟ (13)
This scenario goal is to prioritize section of roads with
the highest gain over those the least profitable. The Goal
(7) is strongly dependent on financial capabilities of the
user. This is the most promising approach for future
commercial development.
Evaluation of the cost of time. The fourth and final
idea is to take into consideration the relationship
between cost and time parameters calculated for the
Goal Factors (2). Then, for every part of the road chose
separately if it is worth to use toll or free road.
During execution of the TSP engine, the algorithm
builds path based on this evaluation of the cost of time.
4 EXPERIMENTATION SYSTEM
All the investigations are made in dedicated
experimentation system, named Traveling Eco-
Salesman. Prefix โ€œecoโ€ comes from economical
approach underlined in solutions presented in this
article.
The program is written in C#, Microsoft object-
oriented programming language and uses REST
protocol to receive information from the Internet in JSON
format. It communicates with Google Maps API to get
real-time information about the time needed to travel
between chosen cities [7]. That information populates
matrices ๐‘‡๐‘… and ๐‘‡๐‘‡ .
Similarly, matrix CP is filled by actual data of cost
downloaded from Michelin Maps API, ViaMichelin [8].
The program takes a list of cities as an input, for
which user wants to calculate optimal route. The first city
is an origin, last is a final destination.
The initial user interface is represented in Figure 4.
The position of each city is represented by a dot on the
cartographic grid.
The user has an access to 6 different features in form
of solutions described in Section 3 โ€“ four approaches to
cost management and two additional TSP engines.
What is more, the user is given an ability to display the
optimal road on the screen.
Figure 4. Initial user interface
After selecting one of the options, the screen shows
calculated route. Optimal path, considering all factors is
shown in Figure 5. In this example, God TSP engine was
chosen.
Figure 5. Example of God functionality
Input: distance matrix, no. of cities, no. of universes
Output: shortest route
1: current shortest route = initial solution;
2: parallel for (no. no universes)
3: draw random route
4: shortest route = find shortest route in random routes;
4
Section of the road is represented as a continuous
line for free road or dotted line for toll one.
Application displays route between cities, which
specification if a toll or free way is preferable on every
part of the route. The application gives information on
duration of the travel and cost of toll fees. For test
purposes, additionally, the value of Goal Function and
duration of execution of the TES algorithm are visible.
5 INVESTIGATION
The research was done on three various datasets
with unique features. The first was set of cities: Como,
Verona, Florence, Pisa, Turin, Milan, Genoa, and
Bergamo. All the cities are located in northern Italy. This
region is very well communicated and, because of
mountainous terrain, the time difference between
traveling toll and the free road is significant. This set is
named Italy for a shortcut.
The second is set of cities in Poland: Wroclaw,
Gdansk, Krakow, Poznan, Warsaw, and Lublin. This
region is not that well communicated and toll fee is
relatively high. This set is named Poland for a shortcut.
The last set of cities are locations all over Europe:
Moscow, Warsaw, Barcelona, London, Prague,
Budapest, Paris, Amsterdam, Madrid, Oslo, Berlin,
Vienna, Athens, Rome, Stockholm, Istanbul, and Lisbon
Those cities are located in different countries and tests
also connection between different regions in Europe.
This set is named Europe for a shortcut.
The first field of investigation was the influence of
limit (13) in the Limit approach on the value of Goal
Function (7). This investigation was done based on Italy
dataset.
In Table 1. results of the exaction of the TSP with the
limit approach are collected. Based on those results
influence of limit parameter (L) on the value of Goal
Function (7) is clearly visible in Figure 9.
Table 1. Influence of parameter L on the value of Goal Function
Limit [โ‚ฌ] Cost [โ‚ฌ] Goal [โ‚ฌ ร— s]
0 0 380.586
7 3.5 388.3
14 12.2 385.553
21 12.2 385.553
28 27.9 313.413
35 27.9 313.413
42 27.9 313.413
49 43.1 270.51
56 43.1 270.51
63 61.2 292.605
70 61.2 292.605
77 61.2 292.605
84 77.8 254.318
Figure 6. Chart showing the influence of parameter L to value of
Goal Function
The general trend is, that with increasing limit of
cost, the value of Goal Function (7) decreases. For
some intervals of the cost, the value of Goal Function
(7) stays on the same level.
The upper limit of research range was the value of
cost received in the approach of using toll roads
whenever possible.
The second field of investigation was an analysis of
the optimal approach to management of the cost.
Dataset used in this comparison is set of cities from
northern Italy. Results collected in Table 2 shows the
best-received results for 30 executions of the program.
Table 2. Comparison of results for different approaches to cost
management
Duration
[hh:mm:ss]
Cost
[โ‚ฌ]
Goal [โ‚ฌ
ร— s]
Time of
execution
[ms]
Free 20:04:25 0 380.586 816
Toll 12:05:01 77.8 254.318 933
Limit 12:05:01 77.8 254.318 610
Evaluation 13:10:16 55.2 223.604 692
Considering the value of Goal Function (7) as a
criterion for choosing the optimal solution to handling
the cost of travel; evaluation of the cost of time is the
most promising approach.
Further research, deciding the most promising TSP
engine were performed based on the very same
mechanism of automatically choosing if travel between
two cities should be done on toll or free road.
Mean values of 30 executions of the program for
0
50
100
150
200
250
300
350
400
450
0 20 40 60 80 100
Goal (L)
5
different TSP engines and different datasets are shown
in Table 3, Table 4 and Table 5.
The key parameter, informing about the performance of
each engine is the value of Goal Function (7).
Table 3. Comparison of results for different TSP engines for Italy
dataset
Italy
Duration
[hh:mm:ss]
Cost
[โ‚ฌ]
Goal [โ‚ฌ ร—
s]
Time of
executio
n [ms]
ACO 14:13:46 93.21 339.804 640
NN 14:13:50 93.60 340.319 0.01
God 13:10:16 55.20 223.600 693
The result of research performed on Italy dataset
shows that outcome of Ant Colony Optimization and
Nearest Neighbour are very similar.
Because of simplicity of implementation, time of
execution of NN engine is significantly shorter. This is a
true statement for every performed experiment.
The best TSP engine used in this experiment was
God algorithm. Value of Goal Function (7) is 33% lower
than in rest of the engines. Hence, time and cost of
travel have also lower values.
Table 4. Comparison of resultsfor different TSP engines for Poland
dataset
Poland
Duration
[hh:mm:ss]
Cost
[โ‚ฌ]
Goal [โ‚ฌ
ร— s]
Time of
execution
[ms]
ACO 22:38:57 10.71 680.569 403
NN 23:15:58 10.26 712.960 0.002
God 18:58:04 0 396.122 747
For Poland dataset, once more, the optimal
algorithm was God. In this experiment value of Goal
Function (7) for God was 42% lower than for Ant Colony
Optimization and 44% lower than for Nearest
Neighbour.
Table 5. Comparison of resultsfor different TSP engines for Europe
dataset
Europ
e
Duration
[hh:mm:ss
]
Cost
[โ‚ฌ]
Goal [โ‚ฌ ร—
s]
Time of
executio
n [ms]
ACO 227:19:36
166.9
2
34132.98
8
2523
NN 233::21:45
176.6
9
37021.90
0
0.01
God 218:20:44 115.58
22331.69
3
548
The third experiment performed on the list of cities
placed in all over Europe confirmed, that God algorithm
provides the optimal results between implemented TSP
engines.
In this case, the result was also drastically better.
Mean value of Goal Function for God was 35% lower
than for ACO and 40% lower than for Nearest
Neighbour.
6 CONCLUSION
The optimal approach for cost management is an
evaluation of the cost of the time performed by the
program, based on values of Goal Factors (2).
The optimal TSP engine implemented in the
Traveling Eco-Salesman program is God algorithm.
This extension to TSP problem provides a number of
possible future investigation fields.
Firstly, the proposition of new formula for Goal
Function (7). Goal presented in this article allows for
finding profitable routes. Reformulation of Goal though
may allow finding even more optimal paths.
Secondly, the proposition of another scenario for
deciding when to how to manage the cost of the travel.
Analogical to presented in Section 3.
Thirdly, implementing another algorithm for solving
TSP problem. Another possible improvement in TSP
engines is calibration of used parameters.
And finally, commercialize Traveling Eco-Salesman
program. The most promising way is to propose it as an
extension of existing Internet maps. It may also succeed
as a standalone application.
7 REFERENCES
[1] Unknown author, Clay tablet containing city map of Nippur, Babylon,
prob. 1400 BC
[2] E. Balais, The traveling salesman problem and its variations, Springer,
2007
[3] G. B. Dantzig, R. Fulkerson, S. Johnson, Solution of a Large-
Scale Travelling-Salesman, Journalof the Operations Research
Society of America, Vol. 2, No. 4, 393-410, 1954
[4] M. Held, R. M. Karp, The Travelling-Salesman Problem and
Minimum Spanning Trees, Operations Research, Vol. 18, No. 6,
1138-1162, 1970
[5] S. Qin, S. Liu, Q. Zhang, The Traveling Salesman Problem with
Profits Considering Time-Dependent Cost and Multi-Trip Mode,
Proc. 36th. Chinese Control Conference, pp. 2899-2903, 2017.
[6] S. Oliveira, M. S. Hussin, A. Roli, M. Dorigo, T. Stรผtzle, Analysis
of the population-based ant colonyoptimization algorithm for
the TSP and the QAP 2017 IEEE Congress of Evolutionary
Computation, pp. 1734-1741, 2017.
[7] https://developers.google.com/maps/documentation/, 2017
[8] http://dev.viamichelin.com/getting-started-rest.html, 2017
[9] G. Gutin, A. Yeo, A. Zverovich, Traveling salesman should not be
greedy: domination analysis of greedy-type heuristics for the
TSP, Discrete Applied Mathematics 117, pp. 81-86, 2002
[10] A. Brรผngger, A. Marzetta, K. Fukuda and J. Nievergelt, The
parallel search bench ZRAM and its applications, Annals of
Operations Research 90, pp. 45โ€“63., 1999
6

More Related Content

What's hot

Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...
Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...
Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...Nooria Sukmaningtyas
ย 
Travelling salesman problem using genetic algorithms
Travelling salesman problem using genetic algorithms Travelling salesman problem using genetic algorithms
Travelling salesman problem using genetic algorithms Shivank Shah
ย 
Fuzzy Model Presentation
Fuzzy Model Presentation Fuzzy Model Presentation
Fuzzy Model Presentation NurudeenIshaq1
ย 
Traffic flow model
Traffic flow modelTraffic flow model
Traffic flow modelHarikesh Kumar
ย 
ENTROPY BASED ASSESSMENT OF HYDROMETRIC NETWORK USING NORMAL AND LOG-NORMAL D...
ENTROPY BASED ASSESSMENT OF HYDROMETRIC NETWORK USING NORMAL AND LOG-NORMAL D...ENTROPY BASED ASSESSMENT OF HYDROMETRIC NETWORK USING NORMAL AND LOG-NORMAL D...
ENTROPY BASED ASSESSMENT OF HYDROMETRIC NETWORK USING NORMAL AND LOG-NORMAL D...mathsjournal
ย 
Vehicle route scheduling and transportation cost minimization in a latex indu...
Vehicle route scheduling and transportation cost minimization in a latex indu...Vehicle route scheduling and transportation cost minimization in a latex indu...
Vehicle route scheduling and transportation cost minimization in a latex indu...IJRES Journal
ย 
Solving TSP using Hybrid GACO
Solving TSP using Hybrid GACOSolving TSP using Hybrid GACO
Solving TSP using Hybrid GACOShruti Gandhi
ย 
Uav route planning for maximum target coverage
Uav route planning for maximum target coverageUav route planning for maximum target coverage
Uav route planning for maximum target coveragecseij
ย 
Central moments of traffic delay at a signalized intersection
Central moments of traffic delay at a signalized intersectionCentral moments of traffic delay at a signalized intersection
Central moments of traffic delay at a signalized intersectionAlexander Decker
ย 
Mixed Integer Linear Programming Formulation for the Taxi Sharing Problem
Mixed Integer Linear Programming Formulation for the Taxi Sharing ProblemMixed Integer Linear Programming Formulation for the Taxi Sharing Problem
Mixed Integer Linear Programming Formulation for the Taxi Sharing Problemjfrchicanog
ย 

What's hot (12)

Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...
Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...
Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...
ย 
Travelling salesman problem using genetic algorithms
Travelling salesman problem using genetic algorithms Travelling salesman problem using genetic algorithms
Travelling salesman problem using genetic algorithms
ย 
Dcm
DcmDcm
Dcm
ย 
Fuzzy Model Presentation
Fuzzy Model Presentation Fuzzy Model Presentation
Fuzzy Model Presentation
ย 
Traffic flow model
Traffic flow modelTraffic flow model
Traffic flow model
ย 
ENTROPY BASED ASSESSMENT OF HYDROMETRIC NETWORK USING NORMAL AND LOG-NORMAL D...
ENTROPY BASED ASSESSMENT OF HYDROMETRIC NETWORK USING NORMAL AND LOG-NORMAL D...ENTROPY BASED ASSESSMENT OF HYDROMETRIC NETWORK USING NORMAL AND LOG-NORMAL D...
ENTROPY BASED ASSESSMENT OF HYDROMETRIC NETWORK USING NORMAL AND LOG-NORMAL D...
ย 
An Introduction to Discrete Choice Modelling
An Introduction to Discrete Choice ModellingAn Introduction to Discrete Choice Modelling
An Introduction to Discrete Choice Modelling
ย 
Vehicle route scheduling and transportation cost minimization in a latex indu...
Vehicle route scheduling and transportation cost minimization in a latex indu...Vehicle route scheduling and transportation cost minimization in a latex indu...
Vehicle route scheduling and transportation cost minimization in a latex indu...
ย 
Solving TSP using Hybrid GACO
Solving TSP using Hybrid GACOSolving TSP using Hybrid GACO
Solving TSP using Hybrid GACO
ย 
Uav route planning for maximum target coverage
Uav route planning for maximum target coverageUav route planning for maximum target coverage
Uav route planning for maximum target coverage
ย 
Central moments of traffic delay at a signalized intersection
Central moments of traffic delay at a signalized intersectionCentral moments of traffic delay at a signalized intersection
Central moments of traffic delay at a signalized intersection
ย 
Mixed Integer Linear Programming Formulation for the Taxi Sharing Problem
Mixed Integer Linear Programming Formulation for the Taxi Sharing ProblemMixed Integer Linear Programming Formulation for the Taxi Sharing Problem
Mixed Integer Linear Programming Formulation for the Taxi Sharing Problem
ย 

Similar to Traveling Eco-Salesman Problem Solved Using Ant Colony Optimization, Nearest Neighbour and God Algorithms

Presentation 3rd CSUM
Presentation 3rd CSUM Presentation 3rd CSUM
Presentation 3rd CSUM LIFE GreenYourMove
ย 
K046036367
K046036367K046036367
K046036367IJERA Editor
ย 
Comparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
Comparison Study of Multiple Traveling Salesmen Problem using Genetic AlgorithmComparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
Comparison Study of Multiple Traveling Salesmen Problem using Genetic AlgorithmIOSR Journals
ย 
With saloni in ijarcsse
With saloni in ijarcsseWith saloni in ijarcsse
With saloni in ijarcssesatish rana
ย 
Presentation escc 2016
Presentation escc 2016Presentation escc 2016
Presentation escc 2016LIFE GreenYourMove
ย 
Presentation of GreenYourMove's hybrid approach in 3rd International Conferen...
Presentation of GreenYourMove's hybrid approach in 3rd International Conferen...Presentation of GreenYourMove's hybrid approach in 3rd International Conferen...
Presentation of GreenYourMove's hybrid approach in 3rd International Conferen...GreenYourMove
ย 
autonomous-vehicles_final
autonomous-vehicles_finalautonomous-vehicles_final
autonomous-vehicles_finalNicholas Jones
ย 
Algorithms And Optimization Techniques For Solving TSP
Algorithms And Optimization Techniques For Solving TSPAlgorithms And Optimization Techniques For Solving TSP
Algorithms And Optimization Techniques For Solving TSPCarrie Romero
ย 
A comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methodsA comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methodsAlexander Decker
ย 
A comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methodsA comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methodsAlexander Decker
ย 
ESCC 2016, July 10-16, Athens, Greece
ESCC 2016, July 10-16, Athens, GreeceESCC 2016, July 10-16, Athens, Greece
ESCC 2016, July 10-16, Athens, GreeceLIFE GreenYourMove
ย 
tAnt colony optimization for
tAnt colony optimization fortAnt colony optimization for
tAnt colony optimization forcsandit
ย 
Ant colony optimization for
Ant colony optimization forAnt colony optimization for
Ant colony optimization forcsandit
ย 
Fakhre alam
Fakhre alamFakhre alam
Fakhre alamFakhre Alam
ย 
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...ijsrd.com
ย 
A New Approach to Solve Initial Basic Feasible Solution for the Transportatio...
A New Approach to Solve Initial Basic Feasible Solution for the Transportatio...A New Approach to Solve Initial Basic Feasible Solution for the Transportatio...
A New Approach to Solve Initial Basic Feasible Solution for the Transportatio...Dr. Amarjeet Singh
ย 
Quantum inspired evolutionary algorithm for solving multiple travelling sales...
Quantum inspired evolutionary algorithm for solving multiple travelling sales...Quantum inspired evolutionary algorithm for solving multiple travelling sales...
Quantum inspired evolutionary algorithm for solving multiple travelling sales...eSAT Publishing House
ย 

Similar to Traveling Eco-Salesman Problem Solved Using Ant Colony Optimization, Nearest Neighbour and God Algorithms (20)

Presentation 3rd CSUM
Presentation 3rd CSUM Presentation 3rd CSUM
Presentation 3rd CSUM
ย 
K046036367
K046036367K046036367
K046036367
ย 
Comparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
Comparison Study of Multiple Traveling Salesmen Problem using Genetic AlgorithmComparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
Comparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
ย 
With saloni in ijarcsse
With saloni in ijarcsseWith saloni in ijarcsse
With saloni in ijarcsse
ย 
Presentation escc 2016
Presentation escc 2016Presentation escc 2016
Presentation escc 2016
ย 
Presentation of GreenYourMove's hybrid approach in 3rd International Conferen...
Presentation of GreenYourMove's hybrid approach in 3rd International Conferen...Presentation of GreenYourMove's hybrid approach in 3rd International Conferen...
Presentation of GreenYourMove's hybrid approach in 3rd International Conferen...
ย 
autonomous-vehicles_final
autonomous-vehicles_finalautonomous-vehicles_final
autonomous-vehicles_final
ย 
E017512630
E017512630E017512630
E017512630
ย 
Algorithms And Optimization Techniques For Solving TSP
Algorithms And Optimization Techniques For Solving TSPAlgorithms And Optimization Techniques For Solving TSP
Algorithms And Optimization Techniques For Solving TSP
ย 
B04 05 1116
B04 05 1116B04 05 1116
B04 05 1116
ย 
A comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methodsA comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methods
ย 
A comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methodsA comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methods
ย 
ESCC 2016, July 10-16, Athens, Greece
ESCC 2016, July 10-16, Athens, GreeceESCC 2016, July 10-16, Athens, Greece
ESCC 2016, July 10-16, Athens, Greece
ย 
Comp prese (1)
Comp prese (1)Comp prese (1)
Comp prese (1)
ย 
tAnt colony optimization for
tAnt colony optimization fortAnt colony optimization for
tAnt colony optimization for
ย 
Ant colony optimization for
Ant colony optimization forAnt colony optimization for
Ant colony optimization for
ย 
Fakhre alam
Fakhre alamFakhre alam
Fakhre alam
ย 
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...
ย 
A New Approach to Solve Initial Basic Feasible Solution for the Transportatio...
A New Approach to Solve Initial Basic Feasible Solution for the Transportatio...A New Approach to Solve Initial Basic Feasible Solution for the Transportatio...
A New Approach to Solve Initial Basic Feasible Solution for the Transportatio...
ย 
Quantum inspired evolutionary algorithm for solving multiple travelling sales...
Quantum inspired evolutionary algorithm for solving multiple travelling sales...Quantum inspired evolutionary algorithm for solving multiple travelling sales...
Quantum inspired evolutionary algorithm for solving multiple travelling sales...
ย 

Recently uploaded

(8264348440) ๐Ÿ” Call Girls In Nand Nagri ๐Ÿ” Delhi NCR
(8264348440) ๐Ÿ” Call Girls In Nand Nagri ๐Ÿ” Delhi NCR(8264348440) ๐Ÿ” Call Girls In Nand Nagri ๐Ÿ” Delhi NCR
(8264348440) ๐Ÿ” Call Girls In Nand Nagri ๐Ÿ” Delhi NCRsoniya singh
ย 
Moving to Italy - A Relocation Rollercoaster
Moving to Italy - A Relocation RollercoasterMoving to Italy - A Relocation Rollercoaster
Moving to Italy - A Relocation RollercoasterStefSmulders1
ย 
Call Girls ๐Ÿซค Connaught Place โžก๏ธ 9999965857 โžก๏ธ Delhi ๐Ÿซฆ Russian Escorts FULL ...
Call Girls ๐Ÿซค Connaught Place โžก๏ธ 9999965857  โžก๏ธ Delhi ๐Ÿซฆ  Russian Escorts FULL ...Call Girls ๐Ÿซค Connaught Place โžก๏ธ 9999965857  โžก๏ธ Delhi ๐Ÿซฆ  Russian Escorts FULL ...
Call Girls ๐Ÿซค Connaught Place โžก๏ธ 9999965857 โžก๏ธ Delhi ๐Ÿซฆ Russian Escorts FULL ...Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
ย 
Italia Lucca 1 Un tesoro nascosto tra le sue mura
Italia Lucca 1 Un tesoro nascosto tra le sue muraItalia Lucca 1 Un tesoro nascosto tra le sue mura
Italia Lucca 1 Un tesoro nascosto tra le sue murasandamichaela *
ย 
A Comprehensive Guide to The Types of Dubai Residence Visas.pdf
A Comprehensive Guide to The Types of Dubai Residence Visas.pdfA Comprehensive Guide to The Types of Dubai Residence Visas.pdf
A Comprehensive Guide to The Types of Dubai Residence Visas.pdfDisha Global Tours
ย 
Apply Indian E-Visa Process Online (Evisa)
Apply Indian E-Visa Process Online (Evisa)Apply Indian E-Visa Process Online (Evisa)
Apply Indian E-Visa Process Online (Evisa)RanjeetKumar108130
ย 
Dubai Call Girls O528786472 Call Girls Dubai Big Juicy
Dubai Call Girls O528786472 Call Girls Dubai Big JuicyDubai Call Girls O528786472 Call Girls Dubai Big Juicy
Dubai Call Girls O528786472 Call Girls Dubai Big Juicyhf8803863
ย 
VIP Call Girls in Noida 9711199012 Escorts in Greater Noida,Ms
VIP Call Girls in Noida 9711199012 Escorts in Greater Noida,MsVIP Call Girls in Noida 9711199012 Escorts in Greater Noida,Ms
VIP Call Girls in Noida 9711199012 Escorts in Greater Noida,Msankitnayak356677
ย 
8377087607 Full Enjoy @24/7 Call Girls in INA Market Dilli Hatt Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in INA Market Dilli Hatt Delhi NCR8377087607 Full Enjoy @24/7 Call Girls in INA Market Dilli Hatt Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in INA Market Dilli Hatt Delhi NCRdollysharma2066
ย 
Call Girls In Panjim Mariott Resort โ‚ฐ8588052666โ‚ฐ North ...
Call Girls In Panjim Mariott Resort โ‚ฐ8588052666โ‚ฐ North ...Call Girls In Panjim Mariott Resort โ‚ฐ8588052666โ‚ฐ North ...
Call Girls In Panjim Mariott Resort โ‚ฐ8588052666โ‚ฐ North ...nishakur201
ย 
Akshay Mehndiratta Summer Special Light Meal Ideas From Across India.pptx
Akshay Mehndiratta Summer Special Light Meal Ideas From Across India.pptxAkshay Mehndiratta Summer Special Light Meal Ideas From Across India.pptx
Akshay Mehndiratta Summer Special Light Meal Ideas From Across India.pptxAkshay Mehndiratta
ย 
Exploring Sicily Your Comprehensive Ebook Travel Guide
Exploring Sicily Your Comprehensive Ebook Travel GuideExploring Sicily Your Comprehensive Ebook Travel Guide
Exploring Sicily Your Comprehensive Ebook Travel GuideTime for Sicily
ย 
Hoi An Ancient Town, Vietnam (่ถŠๅ— ๆœƒๅฎ‰ๅค้Žฎ).ppsx
Hoi An Ancient Town, Vietnam (่ถŠๅ— ๆœƒๅฎ‰ๅค้Žฎ).ppsxHoi An Ancient Town, Vietnam (่ถŠๅ— ๆœƒๅฎ‰ๅค้Žฎ).ppsx
Hoi An Ancient Town, Vietnam (่ถŠๅ— ๆœƒๅฎ‰ๅค้Žฎ).ppsxChung Yen Chang
ย 
How Safe Is It To Witness Whales In Mauiโ€™s Waters
How Safe Is It To Witness Whales In Mauiโ€™s WatersHow Safe Is It To Witness Whales In Mauiโ€™s Waters
How Safe Is It To Witness Whales In Mauiโ€™s WatersMakena Coast Charters
ย 
"Fly with Ease: Booking Your Flights with Air Europa"
"Fly with Ease: Booking Your Flights with Air Europa""Fly with Ease: Booking Your Flights with Air Europa"
"Fly with Ease: Booking Your Flights with Air Europa"flyn goo
ย 
Haitian culture and stuff and places and food and travel.pptx
Haitian culture and stuff and places and food and travel.pptxHaitian culture and stuff and places and food and travel.pptx
Haitian culture and stuff and places and food and travel.pptxhxhlixia
ย 
Revolutionalizing Travel: A VacAI Update
Revolutionalizing Travel: A VacAI UpdateRevolutionalizing Travel: A VacAI Update
Revolutionalizing Travel: A VacAI Updatejoymorrison10
ย 
best weekend places near delhi where you should visit.pdf
best weekend places near delhi where you should visit.pdfbest weekend places near delhi where you should visit.pdf
best weekend places near delhi where you should visit.pdftour guide
ย 

Recently uploaded (20)

(8264348440) ๐Ÿ” Call Girls In Nand Nagri ๐Ÿ” Delhi NCR
(8264348440) ๐Ÿ” Call Girls In Nand Nagri ๐Ÿ” Delhi NCR(8264348440) ๐Ÿ” Call Girls In Nand Nagri ๐Ÿ” Delhi NCR
(8264348440) ๐Ÿ” Call Girls In Nand Nagri ๐Ÿ” Delhi NCR
ย 
Moving to Italy - A Relocation Rollercoaster
Moving to Italy - A Relocation RollercoasterMoving to Italy - A Relocation Rollercoaster
Moving to Italy - A Relocation Rollercoaster
ย 
Call Girls ๐Ÿซค Connaught Place โžก๏ธ 9999965857 โžก๏ธ Delhi ๐Ÿซฆ Russian Escorts FULL ...
Call Girls ๐Ÿซค Connaught Place โžก๏ธ 9999965857  โžก๏ธ Delhi ๐Ÿซฆ  Russian Escorts FULL ...Call Girls ๐Ÿซค Connaught Place โžก๏ธ 9999965857  โžก๏ธ Delhi ๐Ÿซฆ  Russian Escorts FULL ...
Call Girls ๐Ÿซค Connaught Place โžก๏ธ 9999965857 โžก๏ธ Delhi ๐Ÿซฆ Russian Escorts FULL ...
ย 
Italia Lucca 1 Un tesoro nascosto tra le sue mura
Italia Lucca 1 Un tesoro nascosto tra le sue muraItalia Lucca 1 Un tesoro nascosto tra le sue mura
Italia Lucca 1 Un tesoro nascosto tra le sue mura
ย 
Enjoy โžฅ8448380779โ–ป Call Girls In Sector 74 Noida Escorts Delhi NCR
Enjoy โžฅ8448380779โ–ป Call Girls In Sector 74 Noida Escorts Delhi NCREnjoy โžฅ8448380779โ–ป Call Girls In Sector 74 Noida Escorts Delhi NCR
Enjoy โžฅ8448380779โ–ป Call Girls In Sector 74 Noida Escorts Delhi NCR
ย 
Enjoy โžฅ8448380779โ–ป Call Girls In Sector 62 Noida Escorts Delhi NCR
Enjoy โžฅ8448380779โ–ป Call Girls In Sector 62 Noida Escorts Delhi NCREnjoy โžฅ8448380779โ–ป Call Girls In Sector 62 Noida Escorts Delhi NCR
Enjoy โžฅ8448380779โ–ป Call Girls In Sector 62 Noida Escorts Delhi NCR
ย 
A Comprehensive Guide to The Types of Dubai Residence Visas.pdf
A Comprehensive Guide to The Types of Dubai Residence Visas.pdfA Comprehensive Guide to The Types of Dubai Residence Visas.pdf
A Comprehensive Guide to The Types of Dubai Residence Visas.pdf
ย 
Apply Indian E-Visa Process Online (Evisa)
Apply Indian E-Visa Process Online (Evisa)Apply Indian E-Visa Process Online (Evisa)
Apply Indian E-Visa Process Online (Evisa)
ย 
Dubai Call Girls O528786472 Call Girls Dubai Big Juicy
Dubai Call Girls O528786472 Call Girls Dubai Big JuicyDubai Call Girls O528786472 Call Girls Dubai Big Juicy
Dubai Call Girls O528786472 Call Girls Dubai Big Juicy
ย 
VIP Call Girls in Noida 9711199012 Escorts in Greater Noida,Ms
VIP Call Girls in Noida 9711199012 Escorts in Greater Noida,MsVIP Call Girls in Noida 9711199012 Escorts in Greater Noida,Ms
VIP Call Girls in Noida 9711199012 Escorts in Greater Noida,Ms
ย 
8377087607 Full Enjoy @24/7 Call Girls in INA Market Dilli Hatt Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in INA Market Dilli Hatt Delhi NCR8377087607 Full Enjoy @24/7 Call Girls in INA Market Dilli Hatt Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in INA Market Dilli Hatt Delhi NCR
ย 
Call Girls In Panjim Mariott Resort โ‚ฐ8588052666โ‚ฐ North ...
Call Girls In Panjim Mariott Resort โ‚ฐ8588052666โ‚ฐ North ...Call Girls In Panjim Mariott Resort โ‚ฐ8588052666โ‚ฐ North ...
Call Girls In Panjim Mariott Resort โ‚ฐ8588052666โ‚ฐ North ...
ย 
Akshay Mehndiratta Summer Special Light Meal Ideas From Across India.pptx
Akshay Mehndiratta Summer Special Light Meal Ideas From Across India.pptxAkshay Mehndiratta Summer Special Light Meal Ideas From Across India.pptx
Akshay Mehndiratta Summer Special Light Meal Ideas From Across India.pptx
ย 
Exploring Sicily Your Comprehensive Ebook Travel Guide
Exploring Sicily Your Comprehensive Ebook Travel GuideExploring Sicily Your Comprehensive Ebook Travel Guide
Exploring Sicily Your Comprehensive Ebook Travel Guide
ย 
Hoi An Ancient Town, Vietnam (่ถŠๅ— ๆœƒๅฎ‰ๅค้Žฎ).ppsx
Hoi An Ancient Town, Vietnam (่ถŠๅ— ๆœƒๅฎ‰ๅค้Žฎ).ppsxHoi An Ancient Town, Vietnam (่ถŠๅ— ๆœƒๅฎ‰ๅค้Žฎ).ppsx
Hoi An Ancient Town, Vietnam (่ถŠๅ— ๆœƒๅฎ‰ๅค้Žฎ).ppsx
ย 
How Safe Is It To Witness Whales In Mauiโ€™s Waters
How Safe Is It To Witness Whales In Mauiโ€™s WatersHow Safe Is It To Witness Whales In Mauiโ€™s Waters
How Safe Is It To Witness Whales In Mauiโ€™s Waters
ย 
"Fly with Ease: Booking Your Flights with Air Europa"
"Fly with Ease: Booking Your Flights with Air Europa""Fly with Ease: Booking Your Flights with Air Europa"
"Fly with Ease: Booking Your Flights with Air Europa"
ย 
Haitian culture and stuff and places and food and travel.pptx
Haitian culture and stuff and places and food and travel.pptxHaitian culture and stuff and places and food and travel.pptx
Haitian culture and stuff and places and food and travel.pptx
ย 
Revolutionalizing Travel: A VacAI Update
Revolutionalizing Travel: A VacAI UpdateRevolutionalizing Travel: A VacAI Update
Revolutionalizing Travel: A VacAI Update
ย 
best weekend places near delhi where you should visit.pdf
best weekend places near delhi where you should visit.pdfbest weekend places near delhi where you should visit.pdf
best weekend places near delhi where you should visit.pdf
ย 

Traveling Eco-Salesman Problem Solved Using Ant Colony Optimization, Nearest Neighbour and God Algorithms

  • 1. 1 Experimentation system for supporting solving Time and Cost Dependent TSP Problem Traveling Eco-Salesman Adrian Aleksander Strugala Faculty of Electronics Wroclaw University of Science and Technology Wrocล‚aw, Poland 209227@student.pwr.wroc.edu.pl Abstractโ€” The article presents different approaches to finding the optimal solution for a problem, w hich extendsthe classical traveling salesman problem. Takes into consideration possibility of choosing toll highw ay and the standard road betw een two cities. Describes experimentation system. Provides mathematical model, results of the investigation, and conclusion. Index Termsโ€” Traveling Salesman Problem; Time and Cost dependent; Ant Colony Optimization; Nearest Neighbour; God; artificialintelligence; AI โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” ๏ต โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” 1 INTRODUCTION Observing the past centuries we can conclude, that the humanity tends to search for optimal roads. Merchants, travelers, and explorers were creating more and more detailed maps [1]. In the digital era, everyone can use free and open real-time maps found on the Internet. Some of them provide a feature for finding the shortest road connecting a set of cities [2], but very few can answer common question โ€œIs it really worth to pay for toll highway or should I just stay on the free road?โ€ A solution of Traveling Eco-Salesman Problem provides an answer to this question. The Traveling Salesman Problem describes a theoretical problem of finding the least expensive road (in the meaning of time, money or distance) connecting given a collection of cities [3] [4]. Traveling Eco-Salesman Problem introduces a new extension to the classical problem: each of the city can be connected to each other both by regular โ€“ free road or toll highway. This is modification inspired by [5]. Following assumptions are made: every city is connected with each other by free road. Additionally, cities may be connected by toll highway, but they do not have to. Cost of traveling toll road is greater than 0 and time of traveling toll road is shorter than the time of traveling the corresponding free road. There is given initial and ending city. Each city has to be visited once and cannot be visited more than once. The goal is to find the optimal (based on time and cost of travel) road connecting all the cities [6]. Four different approaches to cost management are being taken into consideration: The first is; only free roads can be chosen. This is classical TSP. The second is; toll roads are chosen whenever possible. The result of this approach is the fastest possible solution but uses the highest amount of money. The third is; there is given additional parameter โ€“ limit of combined cost of all chosen toll roads. The limit must not be exceeded. The final is; the computed solution is optimal in the meaning of minimizing Goal Function (7), where goal depends on the cost of the chosen roads and time difference between toll highway and free road for every chosen toll road. Three algorithms for solving TSP are implemented and compared: Ant Colony Optimization, Nearest Neighbour, and God. Following sections, covers listed topics. 2 โ€“ statement of the problem with the introduction of the mathematical model. 3 โ€“ description of four different approaches to finding the optimal solution for the problem and description of three implemented TSP engines. 4 โ€“ description of experimentation system with examples. 5 โ€“ results of the investigation. 6 - conclusion, and plans for future work and 7 - references. 2 PROBLEM STATEMENT The whole system is represented as a directed graph G(V,E). Vertices of this graph are a representation of cities. ๐‘‰ = ( ๐‘ฃ0, ๐‘ฃ1,โ€ฆ , ๐‘ฃ๐‘› ) (1) A number of vertices is equal to n.
  • 2. 2 Each edge is represented as a value of time needed for travel from origin todestination city. They are two sets of arcs โ€“ one for free roads and one for the toll. They are collected in matrices. For free roads, it is written as a matrix ๐‘‡๐‘…nร—n. Analogical, distances for toll roads are ๐‘‡๐‘‡ nร—n. To answer a question when toll road is worth to choose, a correlation between the cost of the road and time of traveling this road had to be formulated. This correlation is a statement of Goal Factor (GP) (2) for a single path: ๐บ๐‘ƒ = ๐ถ ร— ๐‘‡ ร— ๐ผ [โ‚ฌ ร— ๐‘ ] (2) Where GP is the value of Goal Factor, C is the cost of the travel, T is a time of the travel for a single path and I is practical importance factor based on the value of saved time. Empirical meaning of the Goal Factor is to find a road connecting two cities with the possible minimal time and cost of the travel. Following assumptions are made: 1) Time of traveling free road (TF) is always longer than traveling on the toll road (TT): โˆ€( ๐‘Ž < ๐‘›, ๐‘ < ๐‘›) ๐‘‡๐‘… ๐‘Ž,๐‘ > ๐‘‡ ๐‘‡ ๐‘Ž,๐‘ (3) 2) Cost of traveling free road (CF) is always lower than traveling on the toll road (CT) : โˆ€( ๐‘Ž < ๐‘›, ๐‘ < ๐‘›) ๐ถ ๐‘… ๐‘Ž,๐‘ < ๐ถ ๐‘‡ ๐‘Ž,๐‘ (4) 3) Cost of traveling free road is a cost of gasoline only (CG). Cost of gasoline is calculated as the multiplication of distance, average combustion and price of fuel: ๐ถ ๐น = ๐ถ ๐บ = ๐‘  ร— ๐‘๐‘œ๐‘š๐‘๐‘ข๐‘ ๐‘ก๐‘–๐‘œ๐‘› ร— ๐‘“๐‘ข๐‘’๐‘™ ๐‘๐‘Ÿ๐‘–๐‘๐‘’ [โ‚ฌ] (5) 4) Cost of traveling toll road is a cost of highway payment (CP) and gasoline (CG). Combustion on the highway is 1.25 times higher than on the national road, because of higher average velocity: ๐ถ ๐‘‡ = ๐ถ ๐บ ร— 1.25 + ๐ถ ๐‘ƒ[โ‚ฌ] (6) The final Goal Function (7) is the minimal sum of Goal Factors for single paths. This is the key function of the future research: ๐บ = minโˆ‘ ๐บ ๐‘ƒ(๐‘Ž,๐‘) [โ‚ฌ ร— ๐‘ ] (7) 3 SOLUTION TO THE PROBLEM The basis for solving the problem is to find optimal route for TSP. This is done by Ant Colony Optimization algorithm, [6] Nearest Neighbour [9] or God [10] algorithms. Pseudocode of Ant Colony Optimization is presented in Figure 1., pseudocode of Nearest Neighbour is presented in Figure 2. and pseudocode of God is presented in Figure 3. Ants are released from the hive. Their goal is to solve Traveling Salesman Problem. According to a real- life example, at first, they are choosing the route randomly and leaving pheromones. The strongest pheromone trail is left on the most commonly used route, which is considered as the optimal path. Figure 1. Pseudocode of Ant Colony Optimization Nearest Neighbour was one of the first solutions to TSP problem [9]. The idea is very straightforward. Starting from the initial city, the program chooses the nearest city already considered. Then adds it to the path and marks as visited. City, which is set as an ending point, is simply added as the last city in the path. Figure 2. Pseudocode of Attention Whore God algorithm comes from human considerations of the beginning of the word and life [10]. One of the theories says that at beginning of everything God created our universe. In this theory, God created an infinite number of universes, with random laws of physics, rules of chemistry and other rules governing the world. Universes were collapsing one after another, and only one of them survived โ€“ with the optimal rules. This is our universe. Adjusting God to the TSP is as follows. The program chooses random route connecting all the cities, numerous times. It uses all the strengths of parallel programming โ€“ drawing random routes may occur in the same. The only limit is a computational power of the Input: distance matrix, no. of ants, no. of cities Output: shortest route 1: current shortest route = initial solution; 2: while (ant can chose different path than current shortest) 3: while (ant < no. of ants) 4: while (no. of cities in current path != no. of cities) 5: select city i with probability based on distance and pheromone matrices; 6: add city i to shortest path for this ant; 7: leave pheromone trial; 8: shortest path in this iteration = compare paths for each ant and take the shortest; 9: if (shortest path in this iteration < current shortest path) 10: current shortest path = minimum path in this iteration; 11: evaporate pheromone trials; 12: shortest route = current shortest path; Input: distance matrix, no. of cities Output: shortest route 1: current shortest route = initial solution; 2: add starting city as the first; 2: for (no. of cities -2) 3: find nearest neighbour (exclude already visited); 4: add nearest neighbour to path; 5: mark nearest neighbour as visited; 6: add ending city as the last; 7: shortest route = found path;
  • 3. 3 computer. Figure 3. Pseudocode of God The field of investigations consists of finding the most optimal, in the meaning of minimizing Goal (7), solution. This is done by approaching the problem of cost management in four different ways. Following scenarios were implemented based on Ant Colony Optimization algorithm. Each of the scenarios puts different constraints on the TSP algorithms and changes its behavior significantly. Only free roads. The first idea is to answer the question if choosing toll roads is profitable in any case. In this scenario the only cost of the travel is the cost of fuel and importance parameter is equal to 1: ๐ผ = 1 (11) Toll roads whenever possible. The second idea is to investigate this scenario: Choosing toll road is always profitable. This is opposite approach to the first one. I parameter from equation (2) is calculated as follows: ๐ผ = ๐ถ ๐น ๐ถ ๐‘‡ (12) Cost limit. The third idea is to introduce additional constraint of limiting overall cost of travel. This is the most flexible approach and the most practical for future users. โˆ‘ ๐ถ(๐‘Ž,๐‘) < ๐ฟ (13) This scenario goal is to prioritize section of roads with the highest gain over those the least profitable. The Goal (7) is strongly dependent on financial capabilities of the user. This is the most promising approach for future commercial development. Evaluation of the cost of time. The fourth and final idea is to take into consideration the relationship between cost and time parameters calculated for the Goal Factors (2). Then, for every part of the road chose separately if it is worth to use toll or free road. During execution of the TSP engine, the algorithm builds path based on this evaluation of the cost of time. 4 EXPERIMENTATION SYSTEM All the investigations are made in dedicated experimentation system, named Traveling Eco- Salesman. Prefix โ€œecoโ€ comes from economical approach underlined in solutions presented in this article. The program is written in C#, Microsoft object- oriented programming language and uses REST protocol to receive information from the Internet in JSON format. It communicates with Google Maps API to get real-time information about the time needed to travel between chosen cities [7]. That information populates matrices ๐‘‡๐‘… and ๐‘‡๐‘‡ . Similarly, matrix CP is filled by actual data of cost downloaded from Michelin Maps API, ViaMichelin [8]. The program takes a list of cities as an input, for which user wants to calculate optimal route. The first city is an origin, last is a final destination. The initial user interface is represented in Figure 4. The position of each city is represented by a dot on the cartographic grid. The user has an access to 6 different features in form of solutions described in Section 3 โ€“ four approaches to cost management and two additional TSP engines. What is more, the user is given an ability to display the optimal road on the screen. Figure 4. Initial user interface After selecting one of the options, the screen shows calculated route. Optimal path, considering all factors is shown in Figure 5. In this example, God TSP engine was chosen. Figure 5. Example of God functionality Input: distance matrix, no. of cities, no. of universes Output: shortest route 1: current shortest route = initial solution; 2: parallel for (no. no universes) 3: draw random route 4: shortest route = find shortest route in random routes;
  • 4. 4 Section of the road is represented as a continuous line for free road or dotted line for toll one. Application displays route between cities, which specification if a toll or free way is preferable on every part of the route. The application gives information on duration of the travel and cost of toll fees. For test purposes, additionally, the value of Goal Function and duration of execution of the TES algorithm are visible. 5 INVESTIGATION The research was done on three various datasets with unique features. The first was set of cities: Como, Verona, Florence, Pisa, Turin, Milan, Genoa, and Bergamo. All the cities are located in northern Italy. This region is very well communicated and, because of mountainous terrain, the time difference between traveling toll and the free road is significant. This set is named Italy for a shortcut. The second is set of cities in Poland: Wroclaw, Gdansk, Krakow, Poznan, Warsaw, and Lublin. This region is not that well communicated and toll fee is relatively high. This set is named Poland for a shortcut. The last set of cities are locations all over Europe: Moscow, Warsaw, Barcelona, London, Prague, Budapest, Paris, Amsterdam, Madrid, Oslo, Berlin, Vienna, Athens, Rome, Stockholm, Istanbul, and Lisbon Those cities are located in different countries and tests also connection between different regions in Europe. This set is named Europe for a shortcut. The first field of investigation was the influence of limit (13) in the Limit approach on the value of Goal Function (7). This investigation was done based on Italy dataset. In Table 1. results of the exaction of the TSP with the limit approach are collected. Based on those results influence of limit parameter (L) on the value of Goal Function (7) is clearly visible in Figure 9. Table 1. Influence of parameter L on the value of Goal Function Limit [โ‚ฌ] Cost [โ‚ฌ] Goal [โ‚ฌ ร— s] 0 0 380.586 7 3.5 388.3 14 12.2 385.553 21 12.2 385.553 28 27.9 313.413 35 27.9 313.413 42 27.9 313.413 49 43.1 270.51 56 43.1 270.51 63 61.2 292.605 70 61.2 292.605 77 61.2 292.605 84 77.8 254.318 Figure 6. Chart showing the influence of parameter L to value of Goal Function The general trend is, that with increasing limit of cost, the value of Goal Function (7) decreases. For some intervals of the cost, the value of Goal Function (7) stays on the same level. The upper limit of research range was the value of cost received in the approach of using toll roads whenever possible. The second field of investigation was an analysis of the optimal approach to management of the cost. Dataset used in this comparison is set of cities from northern Italy. Results collected in Table 2 shows the best-received results for 30 executions of the program. Table 2. Comparison of results for different approaches to cost management Duration [hh:mm:ss] Cost [โ‚ฌ] Goal [โ‚ฌ ร— s] Time of execution [ms] Free 20:04:25 0 380.586 816 Toll 12:05:01 77.8 254.318 933 Limit 12:05:01 77.8 254.318 610 Evaluation 13:10:16 55.2 223.604 692 Considering the value of Goal Function (7) as a criterion for choosing the optimal solution to handling the cost of travel; evaluation of the cost of time is the most promising approach. Further research, deciding the most promising TSP engine were performed based on the very same mechanism of automatically choosing if travel between two cities should be done on toll or free road. Mean values of 30 executions of the program for 0 50 100 150 200 250 300 350 400 450 0 20 40 60 80 100 Goal (L)
  • 5. 5 different TSP engines and different datasets are shown in Table 3, Table 4 and Table 5. The key parameter, informing about the performance of each engine is the value of Goal Function (7). Table 3. Comparison of results for different TSP engines for Italy dataset Italy Duration [hh:mm:ss] Cost [โ‚ฌ] Goal [โ‚ฌ ร— s] Time of executio n [ms] ACO 14:13:46 93.21 339.804 640 NN 14:13:50 93.60 340.319 0.01 God 13:10:16 55.20 223.600 693 The result of research performed on Italy dataset shows that outcome of Ant Colony Optimization and Nearest Neighbour are very similar. Because of simplicity of implementation, time of execution of NN engine is significantly shorter. This is a true statement for every performed experiment. The best TSP engine used in this experiment was God algorithm. Value of Goal Function (7) is 33% lower than in rest of the engines. Hence, time and cost of travel have also lower values. Table 4. Comparison of resultsfor different TSP engines for Poland dataset Poland Duration [hh:mm:ss] Cost [โ‚ฌ] Goal [โ‚ฌ ร— s] Time of execution [ms] ACO 22:38:57 10.71 680.569 403 NN 23:15:58 10.26 712.960 0.002 God 18:58:04 0 396.122 747 For Poland dataset, once more, the optimal algorithm was God. In this experiment value of Goal Function (7) for God was 42% lower than for Ant Colony Optimization and 44% lower than for Nearest Neighbour. Table 5. Comparison of resultsfor different TSP engines for Europe dataset Europ e Duration [hh:mm:ss ] Cost [โ‚ฌ] Goal [โ‚ฌ ร— s] Time of executio n [ms] ACO 227:19:36 166.9 2 34132.98 8 2523 NN 233::21:45 176.6 9 37021.90 0 0.01 God 218:20:44 115.58 22331.69 3 548 The third experiment performed on the list of cities placed in all over Europe confirmed, that God algorithm provides the optimal results between implemented TSP engines. In this case, the result was also drastically better. Mean value of Goal Function for God was 35% lower than for ACO and 40% lower than for Nearest Neighbour. 6 CONCLUSION The optimal approach for cost management is an evaluation of the cost of the time performed by the program, based on values of Goal Factors (2). The optimal TSP engine implemented in the Traveling Eco-Salesman program is God algorithm. This extension to TSP problem provides a number of possible future investigation fields. Firstly, the proposition of new formula for Goal Function (7). Goal presented in this article allows for finding profitable routes. Reformulation of Goal though may allow finding even more optimal paths. Secondly, the proposition of another scenario for deciding when to how to manage the cost of the travel. Analogical to presented in Section 3. Thirdly, implementing another algorithm for solving TSP problem. Another possible improvement in TSP engines is calibration of used parameters. And finally, commercialize Traveling Eco-Salesman program. The most promising way is to propose it as an extension of existing Internet maps. It may also succeed as a standalone application. 7 REFERENCES [1] Unknown author, Clay tablet containing city map of Nippur, Babylon, prob. 1400 BC [2] E. Balais, The traveling salesman problem and its variations, Springer, 2007 [3] G. B. Dantzig, R. Fulkerson, S. Johnson, Solution of a Large- Scale Travelling-Salesman, Journalof the Operations Research Society of America, Vol. 2, No. 4, 393-410, 1954 [4] M. Held, R. M. Karp, The Travelling-Salesman Problem and Minimum Spanning Trees, Operations Research, Vol. 18, No. 6, 1138-1162, 1970 [5] S. Qin, S. Liu, Q. Zhang, The Traveling Salesman Problem with Profits Considering Time-Dependent Cost and Multi-Trip Mode, Proc. 36th. Chinese Control Conference, pp. 2899-2903, 2017. [6] S. Oliveira, M. S. Hussin, A. Roli, M. Dorigo, T. Stรผtzle, Analysis of the population-based ant colonyoptimization algorithm for the TSP and the QAP 2017 IEEE Congress of Evolutionary Computation, pp. 1734-1741, 2017. [7] https://developers.google.com/maps/documentation/, 2017 [8] http://dev.viamichelin.com/getting-started-rest.html, 2017 [9] G. Gutin, A. Yeo, A. Zverovich, Traveling salesman should not be greedy: domination analysis of greedy-type heuristics for the TSP, Discrete Applied Mathematics 117, pp. 81-86, 2002 [10] A. Brรผngger, A. Marzetta, K. Fukuda and J. Nievergelt, The parallel search bench ZRAM and its applications, Annals of Operations Research 90, pp. 45โ€“63., 1999
  • 6. 6