You are on page 1of 21

Logistik Maritim

Dr. Andri Dwi Setiawan,


Clustering and Shipping Route
Dr. Armand Omar Moeis, M.Sc
Optimization using DBSCAN and The
Travelling Salesman Problem

Group 9

Dewa Ferrouzi D.Z.P Intan Putri M. S. Jasmine Pradnya Muhammad Irsyad


2006525311 2006467280 2006482060 2006576514
DBSCAN Introduction
Density-Based Spatial Clustering of Application with Noise DBSCAN is a data clustering algorithm based on density

DBSCAN Objective

Find the high density cluster core samples. Beneficial for data that comprises DBSCAN has 2 main advantages which make it well-suited for
dense clusters. maritime trajectory clustering.

1 Gives good results since it can find clusters of any shape and is
reliable at spotting outliers.
DBSCAN demonstrates huge potentials to be applied on marine trajectory
clustering (Liu, 2015)
2 Before executing the algorithm, users are not required to input the
anticipated number of clusters.

Source: Liu, B. (2015).


So the algorithm requires two additional parameters
Traditional DBSCAN Clustering Illustration

Eps (epsilon) Parameter MinPts Parameter


DBSCAN is used to
The shortest distance between The quantity of samples (or total display clustering
results of expanded
two samples that must separate weight) required for a
data, detecting
them in order for either to be neighborhood to include a point outliers, and
deemed nearby. as a core point. The actual point generating points
is included in this.
TSP Introduction
Traveling Salesman Problem (TSP) is an algorithmic problem tasked with finding the shortest route between a set of
points and location that must be visited
TSP Objective

Find the shortest (most economical) route passing through all the points and TSP has 2 main advantages which make it well-suited for maritime
returning to the starting point (home port) trajectory clustering.

Optimize and reduce the cost of transport and delivery.


1
TSP is usually formulated using concepts based on graph theory

TSP Application Illustration


Reduces and optimizes the total travel distance of the
2
“salesman”.

Ways to solve the Travelling Salesman Problem

The Branch-and-Bound The Nearest Neighbour


method: Method:

Involves segmenting the issue Involves always going to the


into a number of smaller issues, closest location first, and after
The shortest route in the geographical route from the aforementioned example each of which may have a variety visiting all other locations,
appears to be further away from the mapping method at first glance. of potential solutions. returning to the initial location.

Source: Keshavdas, M. (2022).


Source: Chládek, Petr, Smetanová. (2018).
Data Collection
The required datasets are presented along with its sources. The primary and secondary data are obtained from PT
PELNI, Aquaplot and Google Earth
Data Source Description

Perintis Shipping The names of the ports served by perintis shipping on each route in the
PT. PELNI
Serviceable Ports Maluku Islands region

Perintis Shipping PT. PELNI Perintis shipping routes that connects each of the ports in the Maluku
Routes Islands Region

The time needed for one round voyage on each perintis shipping route in the
Route Round Voyage PT. PELNI
Maluku Islands region (in units of days)

Shipping Route The distance traveled by one round voyage on each perintis shipping route
PT. PELNI
Travel Distance in the Maluku Islands region (in nautical miles)

Port Coordinates The latitude and longitude coordinates of the port served by perintis
Google Earth
shipping in the Maluku Islands region

Port-to-port Mileage PT. PELNI and The mileage data formed in the origin destination matrix corresponding to
Aquaplot the actual voyage distance in nautical miles
Step-by-Step Guide
The required datasets are presented along with its sources. The primary and secondary data are obtained from PT
PELNI, Aquaplot and Google Earth

Step Description Source Tools

Gather the Longitude and Latitude data of each and every one of the ports in the
1 existing route(s) Google Earth Excel

Transform the Excel file into a readable .csv file (make sure that the longitude and
2 latitude are exactly the same as in GEarth) Google Earth Excel

Input the Python DBSCAN syntax with the .csv as the main data input. (MinPts
3 and Eps are adjustable depending on the routes) Excel Python

After the newly formed clusters are collected, reintroduce the noise(s) into the Google
4 new clusters following specific rules. PT. PELNI
Earth

Identify the distances between each ports in the newly adjusted clusters, and from PT. PELNI,
5 the Origin-Destination Matrix. Aquaplot
Excel

Input the OD Matrix values into the Python TSP Syntax manually, and adjust the
6 assumptions accordingly.
Excel Python
Data Collection
Along with the information from PT. PELNI, other sources include port coordinates from Google Earth and distances
between ports from Aquaplot

Google Earth is a computer program that renders a 3D Data collection of travel distance between perintis shipping ports
representation of Earth based primarily on satellite imagery.

Primary Data: Finding travel distances between ports that


We can collect each serviceable perintis shipping ports’ coordinates by using 1
are not yet available using Aquaplot
Google Earth

Google Earth Interface Secondary Data: Travel distance between ports from PT
2 Pelni (only available datas are route distances on the perintis
Port name serviceable routes)
and
location
Aquaplot Illustration on gathering primary data.

Longitude
and
Latitude
Port
coordinat Sea Travel
es Distance
(nautical
miles)

In order to calculate the distance between each port, the port coordinates are next used.
The clustering procedure makes use of the longitude and latitude.

Source: Aquaplot
Source: Google Earth
Data Collection
We collect the data of 3 operating perintis route in the Maluku Island region consisting of 17 different ports

Route Detail and Spesification Google Earth illustration of serviceable perintis shipping ports
in the Maluku Islands Region
Round R-58 R-59 R-60
Number of Voyage
Route Ports Mileage (NM)
Ports Time
(days)

Tual, Banda, Ambon, Elat,


R58 8 1530 14
Dobo, Larat, Saumlaki, Tepa

Saumlaki, Seira, Nurkat, Molu,


R59 Larat, Sofyanin, Elat, Tual, 10 1315 13
Dobo, Batu Goyang

Google Earth illustration of serviceable perintis shipping routes


Saumlaki, Larat, Molu, Ambon,
R60 Ambalau, Namrole, Leksula, 9 1276 14 R58, R59, and R60 in the Maluku Islands Region
Sofyanin, Tutukembong

The traditional route shows


us that some ports are
Average 9 1.373,67 13,67 visited more than others
causing disparities in the
visit. There is also an
Total 27 4121 41 overlapping visit for each
route causing a lengthy
voyage time
Range 2 254 1

Source: PT. PELNI


Data Collection
The current route shows us the lengthy voyage time for every trip and the disparities of the visit frequency
between ports
Duration of round voyage for each route (in days) Port vist frequency disparity

With the average voyage duration of more than 13 days, The difference in the visit frequency between ports is also huge.
completing all 3 route will take 41 days to do. With some port receives 6 visit while others receive only 1 per
trip
Making the frequency of voyage that can be done roughly about
only 2 trips every 3 months. This disparity between ports shows an imbalance in the route
management

Source: PT. PELNI


Data Processing
We then process the collected data into coordinates for clustering using DBSCAN and OD Matrix from the
results for rerouting using TSP Method

Distance between ports as Origin-Destination Matrix for


Perintis Shipping Ports Coordinates used for Clustering with DBSCAN
rerouting using Travelling Salesman Problem Method

We collected each port coordinates


in the Maluku region shipping
routes.

The data then used to execute


clustering using the DBSCAN
algorithm based on the density of the
data
Origin-Destination Matrix as shown above is used to determine new, more
effective routes for perintis shipping using the Travelling Salesman Problem
Method solving algorithms

The OD Matrices will be generated from the new cluster created based on the
DBSCAN result, resulting in a newly improved path for the route
Number of Ports:
Method Framework
18 Unique Ports Collect old route data Create new cluster Generate clusters’ OD
Expanding throughout the Maluku using DBSCAN Matrix
Region
New and improved Generate new path
route created using TSP

Source: PT. PELNI


Data Processing
A program was then created to create the clusters and identify the noise in the clusters created

DBSCAN Programming Codes and Parameters. Tools and Resources

Language
Python using Google Colab
environment

Modules/Library
Parameter: Scikitlearn’s Clustering
(sklearn.cluster)

Epsilon (Eps) min-samples Algorithm


150 Kilometers or ≈ 0.0235 radians A minimum of 3 points of ports are required to form Ball-tree space partitioning
a cluster.
algorithm

Clusters Created Noise Identified DBSCAN Iteration Result

Number of Clusters: Points Considered Noise:

4 Cluster 2 Points

Illustration of the clusters are represented with the color


turquoise, violet, yellow, and dark cyan. While the noise
identifier represented the noise with the color black for noise
and red for normal clusters.
Data Processing
Comparison between DBSCAN Cluster Plot Result and the Google Earth Illustration….

Google Earth Illustration DBSCAN Cluster Plot


Cluster 1
Noise

We need to get rid of


Cluster 2

the noise ports. It can


be done by adding
those ports to other
clusters.
Cluster 3

Number of Cluster and Noise Resulted

Cluster Number of Ports


There are significant differences in the
1 4
number of ports for each 1 cluster(s) and The cluster plot image is flipped horizontally and
Noise 2 there are still two ports that included as rotated 90° to the right to match the illustration.
Noise.
2 7

3 4
Data Processing
Next Step, We put the Noise Ports into other Cluster based on Expert Judgements

Before After
Cluster 1

Cluster 1
Noise

Cluster 2
Interconnection
between three
Noise ports are are
clusters
assigned to other
Cluster 2

clusters.

Cluster 3
Cluster 3

Changes Done

Number of Cluster Resulted


1 Noise ports are are assigned to other clusters. Banda ports are added in cluster 1, and tepa ports are added in cluster 2
Cluster Number of Ports

2 Interconnection of cluster 1 and 3 are fulfilled through the sharing of the Banda Port 1 5

2 7

3 Interconnection of cluster 2 and 3 are fulfilled through the sharing of the Larat Port 3 6
Data Processing
Then, we find the route with the shortest distance for each cluster using the Traveling Salesman Problem

What is Travelling The traveling salesman problem (TSP) is an algorithmic problem tasked with finding the shortest route between a set of points and
Salesman Problem? locations that must be visited

Parameter: Variable : Objective:


Number of Ports Minimizing total distance travelled in each
Distance from port i to j 1, if ship sails from “i” to “j” (Binary) cluster

Step by Step

Input the Origin-Destination Matrix Data


consisting of Port distances to the adjacent as
1 below, with N = number of ports in an iteration
cluster

Input the assumption of the speed of the ship and docking


2
time in each port. (Routing time of 24 hours)
Result and Analysis
The re-routed routes are re-illustrated using Google Earth and below are the results for Cluster 1

CLUSTER 1 R-58
Assumptions that we
use when processing
data
Speed
8 Knots
Docking Time
1 Hour
Rerouting
24 Hours

Number of Port :

5 Ports
With Banda Port as the
interconnection port

Path Taken

(0) Banda (1) Ambon (2) Ambalau (3) Namrole (4) Leksula

Total Distance Travelled Voyage Time (In Days)

478 Nautical Miles 2.697916 Days


Result and Analysis
The re-routed routes are re-illustrated using Google Earth and below are the results for Cluster 2

CLUSTER 2 R-59
Assumptions that we
use when processing
data
Speed
8 Knots
Docking Time
1 Hour
Rerouting
24 Hours

Number of Port :

7 Ports
With Larat Port as the
interconnection port

Path Taken

(0) Tepa (2) Seira (1) Saumlaki (3) Tutukembong (4) Larat

(6) Molu (5) Sofyanin

Total Distance Travelled Voyage Time (In Days)

461 Nautical Miles 2.6927083 Days


Result and Analysis
The re-routed routes are re-illustrated using Google Earth and below are the results for Cluster 3

CLUSTER 3 R-60
Assumptions that we
use when processing
data
Speed
8 Knots
Docking Time
1 Hour
Rerouting
24 Hours

Number of Port :

6 Ports
With Larat Port as the
interconnection port

Path Taken

(0) Elat (1) Tual (2) Banda (5) Larat (3) Batu Goyang

(4) Dobo

Total Distance Travelled Voyage Time (In Days)

862 Nautical Miles 4.739583 Days


Results and Analysis
The TSP model is subsequently review and validated to make sure it can be used and adheres to real-world conditions

Maximum Round
# of Mileage Round Voyage
Cluster Route Voyage Time Status
Ports (NM) Time (days) Total Distance Travelled
(days)
For all Clusters :

1 [0-1-2-3-4-0] 5 478 3 14 FULFILLE


D 1801
Nautical Miles
2 [0-2-1-3-4-5-6-0] 7 461 3 13 FULFILLE
D

3 [0-1-2-5-3-4-0] 6 862 5 14 FULFILLE


VERIFICATION AND VALIDATION D

Verification Validation

The model runs without error and produces an VALIDATE The optimization model produces a route that
objective function value VERIFIED visits each point once
D

The coding process does not show any errors in VALIDATE The optimized route starts and ends at the same
the script code VERIFIED point
D

Optimization produces routes and ports VALIDATE


VERIFIED There are no branching routes/sub-routes
accordingly to the input. D
Results and Analysis
The results of the data processing shows an average reduction of 56% mileage and an average reduction of 69% in average
voyage time

Assumptions that we use Speed Docking Time Rerouting


when processing data 8 Knots 1 Hour 24 Hours

Number of ports per cluster Mileage (NM) Round Voyage Time (days)

before after before after before after

SUM 27 18 4121 1801

AVERAGE 9 6 1373 601 13 4

IMPROVEMENT -33% -56% -69%

RANGE 2 2 254 401 1 2


Results and Analysis
Here is the comparison of Port Clusters before and after optimization

Route Before Route After

Route # of Ports Round Voyage Mileage (NM) Cluster # of Ports Round Voyage Mileage (NM)

R58 8 14 1530 1 5 3 478

R59 10 13 1315 2 7 3 461

R60 9 14 1276 3 6 5 862


Conclusions
The optimization of Perintis Shipping route successfully increase the connectivity index and minimize the round voyage

International benchmarks indicate that logistics costs in Indonesia are still higher
than other countries, with 23.7% of GDP. The government try to reduce this cost by
enabling Integrated Port Network (IPN). Optimizing the shipping route is one of the
Background strategy of IPN.

The research uses a mathematical approach to evaluate and improve the


performance of perintis shipping routes based on parameters traveled and round
voyage length. This research uses a clustering approach with DBSCAN and
Process optimization using TSP.

The research carried out has succeeded in achieving the research objective, namely
reducing the mileage and the round voyage duration in the region studied.

Mileage (NM) - 56% Round Voyage - 69%


Results
1373 NM to 601 NM 13 Days to 4 Days
Thank You

Al-fuqaha, A. (2014). Partitional(K-means), hierarchical, density-based (DBSCAN). Clustering Analysis. Retrieved December 20, 2022, from
https://cs.wmich.edu/~alfuqaha/summer14/cs6530/lectures/ClusteringAnalysis.pdf
Badan Pusat Statistik. (2021). Statistik Transportasi Laut 2020.
Breitkreutz, D., & Casey, K. (2008). Clusterers: a comparison of partitioning and density-based algorithms and a discussion of optimisations.
Chapter 11 branch and bound, search tree methods†. (1973). Mathematics in Science and Engineering, 189–222. https://doi.org/10.1016/s0076-5392(08)62013-5
Chládek, P., & Smetanová, D. (2018). Travelling Salesman Problem Applied to Black Sea Ports used by Czech Ocean Shipping Companies. Naše More, 65(3), 141–
145. https://doi.org/10.17818/nm/2018/3.2
Consulate general of the Republic of Indonesia in Vancouver, Canada. Kementerian Luar Negeri Repulik Indonesia. (n.d.). Retrieved October 4, 2022, from
https://kemlu.go.id/vancouver/en/pages/indonesia_at_a_glance/2016/etc-menu#:~:text=INDONESIA%2C%20the%20largest%20archipelago%20in,which%20a
bout%206%2C000%20are%20inhabited

You might also like