MODEL OF WORKING SHIP CROSSING CHANNEL

An application method for working ship crossing safely is proposed to determine how to make navigation scheme at a certain time. This method makes it possible for decision makers to make reasonable judgments at different times. In this paper, the position relationship between working ship and navigation vessel in waterway is analysed by considering the ship size, hydrological conditions of waterway, ship arrival model and ship navigation trajectory. Using genetic algorithm, the operation scheme of keeping a safe distance between the working ship and the vessel in the channel is solved by taking the speed and direction of the working ship as genetic factors. By analysing the crossing scheme at each starting time in a given time range, the optimal crossing scheme with the farthest distance between the working ship and the vessels in the channel is obtained. According to the measured data, the simulation is carried out with MATLAB to verify the model of working ship crossing channel. The results show that it is safe and reliable to choose the navigation scheme proposed in this paper, which has strong application value.


Introduction
The working ship navigates between different working areas in the channel to perform work tasks.Due to the uncertain location of the working area, working ships cross the channel more frequently than other vessels.However, most working ships have low speed and poor flexibility.The possibility of collision is really high.
There are many reasons for collision avoidance failure, such as human failures [1].According to statistics, more than 80% of ship collision accidents are caused by human error [2].The International Maritime Organization (IMO) has been devoting to the research on the technologies and regulations of the Maritime Autonomous Surface Ship (MASS) in recent years [3].It is very important to establish the ship autonomous anti-collision model, which can provide a reasonable navigation scheme for the operator and reduce the operation accidents.
In the process of working ship navigation, the surrounding environment is uncertain, so it is necessary to plan the collision avoidance path through real-time data [4].Automatic identification system (AIS) and the electronic chart display and information system (ECDIS) are very helpful for this [5].Three basic processes of determining evasive solutions are motion prediction, conflict detection, and conflict resolution [6].Firstly, the motion and trajectory of the ship are analysed, then the collision risk is evaluated, and finally the collision is avoided by different ways.
Chen Qi [7] introduced the ship-following model with fully considered of relevant factors such as vessel type, ship maneuverability and dangerousness of port`s goods is proposed, from which the equations of safety interval under different safety condition levels are specified respectively.Hou Haiqiang [8] calculated the minimum safety distance by analysing the speed distribution of different vessel clearance.Li Xiaoyu [9] designed an adaptive sampling collision avoidance trajectory generation algorithm based on the classical velocity obstacle method for autonomous collision avoidance in Multi-ship encounters.Yang Baicheng [10] focused on the decision problem of collision avoidance action of ships under the situation of multiple ships, based on the improved simulated annealing algorithm, proposed a calculation method of ship steering avoidance.He Yixiong [11] studied the static collision avoidance mechanism (combining the methods of ship domain and speed obstacle theory) and the course control system (combining the fuzzy adaptive PID control and ship motion equations), and set a dynamic ship collision avoidance mechanism.Cheng Zhiyou et al [12] put forward the technology of traffic conflict to measure the collision risk of single vessel crossing ship flow, and analysed the collision avoidance characteristics of passenger ferry on Yangtze River trunk from four aspects: passenger ferry navigation environment, passenger ferry maneuverability, personnel quality and collision avoidance characteristics; combined with inland river collision avoidance rules and good craft requirements, the collision avoidance characteristics of passenger ferry on Yangtze River trunk line were analysed.Ma [13] proposed a method to predict collision risk of ships in passenger-ferry waters by confirming collision risk and collision avoidance path on the basis of machine speed obstacle algorithm.Wang HB [14] proposed a hybrid self-organizing scheduling method for restricted two-way waterways, with Vessel Traffic Service centre managing the direction of traffic flow according to the navigation situations.
However, most of the papers focus on collision avoidance in the case of multi vessel encounter, and few on the gap between vessels.Due to the similarity between ship crossing clearance and pedestrian crossing, the optimization of pedestrian crossing is also included in the reference.Zhao Jia [15] analysed the distance between the pedestrian and the incoming vehicle, the velocity of the vehicle and the allowed gap for crossing to build a psychological distance model for the pedestrian crossing the street safely and a multivariate Logistic regression decision model.Jairus [16] described the behaviour of the drivers under illegal pedestrian crossing circumstances by proposing an extended car-following model.Yang Qi [17] analysed the conflicts between pedestrians and vehicles, constructed a cellular automata model for pedestrian-vehicle interactive operation in signalized intersection, which determined the specific pedestrian crossing shape.Chaudhari Avinash et al [18] analysed the pedestrians' decisions whether to cross the street at unprotected mid-block crosswalks, determined that the traffic gap size, pedestrian speed, vehicle speed, concentration on gap are the parameters, which influences the pedestrian crossing decisions.Cao Yu [19] used the critical gap method in the Gap Acceptance Theory to determine the critical value of deceleration to avoid conflicts for cars.But there are differences as well.Working ship has no control measures in waterway.Compared with pedestrians and vehicles on the road, working ships have poor flexibility and are unable to stop in time.
Therefore, this paper analyses the position relationship between the working ship and the navigation vessel in the channel by considering the four factors of ship size, hydrological conditions, ship arrival model and ship navigation trajectory, and constructs the clearance model of working ship crossing.Using genetic algorithm, taking the velocity (include magnitude and direction) of working ship as genetic factors, this paper predicts whether the working ship can cross the clearance between the navigating vessels in the channel, and obtains the optimal crossing scheme by adjusting the crossing time of the working ship.The result obtained by this research is the necessary premise of ship guidance, which can ensure the safety of the ship in the process of navigation.It is also the basis of channel capacity calculation.At the same time, in the process of ship route planning, it is inevitable that ships will cross the main channel, which can get help from this study.

Problem Description
In the channel, the direction of the ship is divided into two directions: upstream and downstream.At the same time, due to the needs of production and life, there are often fishing, dredging or other offshore operation areas in the channel, and the distribution of working ships in the operation area is more intensive.On the way to the operation site, the working ship needs to cross the channel.When facing the channel with multiple operation areas, the working ship can take two kinds of navigation paths: bypassing the operation area and crossing the operation area, as shown in Figure 1.It can be easily seen in the figure that if we find a way for the ship to cross the operation area, the navigation distance can be significantly reduced.The location of the working ship is uncertain, and there is no fixed sign on the chart, which makes the vessels lack vigilance.Therefore, to judge whether the working ship can cross the channel, it is necessary to comprehensively analyse the navigation track of the navigating vessel in the channel and the navigation track of the working ship to determine the position of the ship.In order to accurately predict and judge the navigation trajectory of working ship, it is necessary to analyse the navigational speed and direction angle.By the way, the flow in the channel is not static, and the hydrological conditions and other factors should also be included in the analysis.At the same time, the ship in the water can`t be simply regarded as a particle, and the influence of ship type should be considered.There are various forms of ship arrival in waterway, including continuous arrival model, Robertson geometric distribution model and Poisson distribution model.
In order to ensure the safety of the working ship crossing the channel, the commonly used method is to send signals to the vessels around the working ship to make them slow down, so that the working ship can cross the channel smoothly.In order to avoid the influence on the surrounding vessels, this paper analyses the distance between the surrounding vessels and the working ship at each time under different crossing schemes to judge whether the working ship can successfully cross the channel at that time.In this paper, it is considered that the working ship crosses the channel at a constant speed and it uses two steering angles when crossing the vessel in upstream and downstream.As long as there is no intersect between the working ship's trajectory and the normal navigation ship's trajectory in the channel at the same time and space, then it can be considered that the working ship can be safe and does not affect the ships on the channel to cross the channel.At the same time, we supposed that the maneuverability of the ship is good enough to navigate according to the navigating scheme.

Navigation trajectory of vessels navigating in the channel
We defined the nearest vessel to the working ship in downstream as vessel i , whose velocity is marked i v .Similarly, the nearest vessel to the working ship in upstream is vessel j, whose velocity is marked j v .As the flow in the channel is not static, it has velocity and direction, the flow velocity is expressed by s v , and the direction angle of it is expressed by  , taking the channel direction as the horizontal direction.The trajectory is obtained by the vector combination of ship velocity and flow velocity as shown in Figure 2.

Fig.2 Motion vector of vessel i and j
Setting the vector of the vessel's velocity and the flow velocity in the vertical direction to 0. v sin sin 0 sin sin 0 where i  is the angle of velocity for vessel i , j  is the angle of velocity for vessel j.
The following variables is obtained by transformation: Model of working ship crossing channel Zhang He, Hao Yuanyuan Xu Cheng, Qin Luying 129 sin sin The actual speed in horizontal direction of the vessel i, pi v , and the actual speed in horizontal direction of vessel j, pj v ,can be expressed.

Navigation trajectory of working ship
Take o to represent the working ship.v ok and k  represent the speed and direction angle of the working ship.When the working ship crosses the channel, it should pass through the vessels downstream and upstream separately.The velocity and direction angel are different in these two periods, marked with subscript k.When k takes 1, it refers the process when the working ship cross the vessels in downstream.When k takes 2, it refers the process when the working ship cross the vessels in upstream.The trajectory is obtained by the vector combination of ship velocity and flow velocity as shown in Figure 3.

The effective length of working ship
When the working ship navigates at k  , the working ship is inclined, as shown in The effective length in vertical direction can be expressed by: The effective length in horizontal direction can be expressed by: ( )

Clearance between working ship and navigation vessels
The distance between the working ship and the navigating ship in the channel refers to the distance when they are at the same horizontal plane.According to the ship's coordinates and dimensions, the following two processes of working ship crossing the ship in downstream direction and the ship in upstream direction are discussed.
(1) The clearance between working ship and the vessels in downstream At the initial moment 0 t ,the working ship is on its position to cross the channel.And it`s going to navigate to the demarcation line between upstream and downstream as shown in Figure 5.

Model of working ship crossing channel
Zhang He, Hao Yuanyuan Xu Cheng, Qin Luying Fig. 5 At the moment of 0 t ,working ship is ready to cross According to the coordinate relationship, we get the following variables: The vertical distance between the working ship and the vessel i : When the working ship navigates to the same horizontal plane to the vessel in downstream, if the working ship is behind it, the working ship should traverse from the aft of it.Otherwise if the working ship is in front of it, the working ship should traverse from the fore of it.The distance between the working ship and the aft of vessel i , hi L , and the distance between the working ship and the fore of vessel Where, ( )   , xy refers to the coordinate of the ship when the working ship crosses the downstream vessels; i l refers to the length of vessel i.
Sketch of working ship traversing from the aft of vessel i is shown in Figure 6.The working ship just reaches the underside of the vessel i.We get the following variables: The clearance between the working ship and vessel i, when the working ship gets the position to traverse from the aft of the vessel i: ( ) Sketch of working ship crossing from the fore of the vessel i is shown in Figure 7.The working ship just leaves the upside of vessel i.We get the following variables: The clearance between the working ship and vessel i, when the working ship gets the position to traverse from the fore of vessel i: (2) The clearance between working ship and the vessels in upstream After the working ship reaches the demarcation line between downstream and upstream, it required a period to change the direction angle.The moment when the working ship gets ready to cross the vessels in upstream is expressed.
Where, 1 Y refers to the width of the main channel in downstream direction, z t refers to the time required for working ship to adjust the direction angle.
At this time, the working ship is getting ready to cross the vessels in upstream, which is shown in Figure 4.After the change of direction angle, we use o and j to represent the working ship and vessel j.
Fig. 8 At the moment of According to the coordinate relationship, we get the following variables: The vertical distance between the working ship and the vessel j: Being similar to the process of working ship crossing the ship in downstream direction, the distance between the working ship and the aft of vessel 1 j − , 1 hj L − , and the distance between the working ship and the fore of vessel j , qj L ,are expressed.
hj-1 2 Where ( ) , x y   refers to the coordinate of the ship after the working ship changed direction angle, l j is the length of vessel j.Sketch of working ship traversing from the fore of vessel j is shown in Figure 9.The working ship just leaves the upside of the vessel j.We get the following variables: O＇ j＇ z qj Fig. 9 The working ship traversed from the bow of the vessel j The required time when the working ship navigates from the demarcation line to the position to traverse from the fore of vessel j : ( ) The clearance between the working ship and vessel j , when the working ship gets the position to traverse from the fore of vessel j : ( ) Sketch of working ship traversing from the aft of vessel j is shown in Figure 10.The working ship just reaches the downside of the vessel j .We get the following variables:

Feasibility judgment of crossing at one time
If the working ship is allowed to cross the navigating vessels at 0 t , the clearance between the working ship and the navigating vessel should be farther than the safe distance, expressed as Where, i z refers to the effective distance between working ship and vessel; j z refers to the effective distance between working ship and vessel j ; qi h refers to the safe distance when the working ship traverses from the fore of the vessel i ; hi h refers to the safe distance when the working ship traverses from the aft of the vessel i ; qj h refers to the safe distance when the working ship traverses from the fore of the vessel j ; hj h refers to the safe distance when the working ship traverses from the aft of the vessel j .

Feasibility judgment of crossing at any time in the given time range
In order to find out the most suitable navigation scheme of working ship in a given time range, from 0 t to n t .We use t n + 0 t to replace any time in the time range.The clearances between working ship and the vessels in channel are expressed.

Model of working ship crossing channel
Zhang He, Hao Yuanyuan Xu Cheng, Qin Luying 135 ( ) If the working ship is allowed to cross at Where, i z refers to the effective distance between working ship and vessel i ; j z refers to the effective distance between working ship and vessel j .
The start time of the working ship which keeps the longest distance from the ship in the channel is the most suitable starting crossing time.The navigation scheme at this time is the most suitable navigation scheme.

Model Solving
Genetic algorithm was first proposed by Professor J.H.Holland, which originated from the study of natural and artificial adaptive systems in the 1960s.[20] Genetic algorithm transforms the process of solving the problem into a process similar to the crossover and mutation of chromosome genes in biological evolution.It is a method to search the optimal solution by simulating the natural evolution process.In order to obtain the best and scheme of working ship crossing the channel in a given time range, it is necessary to solve and record every moment in the time range, and finally find the safest navigation scheme in the specified time range.
A single-chain real number coding scheme is used in this paper: each chromosome represents a navigation scheme consisting of the speed of working ship, the direction angle when the working ship crosses the vessels in downstream and the direction angle when the working ship crosses the vessels in upstream.
  M represents the population size.
The operation steps of genetic algorithm are as follows: Zhang He, Hao Yuanyuan Model of working ship crossing channel Xu Cheng, Qin Luying 136 Step 1: Initialization.Set the Maximum Generation.Generate M individuals randomly, as the genetic population.M takes 50 in this paper.
Step 2: Individual evaluation.Because genetic algorithm requires that the fitness of individuals must be non-negative.But it is possible for the distance between the working ship and the vessels in channel to go negative, i.e. a failed negative scheme which may cause collision.So the fitness function is selected as , where A is a large enough number to make 0 f  .At the same time, the fitness values of each individual in the population are calculated.A takes 20000 in this paper.
Step 3: Selection.Apply the selection operator to the population, according to the fitness value of individuals, some excellent individuals are selected to inherit to the next generation population, according to some rules or methods.In this paper, Roulette Wheel Selection method is used for selection operation, and the possibility of offspring retention is determined according to the proportion of fitness value of each individual in the population.For example, the fitness of an individual g m X is x f , and its probability of being selected is expressed as: The greater the individual fitness value, the greater the chance of being selected.Generate a random number in each round to determine the selected individual.
Step 4: Crossover.Apply the crossover operator to the population.Exchange some of chromosomes for the selected pairs of individuals in a certain probability c p to produce new individuals.c p takes 0.9 in this paper.
Step 5: Mutation.Apply the mutation operator to the population.Change one or some genes with a certain probability m p for the selected individuals to produce new individuals.After selection, crossover and mutation of () Pop g , the next generation population ( 1) Pop g + is obtained.Recalculate and sort the fitness values, and get ready for the next genetic operation.m p takes 0.04 in this paper.
Step 6: Judgment of termination conditions.The process continues until the specified number of generations is attained and acceptable or the best possible solution evolves [21].If the conditions are not met, go to step 2 and continue to evolve.max G takes 1000 in this paper.

Case Analysis and Simulation
According to the information (from http://www.shipxy.com/) of vessels and hydrological conditions at the Yangtze River Estuary, at 14:20, in March 12, 2020, the situation of the channel at this time is shown in Figure 11 and Table 1.
The width of the river here is 1500 meters.The upstream section is 700 meters, and the downstream section is 800 meters.The flow and the channel are in the same direction.And the speed of flow is 1 kn•h -1 .The arrival of vessels in channel arrive obey the Poisson distribution.The breadth of working ship is 10m, and the length of it is 50m.The speed of working ship is in range of 4.5 kn•h -1 to 6 kn•h -1 .The direction angle of it is in range of 70° to 110°.Only if the minimum effective distance is greater than 0, can the working ship cross the channel successfully.The navigating scheme at each starting crossing time is shown in Table 2.
Fig. 11 The Yangtze River channel  According to the simulation results, at the 780-th seconds, the minimum effective distance ( 780 z ) between the working ship and the vessels in channel is the farthest, which is the most suitable crossing time.The speed of working ship should be 5.97 kn/h, the direction angle when it crosses the vessels in downstream should be 108.92°, and the direction angle when it crosses the vessels in upstream should be 97.54 °.Under this crossing scheme, when the working ship navigates to the same horizontal plane as the ship in the channel, the positions of the working ship and the vessels in the channel is shown in the figure 13.The solid line represents the navigation track of the working ship.◀ represents the vessels in upstream and ▶ represents the vessels in downstream.It is obvious from the figure that during the navigation of the working ship, the working ship always keeps effective distance from the ship in the channel, which successfully avoids the occurrence of collision accidents.When the working ship navigates to the same horizontal plane as the vessels in the channel, the effective distance between the engineering ship and them is shown in Figure 14.All the effective distances in the figure are positive, which indicates that the working ship has no influence on the vessels navigating in the channel.That is to say, the working ship can navigate to the destination safely.

Conclusion
In this paper, the ship size, channel hydrological conditions, ship arrival model and other factors are comprehensively considered to predict the trajectory of working ship and navigating vessels in the channel.Through the analysis of the position relationship between the working ship and the navigation vessels in the channel, a trajectory model of working ship crossing clearance is constructed.With the help of genetic algorithm, the navigating scheme of keeping the maximum effective distance between the working ship and the vessels in channel at different starting crossing time is obtained.Finally, by comparing the effective distances in each scheme, the optimal navigating scheme of navigating speed and direction within a given time range are determined.The practicability of the model is verified by MATLAB simulation.At the same time, the model established in this paper can provide a clear suggestion to the working ship pilot, so as to avoid the ship collision accident caused by human error and improve the reliability and safety of decision-making.In the process of solving the model, a variety of crossing schemes are obtained, which is the basis of the next step of ship guidance.On this basis, according to the different needs of decision makers, it can be further optimized to achieve ship guidance.

Fig. 1
Fig.1 Paths of working ship crossing the channel with multiple operation areas

Fig. 3
Fig.3 Working ship velocity vectorThen the synthetic velocity of the working ship and flow, v pok , and the track angle of the working ship, k  , can be expressed.

Figure4.Fig. 4
Figure4.The effective length in vertical and horizontal are related to three factors: direction angle k  ,the breadth of working ship o b and the length of working ship o l .

Fig. 6
Fig.6 The working ship crossing from the stern of the vessel iThe required time when the working ship navigates from the ready position to the position to traverse from the aft of the vessel i:( )11

Fig. 7
Fig.7 The working ship crosses the bow of iThe required time when the working ship navigates from the ready position to the position to traverse from the fore of vessel i:( )11

Fig. 10
Fig.10 The working ship traversed from the stern of the vessel jThe required time when the working ship navigate from the demarcation line to the position to traverse from the aft of the vessel j :

X
represents one of the chromosomes, i.e. a navigation scheme; g represents generation; max G represents the largest generation; m represents the m-th individual of the population; hi qi hh = =260m， hj qj hh = =140m， 20 z ts = .Assuming that the working ship is going to navigate to the opposite bank from (0,0), the minimum effective distance within 0 to 1200 Model of working ship crossing channel Zhang He, Hao Yuanyuan Xu Cheng, Qin Luying 137 seconds are shown in the figure 12.

Fig. 12
Fig.12 Optimal solutions at all times

Fig. 13 Fig. 14
Fig.13 The position of vessels in channel when the working ship navigates to the horizontal plane where they are

Table 1
Vessel information statistics

Table 2
Optimal schemes at all times