You are on page 1of 27

Article

Citation: Gunawan; Utomo, A.;


Pambudi, G.; Hamada, K.; Yanuar.
Optimization of Shipping Routes for
Container Ships from Indonesia to
the Asia-Pacific Using Heuristic
Algorithms. J. Mar. Sci. Eng. 2023, 11,
x. https://doi.org/10.3390/xxxxx

Academic Editor(s): Mihalis Golias

Received: 22 May 2023


Revised: 25 June 2023
Accepted: date
Published: date

Copyright: © 2023 by the authors.


Submitted for possible open access
publication under the terms and
conditions of the Creative Commons
Attribution (CC BY) license
(https://creativecommons.org/license
s/by/4.0/).

Optimization of Shipping Routes for Container Ships from


Indonesia to the Asia-Pacific Using Heuristic Algorithms
Gunawan 1,*, Allessandro Utomo 1, Ghulam Pambudi 1, Kunihiro Hamada 2 and Yanuar 1

1
Mechanical Engineering, Department of Mechanical Engineering, Universitas Indonesia,
Depok 16424, Indonesia; allessandro.setyo@ui.ac.id (A.U.); ghulam.tulus@ui.ac.id (G.P.);
yanuar@eng.ui.ac.id (Y.)
2
Graduate School of Advanced Science and Engineering, Hiroshima University, Hiroshima 739-8527, Japan;
hamada@hiroshima-u.ac.jp
* Correspondence: gunawan_kapal@eng.ui.ac.id; Tel.: +62-813-8578-4345

Abstract: Sea transportation such as that by container ships has an essential role in the economy
both locally and internationally. Ships are a major commodity in distributing goods over long
distances due to their relatively low price compared to air shipping. The study implemented an
optimization method using heuristic algorithms with ship route selection to minimize operational

J. Mar. Sci. Eng. 2023, 11, x. https://doi.org/10.3390/xxxxx www.mdpi.com/journal/jmse


J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 2 of 27

costs based on the parameters of mileage between 12 ports in the Asia-Pacific region. The ship
speed, engine power, and fuel prices at each port are processed using asymmetric traveling
salesman problem modeling (ATSP). The research uses three different algorithms to compare
with the performance of the traveling salesman problem, namely the nearest neighbor algorithm,
simulated annealing, and a genetic algorithm, with an objective function of keeping fuel costs
that ships will incur to a minimum. The results show that the genetic algorithm provides the
route with the lowest fuel cost.

Keywords: heuristics algorithms; Asia-Pacific; traveling salesman problem; fuel costs

1. Introduction
Sea transportation has an essential role in the national and international economy.
Ships have become a commodity to distribute goods over long distances due to their
relatively low price compared to air shipments. Based on Hwang’s research [1], ships are
already a means of transportation where 70% of the value of goods is transported
between continents. The transportation costs result in moving goods in volume being
more afford-able by using sea routes [2]. The cost of transportation itself has a value of
66% of all logistics costs in the world. Shipping companies should obtain transportation
cost efficiency so that shipping companies can achieve operational benefits. The
operational costs borne by a shipping company are divided into several aspects, namely,
fuel costs, insurance, number of ship crews, and port service costs. An immense
contribution, with a weight of 60% of all ship operating costs, is the cost of fuel [3]. In
addition, fuel prices are also volatile and uncertain, so each port creates new challenges
for shipping companies [4].
A container ship is a ship built to transport a container or containers. Each container
ship is designed using units of TEUs with the aim that the ship’s hull can load the
appropriate containers, with the number of containers requested by the owner. A boat
container is slightly different from a general container ship, where a ship regularly has a
specific route or is often referred to as a liner. Based on Kristensen [5], container ships
can be divided into three types based on size as follows: feeder ships (less than 2900
TEUs), Panamax ships (between 1900 TEUs and 5300 TEUs), and Post-Panamax ships (less
than 4000 TEUs). A boat container is a ship most often used in shipping intercontinental
goods. The container size is also becoming more prominent along with the increasing
demand in the market in terms of shipping goods using water transportation. Therefore, the
world economy is highly dependent on the shipping industry, in which container ships
carry non-bulk cargo.
These problems make it difficult for shipping companies to choose the best route.
Therefore, this study aims to provide the best route with the minimum fuel cost and
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 3 of 27

greatest efficiency for shipping companies. The solution is based on graph theory
produced by Bondy and Murty’s research [6]. A graph with the notation G has a set
consisting of a vertex. A graph is a collection of points. A line joining two points is an
edge. Graph G can be represented by (V, E). Set V is a collection of points, and set E is a
collection of edges. The points that exist can represent the location of a city. Meanwhile,
the ribs symbolize the relationship between the two cities represented by the existing
points. Below is an example of a graph G (V, E), with V = {v 1, v2, v3, v4} and E = {e1, e2, e3,
e4, e5, e6}, which can be explained through Figure 1.

Figure 1. Visualization of Graph G (V, E).

The classical mathematical model that uses graph theory is the traveling salesman
problem. The traveling salesman problem (TSP) is a classical mathematical model that
requires an optimization algorithm to be used to search for solutions. This problem is an
application of graph theory and is included in the scientific field of operations research.
The traveling salesman problem originates from a problem where a salesperson must
visit n cities to sell their products. The series of cities he visited would create a path, with
the condition that these cities could only be visited once, and eventually return to the
original city. According to Sengupta and Pal [7] and Çela [8], the traveling salesman
problem can be used to choose the route with the lowest cost. The solution can be found
by creating a traveling salesman problem matrix which contains the costs of traveling
between cities through Equation (1); the matrix is below:

(1)
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 4 of 27

where n is the number of ports to be visited, Dij is the distance or cost from port-i to port-j, and i j, is the sequence of
notation (1, 2, to n). Based on Hoffman’s research, such cases are often referred to as Hamiltonian cycles [9]. Thanks to
its easy formulation, difficulty in solving, and wide range of real-life applications, the TSP is probably the most
studied discrete optimization problem in Gutin’s research [10]. A heuristic algorithm is an algorithm that belongs to
the optimization algorithms; these algorithms can provide results that are close to the optimum value with fast
computation time. Several models of heuristic algorithms can handle cases with large sample sizes with deviation
values only ranging from 2–3% of the optimum solution [11]. Several examples of heuristic algorithms are the genetic,
simulated annealing, ant colony, particle swarm, and nearest neighbor algorithms. In the case of the traveling
salesman problem, the algorithm’s objective function is the same, namely, to find the best route with the minimum
distance or cost.
In contrast to other algorithms [12], the genetic algorithm is one of the best heuristic
algorithms for combinatorial optimization problems [13–16]. This algorithm selects
individuals randomly from a specified population to be parents to produce offspring in
the next generation. Evolution will occur after several generations have passed. The
scientific selection process will produce the best individuals because of the survival
process. Continuous gene changes will occur in individuals to help them adapt or adjust
to their living environment. Changes in genes in individuals are caused by mutation and
crossover processes that occur in each individual. The mutation and crossover processes
are the basis of the genetic algorithm, which provides offspring or a more optimal
solution to solving a predetermined problem [17]. A heuristic algorithm is a procedure
that can provide a good or nearly optimum solution to a problem. [18] This research
aims to find the best route with the minimum fuel cost. This research hopes there is an
easy process for selecting shipping routes for container ships so that operational cost
efficiency can be achieved. This study uses three heuristic algorithms, namely, the
nearest neighbor algorithm, simulated annealing, and the genetic algorithm, to find the
most cost-optimal route.

1.1. Literature Review


Several studies have been conducted to analyze routing problem cases and heuristic
algorithm methods. The manuscript reviews [22] examine the impact of genetic
operators on algorithm efficiency, highlighting their significance in the search for
solutions. The research focuses on applying metaheuristics, particularly genetic
algorithms, to solve the vehicle-routing problem. The study includes the development of
a prototype that incorporates various genetic operators tailored explicitly to the vehicle-
routing problem. Through a series of experiments, the authors investigate the optimal
combination of genetic operators for effectively solving the vehicle-routing problem.
They also assess the level of involvement each genetic operator should have in the
solution-generation process. They also identify the operator that facilitates the discovery
of optimal solutions for large-scale, real-life instances of the vehicle-routing problem.
Ilhan [23] experiments aims to improve the solution quality and convergence of a
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 5 of 27

simulated annealing algorithm for the capacitated vehicle-routing problem (CVRP).


They introduce several enhancements to the algorithm. Firstly, they improve the initial
population generation and utilize advanced 2-opt algorithms to start the search process
with better solutions. Unlike traditional approaches, they incorporate crossover
operators and information exchange among solutions, leading to a higher convergence
rate. They also employ a mixed selection procedure to sustain convergence in the later
iterations. The authors use the Taguchi method to determine the optimal parameter
values for their improved simulated annealing algorithm with crossover (ISA-CO).
Through various performance measures, they demonstrate the competitiveness of ISA-
CO as an alternative method for solving the CVRP. Overall, Ilhan’s study presents a
comprehensive approach to enhancing the simulated annealing algorithm for the CVRP,
showcasing its potential for effective and competitive problem solving. Zhen [24]
researched route and speed optimization on liner ships by considering emission control
policies. The study uses mixed-integer linear programming to minimize fuel costs and
SO2 emissions. Lashgari et al. (2021) uses the stochastic linear-integer programming
model to determine the ship speed and ship route by considering scenarios of
differences in fuel prices. Wen et al. [26] investigate the case of multiple-ship routing and
speed under various objectives, including time, cost, and environmental considerations.
They develop a branch-and-price algorithm and a constraint-programming model to
address this problem. Their models take into account several factors, including the fuel
consumption based on payload, explicit fuel prices, freight rates, and costs associated
with in-transit cargo inventory. The study considers alternative objective functions such
as minimizing the total trip duration, minimizing total cost, and minimizing emissions.
In their study, Moradi et al. (2022) employ a novel method for optimizing routes using
reinforcement learning (RL). The researchers first develop a generic ship model using
artificial neural networks (ANNs) to accurately predict the fuel consumption of the ship.
Subsequently, they apply different RL algorithms, including deep Q-network (DQN),
deep deterministic policy gradient (DDPG), and proximal policy optimization (PPO), to
optimize the routes.

2. Materials and Methods


David Goldberg [19] is the scientist who first introduced a cycle of genetic
algorithms such that the research developed into a cycle that selects the best individuals.
Furthermore, Zbigniew Michalewicz [20] developed a genetic algorithm cycle by
changing the order of the selection process to be carried out after mutation and
crossover and adding an elitism operator. The elitism operator in question provides a
coding process by providing individual forming genes so that it results in encoding
binary values, real numbers, and integers so that optimization occurs based on gene
combinations. Then, the algorithm generates a fitness value that is useful for providing
the best solution from the resulting combination of genes. This function is objective, so an
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 6 of 27

initial population can be created by permuting genes. The initial population is finally
selected so that the individual with the highest fitness value produces the best offspring or,
in this case, the best container ship path from each port of origin and final destination
based on the distance and the cost of fuel used during the trip. This process is explained
further in the sub-chapters below.

2.1. Genetic Algorithm


The most important thing is the three processes that make the genetic algorithm
function as it should, which is determined based on the fitness value as the objective
function to minimize the total fuel cost spent, resulting in less cost and a better fitness
value. The function can be summarized with the following fitness value of this problem
case using the asymmetric traveling salesman problem mathematical model, which is
defined in Equation (2). The F value is the fitness value, and f is the total fuel cost
incurred, so the reference is an objective function that gives the minimum fuel cost
value.
F = 1/f (2)
First, in this study, the selection process used was the tournament method. The
selection process is used to obtain the best individuals, which will then undergo
crossover and mutation processes. This method can be described as a tournament in
which n participants compete with each other to find the best one. The selection is based
on the fitness value of each individual. Second, a crossover is a stage that will produce a
new individual by involving the exchange of genes from two selected parents. The
process is carried out with the results of the selection in the previous process with a
predetermined probability. If the probability value of an individual is greater than the
crossover, then the crossover will not be performed. The crossover process aims to
provide new individuals who provide offspring with better values. Figure 2a illustrates
this process based on research reviewed by Goldberg [21] by performing a one-to-many-
point crossover, an arithmetic crossover, and a crossover for the representation of
permuted chromosomes.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 7 of 27

(a) (b)
Figure 2. Illustration of genetic algorithm process; (a) crossover and (b) mutation.

On the other hand, mutation is an advanced process that aims to produce an


individual exchange of genes within an individual by performing the inversion of a
gene. Mutations are carried out in individuals who pass the selection process in the
previous step. Thus, the greater a mutation probability that is used, the more likely an
individual is to lose the traits that it obtained from its parent. However, the mutation
probability is small. Therefore, genes are never evaluated. This process can be seen in
Figure 2b based on research conducted by Liu [22], which shows the process of gene
transfer from parents to offspring.

2.2. Simulated Annealing


The simulated annealing method was discovered by observing a cooling process in
a metal liquid that will form crystals; this process is often referred to as the annealing
process. We can also define this process as slowly cooling an object until it reaches its
freezing point. Liquid particles at high temperatures have a high energy level, which
makes it easier for the particles to move around each other. When the object’s temperature
is lowered slowly, it will make the particles try to arrange themselves to reach the
minimum energy level and a stable particle arrangement [23]. This decreasing
temperature, or annealing process, can be implemented as an approximation algorithm to
solve simulated annealing problems. Simulated annealing has been proven to solve many
real-life combinatorial optimization problems, including scheduling problems [24,25].
This algorithm depends on its parameters in generating a solution to the problem.
Therefore, searching for optimal parameters such as the initial temperature, the cooling
schedule, and the correct number of iterations will take much time in a trial-and-error
process. Many studies have shown that the simulated annealing algorithm is susceptible
to parameter settings [26]. Generally, the cooling schedule value of simulated annealing
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 8 of 27

ranges from 0.8 to 0.99 [27]. The method can be clarified by the analogies related to
simulated annealing based on the research of Vecchi et al. [23] in Table 1 below.

Table 1. Analogical of Simulated Annealing Process [23].

Physics of Vecchi et al. [23] Research Optimization of Simulated Annealing


The Initial State of Annealing Initial Solution
Energy Cost of Fuel
Physical Changes Temporary Solution
Temperature Controlling Parameter
Equilibrium State Optimal Solution
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 9 of 27

Simulated annealing can be used to solve the traveling salesman problem with the
objective function of the minimum distance or minimum cost. According to Chibante
[24], a solution can be found by inputting the required parameters, determining the
initial route from an optimization process reference, and running iterations that are
carried out by swapping neighbors of the route to be traversed randomly, where the
algorithm generates a random number between values 0 and 1. Thus, a route evaluation
can be carried out consisting of continued iterations based on the maximum number of
iterations fulfilled. Another consideration is the current route and a whether it has a
better value than the shipping route (current solution). Finally, suppose the resulting
new route is not better than the current route. In that case, this will generate the value of
r, which is between the values 0 and 1, which helps calculate the route’s probability
value (p).
The expected final result has two possible cases regarding r. If the value is less than
or equal to p, the resulting route can be the new current solution. However, if the value
of r is greater than p, the new route is not allowed to become the new current solution.
The process is carried out repeatedly until the desired value is achieved based on the
parameters determined at the beginning. This process can be seen in Figure 3.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 10 of 27

Figure 3. Simulated Annealing Flowchart.

2.3. Nearest Neighbor Algorithm


The nearest neighbor algorithm is a greedy algorithm that can be used to solve the
traveling salesman problem. Greedy is an algorithm paradigm that forms a solution
based on the closest solution with the most significant benefit [25]. The algorithm can be
explained through the knapsack fractional problem by comparing a weighted object
from each beam. The most negligible load will be put in the bag first compared to larger
loads.
Route selection using nearest neighbor (NN) has an advantage because the route
has only a few severe errors, but there are long segments that will connect the nodes
with short edges [26]. Although this algorithm is straightforward to implement and can
execute in a fast time, this algorithm performs route selection based on the distance of
the nearest city from the city that is currently being visited. Therefore, this algorithm
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 11 of 27

often cannot provide an optimal solution because it is often trapped in a local optimum.
A flowchart of the nearest neighbor algorithm approach can be seen in Figure 4.

Figure 4. Nearest Neighbor Flowchart.

2.4. Experimental Method


At this stage, the data that have been collected are processed into a mathematical
model of the asymmetric traveling salesman problem so that it can be solved with
predetermined optimization algorithms. After successfully making a mathematical
model of the existing problem, an optimization program is designed using three
heuristic algorithms—a genetic algorithm, simulated annealing, and nearest neighbor—
using the C++ programming language. The objective function of the three programs is to
find the route with the lowest cost. From each optimization program with these three
algorithms, three outputs will be issued: ship route selection, ship fuel operational costs,
and optimization execution time.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 12 of 27

The next step testing the program that had been made. At this stage, selection of
input parameters was also carried out using the trial-and-error method to obtain the
optimum output. The fuel used is VLSFO (very-low-sulfur fuel oil), a mixture of both
fuel types with a sulfur content of 0.5% and an average main engine power of 30,900 kW.
The average auxiliary engine power was 6800 kW, and the average ship speed by type
was 21.6 knots for container ships. The trial was carried out with variations on the
starting/ending destination, which became each route selection’s starting and ending
points. An analysis of each optimization result was carried out. Comparisons were made
based on operational costs and execution time. The nautical mile distance used between
ports in this study uses data that can be seen in Tables 2a and 2b.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 13 of 27

Table 2. Nautical Mile Distance Between Ports; (a) Busan to Yantian, (b) Vung Tau to Colombo,
and VLSFO Fuel Price 224 in USD/Ton [27].

(a)
Tanjung
Port Location Busan Shanghai Qingdao Hong Kong Yantian
Pelepas
Busan 0 535 616 3229 1475 1488
Shanghai 535 0 367 2713 955 968
Qingdao 616 367 0 3066 1307 1320
Tanjung Pelepas 3229 2713 3066 0 1851 1871
Hong Kong 1475 955 1307 1851 0 20
Yantian 1488 968 1320 1871 20 0
Vung Tau 2523 1996 2348 795 934 1085
Nansha New Port 1568 1048 1400 1842 100 80
Shekou 1486 966 1318 1869 18 25
Singapore 3208 1692 3044 57 1460 1851
Salalah 6787 6270 6623 3557 5410 5429
Colombo 4867 4350 4703 1637 3490 3510
(b)
Vung Nansha Colom
Port Location Shekou Singapore Salalah USD/Ton
Tau New Port bo
Busan 2523 1568 1486 3208 6787 4867 318
Shanghai 1996 1048 966 1692 6270 4350 318
Qingdao 2348 1400 1318 3044 6623 4703 328
Tanjung Pelepas 795 1842 1869 57 3557 1637 358.1
Hong Kong 934 100 18 1460 5410 3490 303
Yantian 1085 80 25 1851 5429 3510 401.4
Vung Tau 0 1056 1082 638 4353 2434 482
Nansha New
1056 0 82 1882 5400 3481 401.4
Port
Shekou 1082 82 0 1849 5427 3507 401.4
Singapore 638 1882 1849 0 3614 1695 312
Salalah 4353 5400 5427 3614 0 1920 572
Colombo 2434 3481 3507 1695 1920 0 360

The data regarding the distances between the 12 ports are made into a matrix [Sij]nxn,
where n is the number of ports in 1 ship’s operating route that is in the study of 12 ports.
Jij represents the distance from port i to port j in nautical miles, and i,j = 1,2,…,n.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 14 of 27

Calculation of the sailing time from between ports is performed with a matrix [Tij]nxn. The
voyage time matrix is divided by the distance matrix between the ports and the
container ship speed specified above. Tij is a unit of time required by a ship sailing from
port i to port j. The matrix relationship between Tij and Sij can be seen in Equation (3).

(3)

(4)

(5)

The weight of the fuel used by the ship can be calculated using Equation (4). It is
assumed that the primary engine fuel consumption is 209 g/kWh and that the auxiliary
engine fuel consumption is 211 g/kWh, according to the range written by Poehls [27].
The main engine power and auxiliary engine power of the container ship are taken from
the average ship engine power table made by the Air Resources Board [28]. Next, the
fuel weight required for each inter-port voyage is written in a matrix [Fij]nxn. First, Fij
represents the fuel the ship uses in tons to travel from port i to port j. After that, the fuel
price from each port will be incorporated into a matrix to give the traveling salesman
problem an asymmetrical shape that describes the fuel cost of each voyage. Finally, Cij
describes the fuel costs incurred by the ship to sail from port i to port j, while fi describes
the fuel price in USD/ton at port i, and i,j = 1,2,…,n. This Cij matrix is the result of
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 15 of 27

processing the data obtained into an asymmetric traveling salesman problem which will
later be optimized for route selection.

[ ( Pe . Bme ) + ( Pae . Bae ) ] gv .10 6 (6)

K= [ ( Pe . Bme ) + ( Pae . Bae ) ] . 106 (7)

where Pe is the main engine power (kW), Bme is the primary engine fuel consumption (209 g/kWh), Pae is the
auxiliary engine power (kW), and Bae is the auxiliary engine fuel consumption (211 g/kWh). After successfully
performing optimization with the three heuristic algorithms used to solve the problem that has been posed, an
analysis and comparison of the results issued from the three algorithms will be carried out. The outputs of the three
algorithms are as follows: ship route selection and ship fuel operational costs.
The following is an individual example of the algorithm, along with the calculation
of its fitness value, namely the fuel cost.
Individual (route): Tanjung Pelepas–Yantian–Nansha New Port–Vung Tau–Shekou–
Hong Kong–Busan–Qing Dao–Shanghai–Singapore–Salalah–Colombo–Tanjung Pelepas.
Suppose that i = 1 for Tanjung Pelepas, i = 2 for Yantian, i = 3 for Nansha New Port,
and so on. Then, the following is a formula for calculating the fuel cost (FC):
12
Si , i+1
FC =∑ xK xfi (8)
i=1 V
Of the three outputs given, a comparison will be made regarding which algorithm
provides the route with the most negligible operational costs. In addition to comparing
the operational costs, this paper also analyzes the increase in program computing time
with a decrease in the results of operating costs. After successfully comparing these
things, the best algorithm to use in the problem can be determined.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 16 of 27

3. Results and Discussion


Parameter variations in the optimization algorithm’s input parameters are carried
out to maximize the performance of each heuristic algorithm used in solving the
problem. The variation of the parameters in question is very different for each
optimization algorithm because each algorithm has its own parameters. Therefore, each
algorithm must perform parameter variations to obtain the ideal parameters. For
example, parameter variations in the nearest neighbor algorithm are not carried out
because there are no input parameters other than the ATSP matrix.

3.1. Genetic Algorithm Parametric Testing


In the genetic algorithm, parameter variations are carried out on the values of the
population size, crossover rate, mutation rate, and generation size. The test aims to
determine the ideal values of the four input parameters for this shipping route selection
problem. This test aims to find the best population size. In the tests carried out, several test
parameters were determined, namely: crossover rate = 0.1, mutation rate = 0.2, and
generation size = 10.
The population size tested is in the range of 10 to 110. The test is performed 10
times to obtain the average fuel cost generated for these parameters. The following is a
graph of population size against average fuel operating costs. Figure 5a shows that the
lowest average fuel cost is obtained when the population size is 100. Meanwhile, the
highest average fuel cost is obtained when the population size is 10. It can be concluded
that the larger the population used, the more it is possible to find a better solution.
Therefore, for the population size parameter, the value of 100 was chosen because this
value managed to yield the lowest average fuel cost. Mutation and crossover rate tests
were conducted to obtain the best ratio with the condition Cr + Mr = 1. In this test,
several parameters were determined, namely, population size = 100 and generation size
= 10.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 17 of 27

(a) (b)

(c)
Figure 5. Testing of genetic algorithm parameter variations; (a) population size, (b) mutation rate,
and (c) generation size.

The test is performed 10 times to obtain the average fuel cost of each combination of
mutation rate and crossover rate. Above is a graph of the results of testing the
combinations of crossover rate and mutation rate values regarding the average spent
fuel costs. Figure 5b shows that the lowest average fuel cost is obtained when the mutation
rate is 0.4 and the crossover rate is 0.6. Meanwhile, the highest average fuel cost is obtained
when the mutation rate is 1 and the crossover rate is 0. A high mutation rate value with a
low crossover rate indicates that the search for solutions is not optimal. Therefore, to
obtain the best results, the optimization parameters of the genetic algorithm for this
problem are chosen at the mutation rate and crossover rate values that give the lowest
average fuel cost.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 18 of 27

Generation size testing also aims to determine the best generation size. In the
generation size test, the test parameters determined are population size = 100, mutation
rate = 0.4, and crossover rate = 0.6. The generation size test is carried out from 10–100,
and each generation size is tested 10 times to obtain the average fuel cost. This test aims
to obtain the ideal generation size parameter value that can provide the result with the
lowest average fuel cost. From Figure 5c above, it can be concluded that the larger the
generation size used, the smaller the average value of fuel costs. Although the average
cost of the resulting fuel will tend to become smaller as the generation size increases, the
decrease in the average cost becomes less and less significant.

3.2. Simulated Annealing Parametric Testing


In the simulated annealing algorithm, there are two parameter variations carried
out, namely, the initial temperature and the cooling rate value. This test is carried out to
obtain the most ideal parameter values for the simulated annealing algorithm in the
route-finding problem with the minimum fuel cost. This test was carried out in a
temperature range of 10–200.
Tests on the initial temperature value are carried out with parameters at a final
temperature of 0 °C and a cooling rate of 0.75. Figure 6a shows that the average fuel cost
tends to decrease as the initial temperature value rises. The test proves that the greater
the initial temperature value, the better the results. However, for the tested case, when
the initial temperature passed 100 °C, the average fuel cost did not significantly decrease.
The test was conducted with a cooling rate range of 0.3–0.99. The test was performed 10
times to obtain the average fuel cost value. Tests on the initial temperature value are
carried out with the following parameters: a final temperature of 0 °C and an initial
temperature of 200 °C. It can be seen from Figure 6b that the higher the cooling rate in the
test, the lower the average fuel cost. The best average value for fuel costs is obtained when
the cooling rate is 0.99. Therefore, the cooling rate value that gives the best average will be
used as a simulated annealing parameter in selecting ship routes. From the results of the
tests carried out on the parameters of the simulated annealing algorithm, it was found that
the parameters that give the ideal value are a final temperature of 0 °C, an initial
temperature of 200 °C, and a cooling rate of 0.99.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 19 of 27

(a) (b)
Figure 6. Testing of simulated annealing parameter variations; (a) temperature value testing, (b)
cooling rate value testing.

3.3. Optimum Solution for Asia-Pacific Cargo Shipping Route


Based on the optimizations carried out, several results will be given by the
algorithm for the selection of the optimum route and the lowest fuel cost for each track
that is traced. With this, a comparison can be made between the ship routes from each
destination. In this discussion we use the results of the initial and final destinations at
Tanjung Pelepas and compare them with those of the other three algorithms.
Visualizations and other route selection results can be seen in separate results. The route
selections obtained from each algorithm are presented in Table 3 and Figure 7 below as
visualizations of the route selection of each algorithm at each starting/ending destination
via Tanjung Pelepas, Indonesia.

Table 3. Route Selection from Each Algorithm via Tanjung Pelepas.

Algorithm Route Selection


Tanjung Pelepas–Vung Tau–Nansha New Port–Yantian–
Genetic Algorithm Shekou–Hong Kong–Busan–Qingdao–Shanghai–
Singapore–Salalah–Colombo–Tanjung Pelepas
Tanjung Pelepas–Vung Tau–Nansha New Port–Yantian–
Simulated Annealing Shekou–Hong Kong–Busan–Qingdao–Shanghai–
Singapore–Salalah–Colombo–Tanjung Pelepas
Tanjung Pelepas–Singapore–Vung Tau–Hong Kong–
Nearest Neighbor Shekou–Yantian–Nansha New Port–Shanghai–Qingdao–
Busan–Colombo–Salalah–Tanjung Pelepas
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 20 of 27

(a)
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 21 of 27

(b)
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 22 of 27

(c)
Figure 7. Optimum route selection of different algorithms; (a) genetic algorithm, (b) simulated
annealing, (c) nearest neighbor.

After testing each initial location/destination using each of the previously


determined parameters, the three algorithms succeeded in conducting route searches.
The proves that the three algorithms can find ship routes with the lowest fuel costs. The
results of the three algorithms are in the forms of route selection and the cost of existing
fuel. Therefore, we can compare the three algorithms in terms of the fuel costs incurred
when transiting the route chosen in Table 4 and Figure 8.

Table 4. Fuel Cost (USD) of Route Selection Results for Each Algorithm.

Genetic Al- Simulated Nearest


Start-End Destinations
gorithm Annealing Neighbor
Busan–Busan 1812235 1958933 2437987
Shanghai–Shanghai 1812235 1971558 2356335
Qingdao–Qingdao 1812235 1841853 2419796
Tanjung Pelepas–Tanjung Pelepas 1812235 2346975 2093880
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 23 of 27

Hong Kong–Hong Kong 1812235 1882814 2297187


Yantian–Yantian 1812235 1842789 2300718
Vung Tau–Vung Tau 1812235 2221920 2282336
Nansha New Port–Nansha New Port 1812235 1882814 2282336
Shekou–Shekou 1812235 1983543 2299934
Singapore–Singapore 1812235 1944683 2136125
Salalah–Salalah 1812235 1841853 1937599
Colombo–Colombo 1812235 1841853 1937599

Figure 8. Fuel cost (USD) comparison for every route selection.

The genetic algorithm always gives the best output from the three algorithms tested
for each starting/ending destination. Meanwhile, the nearest neighbor algorithm
provides the route with the worst fuel cost when compared to the other two algorithms.
For the simulated annealing algorithm, in selecting the route, the fuel value is often close
to the results of the genetic algorithm.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 24 of 27

Figure 9. Comparison between fuel cost and number of destinations via Tanjung Pelepas.

In the simulated annealing algorithm, the fuel cost of each selected route is highly
variable. This is because simulated annealing is often trapped at a local optimum.
Simulated annealing also cannot give the better results than the genetic algorithm
because the simulated annealing algorithm is a single-solution-based algorithm. A
single-solution-based algorithm starts with a random solution. Then, it obtains a new
candidate solution by finding a random neighbor solution that depends on the current
solution and that satisfies the existing criteria. Therefore, the best result of the route
search carried out is very dependent on the random solution generated at the beginning
of the running of the algorithm. In the graphs above, the search pattern of simulated
annealing is very varied, which means it is very dependent on the initial solution chosen
at random.
The nearest neighbor algorithm provides the worst route selection because the
route search is very dependent on the initial destination. We can see in the graphs of fuel
costs against the number of destinations that the nearest neighbor algorithm always
starts with a low fuel cost at the beginning of the number of destinations visited.
However, the higher the number of destinations visited, the more fuel costs tend to
increase sharply. In the nearest neighbor algorithm, the selected destination is the
destination with the lowest cost from the location at the stopover time. The pattern
repeats itself until all destinations have been visited. This pattern means the nearest
neighbor algorithm does not give ideal results. Due to the algorithm’s characteristics that
do not search for the best route globally, the route search is very dependent on the
nearest destination from the stopover location.
Genetic algorithms engaged in route searching find the shortest route. We can see in
the graphs of fuel costs against the number of destinations above in the genetic
algorithm that fuel costs look high when the number of destinations that have been
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 25 of 27

visited is small. However, the genetic algorithm succeeded in providing the lowest fuel
costs when all destinations were successfully visited. The analysis proves that the route
selection made by the genetic algorithm considers the best route globally, coupled with
the fact that the genetic algorithm is a population-based algorithm. The genetic
algorithm starts with a solution of a specified population and then performs selection,
mutation, and crossover. The genetic algorithm has succeeded in proving that
algorithms of its type are the best for solving the problem of finding ship routes with the
goal of the lowest material costs due to considering many solutions that are executed
and compared.

4. Conclusions
From this study of optimizing the selection of cargo ship routes using heuristic
algorithms, it can be concluded that the three algorithms can be used to solve the
traveling salesman problem to find the best ship route. In this case, the genetic algorithm
has the most optimal results with the lowest fuel cost of USD 1.5 million. The results are
achieved by using the best route selection and minimizing the cost of fuel used. On the
other hand, population-based algorithms such as genetic algorithms will be better
applied than single-solution-based algorithms to solve multimodal problems such as the
one in this study. This study can be applied to other sea areas as long as the
characteristics of those seas are the same as, or at least similar to, those of the seas in the
Asia-Pacific region. This study only considers the cost of ship fuel and the distance
between ports, so the characteristics of the sea and the weather are not accounted for.
The option of considering the sea characteristics could be used in future research.
Furthermore, the nearest neighbor algorithm cannot provide the optimum solution
because the algorithm does not consider the global route search solution. Another
suggestion that could be considered in further research is that other operational aspects
that may affect route selection and fuel consumption should also be considered. Finally,
artificial intelligence can consider environmental conditions so that route selection can
effectively occur.

Author Contributions: Conceptualization, G. and A.U.; methodology, A.U.; software, A.U.;


validation, G.P., G., Y., and K.H..; formal analysis, K.H.; investigation, A.U.; resources, G.; data
curation, A.U.; writing—original draft preparation, A.U.; writing—review and editing, G., Y., and
K.H.; visualization, A.U.; supervision, Y. and K.H.; project administration, G.; funding acquisition,
G. All authors have read and agreed to the published version of the manuscript.
Funding: This research was funded by Direktorat Riset dan Pengembangan Universitas Indonesia,
grant number NKB-1333/UN2.RST/HKP.05.00/2022.
Acknowledgments: The authors would like to thank Raymond Lesmana for providing the data of
the heuristic algorithm used in this manuscript. The following work would not be possible
without their hard work and consistency.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 26 of 27

Conflicts of Interest: The authors declare no conflict of interest.

References
1. Al-Khayyal, F.; Hwang, S.-J. Inventory constrained maritime routing and scheduling for multi-commodity liquid bulk, part I:
Applications and model. Eur. J. Oper. Res. 2007, 176, 106–130. https://doi.org/10.1016/j.ejor.2005.06.047.
2. Baškarada, S. Information Quality Management Capability Maturity Model; Springer: Berlin/Heidelberg, Germany, 2009.
3. Ghiani, G.; Laporte, G.; Musmanno, R. Introduction to Logistics Systems: Planning and Control; John Wiley: Hoboken, NJ, USA,
2004.
4. Golias, M.M.; Saharidis, G.K.; Boile, M.; Theofanis, S.; Ierapetritou, M.G. The Berth Allocation Problem: Optimizing Vessel Ar-
rival Time. Marit. Econ. Logist. 2009, 11, 358–377.
5. Kristensen, H. Statistical Analysis and Determination of Regression Formulas for Main Dimensions of Container Ships based on IHS
Fairplay Data; Project no. 2010-56 Emissionsbeslutningsstøttesystem Work Package 2 Report no. 03; Technical University of
Denmark: Kongens, Denmark, 2012.
6. Bondy, J.A.; Murty, U.S.R. Graph Theory with Applications; Wiley: New York, NY, USA, 2002.
7. Sengupta, A.; Pal, T.K. Travelling Salesman Problem with Interval Cost Constraints. Fuzzy Prefer. Ordering Interval Numbers
Decis. Probl. 2009, 238, 111–119.
8. Çela, E.; Deineko, V.G.; Woeginger, G.J. The Multi-Stripe Travelling Salesman Problem. Ann. Oper. Res. 2017, 259, 21–34.
9. Hoffman, K.L.; Padberg, M.; Rinaldi, G. Traveling Salesman Problem. Encycl. Oper. Res. Manag. Sci. 2013, 7, 1573–1578.
10. Gross, J.L.; Yellen, J.; Zhang, P. Handbook of Graph Theory; CRC Press, Taylor & Francis Group: Boca Raton, FL, USA, 2014.
11. Bal Beşikçi, E.; Arslan, O.; Turan, O.; Ölçer, A.I. An Artificial Neural Network Based Decision Support System for Energy Effi -
cient Ship Operations. Comput. Oper. Res. 2016, 66, 393–401.
12. Hussain, A.; Muhammad, Y.S.; Nauman Sajid, M.; Hussain, I.; Mohamd Shoukry, A.; Gani, S. Genetic Algorithm for Traveling
Salesman Problem with Modified Cycle Crossover Operator. Comput. Intell. Neurosci. 2017, 2017, 1–7.
13. Liu, R.; Jiang, Z.; Geng, N. A Hybrid Genetic Algorithm for the Multi-Depot Open Vehicle Routing Problem. OR Spectrum
2012, 36, 401–421.
14. Bayram, H.; Şahin, R. A New Simulated Annealing Approach for Travelling Salesman Problem. Math. Comput. Appl. 2013, 18,
313–322.
15. Eiselt, H.A.; Sandblom, C.-L.; Spielberg, K. Integer Programming and Network Models; Springer: Berlin, Germany, 2011.
16. Rego, C.; Gamboa, D.; Glover, F.; Osterman, C. Traveling Salesman Problem Heuristics: Leading Methods, Implementations
and Latest Advances. Eur. J. Oper. Res. 2011, 211, 427–441.
17. Tsai, C. A New Hybrid Heuristic Approach for Solving Large Traveling Salesman Problem*1. Inf. Sci. 2004, 166, 67–81.
18. Zhan, S.-H.; Lin, J.; Zhang, Z.-J.; Zhong, Y.-W. List-Based Simulated Annealing Algorithm for Traveling Salesman Problem.
Comput. Intell. Neurosci. 2016, 2016, 1–12.
19. Burke, E.K. Search Methodologies; Springer: New York, NY, USA, 2016.
20. Michalewicz, Z. Genetic Algorithms + Data Structures = Evolution Programs; Springer: Berlin, Germany, 2011.
21. Goldberg, D.E.; Bridges, C.L. An Analysis of a Reordering Operator on a Ga-Hard Problem. Biol. Cybern. 1990, 62, 397–405.
22. Liu, C. Multi-Robot Task Allocation for Inspection Problems with Cooperative Tasks Using Hybrid Genetic Algorithms; Kassel Univ.
Press: Kassel, Germany, 2014.
23. İlhan, İ. An Improved Simulated Annealing Algorithm with Crossover Operator for Capacitated Vehicle Routing Problem.
Swarm Evol. Comput. 2021, 64, 100911. https://doi.org/10.1016/j.swevo.2021.100911.
24. Zhena, L.; Hua, Z.; Yan, R.; Zhuge, D.; Wang, S. Route and speed optimization for liner ships under emission control policies.
Transp. Res. Part C Emerg. Technol. 2020, 110, 330–345. https://doi.org/10.1016/j.trc.2019.11.004.
J. Mar. Sci. Eng. 2023, 11, x FOR PEER REVIEW 27 of 27

25. Lashgari, M.; Akbari, A.A.; Nasersarraf, S. A new model for simultaneously optimizing ship route, sailing speed, and fuel
consumption in a shipping problem under different price scenarios. Appl. Ocean Res. 2021, 113, 102725. https://doi.org/
10.1016/j.apor.2021.102725.
26. Wen, M.; Pacino, D.; Kontovas, C.A.; Psaraftis, H.N. A multiple ship routing and speed optimization problem under time, cost
and environmental objectives. Transp. Res. Part D Transp. Environ. 2017, 52A, 303–321. https://doi.org/10.1016/j.trd.2017.03.009.
27. Moradi, M.H.; Brutsche, M.; Wenig, M.; Wagner, U.; Koch, T. Marine route optimization using reinforcement learning ap-
proach to reduce fuel consumption and consequently minimize CO 2 emissions. Ocean Eng. 2022, 259, 111882. https://doi.org/
10.1016/j.oceaneng.2022.111882.
28. Ochelska-Mierzejewska, J.; Poniszewska-Maranda, A.; Maranda, W. Selected Genetic Algorithms for Vehicle Routing Problem
Solving. Electronics 2021, 10, 3147. https://doi.org/10.3390/electronics10243147.
29. Kirkpatrick, S.; Gelatt, C.D.; Vecchi, M.P. Optimization by Simulated Annealing; IBM Thomas J. Watson Research Center: York-
town Heights, NY, USA, 1982.
30. Bui-Duy, L.; Vu-Thi-Minh, N. Utilization of a Deep Learning-Based Fuel Consumption Model in Choosing a Liner Shipping
Route for Container Ships in Asia. Asian J. Shipp. Logist. 2021, 37, 1–11.
31. Datta, D.; Amaral, A.R.S.; Figueira, J.R. Single Row Facility Layout Problem Using a Permutation-Based Genetic Algorithm.
Eur. J. Oper. Res. 2011, 213, 388–394.
32. Gen, M.; Cheng, R. Genetic Algorithms and Engineering Design; Wiley: New York, NY, USA, 2000.
33. Zhang, R.; Wu, C. A Hybrid Immune Simulated Annealing Algorithm for the Job Shop Scheduling Problem. Appl. Soft Com-
put. 2010, 10, 79–89.
34. Air Resources Board. Ocean Going Ship Survey; Air Resources Board: Sacramento, CA, USA, 2007.

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury
to people or property resulting from any ideas, methods, instructions or products referred to in the content.

You might also like