## 4 Discussion  
Meteorological and marine environment factors directly or indirectly cause damage to ships or the loss of ships [39]. In the field of maritime transport, in which cargo transport accounts for more than 90% of world trade [40], the relationship between ship safety and meteorological and marine environment factors has been broadly investigated. Recently, many researchers have studied the optimization of route planning to improve the safety of sailing ships [41; 42; 43; 44]. However, these planning models do not consider the constraints of the IMO guidelines, and there are few studies on the impact of ship vulnerability on vessel safety. The purpose of the revised IMO guidelines is to provide a basis for ship captains to make decisions about ship operations in bad weather and sea conditions, thereby helping them avoid the dangerous phenomena they may encounter in such conditions, including surf-riding and broaching-to phenomena, a reduction in intact stability when riding a wave crest amidships, synchronous rolling motion, parametric roll motions, and successive high-wave attacks. The empirical equation of the IMO guidelines is not sufficient and can only avoid most of the common risks to ships. Moreover, the sudden change in a ship's state while sailing at sea is a highly chaotic nonlinear system, and the unfavorable combination of ocean parameters and the ship's state may lead to dangerous situations. In this study, we take the empirical formula of the IMO guidelines as the basis of the principle of avoiding danger, while for dead ship conditions, excessive accelerations, and other situations that cause ship instability and damage, further research into and the prediction of these nonlinear dangerous situations are significant for the optimization of the weather route model. Therefore, based on this study, we can continue to study the influence of ship stability under dynamic constraints from the perspective of ship dynamics and add these constraints into the multi-objective programming model. In this study, meteorological and marine environment factors and the vulnerability of ships are integrated by a multi-layer fuzzy comprehensive evaluation to obtain a risk assessment value. Meanwhile, the IMO guidelines are taken as hard constraints, and the bidirectional A* algorithm is used for route planning. If risk and the IMO guidelines are not considered during the voyage from Colombo, Sri Lanka to Djibouti, the bidirectional A* algorithm is used for route planning, the route of which is marked as WrouteB, compared with IBA*routeB, and the result is shown in Figure 16.  
Figure 15: Average risk value of planned routes under different roughness allowance factor scenarios. In Figure 16, when risk and the IMO guidelines are not considered, WrouteB enters the high-risk area around 27 June, while IBA*routeB bypasses the high-risk area. It can be understood that the consideration of risk and the IMO regulations is therefore very important for the safety of sailing ships. In previous studies, common algorithms to solve the pathfinding problem have included the Dijkstra and A* algorithms. Compared with Dijkstra, the A* algorithm not only considers the distance from the start node to the current node, but also considers the estimated cost from the current node to the end node. However, the area involved in the ocean route is large and the timespan is long, so more efficient algorithms are needed for route planning. The bidirectional A* algorithm, an improvement on the A* algorithm, searches the intersection points from the start node and the end node at the same time, thus reducing the number of nodes to search and improving the search efficiency.