# Simulation Study on an ICT-Based Maritime Management and Safety Framework for Movable Bridges
## 4 Principle of the Study
A simulation environment has been designed using Python programming language to demonstrate different conditions of the movable bridge automation process. The core modules that are incorporated to construct the simulation are the random and matplotlib packages. The simulation environment consists of two major segments: class creation and controlling the simulation. The graphical contents of the simulation have been designed using the AutoCAD designing tool. For a successful demonstration of the complete automation, a total of six classes has been introduced. The background is the class that creates the background of the GUI (Generic User Interface), including the buoy illustration, camera for detecting the traffic for counting purposes, the river, and label registry for each of the components in a complete scene. The cameras are considered as reference points in our simulation system to count the entry and exit number of passing vehicles. The Bridge class is the main component of the simulation environment which illustrated a swing bridge for the proposed simulation purpose. For a certain placement of the ship and the on-bridge road traffic, the bridge moves automatically. The Ship class illustrates a manually controllable ship and an ACC-enabled ship. This ship can sense other ships inside its shape domain and can control its velocity as per the requirements to avoid any type of collision. The manually controllable ship is the illustration of a ship that can be controlled via user input through the directional keypress and can be moved independently, although it will maintain all the rules of movable bridge automation to avoid clashes with the bridge. The controlling parameter is the velocity which can be controlled with a predefined interval. The Car class refers to the road traffics, which is automated and automatically generated at a regular interval from both routes. There are three colors: Red, Green, and Blue. While the bridge opens or closes, the cars standstill at a predefined distance from the bridge until the complete reformation of the bridge happens. The density and speed of the cars can be controlled via programming to perform different modes of automation. The Graph class is responsible for showing the graphs in the simulation GUI to indicate the timely changes in the velocity, the distance covered, and the distance from the bridge of the ship. The maximum data at any time in the plotted graph is equivalent to 100 samples. There are three graphical representations indicating the velocity of the ship, the distance covered by the ship, and the distance from ship to bridge. In all three graphs, the independent axis represents the time in hours which is synchronized evenly according to the real-life scenario. Figure 7 refers to the graphical representation used in the designed simulation. All the classes are stored in a module, which is then called the main simulation program. The program is a continuous one that generates a 1280 p \(\times\) 720 p display where all the other class components are positioned. The calling procedure of the classes is maintained by a layer-wise system, where the background will be the bottom-most layer, then the ship, the bridge, and the road traffic sequentially. The simulation is controlled accordingly to the mentioned methodology of automation, which will be elaborately discussed later in the article. Figure 7: Graphical representation of different parameters in the designed simulation.