1 Introduction

At present, green ship technology has a prominent role because of soaring fuel prices and the environmental regulations imposed by the IMO and several countries. Many research efforts have aimed to reduce greenhouse gas emissions and fuel consumption, including adding appendages to a ship to reduce the operational speed [4, 9]. Optimal ship routing also belongs to this research area, where it provides an optimal route to the destination that uses the minimal time or fuel in given sea conditions while considering the safety of the ship. A major characteristic of this problem is that the ocean environment changes with time. To cope with a changing environment, Hinnenthal [5] introduced ensemble forecasting to consider the robustness of weather information. However, ensemble forecasting is very expensive information and it takes a long time to calculate the optimal route because the database used for forecasting is too large. To avoid this problem, it is necessary to develop an efficient replanning algorithm. Path replanning may take too much time and thus an efficient path planning algorithm is required. Several methods have been applied in this area, including a simulated annealing algorithm [7], two-dimensional dynamic programming (2DDP) [3], three-dimensional dynamic programming [18, 21], modified isochrones method [16], three-dimensional isochrones method [10], and other methods such as a fuzzy logic algorithm [14], genetic algorithm [11], and Dijkstra’s algorithm [12, 19]. The simulated annealing method is an extension of the Monte Carlo method. It is a recursive algorithm that finds the optimal solution but it is dependent on the initial temperature of the Boltzmann probability distribution. If the initial temperature is too high than the optimal solution, the computation time by this algorithm may take too long to give an optimal solution within a limited time. The route accepted by this algorithm is only a parallel or anti-parallel direction of the wave field, which would change the heading angle of the ship too greatly; thus this algorithm is not efficient in terms of fuel consumption. The 2DDP method is also a recursive method, based on grid system. In this method, the options to change the engine revolution rate or the speed of the ship are lacking because these variables are constant. The modified isochrones method is very similar to the 2DDP method and it also assumes that the speed is constant. To overcome this disadvantage of the isochrones method and 2DDP, three-dimensional versions of these methods have been developed. However, the optimality of the speed or engine output obtained using these methods is not guaranteed. In the present study, therefore, we developed a path planning and speed scheduling algorithm based on the A* algorithm and by using geometric programming for weather routing.

The next section briefly considers the effects of the ocean environment on ship operation and some safety constraints. The third section describes weather routing problem definition and gives the objective of the problem. The fourth section presents the route seeking procedure and the basic A* algorithm. The fifth section presents the strategy for speed scheduling with basic geometric programming. A simple case study that validates the proposed algorithm is provided in the next section. Finally, section seven gives the main conclusions and a summary of the research.

2 Background

2.1 Speed change due to the ocean environment

Ocean waves and winds can reduce the speed of a ship. To calculate this reduction in a highly accurate manner, it is necessary to solve the seakeeping problem and compute the added resistance attributable to the ocean environment. However, this task is too complex and the time-consuming to find the optimal route within a limited time. Thus, we adopt a simplified formula [20] to calculate the speed reduction, as follows:

$$\frac{{{\Delta}V}}{V} = \frac{\alpha \mu }{100}\left( {\frac{{0.7\;{\text{BN}} + {\text{BN}}^{6.5} }}{{2.7\nabla^{2/3} }}} \right),$$
(1)

where \({\Delta}V\) is the change in the speed of the ship (m/s), \(V\) is the ship speed in calm water (m/s), \(\alpha\) is the speed reduction coefficient, which is dependent on the hull shape of the ship and its speed, \(\mu\) is the directional speed reduction coefficient, which relies on the encounter angle between the ship’s heading angle and the wave direction, BN is the Beaufort number, and \(\nabla\) is the displacement of the ship. The speed reduction in (1) will be used to calculate the fuel consumption. The values of \(\alpha\) and \(\mu\) are shown in Tables 1 and 2. In Table 1, \(C_{\text{b}}\) is the block coefficient of ship and \({\text{Fn}}\) is the Froude number. And in Table 2, the term ‘normal’ refers to the loading condition of the ship, which is a two-third full load.

Table 1 \(\alpha\) value
Table 2 \(\mu\) value

2.2 Safety constraints

The IMO safety guidelines are adopted to reflect the safety factors required during the voyage of a ship [6]. According to the IMO guidelines, the encounter angle between the ship and wave \(\beta\) is defined as 0° when it is the head sea and 180° when it is the following sea. According to the guidelines, two major dangerous situations should be avoided: surf-riding and parametric rolling.

Surf-riding usually occurs when the following two conditions are met:

$$\begin{aligned} 135^{ \circ } < \beta < 225^{ \circ } \hfill \\ V_{\text{ship}} > \frac{{1.8\sqrt {L_{\text{ship}} } }}{{\cos \;(180^{ \circ } - \beta )}}, \hfill \\ \end{aligned}$$
(2)

where \(\beta\) is the encounter angle between the waves and ship and \(L_{\text{ship}}\) is the length of the ship. Parametric rolling is a type of resonance between the wave frequency and the ship rolling motion, which occurs when any one of the following two conditions are met:

$$\begin{aligned} |T_{\text{R}} - T_{\text{E}} |\; \le \;\varepsilon T_{\text{R}} \hfill \\ |T_{\text{R}} - 2T_{\text{E}} |\; \le \;\varepsilon T_{\text{R}} , \hfill \\ \end{aligned}$$
(3)

where \(T_{\text{R}}\) is the natural period of the rolling motion of the ship, \(T_{\text{E}}\) is the encounter period between the ship and waves [6], and \(\varepsilon\) is a criterion that indicates expectation of parametric rolling. In this study, the value is set to be as 0.05 to cover a frequency range that has high expectation of parametric roll based on the calculation result of ship motion response amplitude operator (RAO). We can calculate the encounter period by (4)

$$T_{\text{E}} = \frac{{3T_{\text{W}}^{2} }}{{3T_{\text{W}} + V\cos \beta }},$$
(4)

where \(T_{\text{W}}\) is the period of the waves and \(V\) is the ship speed in knots. In this study, these two safety constraints are reflected by excluding nodes, which is waypoint in grid system from route seeking phase by setting an infinite cost for areas where one of the two constraints is expected to be satisfied. As shown in Fig. 2, nodes are defined as candidates of waypoints among which one is selected by an optimal routing.

3 Problem description

In the weather routing problem, it is difficult to calculate the optimal route because the external environment changes dynamically and the information provided by the forecasting center is limited. Thus, it is necessary to plan the path for each time stage and to apply an appropriate algorithm which can give an optimal solution within a limited time such as around 10 min in this study. The time stage means time duration between \(i - 1{\text{th}}\) weather information update and \(i{\text{th}}\) update, where \(i\) is update time index during the voyage. The optimization problem that considers fuel consumption can be formulated as (5):

$$\begin{gathered} \min f(V,\beta ) = \sum\limits_{{i = 1}}^{n} {\{ g(V_{{i - 1,i}} ) + g_{{ad}} (V_{{i - 1,i}} ,\beta _{{i - 1,i}} )\} d_{{i - 1,i}} } \hfill \\ {\text{subject to}} \hfill \\ \sum\limits_{{i = 1}}^{n} {\frac{{d_{{i - 1,i}} }}{{V_{{i - 1,i}} }}} \le T \hfill \\ V_{{\min }} \le V_{{i - 1,i}} \le V_{{\max }} \hfill \\ \beta _{{\min }} \le \beta _{{i - 1,i}} \le \beta _{{\max }} \hfill \\ \end{gathered}$$
(5)

According to (5), the optimization problem depends on the heading angle and speed of the ship. In (5) \(g(V_{i - 1,i} )\) is the fuel consumption per unit distance in calm water with speed \(V_{i - 1,i}\), \(g_{\text{ad}} (V_{i - 1,i} ,\beta_{i - 1,i} )\) is the added fuel consumption per unit distance in an ocean environment compared with voyaging in calm water, \(d_{i - 1,i}\) is the distance between position at \(i - 1{\text{th}}\) weather information update and position at \(i{\text{th}}\) update. In this paper, weather information update interval is 6 h. The fuel consumption quantity \(g(V_{i - 1,i} )\) in calm water is expressed as a 2nd order polynomial function which is based on sea trial record between the engine power and the ship speed. The added fuel consumption \(g_{\text{ad}} (V_{i - 1,i} ,\beta_{i - 1,i} )\) is introduced to compensate speed reduction at designated speed \(V_{i - 1,i}\) and is obtained by iteration of (1) as in Fig. 1. And the first constraint states that the total voyaging time should not exceed the designated voyaging schedule, the second constraint states that the ship should be operated within a certain range, and the final constraint restricts the heading angle of ship, which can be matched to the course of the ship in a specific range. In other words, this optimization aims to determine the heading angle and speed of the ship at each time stage.

Fig. 1
figure 1

Flow chart to obtain added fuel quantity

4 Phase 1: searching for the optimal route

In Phase 1, an optimal course is generated that considers fuel consumption where the speed of the ship is fixed as a constant. The A* algorithm is used to plan the path. This algorithm is based on a gridded map and it searches for an optimal route given nodal point connections. A* algorithm was selected because it searches a solution faster than Dijkstra algorithm and guarantees that a generated path is a global optimum provided that the heuristic value used is not overestimated but admissible (see [17] for details).The term “admissible” means that the estimated heuristic is equal or less than the actual cost (i.e. fuel consumption) from the neighboring node to final destination and “overestimated” means the heuristic value is greater than actual cost.

4.1 A* algorithm

The A* algorithm is generally used for path planning problems (AUV, USV, etc. [8]) because it performs faster calculations compared with Dijkstra’s algorithm, which is the global optimal path planning algorithm. The A* algorithm searches for the path based on an evaluation function that comprises a cost function, which is the exact cost between the present point and next point, and an heuristic function, which estimates from the next nodal point to the final destination. The search (i.e., search speed and optimal quality) is dependent on the heuristic value selected. According to [15], the global optimal path is always found when the heuristic is admissible but, if it is overestimated, the search speed is increased and the path generated is not optimal. Therefore, the application of an appropriate heuristic function should be considered. When searching for a path using the A* algorithm, two sets of nodes are usually employed: a closed set and an open set. The closed set is the set of already searched nodes and the open set is the set of nodes that need to be searched. The search is not stopped until the open set is empty or the current node is the final destination. The steps involved in the A* search procedure are as follows:

  • Step 1 Construct the node connections where all nodes have a value of infinity.

  • Step 2 Initialize the closed set as the empty set and the open set contains the start node. Set the start node as the current node.

  • Step 3 Search the neighboring node values (i.e., the cost value plus the heuristic value) and compare with the previously assigned value. If the value is smaller than the previously assigned value, update the value using the recently calculated value.

  • Step 4 Add the current node to the closed set and add the neighboring nodes to the open set.

  • Step 5 Set the current node as the node with the lowest value in the open set.

  • Step 6 Iterate steps 3–5 until the open set is not empty or the current node is the final destination.

4.2 Application of the A* algorithm to the weather routing problem

When applying the A* algorithm to the weather routing problem, the search steps are the same as those described above, but the evaluation function is different. The evaluation function applied to this problem is presented as in (6), which is the weight between two nodal points:

$$f(\beta_{i - 1,i} ) = g(V)d_{i - 1,i} + g_{\text{ad}} (V,\beta_{i - 1,i} )d_{i - 1,i} + h(V,\beta_{{i,{\text{final}}}} )d_{{i,{\text{final}}}} ,$$
(6)

where \(\beta_{i - 1,i}\) is the heading angle of the ship when it sails \(i{\text{th}}\) time stage. The first two terms \(g(V)d_{i - 1,i} + g_{\text{ad}} (\beta_{i - 1,i} )d_{i - 1,i}\) play role of cost value, which is exact fuel consumption from current position to next position. In the cost value term, \(g\left( V \right)\) is the fuel consumption per unit distance with a specific fixed speed, \(g_{\text{ad}} (V,\beta_{i - 1,i} )\) is the added fuel consumption to compensate speed reduction caused by the ocean environment, which depends on the weather information at a certain time. The fuel consumption quantity is calculated based on sea trial record and simplified formula (1) of speed reduction. And \(h(V,\beta_{{i,{\text{final}}}} )\) is heuristic value, which is the estimated fuel consumption per unit distance, and \(d_{{i,{\text{final}}}}\) is the distance between the position at \(i{\text{th}}\) weather information update and the final destination. The heuristic value used in this problem is the fuel consumption when the ship sails from a neighboring node to the final destination where \({\text{BN}} = 2\). This heuristic value is determined by trial and error to avoid becoming trapped by local minima and to ensure that the search speed is sufficiently fast.

5 Phase 2: optimal speed scheduling

The speed scheduling is based on the optimal route obtained in Phase 1. This type of speed scheduling problem was introduced in [13, 15] for ships that voyage among several ports. However, the solution was achieved via nonconvex optimization, which is not efficient. In the weather routing problem, this problem can be formulated as (7) and solved by convex optimization:

$$\begin{aligned} \hbox{min} \sum\limits_{i = 1}^{n} {g(V_{i - 1,i} )d_{i - 1,i} } \hfill \\ {\text{subject to}} \hfill \\ \sum\limits_{i = 1}^{n} {\frac{{d_{i - 1,i} }}{{V_{i - 1,i} - \Delta V_{i - 1,i} }}\; \le \;T} \hfill \\ V_{\hbox{min} } \le V_{i - 1,i} \le V_{\hbox{max} } ,\;i = 1,2,\ldots,n, \hfill \\ \end{aligned}$$
(7)

where \(g(V_{i - 1,i} )\) is the fuel consumption per nautical mile, which is usually interpolated from the 2nd order polynomial of the ship speed \(V_{i - 1,i}\) in calm water, \(\Delta V_{i - 1,i}\) is the speed reduction caused by the ocean environment, \(T\) is the total voyaging time from the present point to the destination, and \(V_{\hbox{min} }\) and \(V_{\hbox{max} }\) are the minimum and maximum speeds of the ship, respectively. In this paper, we assume that there exists one to one relationship between fuel consumption (i.e., engine output) and speed of ship in calm water based on sea trial record. Then, we can calculate fuel consumption by using ship speed. This problem is a highly nonlinear and nonconvex optimization problem. However, if we modify the variables in an appropriate manner, this problem can be converted into geometric programming and then into a convex optimization problem.

5.1 Geometric programming

Geometric programming was first developed for geometrical design problems. The standard form of this problem is (8):

$$\begin{aligned} \hbox{min} f_{0} (x) \hfill \\ {\text{subject to}} \hfill \\ f_{i} (x) \le 1,\;i = 1,\ldots,m \hfill \\ h_{i} (x) = 1,\;i = 1,\ldots,p, \hfill \\ \end{aligned}$$
(8)

where \(f_{0} (x)\) and \(f_{i} (x)\) are posynomial functions and \(h_{i} (x)\) is a monomial function. The constraints are not convex and nonlinear and thus it is very difficult to solve. However, by changing the variable, this problem can be transformed into a convex optimization problem [1, 2]. The basic idea of geometric programming is converting original problem to nonlinear but convex problem. If we define the variable \(x_{i} = e^{{y_{i} }}\), the optimization function can be expressed as \(\sum\limits_{k = 1}^{K} {cx_{1k}^{{a_{1k} }} x_{2k}^{{a_{2k} }} \ldots x_{nk}^{{a_{nk} }} } = \sum\limits_{k = 1}^{K} {e^{{a_{k}^{T} y + b_{k} }} }\). Similarly, the other constraints can be expressed using (9).

$$\begin{aligned} \hbox{min} \sum\limits_{k = 1}^{{K_{0} }} {e^{{a_{0k}^{T} y + b_{0k} }} } \hfill \\ {\text{subject to}} \hfill \\ \sum\limits_{k = 1}^{{K_{i} }} {e^{{a_{ik}^{T} y + b_{k} }} } \le 1,\;i = 1,\ldots,m \hfill \\ e^{{g_{1}^{T} y + h_{1} }} = 1,\;i = 1,\ldots,p \hfill \\ \end{aligned}$$
(9)

By taking the logarithm, the problem can be reformulated as (10)

$$\begin{aligned} \hbox{min} \tilde{f}_{0} (y) = \log \left( {\sum\limits_{k = 1}^{K} {e^{{a_{k}^{T} y + b_{k} }} } } \right) \hfill \\ {\text{subject to}} \hfill \\ \tilde{f}_{i} (y) = \log \left( {\sum\limits_{k - 1}^{{K_{i} }} {e^{{a_{i}^{T} y + b_{ik} }} } } \right)\; \le \;0,\;i = 1,\ldots,m \hfill \\ \tilde{h}_{i} (y) = g_{i}^{T} y\; + \;h_{i} = 0,\;i = 1,\ldots,p \hfill \\ \end{aligned}$$
(10)

In (10), the objective function is a log-convex function and the inequality constraints are also log-convex, whereas the equality constraints are an affine function. Thus, (10) is a convex optimization problem. Using the geometric programming method, Boyd [1] solved a problem with 1000 variables and 10,000 constraints within 1 min.

5.2 Applying speed scheduling

As mentioned earlier, \(g(V_{i - 1,i} )\) can usually be interpolated by 2nd order polynomials in the range of the operational speed of a ship. The function is monotonically increasing in the operational speed range. According to the simplified formula (1) for speed reduction, the reduced speed is \(\Delta V = V\alpha \mu \left\{ {\left( {0.7BN + BN^{6.5} } \right)/2.7\nabla^{2/3} } \right\}/100\). After the optimal route is determined, where the operational range of the speed is within a certain Froude Number (\({\text{Fn}}\)) interval, the terms in the formula remain constant, except for the speed \(V\). Thus, the original problem is reformulated as follows:

$$\begin{aligned} \hbox{min} f(V) = \sum\limits_{i = 1}^{n} {(C_{1} V_{i - 1,i}^{2} + C_{2} V_{i - 1,i} + C_{3} )d_{i - 1,i} } \hfill \\ {\text{subject to}} \hfill \\ \sum\limits_{i = 1}^{n} {\frac{{d_{i - 1,i} }}{{\lambda_{i} V_{i} }}\; = \;\sum\limits_{i = 1}^{n} {\frac{1}{{\lambda_{i}^{\prime } V_{i} }}} } \; \le \;T \hfill \\ V_{\hbox{min} } \le V_{i} \le V_{\hbox{max} } ,\;i = 1,2,\ldots,n, \hfill \\ \end{aligned}$$
(11)

where \(\lambda_{i}\) is \(\frac{{{{\Delta }}V}}{V} = \frac{\alpha \mu }{100}\left( {\frac{{0.7\;{\text{BN}} + {\text{BN}}^{6.5} }}{{2.7\nabla^{2/3} }}} \right),\), and \(\lambda_{i}^{{\prime }}\) is the multiplication \(\lambda_{i}\) and \(1/d_{i - 1,i}\). The coefficient \(\lambda_{i}^{{\prime }}\) is constant once an optimal route is given via Phase 1 because this phase is conducted for speed scheduling over the optimized route. However, the objective function in (11) is not posynomial because the coefficient \(C_{2}\) is usually negative, where this coefficient indicates the location of the axis of symmetry and it is reasonable that the axis of symmetry is placed around the operational range, which is the positive speed. Therefore, we cannot apply geometric programming to this problem. Now, we modify the objective function as posynomial function as shown in (12) by approximation.

$$f(V) \approx \widehat{f}(V) = \sum\limits_{i = 1}^{n} {\widehat{g}(V_{i - 1,i} )d_{i - 1,i} } = \sum\limits_{i = 1}^{n} {\sum\limits_{k = 1}^{m} {a_{k} V_{i - 1,i}^{{b_{k} }} } d_{i - 1,i} } ,$$
(12)

where \(\widehat{f}(V)\) is approximated objective function of original objective function and \(\widehat{g}(V_{i - 1,i} )\) is approximated posynomial function of fuel consumption \(g(V_{i - 1,i} )\) within operation range of ship speed. This approximation is always valid in this problem because the original objective function is convex, (i.e., coefficient of second order is positive) then, this function can be approximated by posynomial (see [1] Sect. 8.1 for detail). By approximation of objective function, the optimization problem can be reformulated as in (13):

$$\begin{aligned} \hbox{min} f(V) \approx \widehat{f}(V) = \sum\limits_{i = 1}^{n} {\widehat{g}(V_{i - 1,i} )d_{i - 1,i} } \; = \;\sum\limits_{i = 1}^{n} {\sum\limits_{k = 1}^{m} {a_{k} V_{i - 1,i}^{{b_{k} }} } d_{i - 1,i} } \hfill \\ {\text{subject to}} \hfill \\ \sum\limits_{i = 1}^{n} {\frac{1}{{T\lambda_{i}^{{\prime }} V_{i} }}\; \le \;1} \hfill \\ V_{\hbox{min} } V_{i}^{ - 1} \; \le \;1 \hfill \\ V_{\hbox{max} }^{ - 1} V_{i} \le 1,\;i = 1,\ldots,n \hfill \\ \end{aligned}$$
(13)

This problem can be solved using the CVX tool utilizing SDPT3 [1] program as a solver which is a MATLAB software package for semi-definite programming.

6 Numerical simulation

To validate the proposed method, a simulation was conducted based on the route between Tokyo and San Francisco in two cases: a 10-day voyaging schedule and an 8-day voyaging schedule. These two cases were selected because the design speed of subject ships is very high at present; thus it was necessary to simulate lower speed and service speed cases. The subject ship was an 8000 TEU container ship, which was originally designed with 23.5 knots as the service speed, and the detailed major dimensions of the ship are given in Table 3. According to sea trial data, the interpolated function between speed of ship and engine output by 3rd order polynomial is \(P = 118.8V^{3} - 1981V^{2} + 10110V\;(kW)\), where \(V\;({\text{m/s)}}\) is ship speed and \(P\;(\text{kW} )\) is engine output. The weather information was provided by ECMWF (http://data-portal.ecmwf.int/) and the voyaging schedules were from May 1, 2013 to May 10, 2013 for the 10-day voyage with speed range 16.5 to 21.5 knots, and from May 1, 2013 to May 8, 2013 for the 8-day voyage with speed range 21.5 to 26.5 knots. The environmental data were updated every 6 h and the information resolution was 1.5° for latitude and longitude. To calculate the speed reduction and to consider the IMO safety regulations, significant wave height, wave direction, wave duration, and wind speed information were acquired. The grid was designed to have distance intervals of 1.5° longitude and 0.5° latitude. The searching domain to generate an optimal route in Phase 1 is bounded above and below by 5° latitude space along the great circle route as shown in Fig. 2. The latitude interval was finely divided compared to longitude interval to have various heading angles of a ship and the number of node connections in each time interval of Phase 1 is nine. Figure 2 shows grid system of Phase 1 briefly. In the simulations, three voyaging scenarios were tested for each simulation case: sailing with the optimized speed schedule; sailing with a constant engine output rate, and sailing with a constant ship speed, which compensated for the speed reductions caused by the ocean environment via additional engine output. The constant engine output and speed did not violate the time constraint and operation range constraint. Figures 3 and 4 show the simulation results and Table 4 gives the fuel consumption for each voyaging scenario.

Table 3 Nondimensionalized principal dimensions of the subject ship
Fig. 2
figure 2

Grid system design

Fig. 3
figure 3

Eight-day voyage scenario (Case1)

Fig. 4
figure 4

Ten-day Voyage Scenario (Case 2)

Table 4 Comparison of fuel consumption

Figures 3 and 4 show the optimized routes, great circle route, and the routes when the heuristic value is changed for the two simulation cases. As shown in Figs. 3 and 4, the routes generated by setting higher BN are different from the optimal route, which implies that the heuristic values with higher BN lost admissibility. A comparison of the two figures shows that the optimized routes differed even though the simulations occurred in the same ocean environment. This is because the location of the ship might be different at each time step and the route will be optimized accordingly. Figures 5 and 6 show the engine output and actual ship speed at each time step. The comparison of actual cost and heuristic value is presented in Fig. 7 to see the admissibility of heuristic value in Phase 1. Comparisons of the results for the scenarios shown in these figures and the time history of the significant wave height in Fig. 8 indicate that bad weather occurred 40–60 h after the departure of the ship. The engine output of the constant speed voyage exceeded the normal output range to compensate for the reduced speed, whereas the speed of the scheduled engine output only increased slightly. In Figs. 9, 10, and 12, the results indicate that the ship sailed into bad weather about 80 h after departure. Based on these results, optimal speed scheduling appears to be a reasonable voyaging strategy (engine output) in bad weather, which is validated by the reduced fuel consumption shown in Table 4. In Figs. 9, 10 and 12, the speed reduction is not so great around 200 h into the voyage, although the wave height was greater than that at 80 h. This was because the encounter angle between the ship and the waves was different. Table 2 shows that \(\mu\) depended on the encounter angle and we can infer that \(\mu\) was a small value. As shown in Figs. 7 and 11 the heuristic value by setting BN = 2 is always smaller than the actual cost. Therefore, the heuristic value is not overestimated and it is admissible. Analysis of the time history of the significant wave height during the voyages as shown in Figs. 8 and 12 reveals that the overall significant wave height was smaller in the optimal route than that of great-circle route; thus we can conclude that an appropriate optimal route was obtained compared with the great-circle route. Therefore, the A* algorithm is also an appropriate algorithm to get an optimal route in Phase 1 of the weather routing problem.

Fig. 5
figure 5

Engine output for the 8-day voyage scenario (Case 1)

Fig. 6
figure 6

Ship speed for the 8-day voyage scenario (Case 1)

Fig. 7
figure 7

Comparison on actual cost and heuristic value (Case 1)

Fig. 8
figure 8

Time history of the significant wave height (Case 1)

Fig. 9
figure 9

Engine output for the 10-Day Voyage Scenario (Case 2)

Fig. 10
figure 10

Ship speed for the 10-day voyage scenario (Case 2)

Fig. 11
figure 11

Comparison on actual cost and heuristic value (Case 2)

Fig. 12
figure 12

Time history of the significant wave height (Case 2)

Table 4 shows that the voyaging scenario with the optimally scheduled speed had a lower fuel consumption compared with the other two scenarios. If we set the fuel consumption with a constant speed voyaging scenario as the comparison target, the speed scheduling strategy resulted in 3.2 and 2.1 % reductions in fuel consumption. Therefore, these two simulations demonstrate the benefit of the proposed method.

7 Conclusion

In this study, we proposed a new method to solve the weather routing problem. An excessive number of iterations are required to determine the optimal heading angle and the speed of a ship; thus our method determines the optimal heading with a fixed ship speed using the A* algorithm and the scheduling speed is then obtained using geometric programming. The optimal route and speed of the ship at each time stage can then be obtained by repeating this procedure. The advantage of speed scheduling using geometric programming is that the optimization result is the global optimum based on the given information and it can optimize very efficiently because the optimization problem for Phase 2 was converted to a convex problem. To validate the proposed method, we performed two simulations and the results showed that the proposed method reduced the fuel consumption by 3.2 and 2.1 % compared with a constant speed voyage. The results of the simulations suggest that this method could be applied to the general weather routing problem and it may be a helpful tool for ship operation.