## 3 Maritime Traffic Generator  
The maritime traffic generator creates a virtual maritime traffic environment similar to the actual maritime traffic environment. It consists of a generator based on absolute position (GAP) and a generator based on relative position (GRP). The maritime traffic environment can be categorized into two main factors: environmental elements such as waves, wind, and currents, and the ship's maneuvering and propulsion characteristics. The interaction of these factors ultimately manifests as changes in the positions of other vessels. This generator employs GAP and GRP to create positions for other ships that accurately reflect these characteristics. Therefore, it can be described as a maritime traffic generator that considers both environmental conditions and ship-specific features. Both generators generate virtual ships in their own ways and provide the user with a virtual maritime traffic environment through virtual data monitoring system. Figure 1 shows the configuration of the maritime traffic generator, which consists of GAP and GRP to generate the virtual ship data. GAP is a basic method to generate virtual ships. The user can create multiple scenarios according to the purpose and retrieve the virtual maritime traffic environment of the desired scenario through GAP [33]. Figure 2 shows the configuration of GAP, which generates virtual ships based on historical maritime data stored in the scenario database, and Figure 3 shows the scenario-related configuration of the simulation database, which consists of the Scenario, Scenario Ship, Traffic Ship, and Harbor Path tables. GRP generates virtual ships based on the encounter situation with the own ship, DCPA, TCPA, and distance. When GRP receives the virtual ship generation conditions and information of the own ship, the COLREG-based position judgment algorithm determines the positions of the virtual ships and the ship vector judgment algorithm determines the speed of ground (SOG) and course of ground (COG) of the virtual ships. Figure 4 shows the configuration of GRP. Figure 1: Configuration of the maritime traffic generator. Figure 4: Configuration of GRP. Figure 3: Scenario-related configuration of the simulation DB. Figure 2: Configuration of GAP. The COLREG-based position judgment algorithm receives the virtual ship generation conditions and data on the own ship and determines the positions of virtual ships based on the encounter situation and the distance between the own ship and virtual ships according to COLREG. The ship vector judgment algorithm determines the SOG and COG of the virtual ships according to the DCPA and TCPA conditions of the own ship and virtual ships through iterative methods after receiving the virtual ship generation conditions, information on the own ship, and the positions of the virtual ships determined by the COLREG-based position judgment algorithm. Algorithm 1 shows the pseudocode of the COLREG-based position judgment algorithm, which identifies encounter states such as overtaken, overtaking, head-on, and crossing based on the bearing of the encountering ship. Algorithm 2 shows the pseudocode of the ship vector judgment algorithm, which determines the SOG and COG that meet specific DCPA and TCPA criteria based on the ship's position.