METHODOLOGY OF SYNTHESIS OF THE SUPERVISORS BY USING PETRI NET

The ever-increasing maritime traffic becomes a great threat to the safety of navigation particularly in confined waters. It is therefore necessary to develop new solutions in order to enhance the safety at sea. One of the possible solutions involves the control and management of vessel flow by radar supervision and automated guiding systems. This paper discusses the collision avoidance issue in the area of predefined routes and analyses real-life problems in maritime traffic by using appropriate software tools aimed at the enhancement of the safety of navigation. The goal of this study is to suggest a method for synthesizing the navigation supervisor by using Petri nets, which would monitor and control maritime traffic. The objective of installing a supervisor in the coastal centers is to prevent collisions and to improve safety in hazardous sea passages.


Introduction
There are a number of factors affecting the safety of the ship, people, environment and property at sea.These factors may lead to grounding, collision, fire, capsizing, propulsion failure, blackout, hull damage, pollution of the marine environment, and other accidents.The International Maritime Organization (IMO) seeks to implement new systems, such as e-Navigation in shipping, with the purpose of harmonizing the use of advanced navigation systems.
To avoid potential collisions in a dense traffic area, it is necessary to build a VTS (Vessel Traffic System).The VTS is the information system featuring a wide range of hardware and software modules that collect, integrate, analyze and present data from various sensors.The main aim of the VTS system is to provide the user with reliable and precise ''real-time'' information about the movement of ships and the interaction with other VTS shore systems.All information given by the VTS to operator has to enable: • Information and organization

58
• Reduced risk of marine operations • Enhancing of efficient navigation and port resources • Distribution of all information within VTS • Assistance during search and rescue operations and data logging of VTS information for further analyzing and administration purpose.Former researches associated with e-navigation have not dealt with the issue of traffic flow in narrow waterways, where the vessels' routes are defined by the waterway direction (predefined routes).The latter cannot be changed and the vessel supervision and sea traffic control is carried out by the shore-based centers.These areas cope with increased traffic flow and face the potential collision risks.In terms of navigation, these passages represent demanding areas generating a large amount of various information via the navigation devices, which increases the probability of human error.

Hypothesis
By using and upgrading the existing technologies, it is possible to considerably reduce the probability of collision situation in maritime heavy traffic areas.The enhancement of these systems is particularly useful in vessel traffic management in narrow passages where the routes are predefined and cannot be altered [1].

Methodology
One of the possible ways to minimize the risk of collision is to establish the coordination of the vessel traffic management performed by the Ship Traffic Control Center (STCC).This center can gather data about the number of vessels that are present in individual sea traffic sectors, i.e. in basic units of space, and about the times of vessels crossing from one sector to another.A sector is considered as a basic unit of time and represents a part of the navigation area through which the vessels sail on predefined routes.
The data can be obtained on the current position and speed of the vessel, with the aid of the radar, Automatic Identification System (AIS) or any other sensor system.It is necessary to build an appropriate supervisory system in narrow waterways, which would warn the STCC operator of the non-allowable ship maneuvering in the supervised area, in order to minimize the probability of human error that may result in collision, and to suggest possible solutions for avoiding collision situations.
The role of the supervisory system can be described by gaining an insight into a similar system that is integrated into the Automatic Radar Plotting Aid (ARPA) system on any ship: The ARPA system calculates the key CPA and TCPA parameters for any vessel within the predefined range.Officers on the bridge must pay special attention to all vessels having small values of CPA and TCPA (CPA < 1.0 NM and TCPA < 12 min), BCR = NM and BCT = 0 min.
In order to perform the synthesis of the supervisory system, the supervised area is divided into sectors (Figure 1), and the ship movement is modelled as a set of discrete and indiscrete events.Input data on conditions and events are gathered from the on-board devices such as ARPA, Electronic Charts Display Information System (ECDIS) [2], [3], [4] and AIS [5], [6].On the basis of the obtained discrete events, the supervisory system defines the risk of collision.The supervisory system selects dangerous situations and sends out warnings to the STCC operator.Taking the received information into consideration, the operator takes necessary measures by applying the shore-to-ship communication system and warning the officer of the watch or the master.In addition to selecting dangerous events and giving warnings to vessels, the supervisory system provides the following information about: • traffic density in the sector, • priorities given to vessels (vessel 1, 2, 3... n may have the priority in the crossing situation), and • duration of the overcapacity of the individual sectors.All data are graphically presented on the Electronic Prototype Displays (EPD) fitted both to the vessel and the shore-based center (Figure 1).

SUPERVISOR EPD DISPLAY INTEGRATED WITH ECDIS EQUIPMENT
Fig. 1 VTS system with the supervisor The supervisor consists of two parts: • Crossing supervisorsupervises ship movement through the crossings, and • Sector supervisorsupervises ship movement through the sectors.The crossing supervisor would monitor and manage the traffic flow in the respective crossings with respect to early warnings of impending dangers.The sector supervisor would track the route of the ship in a particular sector, and in the event that the ship does not follow a fixed (predefined) route, the supervisor alerts VTS operators and the ship.A predefined route is a trajectory of a vessel through a set of sectors.The sequence of crossings between sectors is defined and fixed.Each route can be determined by the STCC center before sailing through the area.Once the route is predefined, it cannot be changed until the passage is over.Each route can be given its capacity inside an individual sector Krs.The operator has to assign a predefined route, the priority P and importance W to every vessel entering the supervised area.The route's starting point is the source place, i.e. the place of entrance of the vessel into the supervised area, while the route's end is the sink place.The capacity of the predefined route Krs determines the maximum number of vessels on the route and depends directly on the capacity of the sector Ks that the routes are passing through.The capacity of the route in an individual sector is defined by the largest allowed number of vessels that can be present in the sector at the same time, i.e. by the number of place marks that the sector models within the route.The priorities allocated to vessels become important in the crossings, when the supervisory system controls the sequence of vessels' entrance into the crossing.In addition, a level of importance can be determined for any ship on the route.The importance defines how much capacity of the sector Ks a vessel uses upon entering the sector.
The sector represents a part of the navigation area through which the vessels sail, following their predefined routes.The sectors result from the process of discretization of the navigation area, i.e. through conversion of the continuous process of traffic flow into discrete states.The sectors are predefined areas integrated into the STCC system.The operator can change them by using a specially defined procedure.One or more predefined routes may pass through a sector.The supervisory system "sees" the vessels and their movement as a set of discrete states.The size of a sector is determined in line with the geographical configuration of the navigation area, general traffic flow and the sailing zones with plotted sectors.The number of vessels in a sector is determined by the sector's capacity Ks, as assessed by the STCC operator based on the traffic situation.The very configuration of the sector depends to a large extent on the depth of the water, i.e. the draft of the vessel sailing through a particular sector.
The crossing is defined as a sector where the routes intersectthe Crossing Traffic Zone.The crossing with priorities (Kp) is a type of crossing where the vessels with different priorities cross each other's routes.The allocation of priorities results in a situation where the vessels on higher priority routes have the priority when entering the crossing over the vessels coming from the lower priority routes.
If the transition is enabled then it is possible to fire the transition.By firing the transition, the state of the Petri net is changed [9], [10].
When the transition is fired: • The number of tokens in all input places t is reduced by the number of arc weights that connect the place and transition; • The number of tokens for all output p is increased by the number of arc weights that connect the transitions with places.

Results and discussion
The method of Petri nets based on P-invariants [11] is used for solving the problem of crossings and development of the crossing supervisor (Figure 2).Each of the routes shown in Figure 4 consists of three places (P): one marking the vessels prior to entering the crossing (entering place), another place within the crossing, and the third place marking the exit from the crossing.The entering places are P1 for route A, P3 for route B, P5 for route C and P7 for route D. Places within the crossing include PA for route A, PB for route B, PC for route C and PD for route D. The capacities of places PA, PB, PC and PD make one mark, which implies that two vessels using the same route cannot be present at the crossing at the same time.The exit places include P2 for route A, P4 for route B, P6 for route C and P8 for route D. Transitions (T) from T1 to T8 are time transitions, hence the net in Figure 4 is a Timed Petri net.Since the capacity of the sector Ks = 2 is defined, the valid relation is: The P-invariant method enables the calculation of the control place (C) or the crossing supervisor that limits the number of vessels within the crossing.Visual Object Net program has been used for the model simulation corresponding to Figure 3.This program has been used for designing the diagrams presenting the dynamics of the mark movement for places PA, PB, PC and PD.Transition times (T1, T2, T3, T4, T5, T6, T7 and T8) are equal to one minute.In the crossing featuring the priorities Kp, each vessel on the route is allocated a level of priority before entering the crossing.The vessel's priority is transferred to the transition at the entrance to the crossing.In this simulation, it has been assumed that: • Route A has the highest priority, so that the transition T1 in Figure 4 is given the highest priority (p = 4).• Route B has lower priority, so that the transition T3 is given the corresponding priority (p = 3).• The priority of route C is even lower, so that the transition T7 is given the priority (p = 2), • Route D has the lowest priority, so that the transition T5 is given the priority (p = 1).Using the previously defined priorities, the simulation of the crossing has produced the results in the following diagrams (Figures 5-8).It can be noted that the vessels on routes A and B (0-8.5 min) are entering the crossing simultaneously, while the vessels on routes C and D are waiting.Only after all vessels on routes A and B have passed, i.e. at the moment 8.5 min, the vessels from routes C and D can enter the crossing and passing it over the time interval from 8.5 to 16 min.The largest number of vessels that can be present in the crossing type Kp on all routes amounts to 1 vessel.
When performing the simulation for the crossing Kp in Visual Object Net program, it can be concluded that the vessels on the route A simultaneously pass through the sectors as do the vessels on the route B. The vessels on the route A have priority 4, whereas the vessels on the route B have priority 3.However, even though the vessels on route B have a lower priority of entrance into the crossing than the vessels on the route A, the route B follows the route A because the capacity amounts to two vessels, so that the crossing can handle one vessel from the route A and one more from the route B at the same time.Only after all vessels on routes A and B leave the crossing, the vessels from routes C and D can enter it, due to the lower priority of their routes.The total duration of passage of all vessels on routes A and B is up to 8.5 minutes, while routes C and D are passed within 8.5 to 16 minutes.
When simulating the above presented results there was no delay in the performance of Petri nets owing to inaccurate entering of priorities or other input parameters.Therefore it can be conclude that the model proves the assumption that the automated processes allow the supervision and management of the sea traffic flow without collision risks.

Conclusion
Petri nets can be used in simulation of traffic issues occurring due to increased traffic intensity.The Petri net is able to simulate the operation of an automated system fed by appropriate parameters which could deal with traffic issues and simulate maritime traffic with minimum delays and maximum flow of vessels.
The task of the supervising system is to control meeting situations in narrow waterways.Research results indicate that most of these issues are handled by man, typically a maritime officer.In busy navigation areas, there is a large amount of information that must be taken into account.Due to the shallow waters, proximity of the shoreline and other vessels, the probability of human error is increased.Automation of the supervision could minimize that risk.The suggested automated system does not require major investments as most of the equipment used in this research already exists on board.Upgrading would be necessary only in shore-based VTS centres.The system would require quality telemetry and communication devices (data transfer), as well as computers able to run demanding software.
The simulated solutions prove that, by inserting appropriate input (defined) parameters, it is possible to deal with congestion of busy navigation areas without traffic dead locks.
the supervisory system includes the following elements:  Definition of the sector size,  Definition of predefined routes, route capacity in an individual sector Krs, and the capacity of the sector Ks,  Definition of the crossing types and their capacity,  Creation of the Petri net of the real states -SPMP,  Creation of the Petri net of the allowed states -DPMP, and  Synthesis of the Petri net of the crossing supervisor -NPMP (DPMP + NPM = KPMP).Basic expressions used in the synthesis of the crossing supervisor include:  Predefined routes,  Sectors,  Crossings.

Fig. 2 a
Fig. 2 a) Petri net b) set of reachable states Figure 2 shows an ordinary Petri net.The Petri net has 6 places (p1 -p6), and 5 transitions (t1 -t5).Places represent states, and transitions represent events.There is one token in place p1, and the state of the net can be described by the vector m (p0).Firing if the transition t1 is possible if the relation (2) is satisfied, and after firing of transition t1, the state m (p1) is reached.From the state m (p1) it is possible to reach states m (p2) and m (p3).All possible states in the net are shown in Figure 2(b).

Fig. 3 63 Fig. 4
Fig.3 Traffic system with one crossing Figure3shows the sector S that represents a crossing through which four routes pass.A T-timed Petri net has been designed for solving the crossings K.The input parameter limits the capacity of the sector, i.e. the capacity of the crossing Ks = 2 and the capacity Krs = 1.

Fig. 5
Fig. 5 Number of ships in the crossing type Kp for Route A Figure 5 shows the number of vessels at specific time intervals for the route A in the crossing type Kp.The total duration of passage of all vessels on Route A is 8.5 minutes.

Fig. 6 Figure 6
Fig. 6 Number of ships in the crossing type Kp for Route B Figure 6 shows the number of vessels at specific time intervals for the route B in the crossing type Kp.The total duration of passage of all vessels on Route B is 8.5 minutes.

Fig. 7 Figure 7 Fig. 8 Figure 8
Fig. 7 Number of ships in the crossing type Kp for Route C Figure 7 shows the number of vessels at specific time intervals for the route C in the crossing type Kp.The total duration of passage of all vessels on Route C is 16 minutes.
-initial marking.An ordinary Petri net belongs to the group of autonomous Petri nets.The states in the discrete event system can be shown as places of Petri nets and events as transitions of Petri nets.The places and transitions of Petri nets form the nodes of basic Petri nets.The markings of Petri nets make the function , which assigns a non-negative number to a p of the Petri net.  m p l is the number of marks or "tokens" inside a place (circle).A Petri net state is vector n is the number of places in the Petri net.The elements () i mp of the vector m show the number of tokens in place i p .The initial state