## 1 Introduction  
Due to the nature of their business activity and complexity ports are highly challenging in regard to the development and implementation of a port safety management system (PSMS). Moreover, the interests of groups with opposing goals need to co-exist in ports. The Harbour Master plays a crucial role, being responsible for overall port safety, implementation of safety regulations and PSMS, information exchange, the environment, and security within the ports. Unfortunately, there is a lack of global regulation in this area [1]. There have been several attempts and case studies made to attempt to create such regulations [2], but there are serious obstructions, in particular because such a framework must satisfy global, regional, local, and industrial regulations. The global maritime community is subject to International Maritime Organization (IMO) regulation, where port should implement the International Ship and Port Facility Security Code (ISPS) as the general regulatory framework [3]. Detailed safety and security procedures are instead regulated by national rules of port regulations. The most comprehensive and elaborated legal framework for PSMS is the UK Port Marine Safety Code [1] which introduced a formal risk assessment including the As Low As Reasonably Practicable (ALARP) concept. A similar comprehensive concept has been implemented in New Zealand and is applied in other countries such as the U.S., Canada, and the Netherlands [4]. The risk management procedure applied according to this standard is based on the following steps: data gathering and familiarization, hazard identification, risk analysis, risk assessment, and risk control. Several attempts have been made to link IMO Formal Safety Assessment (FSA) [5] with PSMS, but serious limitations have been observed, such as the influence of different standards of operation, especially for dangerous cargo handling terminals; the influence of constantly changing port infrastructure; that serious maritime accidents in ports are rare events; the belief of decision makers that due to low energies and ship speed reduction in ports, the risk is lower than typically calculated; and that ship traffic influence and the significant influence of a human factor must be taken into account [6]. Port regulations (port bylaws) have a significant role in the safety management process as a major implementer of Risk Control Options (RCO). Additionally, several relevant documents exist in ports: terminal safety procedures, terminal operational procedures and procedures of accidents consequences mitigation (such as contingency planning). Port regulations are often created based on expert opinions (pilots, Harbour Master) using specific local knowledge. The dangerous cargo terminals (oil, gas or chemical) usually operate under an international industrial legal framework created by organizations such as Oil Companies International Marine Forum (OCIMF) or International Chamber of Shipping (ICF). This paper first presents the need of a port to assess the risk between the approaching and a moored ship. The risk is defined as a potential loss of property and the risk criteria are related to the revenue of the analysed port and the cost of an average accident. According to the risk calculation the probability of accidents is calculated for two different ports according to the specifics of the approaching channels and piloting procedures. Next, the consequences are analysed with the energy collision model supported by the kinematic model of mooring ropes. The result is the evaluation of the limit velocity of the ship approaching the terminal to keep consequences of a collision within a reasonable limit. The last is the evaluation of the risk applying the event tree approach considering the likelihood of the collision events and their consequences estimated in costs. The risk is presented with the F-N function comparing the two analysed ports. Again, accidents in port areas are rare events, especially those with significant consequences.