## 3 Determination of Accident Scenarios and Probability  
One of the most appropriate approaches to assessing the safety of complex marine traffic engineering systems is the use of stochastic simulation models [8]. The model could be used for almost all navigational accident assessments, such as collisions, groundings, contact with fixed objects, indirect accidents such as anchor accidents or accidents caused by ship-generated waves. The model could comprise several modules responsible for different navigational accidents. The design of the collision model was divided into 4 stages. The main goal of this model is to calculate the probability of collision for a given type of encounter. Because there are no statistical data about collisions in the Gulf of Trieste and Koper, the probability calculated for the Baltic Sea was used. Stage I--Division of the encounters into characteristic types  
1. Head-on encounter--difference of headings 170\({}^{\circ}\)-190\({}^{\circ}\) and distance less than critical
2. Overtaking--difference of headings more than 350\({}^{\circ}\) or less than 10\({}^{\circ}\) and distance less than critical
3. Crossing--difference of headings (rest of cases) and distance less than critical  
The critical distances where navigators perform anti-collision manoeuvres was assumed on the basis of expert opinions separately for each type of situation. Stage II--Calculation of the number of encounters of each type  
For the southern part of the Baltic Sea, the overall number of encounters estimated by the simulation model is around 140,000 per year where 30% of them are head-on situations, 40% crossing and 30% overtaking. It could be done for the Gulf of Trieste, but due to lack of collision data it would be pointless. Stage III--Study of the statistical data and evaluation of the intensity of collisions  
For the southern part of the Baltic Sea the mean intensity of collision accidents equals 2.2 per year. Only the accidents on the open sea area were considered. Stage IV--Calculation of the probability of collision for a given type of situation  
To simplify the calculations, it was assumed that the intensity of collision was equal in all considered situations. Data for collision probability simulation were obtained from AIS data collection at each port. 1. Head-on encounter--0.73 collisions per year
2. Overtaking--0.73 collisions per year
3. Crossing--0.73 collisions per year  
The probability of collision for a given type of encounter can be calculated by using the following formula:  
\[Pc=\frac{I}{n_{ES}}\, \tag{4}\]  
where \(P_{C}\) is the probability of collision for a given type of encounter, \(I\) is the intensity of collision for a given type of encounter and \(n_{ES}\) is the number of encounters of a given type. The Poisson distribution is popular for modelling the number of times an event occurs in an interval of time or space and was here used to model the number of ships on each route [17; 22]:\[f(k,\lambda)=\frac{\lambda^{k}e^{-\lambda}}{k!}, \tag{5}\]  
where \(k\) is the number of ships occurring on a given route in one step of simulation and \(\lambda\) is the expected number of ships that occur during the one step of simulation. Coordinates of way points were modelled using two-dimensional normal distribution. The normal distribution of ship routes in a navigation channel was found from the analysis of ships AIS data for both ports and can easily be modelled. Each coordinate of each way point for a ship on a given route was generated separately with the use of the following formula:  
\[f(x)=\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(x-\mu)^{2}}{2\sigma^{2}}}, \tag{6}\]  
where \(\mu\) is the mean coordinate (latitude, longitude) of a way point and \(\sigma\) is the standard deviation. Several kinds of technical accidents with the highest expected consequences were analysed. The following accidents were taken into account:  
1. Passing ship is losing its propulsion but rudder is working (not considered in this study because the ship is controllable, so this accident type is also rare),
2.